/* Base styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

code {
    font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}

/* App container layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top bar */
.top-bar {
    background-color: #14544C;
    color: white;
    padding: 15px;
    text-align: center;
    height: 4vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar h1 {
    margin: 0;
    font-size: 1.2rem;
}

/* Content area */
.content {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.production {
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Green button styles */
.green-button {
    background-color: #14544C;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0 15px 0 0;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    font-weight: bold;
}

.green-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.green-button:not(:disabled):hover {
    background-color: #092421;
}

/* Red button styles */
.red-button {
    background-color: #d30000;
    color: white;
    border: none;
    padding: 8px 15px;
    margin: 0 15px 0 0;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    font-weight: bold;
}

.red-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.red-button:not(:disabled):hover {
    background-color: #990000;
}

/* Input field styles */
.input {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem;
    width: 250px;
    margin-bottom: 1rem;
}

.input:focus {
    outline: none;
    border-color: #14544C;
}

/* IP list styles */
.ip-list {
    list-style-type: none;
    padding: 5px;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    background: #f9f9f9;
}

.ip-list li {
    font-weight: bold;
    padding: 6px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ip-list li:last-child {
    border-bottom: none;
}

/* Table styles */
.settings-table-container {
    margin-top: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    background-color: #ffffff;
}

.settings-table-container h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #4a4a4a;
}

.settings-table-container table {
    min-width: 100%;
    border-collapse: collapse;
    text-align: center;
    width: 100%;
}

.settings-table-container th,
.settings-table-container td {
    border: 1px solid #d1d5db;
    padding: 1rem;
}

.settings-table-container th {
    background-color: #f3f4f6;
    color: #4a4a4a;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: normal;
}

.settings-table-container td {
    font-weight: 600;
}

.settings-table-container td:hover {
    background-color: #f3f4f6;
    transition: background-color 0.2s;
}

/* Status message styles */
.settings-error {
    margin-top: 1rem;
    color: #dc2626;
    font-weight: bold;
    text-align: center;
    font-size: 16px;
    padding: 12px 20px;
    border-radius: 8px;
    background-color: #fee;
    border: 2px solid #dc2626;
}

.settings-info {
    margin-top: 1rem;
    color: #14544C;
    font-weight: bold;
    text-align: center;
    font-size: 16px;
    padding: 12px 20px;
    border-radius: 8px;
    background-color: #e8f5e9;
    border: 2px solid #14544C;
}

.status-icon {
    font-size: 24px;
    font-weight: bold;
    margin-right: 10px;
    vertical-align: middle;
}

.success-icon {
    color: #16a34a;
}

.error-icon {
    color: #dc2626;
}

/* Select dropdown styles */
select {
    margin: 0 5px;
    padding: 3px 8px;
    font-size: 14px;
    background-color: #f0f4f7;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

select:hover {
    border-color: #14544C;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

select:focus {
    outline: none;
    border-color: #14544C;
}

/* Log viewer styles */
.log-viewer {
    width: 100%;
    height: 300px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 14px;
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #404040;
    border-radius: 4px;
    padding: 12px;
    line-height: 1.4;
    resize: vertical;
    box-sizing: border-box;
}

.log-container {
    margin-top: 20px;
}

.log-container h4 {
    margin-bottom: 10px;
    color: #4a4a4a;
}

/* Login form styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    color: #14544C;
    margin-bottom: 1.5rem;
}

.login-form .input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.login-form .green-button {
    width: 100%;
    margin: 0;
    padding: 12px;
}

/* Gateway status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-unconfigured {
    background-color: #9ca3af;
    color: white;
}

.status-configured {
    background-color: #fbbf24;
    color: #1f2937;
}

.status-tested {
    background-color: #22c55e;
    color: white;
}

.status-e2e_tested {
    background-color: #3b82f6;
    color: white;
}

.status-running {
    background-color: #f97316;
    color: white;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Utility classes */
.green-text {
    color: #14544C;
}

.ok-text {
    color: #16a34a;
}

.red-text {
    color: #dc2626;
}

.hidden {
    display: none;
}

/* Form layout helpers */
.form-row {
    margin-bottom: 1rem;
}

.form-row label {
    display: inline-block;
    min-width: 180px;
}

.button-group {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Checkbox styling */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
