* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', 'Source Sans Pro', sans-serif;
    background: #153867;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(21, 56, 103, 0.3);
    padding: 36px;
    max-width: 1080px;
    width: 100%;
}

h1 {
    color: #153867;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Brandon-grotesque', 'Open Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 28.8px;
}

/* Header with user info */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.header-title {
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.user-info span {
    color: #153867;
    font-weight: 600;
    font-size: 14px;
}

.btn-logout {
    padding: 6px 14px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    text-transform: uppercase;
}

.btn-logout:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.4);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 22.5px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 22.5px;
}

.form-group label {
    display: block;
    margin-bottom: 7.2px;
    font-weight: 600;
    color: #266ca9;
    font-size: 14.4px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 10.8px;
    border: 2px solid #67b8e3;
    border-radius: 8px;
    font-size: 14.4px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Open Sans', sans-serif;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #266ca9;
    box-shadow: 0 0 0 3px rgba(103, 184, 227, 0.2);
}

.radio-group {
    display: flex;
    gap: 25px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    color: #333;
}

.radio-label input {
    width: auto;
    margin-right: 6px;
}

.radio-label span {
    font-size: 14.4px;
}

h2 {
    color: #153867;
    margin-bottom: 18px;
    text-align: center;
    font-size: 21.6px;
    font-family: 'Brandon-grotesque', 'Open Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tab Navigation - File Folder Style */
.tab-navigation {
    display: flex;
    flex-wrap: nowrap;
    gap: 4.5px;
    margin-bottom: 0;
    border-bottom: 2px solid #67b8e3;
}

.tab-button {
    flex: 0 0 auto;
    width: 135px;
    white-space: nowrap;
    padding: 9px 14.4px;
    background: #e8f4fa;
    color: #266ca9;
    border: 2px solid #67b8e3;
    border-radius: 8px 8px 0 0;
    font-size: 11.7px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: 'Open Sans', sans-serif;
    position: relative;
    top: 2px;
}

.tab-button:hover {
    background: #d4ebf7;
    transform: translateY(0);
    box-shadow: none;
}

.tab-button.active {
    background: white;
    color: #153867;
    border-bottom: 2px solid white;
    font-weight: 700;
}

.tab-button:active {
    transform: translateY(0);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 27px 0;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

button {
    width: 100%;
    padding: 12.6px;
    background: #153867;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14.4px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Open Sans', sans-serif;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(38, 108, 169, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
}

button.btn-danger {
    background: #c82333;
}

button.btn-danger:hover {
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

.result-section {
    margin-top: 13.5px;
    display: none;
}

.result-section.show {
    display: block;
}

.result-section.success #deploymentLogs {
    border-color: #28a745;
}

.result-section.error #deploymentLogs {
    border-color: #dc3545;
}

#deploymentLogs {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 11.7px;
    line-height: 1.5;
    padding: 13.5px;
    border-radius: 8px;
    border: 2px solid #266ca9;
    height: calc(1.5em * 15 + 27px);
    max-height: calc(1.5em * 15 + 27px);
    width: 100%;
    overflow-y: scroll;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ANSI color classes for terminal output */
#deploymentLogs .ansi-bold { font-weight: bold; }
#deploymentLogs .ansi-black { color: #555555; }
#deploymentLogs .ansi-red { color: #ff5555; }
#deploymentLogs .ansi-green { color: #50fa7b; }
#deploymentLogs .ansi-yellow { color: #f1fa8c; }
#deploymentLogs .ansi-blue { color: #6272a4; }
#deploymentLogs .ansi-magenta { color: #ff79c6; }
#deploymentLogs .ansi-cyan { color: #8be9fd; }
#deploymentLogs .ansi-white { color: #f8f8f2; }

#deploymentLogs::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

#deploymentLogs::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 8px;
}

#deploymentLogs::-webkit-scrollbar-thumb {
    background: #67b8e3;
    border-radius: 8px;
}

#deploymentLogs::-webkit-scrollbar-thumb:hover {
    background: #266ca9;
}

hr {
    margin: 40px 0;
    border: none;
    border-top: 2px solid #67b8e3;
}

.copy-btn {
    position: absolute;
    bottom: 9px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #266ca9;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.copy-btn:hover {
    background: #153867;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 108, 169, 0.5);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn svg {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    #deploymentLogs {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 22.5px;
    }
}

/* Maintenance Tab Styles */
.maintenance-section h3 {
    color: #153867;
    margin-bottom: 10px;
    font-size: 18px;
}

.maintenance-section .description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.btn-secondary {
    background: #495057;
}

.btn-secondary:hover {
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

.btn-success {
    background: #1e7e34;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-success:hover {
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-warning {
    background: #e0a800;
    color: #212529;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.btn-warning:hover {
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
}

.orphaned-streams-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.orphaned-streams-section h4 {
    color: #153867;
    margin-bottom: 15px;
    font-size: 16px;
}

.no-orphans {
    text-align: center;
    padding: 20px;
    color: #28a745;
}

.no-orphans p {
    margin-bottom: 8px;
}

.no-orphans .info {
    color: #666;
    font-size: 13px;
}

.orphan-info {
    margin-bottom: 15px;
}

.orphan-info .info {
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

.streams-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.streams-table th,
.streams-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.streams-table th {
    background: #266ca9;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.streams-table td {
    font-size: 14px;
}

.streams-table tr:hover {
    background: #f1f3f4;
}

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

.error-message {
    color: #dc3545;
    padding: 15px;
    background: #f8d7da;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

.cleanup-results {
    padding: 15px;
}

.cleanup-results h4 {
    color: #153867;
    margin-bottom: 10px;
}

.cleanup-results ul {
    list-style: none;
    padding: 0;
}

.cleanup-results li {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 14px;
}

.cleanup-results .success-item {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cleanup-results .error-item {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Remove button in indexers table */
.btn-remove-indexer {
    padding: 4px 12px;
    background: #c82333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
}

.btn-remove-indexer:hover {
    background: #a71d2a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.btn-remove-indexer:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Install button in indexers table */
.btn-install {
    padding: 4px 12px;
    background: #218838;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    margin-right: 8px;
}

.btn-install:hover {
    background: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #67b8e3;
    background: #266ca9;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 28px;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
    box-shadow: none;
}

.modal-body {
    padding: 25px;
}

.install-section {
    margin-bottom: 25px;
}

.install-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.install-header h4 {
    color: #153867;
    margin: 0;
    font-size: 16px;
}

.copy-btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #266ca9;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn-small:hover {
    background: #153867;
    transform: translateY(-1px);
}

.command-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.install-note {
    color: #666;
    font-size: 13px;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #266ca9;
}

.install-note code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', monospace;
    color: #153867;
}

/* Admin Tab Styles */
.admin-section {
    max-width: 500px;
}

.admin-section h3 {
    color: #153867;
    margin-bottom: 10px;
    font-size: 18px;
}

.admin-section .description {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

.password-form .form-group {
    margin-bottom: 20px;
}

.password-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.password-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* API Key Management Styles */
.api-key-form {
    margin-bottom: 20px;
}

.btn-generate {
    padding: 10px 20px;
    background: #218838;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    white-space: nowrap;
}

.btn-generate:hover {
    background: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.new-api-key {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.api-key-warning {
    color: #856404;
    margin-bottom: 10px;
    font-size: 14px;
}

.api-key-value {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1e1e1e;
    padding: 12px;
    border-radius: 6px;
}

.api-key-value code {
    flex: 1;
    min-width: 0;
    color: #50fa7b;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.api-key-value .copy-btn-small {
    flex-shrink: 0;
}

.api-keys-list {
    margin-top: 20px;
}

.api-keys-list .loading-text {
    color: #666;
    font-style: italic;
}

.api-keys-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.api-keys-table th,
.api-keys-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.api-keys-table th {
    background: #266ca9;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.api-keys-table td {
    font-size: 14px;
}

.api-keys-table tr:hover {
    background: #f8f9fa;
}

.api-keys-table .key-name {
    font-weight: 600;
    color: #153867;
}

.api-keys-table .key-preview {
    font-family: 'Consolas', monospace;
    color: #666;
    font-size: 12px;
}

.api-keys-table .key-date {
    color: #666;
    font-size: 13px;
}

.api-keys-table .key-permissions {
    font-size: 12px;
    color: #266ca9;
}

/* =============================================================================
   User Management Styles
   ============================================================================= */

.user-form-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.user-form-section h4 {
    margin: 0 0 15px 0;
    color: #153867;
    font-size: 16px;
}

.add-user-form .form-row {
    display: flex;
    gap: 15px;
}

.permissions-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

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

.permission-desc {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.users-list-section {
    margin-top: 20px;
}

.users-list-section h4 {
    margin: 0 0 15px 0;
    color: #153867;
    font-size: 16px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.users-table th,
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.users-table th {
    background: #266ca9;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.users-table td {
    font-size: 14px;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.users-table .user-name {
    font-weight: 600;
    color: #153867;
}

.users-table .user-permissions {
    font-size: 12px;
    color: #266ca9;
}

.users-table .user-actions {
    display: flex;
    gap: 8px;
}

.current-user-badge {
    font-size: 11px;
    color: #28a745;
    font-weight: normal;
}

.btn-edit {
    padding: 4px 12px;
    background: #266ca9;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: auto;
}

.btn-edit:hover {
    background: #1e5a8c;
    transform: none;
    box-shadow: none;
}

.btn-delete {
    padding: 4px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: auto;
}

.btn-delete:hover {
    background: #c82333;
    transform: none;
    box-shadow: none;
}

.no-users {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* SSH Key Display */
.ssh-key-container {
    margin-top: 15px;
}

.ssh-key-container .loading-text {
    color: #666;
    font-style: italic;
}

.ssh-key-display {
    margin-top: 15px;
}

.ssh-key-info {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.ssh-key-type {
    background: #266ca9;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ssh-key-comment {
    color: #666;
    font-size: 13px;
    align-self: center;
}

.ssh-key-value {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #1e1e1e;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.ssh-key-value pre {
    flex: 1;
    color: #50fa7b;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    word-break: break-all;
    white-space: pre-wrap;
    margin: 0;
    line-height: 1.5;
}

.ssh-key-value .copy-btn {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: auto;
    padding: 8px 14px;
    background: #266ca9;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    box-shadow: none;
}

.ssh-key-value .copy-btn:hover {
    background: #1e5a8c;
}

.ssh-key-hint {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

.ssh-key-command {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.ssh-key-command code {
    flex: 1;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #333;
    word-break: break-all;
}

.error-text {
    color: #dc3545;
}

/* Edit User Modal */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.modal-actions button {
    width: auto;
    padding: 8px 20px;
}

.btn-revoke {
    padding: 4px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
}

.btn-revoke:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.no-api-keys {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Permanent Console */
.console-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e1e1e;
    border-top: 3px solid #266ca9;
    z-index: 900;
    transition: transform 0.3s ease;
}

.console-section.minimized {
    transform: translateY(calc(100% - 40px));
}

.console-section.minimized #consoleLogs,
.console-section.minimized .console-resize-handle {
    display: none;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px 0 0;
    background: #153867;
    color: white;
    font-weight: 600;
    font-size: 13px;
    gap: 8px;
}

.console-tab-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    padding: 6px 8px;
}

.console-tab-bar::-webkit-scrollbar {
    height: 4px;
}

.console-tab-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.console-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    max-width: 200px;
}

.console-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.console-tab.active {
    background: rgba(255, 255, 255, 0.25);
}

.console-tab-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.console-tab-status.running {
    background: #4dd0e1;
    animation: pulse 1.5s infinite;
}

.console-tab-status.success {
    background: #69f0ae;
}

.console-tab-status.error {
    background: #ff5252;
}

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

.console-tab-title {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

.console-tab-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}

.console-tab-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.console-controls {
    display: flex;
    gap: 8px;
}

.console-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.console-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.console-btn svg {
    display: block;
}

#consoleLogs {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 12px 16px;
    margin: 0;
    height: 200px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.console-resize-handle {
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 16px;
    color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.console-resize-handle:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

#consoleLogs::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#consoleLogs::-webkit-scrollbar-track {
    background: #2d2d2d;
}

#consoleLogs::-webkit-scrollbar-thumb {
    background: #67b8e3;
    border-radius: 4px;
}

#consoleLogs::-webkit-scrollbar-thumb:hover {
    background: #266ca9;
}

/* ANSI color classes for console */
#consoleLogs .ansi-bold { font-weight: bold; }
#consoleLogs .ansi-black { color: #555555; }
#consoleLogs .ansi-red { color: #ff5555; }
#consoleLogs .ansi-green { color: #50fa7b; }
#consoleLogs .ansi-yellow { color: #f1fa8c; }
#consoleLogs .ansi-blue { color: #6272a4; }
#consoleLogs .ansi-magenta { color: #ff79c6; }
#consoleLogs .ansi-cyan { color: #8be9fd; }
#consoleLogs .ansi-white { color: #f8f8f2; }

/* Add padding to main container when console is visible */
body.console-open .container {
    padding-bottom: 260px;
}

/* Console status indicators */
.console-section.success .console-header {
    background: #1e7e34;
}

.console-section.error .console-header {
    background: #b21f2d;
}

/* =============================================================================
   Configuration Editor Styles
   ============================================================================= */

/* Config Section Tabs */
.config-section-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.config-section-btn {
    padding: 8px 20px;
    background: #f8f9fa;
    color: #266ca9;
    border: 2px solid #e9ecef;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    top: 2px;
    width: auto;
}

.config-section-btn:hover {
    background: #e9ecef;
    transform: none;
    box-shadow: none;
}

.config-section-btn.active {
    background: white;
    border-color: #266ca9;
    border-bottom-color: white;
    color: #153867;
}

/* Config Sections */
.config-section {
    display: none;
}

.config-section.active {
    display: block;
}

.config-section h3 {
    color: #153867;
    margin-bottom: 10px;
    font-size: 18px;
}

/* Config Form */
.config-form {
    margin-top: 20px;
}

/* Config Group */
.config-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.config-group h4 {
    color: #153867;
    margin: 0 0 15px 0;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

/* Config Fields Grid */
.config-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.config-field {
    display: flex;
    flex-direction: column;
}

.config-field.config-field-wide {
    grid-column: span 2;
}

.config-field label {
    font-size: 13px;
    font-weight: 600;
    color: #266ca9;
    margin-bottom: 5px;
}

.config-field input {
    padding: 8px 12px;
    border: 2px solid #67b8e3;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.config-field input:focus {
    outline: none;
    border-color: #266ca9;
    box-shadow: 0 0 0 3px rgba(103, 184, 227, 0.2);
}

.config-field input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Password Field with Toggle */
.config-field-password {
    position: relative;
}

.config-field-password input {
    padding-right: 60px;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    bottom: 6px;
    padding: 4px 10px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
    width: auto;
}

.btn-toggle-password:hover {
    background: #5a6268;
    transform: none;
    box-shadow: none;
}

/* Config Warning */
.config-warning {
    color: #856404;
    background: #fff3cd;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
}

/* Config Actions */
.config-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.config-actions button {
    width: auto;
    padding: 10px 25px;
}

/* Config Hosts List */
.config-hosts-list {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
}

.config-host-item {
    display: flex;
    gap: 15px;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f4;
    align-items: center;
}

.config-host-item:last-child {
    border-bottom: none;
}

.config-host-item .host-name {
    font-weight: 600;
    color: #153867;
    min-width: 180px;
}

.config-host-item .host-ip {
    font-family: 'Consolas', monospace;
    color: #666;
}

.config-host-item .host-user {
    color: #888;
    font-size: 13px;
}

.no-hosts {
    color: #888;
    font-style: italic;
    margin: 0;
    padding: 10px;
}

/* Loading Text */
.loading-text {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Responsive adjustments for config */
@media (max-width: 768px) {
    .config-fields {
        grid-template-columns: 1fr;
    }

    .config-field.config-field-wide {
        grid-column: span 1;
    }

    .config-section-tabs {
        flex-wrap: wrap;
    }

    .config-section-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Cluster Select Row */
.cluster-select-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cluster-select-row select {
    flex: 1;
    padding: 10px 15px;
    font-size: 16px;
    min-width: 300px;
}

.cluster-select-row .btn-success {
    padding: 10px 15px;
    font-size: 14px;
    white-space: nowrap;
}

/* Host Entry Styles */
.host-entry {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.host-entry input.host-name {
    flex: 1;
    min-width: 150px;
}

.host-entry input.host-ip {
    flex: 1;
    min-width: 150px;
}

.btn-remove-host {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    transition: background 0.2s;
}

.btn-remove-host:hover {
    background: #c82333;
}

.btn-add-host {
    margin-top: 5px;
    padding: 8px 16px;
    font-size: 13px;
}

.field-hint {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

/* Add Cluster Modal Adjustments */
#addClusterModal .modal-content {
    background: white;
    max-width: 700px;
}

#addClusterModal .modal-body {
    background: white;
    padding: 25px;
}

#addClusterModal .config-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#addClusterModal .config-group:last-of-type {
    margin-bottom: 15px;
}

#addClusterModal .config-group h4 {
    color: #153867;
    margin-bottom: 12px;
    font-size: 15px;
    margin-top: 0;
}

#addClusterModal .config-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

#addClusterModal .config-field {
    display: flex;
    flex-direction: column;
}

#addClusterModal .config-field label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

#addClusterModal .config-field input {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#addClusterModal .config-field input:focus {
    outline: none;
    border-color: #266ca9;
    box-shadow: 0 0 0 3px rgba(38, 108, 169, 0.1);
}

#addClusterModal .config-field input::placeholder {
    color: #999;
}

#addClusterModal .config-field.config-field-wide {
    grid-column: span 2;
}

@media (max-width: 600px) {
    #addClusterModal .config-fields {
        grid-template-columns: 1fr;
    }

    #addClusterModal .config-field.config-field-wide {
        grid-column: span 1;
    }

    .host-entry {
        flex-wrap: wrap;
    }

    .host-entry input {
        flex: 1 1 100%;
    }
}
