:root {
    --primary-color: #1976d2;
    --primary-light: #e3f2fd;
    --primary-dark: #0d47a1;
    --secondary-color: #546e7a;
    --bg-color: #f5f8fa;
    --card-bg: #ffffff;
    --text-color: #37474f;
    --text-light: #78909c;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --code-bg: #263238;
    --radius: 8px;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --sidebar-collapsed-width: 56px;
    --sidebar-expanded-width: 200px;

    /* Override Bootstrap primary to match our design */
    --bs-primary: #1976d2;
    --bs-primary-rgb: 25, 118, 210;
    --bs-link-color: #1976d2;
    --bs-link-hover-color: #0d47a1;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}


.app-header, .app-footer {
    flex-shrink: 0;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 10;
}

.app-header {
    height: 56px;
}

.app-footer {
    height: 40px;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    border-bottom: none;
}

.app-main {
    flex-grow: 1;
    overflow: hidden;
    padding: 0.75rem;
}

.app-main > .container-fluid,
.app-main .row {
    height: 100%;
}

.col-info, .col-input, .col-results {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.info-card, .input-card, .results-card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.info-card, .input-card {
    overflow-y: auto;
}

.results-card {
    flex-grow: 1;
    overflow-y: auto;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-section {
    margin-bottom: 1.25rem;
}

.app-description {
    font-size: 0.9rem;
    color: var(--text-light);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.input-control {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 1rem;
    padding: 0.75rem;
}

.query-textarea {
    min-height: 200px;
    line-height: 1.5;
    font-size: 1.05rem;
    resize: none;
}

.input-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.action-btn {
    padding: 0.25rem 1rem;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    color: var(--text-light);
    padding: 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    opacity: 0.4;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

#results-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.result-section {
    margin-bottom: 1.5rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.copy-btn {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
}

.sql-container {
    font-size: 0.85rem;
    padding: 1rem !important;
    max-height: 300px;
    overflow: auto;
    line-height: 1.5;
    background-color: #282a36 !important;
    color: #f8f8f2 !important;
    font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
    white-space: pre !important;
    tab-size: 4;
    -moz-tab-size: 4;
    border-radius: var(--radius);
}

.explanation-container {
    background-color: #f8f9fa;
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    line-height: 1.5;
}

.spinner {
    margin: 0 auto 1.5rem;
    width: 80px;
    text-align: center;
}

.spinner > div {
    width: 14px;
    height: 14px;
    background-color: var(--primary-color);
    border-radius: 100%;
    display: inline-block;
    animation: bounce 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
    animation-delay: -0.32s;
}

.spinner .bounce2 {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1.0);
    }
}

.accordion {
    margin-bottom: 1rem;
}

.accordion-item {
    border: none;
    margin-bottom: 0.25rem;
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    background-color: var(--primary-light);
    border-radius: var(--radius) !important;
    color: var(--primary-dark);
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.accordion-body {
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 0.8rem;
}

.columns-list {
    list-style: none;
    padding-left: 0.5rem;
    margin: 0;
}

.column-item {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.table-count {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-left: 0.5rem;
    font-weight: normal;
}

.update-sfmc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

/* Responsiveness — index.html (Builder) */
@media (max-width: 991.98px) {
    body {
        overflow: auto;
    }

    .app-wrapper {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .app-main-wrapper {
        overflow: visible;
    }

    .app-main {
        overflow: visible;
        padding: 0.75rem 0.5rem;
    }

    .info-card, .input-card, .results-card {
        height: auto;
        margin-bottom: 1rem;
        max-height: none;
        overflow-y: visible;
    }

    .col-info, .col-input, .col-results {
        height: auto;
        margin-bottom: 1rem;
    }

    #results-area {
        height: auto;
    }

    .result-section {
        height: auto;
        min-height: 200px;
    }

    .query-textarea {
        min-height: 150px;
    }
}
/* --- Data Extension Name Validation --- */
.border-a {
    border: 2px solid #d1e7dd !important;
    background-color: #f8fdf9 !important;
}

.border-b {
    border: 2px solid #fff3cd !important;
    background-color: #fffbf0 !important;
}

.border-c {
    border: 2px solid #f8d7da !important;
    background-color: #fffbfd !important;
}

/* Score base colors — no padding here; use .score-label or .score-badge for sizing */
.score-a {
    background-color: #d1e7dd;
    color: #0a3622;
    border: 1px solid #a3cfbb;
    font-weight: 800;
}

.score-b {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
    font-weight: 800;
}

.score-c {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
    font-weight: 800;
}

/* Larger score pill (DE name validation in builder) */
.score-label {
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
}

/* Small score badge (table list items) */
.score-badge {
    padding: 2px 6px;
    font-size: 0.65rem;
    border-radius: 4px;
    font-weight: 800;
    margin-left: 8px;
    text-transform: uppercase;
}

#de-name-feedback {
    font-size: 0.85rem;
    line-height: 1.4;
}

#de-name-feedback div {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

#de-name-feedback i {
    margin-right: 0.5rem;
    font-size: 0.95rem;
}

/* ================================================================
   LAYOUT: APP WRAPPER + NAV SIDEBAR
   ================================================================ */

.app-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ---- NAV SIDEBAR ---- */
.app-sidebar {
    width: var(--sidebar-collapsed-width);
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.25s ease;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.app-sidebar:hover {
    width: var(--sidebar-expanded-width);
}

.sidebar-brand {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.sidebar-brand-icon {
    font-size: 1.3rem;
    color: var(--primary-color);
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.sidebar-brand-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.app-sidebar:hover .sidebar-brand-name {
    opacity: 1;
}

.sidebar-nav {
    flex-grow: 1;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    overflow: hidden;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-link i {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.sidebar-link span {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.app-sidebar:hover .sidebar-link span {
    opacity: 1;
}

.sidebar-link:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.sidebar-link-danger:hover,
.sidebar-link-danger {
    color: var(--danger-color);
}

.sidebar-link-danger:hover {
    background: #fdecea;
}

.sidebar-bottom {
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    white-space: nowrap;
}

.sidebar-user-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 700;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0;
    transition: opacity 0.15s;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.app-sidebar:hover .sidebar-user-name {
    opacity: 1;
}

/* ---- MAIN WRAPPER (right of sidebar) ---- */
.app-main-wrapper {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Scrollable page wrapper (for forms/settings pages) */
.scrollable-page {
    flex-grow: 1;
    overflow-y: auto;
}

/* Mobile sidebar */
.sidebar-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

@media (max-width: 767px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(calc(-1 * var(--sidebar-collapsed-width) - 4px));
        transition: transform 0.25s ease, width 0.25s ease;
        z-index: 200;
        width: var(--sidebar-collapsed-width);
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
        width: var(--sidebar-expanded-width);
    }

    .app-sidebar.mobile-open .sidebar-brand-name,
    .app-sidebar.mobile-open .sidebar-link span,
    .app-sidebar.mobile-open .sidebar-user-name {
        opacity: 1;
    }

    .sidebar-mobile-overlay.active {
        display: block;
    }

    .app-main-wrapper {
        width: 100%;
    }

    .app-sidebar:hover {
        width: var(--sidebar-collapsed-width);
    }
}

/* ================================================================
   PAGE: SELECT TABLES (Data Extensions management)
   ================================================================ */

.st-header {
    height: auto !important;
    padding: 0.75rem 1.5rem !important;
}

.st-search-container {
    flex-grow: 1;
    margin: 0 1rem;
    position: relative;
    z-index: 5;
}

.st-search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.st-search-input {
    padding-left: 40px;
    border-radius: 8px 0 0 8px;
    background-color: #f8f9fa;
}

.st-score-filter {
    max-width: 140px;
    border-radius: 0;
    background-color: #f8f9fa;
    border-left: 0;
    cursor: pointer;
    font-weight: 600;
}

.st-score-filter:last-of-type {
    border-radius: 0 8px 8px 0;
}

.st-header-left,
.st-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.st-main-content {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.st-table-sidebar {
    width: 400px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

.st-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #f1f1f1;
    background: #fafafa;
}

.st-table-list {
    overflow-y: auto;
    flex-grow: 1;
}

.table-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.table-item:hover {
    background-color: #f8faff;
}

.table-item.active {
    background-color: #e7f1ff;
    border-left: 4px solid var(--primary-color);
}

.table-item.selected-row {
    background-color: #f0f7ff;
}

.table-item.has-duplicate {
    border-left: 3px solid #ff9800;
}

.table-item.has-duplicate .table-item-name::before {
    content: "⚠ ";
    color: #ff9800;
    font-weight: bold;
}

@keyframes pulse-primary {
    0% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(25, 118, 210, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 118, 210, 0); }
}

.pulse-primary {
    animation: pulse-primary 2s infinite;
}

.table-item .form-check-input {
    margin-right: 12px;
    cursor: pointer;
}

.table-item-info {
    flex-grow: 1;
    min-width: 0;
}

.table-item-name {
    font-weight: 600;
    color: #333;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.table-item-meta {
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.st-detail-pane {
    flex-grow: 1;
    background: var(--bg-color);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

.detail-card {
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    height: fit-content;
}

.detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    height: 100%;
    width: 100%;
}

.detail-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 1.5rem;
}

.field-badge {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
}

.field-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #212529;
    word-break: break-all;
}

.field-type {
    font-size: 0.75rem;
    color: #6c757d;
}

.fields-table-wrapper {
    margin-top: 1.5rem;
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.fields-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.fields-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
}

.fields-table th {
    padding: 12px;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
    white-space: nowrap;
}

.fields-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    word-break: break-word;
}

.fields-table tbody tr {
    transition: background 0.15s ease;
}

.fields-table tbody tr:hover {
    background-color: #f8fbff;
}

.pk-indicator {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #e7f1ff;
    border-radius: 4px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.75rem;
}

.field-type-badge {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 500;
}

.table-info-row {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.info-value {
    font-weight: 600;
    color: #212529;
}

.salesforce-link {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.salesforce-link:hover {
    text-decoration: underline;
}

#sync-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
}

.audit-item {
    font-size: 0.85rem;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
}

.audit-item i {
    margin-right: 8px;
    margin-top: 3px;
}

.audit-pass { color: #198754; }
.audit-warning { color: #ffc107; }
.audit-fail { color: #dc3545; }

/* Select tables responsive */
@media (max-width: 991px) {
    .st-header {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
        row-gap: 0.75rem;
    }

    .st-header-left { order: 1; flex: 1; }
    .st-header-right { order: 2; flex: 1; justify-content: flex-end; }

    .st-search-container {
        order: 3;
        margin: 0 !important;
        max-width: none;
        width: 100%;
    }

    .st-main-content {
        position: relative;
    }

    .st-table-sidebar {
        width: 100%;
        position: absolute;
        height: 100%;
        left: 0;
        top: 0;
        transition: transform 0.3s ease;
        background: white;
    }

    .st-main-content.show-detail .st-table-sidebar {
        transform: translateX(-100%);
    }

    .st-detail-pane {
        width: 100%;
        padding: 1rem;
        position: absolute;
        height: 100%;
        left: 100%;
        top: 0;
        display: block;
        transition: transform 0.3s ease;
        background: var(--bg-color);
        z-index: 20;
    }

    .st-main-content.show-detail .st-detail-pane {
        transform: translateX(-100%);
    }

    #mobile-back-btn { display: inline-flex; }
}

#mobile-back-btn { display: none; }

/* ================================================================
   PAGE: NAMING SETTINGS
   ================================================================ */

.settings-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.ns-header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.title-accent {
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    margin-bottom: 15px;
}

.prefix-row {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.prefix-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.rule-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.rule-card:hover {
    background: #fafafa;
}

#prefix-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

#prefix-container::-webkit-scrollbar { width: 6px; }
#prefix-container::-webkit-scrollbar-track { background: transparent; }
#prefix-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ================================================================
   PAGE: LOGIN
   ================================================================ */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, #dce8f5 100%);
    padding: 2rem;
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(25, 118, 210, 0.12);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.login-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.login-tagline {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.login-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.login-steps {
    text-align: left;
    margin-bottom: 2rem;
}

.login-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.login-step-num {
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ================================================================
   COMPONENT: SKELETON LOADER
   ================================================================ */

.skeleton-loader {
    padding: 1rem;
}

.skeleton-line {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
/* =========================================================
   Record Explorer Modal
   ========================================================= */

.de-explorer-modal {
    max-width: 92vw;
    width: 92vw;
    height: 88vh;
    margin: 4vh auto;
}

.de-explorer-modal .modal-content {
    height: 88vh;
    display: flex;
    flex-direction: column;
}

.de-explorer-modal .modal-body {
    flex: 1 1 0;
    overflow: hidden;
}

.de-records-scroll-wrap {
    height: 100%;
    overflow: auto;
}

.de-records-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
    white-space: nowrap;
}

.de-records-table thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 2;
    border-bottom: 2px solid var(--border-color);
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}

/* Second header row (filter inputs) sticks below the first */
.de-records-table thead tr:nth-child(2) th {
    top: 31px;
    background: #fff;
    padding: 4px 6px;
    border-bottom: 1px solid var(--border-color);
}

.th-sortable {
    cursor: pointer;
}

.th-sortable:hover {
    background: #e9ecef !important;
}

.col-filter-input {
    width: 100%;
    font-size: 0.7rem;
    padding: 2px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
}

.col-filter-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

.de-records-table tbody td {
    padding: 5px 10px;
    border-bottom: 1px solid #f0f0f0;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.de-records-table tbody tr:hover td {
    background-color: var(--primary-light);
}

.row-hidden {
    display: none;
}

.re-filter-row th {
    z-index: 1 !important;
}
