/* Cognizant Professional Navy Blue Theme */
:root {
    --primary-navy: #03045e;
    --secondary-navy: #1e40af;
    --light-navy: #3b82f6;
    --accent-blue: #60a5fa;
    --light-blue: #dbeafe;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --dark-gray: #374151;
    --border-gray: #e5e7eb;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--light-blue) 100%);
    color: var(--dark-gray);
    min-height: 100vh;
}

/* ================= MAIN TAB LAYER (New) ================= */
.main-tab-nav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}

.main-tab-button {
    background: var(--light-gray);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.main-tab-button:hover:not(.active) {
    background: var(--light-blue);
    color: var(--primary-navy);
}

.main-tab-button.active {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.main-tab-content { display: none; }
.main-tab-content.active { display: block; }

.placeholder-section { 
    background: var(--white); 
    border: 2px dashed var(--border-gray);
    padding: 3rem 2rem; 
    border-radius: 12px; 
    text-align: center; 
}
.placeholder-section h2 { margin-bottom: 1rem; }
.placeholder-section p { opacity: 0.8; }

/* Info box for completion guidance */
.info-box {
    background: #cbf3f0;
    border: 1px solid #cbf3f0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}
.info-box p { margin-top: 0.5rem; }
.info-box.hidden { display: none; }

/* Tip box for transformation tab (light green background) */
.tip-box {
    background: #f1faee;
    border: 1px solid #e6f3ea;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark-gray);
}
.tip-box i {
    color: #2b9348;
    font-size: 1.25rem;
}

/* Read-only approval code background customization (applies to all approval textareas) */
#approval-code[readonly],
.approval-textarea[readonly] {
    background: #e9ecef !important;
}

@media (max-width: 900px) {
    .main-tab-button { flex: 1 1 calc(50% - 0.5rem); justify-content: center; }
}
@media (max-width: 520px) {
    .main-tab-button { flex: 1 1 100%; }
}

/* Header */
.header {
    background: radial-gradient(1200px 500px at 10% 0%, rgba(3,4,94,0.95) 0%, rgba(30,64,175,0.92) 40%, rgba(59,130,246,0.85) 100%),
                linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
    padding: 0;
    box-shadow: 0 10px 24px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.header-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.header-left { display: flex; align-items: center; gap: 1rem; }
.header-titles { display: flex; flex-direction: column; }
.header-title { font-size: 1.85rem; font-weight: 700; letter-spacing: 0.3px; }
.header-subtitle { font-size: 0.95rem; opacity: 0.9; font-weight: 500; }

/* Logo polish */
.brand-icon {
    width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: transparent; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

/* Ribbon accent on the right */
.ribbon-icon-large { width: 42px; height: 42px; opacity: 0.95; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }

/* Bottom accent bar */
.header-accent {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 30%, #93c5fd 60%, #dbeafe 100%);
    box-shadow: 0 2px 12px rgba(59,130,246,0.35);
}

@media (max-width: 640px) {
    .header-title { font-size: 1.35rem; }
    .header-subtitle { font-size: 0.85rem; }
    .brand-icon { width: 48px; height: 48px; }
    .ribbon-icon-large { width: 36px; height: 36px; }
}

/* Brand icon replacing font-awesome robot */
.brand-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 1rem;
    border-radius: 4px;
    /* Remove background and extra padding so PNG's transparent background shows through */
    background: transparent;
    padding: 0;
}

/* Header layout: stack title and subtitle, but align icon with title */
.header-content {
    display: flex;
    flex-direction: column; /* stack h1 and p */
    gap: 0.25rem;
}

/* Align icon and title on a single line while keeping subtitle below */
.header h1 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0; /* remove margin to keep subtitle spacing controlled by .header-content gap */
}

.header p {
    margin-top: 0.25rem;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Tab Navigation */
.tab-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: var(--light-gray);
    border-bottom: 2px solid var(--border-gray);
}

/* Ribbon logo within tab navigation */
.tab-ribbon-logo {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    background: var(--white);
    border-right: 2px solid var(--border-gray);
}

.tab-ribbon-logo .ribbon-icon {
    height: 44px;
    width: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 1024px) {
    .tab-ribbon-logo {
        justify-content: center;
        padding: 0.5rem 0.75rem;
    }
    .tab-ribbon-logo .ribbon-icon {
        height: 36px;
    }
}

.tab-button {
    flex: 1;
    padding: 1.25rem 2rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: var(--light-blue);
    color: var(--primary-navy);
}

.tab-button.active {
    background: var(--white);
    color: var(--primary-navy);
    border-bottom-color: var(--primary-navy);
}

.tab-button i {
    margin-right: 0.5rem;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 2rem;
    min-height: 600px;
}

.tab-content.active {
    display: block;
}

.section h2 {
    color: var(--primary-navy);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.section h2 i {
    margin-right: 0.75rem;
    color: var(--accent-blue);
}

/* Action Section */
.action-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-navy);
}

.action-btn {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: var(--white);
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.2);
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 58, 138, 0.3);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-btn i {
    margin-right: 0.5rem;
}

/* Spinner */
.spinner {
    color: var(--accent-blue);
    font-weight: 500;
    font-size: 1rem;
}

.spinner.hidden {
    display: none;
}

.spinner i {
    margin-right: 0.5rem;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.content-grid.full-width {
    grid-template-columns: 1fr;
}

.full-width {
    grid-column: 1 / -1;
}

/* Log Section */
.log-section {
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.code-section {
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.log-section h3, .code-section h3 {
    color: var(--secondary-navy);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.log-section h3 i, .code-section h3 i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
}

.log-container {
    background: #1a1a1a;  /* PowerShell blue background */
    color: #00ff00;       /* Light gray text like PowerShell */
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Consolas', 'Courier New', 'Lucida Console', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    height: 400px;
    max-height: 400px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #2d5aa0;
    white-space: pre-wrap;  /* Preserve whitespace and line breaks */
    word-wrap: break-word;  /* Handle long lines */
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.log-entry {
    margin-bottom: 0.5rem;
}

.log-timestamp {
    color: #888;
    margin-right: 0.5rem;
}

/* ANSI Color Classes for Terminal Output */
.ansi-black { color: #000000; }
.ansi-red { color: #ff6c6b; }
.ansi-green { color: #98be65; }
.ansi-yellow { color: #ecbe7b; }
.ansi-blue { color: #51afef; }
.ansi-magenta { color: #c678dd; }
.ansi-cyan { color: #46d9ff; }
.ansi-white { color: #ffffff; }
.ansi-bright-black { color: #5b6268; }
.ansi-bright-red { color: #ff665c; }
.ansi-bright-green { color: #7bc275; }
.ansi-bright-yellow { color: #fcce7b; }
.ansi-bright-blue { color: #729fcf; }
.ansi-bright-magenta { color: #c678dd; }
.ansi-bright-cyan { color: #46d9ff; }
.ansi-bright-white { color: #f8f8f2; }

.ansi-bg-black { background-color: #000000; }
.ansi-bg-red { background-color: #ff6c6b; }
.ansi-bg-green { background-color: #98be65; }
.ansi-bg-yellow { background-color: #ecbe7b; }
.ansi-bg-blue { background-color: #51afef; }
.ansi-bg-magenta { background-color: #c678dd; }
.ansi-bg-cyan { background-color: #46d9ff; }
.ansi-bg-white { background-color: #ffffff; }

.ansi-bold { font-weight: bold; }
.ansi-dim { opacity: 0.7; }
.ansi-italic { font-style: italic; }
.ansi-underline { text-decoration: underline; }
.ansi-blink { animation: blink 1s linear infinite; }
.ansi-reverse { 
    background-color: #f0f0f0; 
    color: #012456; 
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Code Section */
.code-section {
    position: relative;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-gray);
    padding: 0.75rem 1rem;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid var(--border-gray);
}

.code-header span {
    font-weight: 500;
    color: var(--dark-gray);
}

.copy-btn {
    background: var(--accent-blue);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--light-navy);
    transform: translateY(-1px);
}

.copy-btn i {
    margin-right: 0.25rem;
}

.code-container {
    background: #f8f9fa;
    border: 1px solid var(--border-gray);
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    height: 400px;
    max-height: 400px;
    overflow: auto;
    white-space: pre-wrap;
    margin: 0;
}

/* Approval Section */
.approval-section {
    background: var(--light-blue);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 2px solid var(--accent-blue);
}

.approval-section h3 {
    color: var(--primary-navy);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.approval-section h3 i {
    margin-right: 0.75rem;
    color: var(--accent-blue);
}

.approval-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    background: var(--white);
    transition: border-color 0.3s ease;
}

.approval-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.approval-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.approve-btn, .load-btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.approve-btn {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    color: var(--white);
}

/* Disabled state for approve button: greyed out and no pointer */
.approve-btn:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    opacity: 0.85;
    box-shadow: none;
}

/* Ensure no hover lift or shadow when disabled */
.approve-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.load-btn {
    background: linear-gradient(135deg, var(--warning-orange) 0%, #d97706 100%);
    color: var(--white);
}

.approve-btn:hover, .load-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.approve-btn i, .load-btn i {
    margin-right: 0.5rem;
}

/* Metadata status styling */
.metadata-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.metadata-status.success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.metadata-status.error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.metadata-status i {
    margin-right: 0.5rem;
}

.metadata-status.hidden {
    display: none;
}

/* Dual code panels (Tab 4) */
.two-codes .code-panel-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
}

.two-codes .code-section.half {
    flex: 1 1 48%;
    min-width: 380px;
}

.load-btn.mini, .copy-btn.mini {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
}

/* Dual approval grid */
.dual-approval .dual-approval-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dual-approval .approval-pane h4 {
    margin-bottom: 0.75rem;
    color: var(--secondary-navy);
}

.dual-approval .approval-pane {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1100px) {
    .dual-approval .dual-approval-grid {
        grid-template-columns: 1fr;
    }
    .two-codes .code-panel-group {
        flex-direction: column;
    }
    .two-codes .code-section.half {
        min-width: auto;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--success-green);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(100%);
}

.toast i {
    margin-right: 0.5rem;
}

/* ================= EXCLUDED COLUMNS ALERT ================= */
.alert-box {
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-box.warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.alert-box.warning .alert-header {
    color: #856404;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.alert-header i {
    font-size: 1.3rem;
}

.alert-body {
    color: #333;
}

.alert-body p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.excluded-columns-table-wrapper {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.excluded-columns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.excluded-columns-table thead {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.excluded-columns-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

.excluded-columns-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.excluded-columns-table tbody tr:hover {
    background: #f8f9fa;
}

.excluded-columns-table td:first-child {
    font-family: 'Courier New', monospace;
    background: #fff9e6;
    color: #856404;
    font-weight: 500;
    max-width: 250px;
    word-break: break-word;
}

.excluded-columns-table td:last-child {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Exception Action Buttons */
.exception-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    justify-content: flex-end;
}

.exception-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.exception-btn i {
    font-size: 1rem;
}

.accept-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

.revert-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.revert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.4);
}

/* Modal/Popup Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #1e3a8a;
}

.modal-header i {
    font-size: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-body {
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
}

.modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
}

.modal-btn-cancel {
    background: #e9ecef;
    color: #495057;
}

.modal-btn-cancel:hover {
    background: #dee2e6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: left;
    }
    .brand-icon {
        width: 96px;
        height: 96px;
        padding: 0; /* ensure no padding that creates a background box */
        margin-right: 0.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .approval-actions {
        flex-direction: column;
    }
}

/* Scrollbar Styling */
.log-container::-webkit-scrollbar,
.code-container::-webkit-scrollbar,
.approval-textarea::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track,
.code-container::-webkit-scrollbar-track,
.approval-textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb,
.code-container::-webkit-scrollbar-thumb,
.approval-textarea::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover,
.code-container::-webkit-scrollbar-thumb:hover,
.approval-textarea::-webkit-scrollbar-thumb:hover {
    background: var(--light-navy);
}

/* === Unified Transformation Approval (Single Pane + Dropdown) === */
.approval-inline {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.dropdown-label {
    font-weight: 600;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}
.file-select {
    padding: 6px 10px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
    min-width: 240px;
}
.file-select:disabled {
    background: #f3f3f3;
    cursor: not-allowed;
}

/* ================= SQL Generation Enhancements ================= */
#generated-sql-content,
#editable-sql {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    letter-spacing: 0.2px;
    tab-size: 4;
    color: #1e293b;
}

#generated-sql-content {
    max-height: 500px;
    background: #fafbfc;
    border: 1px solid #e1e4e8;
}

#editable-sql {
    min-height: 400px;
    max-height: 600px;
    background: #ffffff;
    border: 2px solid var(--secondary-navy);
    padding: 1rem;
    resize: vertical;
}

/* SQL Comment styling */
.sql-comment {
    color: #6a737d;
    font-style: italic;
}

/* ============================================================================
   AUTHENTICATION STYLES (Login/Logout Only)
   ============================================================================ */

/* Auth Run Bar */
.auth-run-bar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid var(--border-gray);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-user {
    font-weight: 600;
    color: var(--primary-navy);
}

.auth-user.anonymous {
    color: var(--dark-gray);
    font-style: italic;
}

.run-status {
    color: var(--secondary-navy);
    font-size: 0.9rem;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-form input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 180px;
}

.login-form input:focus {
    outline: none;
    border-color: var(--secondary-navy);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

.login-form button {
    padding: 0.5rem 1rem;
    background: var(--secondary-navy);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.login-form button:hover {
    background: var(--primary-navy);
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: var(--error-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 4, 94, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-modal {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-brand img {
    height: 60px;
    margin-bottom: 1.5rem;
}

.login-modal h2 {
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.overlay-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overlay-login-form input {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.overlay-login-form input:focus {
    outline: none;
    border-color: var(--secondary-navy);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.overlay-login-btn {
    padding: 0.875rem 1rem;
    background: var(--secondary-navy);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.overlay-login-btn:hover {
    background: var(--primary-navy);
}

.overlay-login-btn:active {
    transform: scale(0.98);
}

.login-hint {
    margin-top: 1rem;
    color: var(--dark-gray);
    font-size: 0.85rem;
}