body.etl-background {
    min-height: 100vh;
    background: url('/static/images/Novellus-BG.jpg') center center / cover no-repeat fixed;
    color: #1E2B3A;
}

.etl-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 43, 58, 0.78), rgba(30, 43, 58, 0.42));
    z-index: -1;
}

.etl-navbar {
    background-color: #AD965F !important;
    border-bottom: 2px solid #8B6914;
    min-height: 46px;
}

.etl-navbar .navbar-brand {
    font-size: 1rem;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1.1;
}

.etl-navbar .btn {
    padding: 0.18rem 0.45rem;
    font-size: 0.78rem;
    line-height: 1.2;
}

.etl-nav-btn {
    border-radius: 999px;
    font-weight: 700;
    color: #1E2B3A !important;
}

.etl-nav-btn:hover {
    background-color: #1E2B3A !important;
    color: #fff !important;
}

.btn {
    font-family: "Brother 1816", Arial, sans-serif;
    font-weight: 600;
    border-radius: 0.45rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #AD965F 0%, #8B6914 100%);
    border-color: #AD965F;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #8B6914 0%, #5D4409 100%);
    border-color: #8B6914;
    color: #fff;
}

.btn-secondary {
    background-color: #1E2B3A;
    border-color: #1E2B3A;
    color: #fff;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: #0F1923;
    border-color: #0F1923;
    color: #fff;
}

.btn-outline-primary {
    color: #1E2B3A;
    border: 2px solid #AD965F;
    background-color: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #AD965F;
    border-color: #AD965F;
    color: #fff;
}

.btn-outline-secondary {
    color: #1E2B3A;
    border: 2px solid #1E2B3A;
    background-color: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
    background-color: #1E2B3A;
    border-color: #1E2B3A;
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #AD965F 0%, #8B6914 100%);
    border-color: #8B6914;
    color: #fff;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background: linear-gradient(135deg, #8B6914 0%, #5D4409 100%);
    border-color: #5D4409;
    color: #fff;
}

.btn-check:focus + .btn-outline-primary,
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(173, 150, 95, 0.35) !important;
    outline: none;
}

.btn-check:focus + .btn-outline-secondary,
.btn-outline-secondary:focus {
    box-shadow: 0 0 0 0.25rem rgba(30, 43, 58, 0.25) !important;
    outline: none;
}

.min-vh-50 {
    min-height: 50vh;
}

.etl-auth-card {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 34px rgba(30, 43, 58, 0.18);
}

.etl-auth-icon-wrap {
    display: flex;
    justify-content: flex-start;
}

.etl-auth-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #1E2B3A;
    background: rgba(173, 150, 95, 0.18);
}

.etl-auth-title {
    font-size: 1.45rem;
    line-height: 1.1;
    color: #1E2B3A;
    font-weight: 700;
}

.etl-auth-subtitle {
    font-size: 0.84rem;
    color: #3D4F64;
    margin-bottom: 0.9rem;
}

.etl-auth-btn {
    height: 34px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.etl-auth-local-form .form-label {
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 0.18rem !important;
}

.etl-auth-local-form .form-control {
    font-size: 0.8rem;
    line-height: 1.15;
    min-height: 34px;
    padding: 0.3rem 0.5rem;
}

.etl-layout {
    min-height: 0;
}

.etl-sidebar {
    width: 240px;
    background: rgba(255, 255, 255, 0.94);
    border-right: 1px solid #E0E6EC;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: width 0.25s ease, padding 0.25s ease, opacity 0.2s ease;
    overflow: hidden;
}

.etl-sidebar-link {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    color: #1E2B3A;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.15;
    background: rgba(173, 150, 95, 0.12);
}

.etl-sidebar-link:hover {
    background: #1E2B3A;
    color: #fff;
}

.etl-sidebar-link.active {
    background: linear-gradient(135deg, #AD965F 0%, #8B6914 100%);
    color: #fff;
}

body.etl-sidebar-collapsed .etl-sidebar {
    width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-right: none;
    opacity: 0;
}

.etl-page-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid #E0E6EC;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.etl-page-card .card-body {
    padding: 0.85rem;
}

.etl-page-card h5,
.etl-page-card .h5 {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0;
}

.etl-page-card .card-body > .d-flex.justify-content-between.align-items-center.mb-3 {
    margin-bottom: 0.45rem !important;
    gap: 0.35rem;
}

.etl-page-card .card-body > .d-flex.justify-content-between.align-items-center.mb-3 .btn.btn-sm,
.etl-page-card .card-body > .d-flex.justify-content-between.align-items-center.mb-3 a.btn.btn-sm {
    padding: 0.16rem 0.42rem;
    font-size: 0.68rem;
    line-height: 1.15;
}

.etl-page-card .table-responsive {
    margin-top: 0.1rem;
}

.etl-page-title {
    background: linear-gradient(135deg, #AD965F 0%, #8B6914 100%);
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.etl-stat-row {
    overflow-x: auto;
    white-space: nowrap;
}

.etl-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.96);
    color: #1E2B3A;
    border: 1px solid #DDE5EE;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.74rem;
    line-height: 1.1;
    white-space: nowrap;
}

.etl-stat-chip-wide {
    max-width: 460px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.etl-form-section {
    background: #fff;
    border: 1px solid #E0E6EC;
    border-radius: 12px;
    padding: 1rem;
}

.etl-filter-form .form-label {
    font-size: 0.74rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.15;
}

.etl-filter-form .form-control,
.etl-filter-form .form-select {
    font-size: 0.8rem;
    line-height: 1.2;
    min-height: 34px;
    padding: 0.3rem 0.5rem;
}

.etl-filter-form .btn {
    font-size: 0.78rem;
    line-height: 1.15;
    padding: 0.36rem 0.62rem;
    min-height: 34px;
}

.etl-footer {
    background: rgba(0, 0, 0, 0.55) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin-top: auto;
}

.etl-version-badge {
    color: #FFFFFF;
    background: rgba(173, 150, 95, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.etl-footer-text {
    color: #FFFFFF !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.etl-footer-meta {
    color: #FFFFFF !important;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    opacity: 0.95;
}

.etl-page-card .table {
    margin-bottom: 0;
    font-size: 0.78rem;
    line-height: 1.2;
}

.etl-page-card .table thead th {
    background-color: #1E2B3A;
    color: #fff;
    border: none;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.36rem 0.46rem;
    white-space: nowrap;
}

.etl-page-card .table tbody td {
    padding: 0.34rem 0.46rem;
    border-color: #E6ECF2;
    vertical-align: middle;
}

.etl-page-card .table tbody tr:nth-child(even) {
    background-color: rgba(173, 150, 95, 0.15);
}

.etl-page-card .table .small,
.etl-page-card .table small {
    font-size: 0.7rem;
}

.etl-page-card .table td .btn,
.etl-page-card .table th .btn {
    padding: 0.18rem 0.42rem;
    font-size: 0.68rem;
    line-height: 1.15;
}

.etl-page-card .table .badge {
    font-size: 0.64rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
}

.log-container {
    height: 400px;
    overflow-y: auto;
    padding: 10px;
    white-space: pre-wrap;
    font-size: 12px;
}

.log-entry {
    margin-bottom: 2px;
    line-height: 1.4;
}

/* Global button contrast fix: many pages use btn-outline-light on white cards */
.btn-outline-light {
    color: #1E2B3A !important;
    border: 2px solid #1E2B3A !important;
    background-color: #FFFFFF !important;
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active {
    color: #FFFFFF !important;
    background-color: #1E2B3A !important;
    border-color: #1E2B3A !important;
}

.btn-check:focus + .btn-outline-light,
.btn-outline-light:focus {
    box-shadow: 0 0 0 0.25rem rgba(30, 43, 58, 0.25) !important;
    outline: none;
}

.btn-outline-light:disabled,
.btn-outline-light.disabled {
    color: #6C7B7F !important;
    background-color: #F5F7FA !important;
    border-color: #D5DDE5 !important;
    opacity: 1;
}

/* Global button text clarity */
.btn,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.etl-nav-btn,
.etl-page-card .btn,
.table .btn {
    text-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
}

.btn:hover,
.btn:focus,
button:hover,
button:focus {
    text-shadow: none !important;
    filter: none !important;
}

@media (max-width: 991.98px) {
    .etl-layout {
        flex-direction: column;
    }

    .etl-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #E0E6EC;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .etl-sidebar-link {
        width: auto;
    }

    body.etl-sidebar-collapsed .etl-sidebar {
        width: 100%;
        max-height: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-bottom: none;
    }
}
