:root {
    --et-primary: #3b71ca;
    --et-primary-dark: #244d9b;
    --et-navy: #17233c;
    --et-navy-2: #10192c;
    --et-bg: #f5f7fb;
    --et-card: #ffffff;
    --et-border: #e5eaf1;
    --et-text: #243047;
    --et-muted: #7a8799;
    --et-success: #00b74a;
    --et-danger: #f93154;
    --et-warning: #ffa900;
    --et-shadow: 0 6px 24px rgba(28, 45, 77, .08);
    background: var(--et-bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--et-bg); }

/* ---------- App shell ---------- */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 278px minmax(0,1fr); }
.app-sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: linear-gradient(180deg, var(--et-navy) 0%, var(--et-navy-2) 100%);
    color: #fff; padding: 22px 16px 16px; display: flex; flex-direction: column;
    box-shadow: 5px 0 24px rgba(16, 25, 44, .12); z-index: 20;
}
.brand-block { display:flex; align-items:center; gap:12px; padding:4px 8px 24px; }
.brand-mark, .login-logo {
    width:44px; height:44px; display:grid; place-items:center; border-radius:13px;
    background:linear-gradient(135deg,#5f9df7,#3b71ca); color:#fff;
    box-shadow:0 8px 20px rgba(59,113,202,.28);
}
.brand-title { }
.brand-subtitle { color:#8fa1bf; margin-top:2px; }
.sidebar-user-card {
    display:grid; grid-template-columns:38px minmax(0,1fr) 26px; gap:10px; align-items:center;
    padding:12px; margin:0 4px 18px; border:1px solid rgba(255,255,255,.08); border-radius:14px;
    background:rgba(255,255,255,.045);
}
.user-avatar { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:#2b3a5c; color:#cbd8ef; }
.user-meta { min-width:0; display:flex; flex-direction:column; }
.user-meta strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-meta span { color:#8fa1bf; margin-top:2px; }
.logout-link { display:grid; place-items:center; width:26px; height:26px; color:#9db0ce; text-decoration:none; border-radius:8px; }
.logout-link:hover { background:rgba(255,255,255,.08); color:#fff; }
.sidebar-nav { display:flex; flex-direction:column; gap:4px; }
.nav-section-label { color:#61728f; padding:20px 12px 7px; }
.side-link {
    display:flex; align-items:center; gap:11px; min-height:42px; padding:9px 12px; border-radius:10px;
    color:#c5d0e3; text-decoration:none; transition:.18s ease;
}
.side-link:hover { color:#fff; background:rgba(255,255,255,.06); transform:translateX(1px); }
.side-link.active { color:#fff; background:linear-gradient(90deg,rgba(59,113,202,.95),rgba(59,113,202,.66)); box-shadow:0 5px 14px rgba(34,84,160,.28); }
.nav-icon { width:23px; text-align:center; opacity:.95; }
.sidebar-footer { margin-top:auto; color:#586984; text-align:center; padding:22px 8px 4px; }
.app-main { min-width:0; display:flex; flex-direction:column; }
.topbar {
    height:76px; padding:0 30px; display:flex; align-items:center; justify-content:space-between; gap:18px;
    background:rgba(255,255,255,.95); border-bottom:1px solid var(--et-border); position:sticky; top:0; z-index:15;
    backdrop-filter: blur(10px);
}
.topbar-eyebrow, .eyebrow { color:var(--et-primary); }
.topbar-title { margin-top:2px; color:#42516b; }
.topbar-chip { padding:7px 11px; border-radius:20px; color:#54647c; background:#f1f4f9; border:1px solid #e3e8ef; }
.content-area { padding:28px 30px 44px; min-width:0; max-width:1680px; width:100%; margin:0 auto; }

/* ---------- Page hierarchy ---------- */
.page-heading-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:2px 0 18px; }
.page-heading-actions p { margin:0; }
.page-hero {
    display:flex; justify-content:space-between; align-items:flex-end; gap:24px; padding:28px 30px; margin-bottom:24px;
    background:linear-gradient(135deg,#ffffff 0%,#f2f6ff 100%); border:1px solid #e2e9f5; border-radius:18px; box-shadow:var(--et-shadow);
}
.page-hero h1 { margin:6px 0 7px; }
.page-hero p { margin:0; color:#6c7b90; }
.hero-badge { white-space:nowrap; padding:9px 14px; border-radius:24px; background:#eaf1ff; color:#315fa9; }

/* ---------- Cards / modules ---------- */
.module-grid, .cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.module-card, .card-link {
    position:relative; display:flex; align-items:center; gap:18px; min-height:145px; padding:22px 22px;
    color:inherit; text-decoration:none; background:#fff; border:1px solid var(--et-border); border-radius:17px; box-shadow:var(--et-shadow); transition:.2s ease;
}
.module-card:hover, .card-link:hover { transform:translateY(-2px); border-color:#c9d8f1; box-shadow:0 10px 30px rgba(28,45,77,.12); color:inherit; }
.module-icon { flex:0 0 58px; width:58px; height:58px; display:grid; place-items:center; border-radius:16px; background:#edf3ff; color:#315fa9; }
.module-card-body { min-width:0; }
.module-card h2, .card-link h2 { margin:3px 0 6px; }
.module-card p, .card-link p { margin:0; color:#7a8799; line-height:1.55; }
.module-kicker { color:#7890b5; }
.module-arrow { margin-left:auto; color:#7290c0; }

/* ---------- MDB-like panels / forms ---------- */
.panel {
    background:#fff; border:1px solid var(--et-border); border-radius:16px; padding:20px;
    box-shadow:0 4px 18px rgba(30,48,80,.055);
}
.panel > h2:first-child { padding-bottom:13px; margin-bottom:15px; border-bottom:1px solid #edf0f5; }
.panel label, .field-group label { display:block; margin:13px 0 6px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px 16px; }
.form-grid label { margin:0; }
.form-grid .span2 { grid-column:span 2; }
.search-grid { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:10px 14px; }
.search-grid label { margin:0; }
.section-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:18px; }
.section-row h3 { margin:0; }
.calc-grid { display:grid; grid-template-columns:minmax(360px,460px) minmax(0,1fr); gap:18px; align-items:start; }
.qty-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.fitting-row { display:grid; grid-template-columns:minmax(0,1fr) 82px 66px; gap:8px; margin:8px 0; }
.transition-row { display:grid; grid-template-columns:minmax(0,1fr) 90px; gap:8px; align-items:end; margin:10px 0 2px; padding:10px; border:1px solid #e1e6ee; border-radius:8px; background:#fafbfc; }
.transition-row label { margin:0; }
.transition-pipe { grid-column:1 / -1; }
.transition-delete { display:flex; align-items:flex-end; justify-content:flex-end; }
.transition-k-preview { margin:4px 0 12px 2px; }

/* ---------- Buttons ---------- */
button { cursor:pointer; }
button:disabled { opacity:.45; cursor:not-allowed; transform:none !important; }
.button-link { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.action-row { display:flex; gap:8px; margin-top:18px; flex-wrap:wrap; }
.compact-actions { margin-top:14px; }
.link-button { border:0; background:transparent; color:#356ab8; padding:2px 0; cursor:pointer; }
.link-button:hover { text-decoration:underline; }
.star-button { border:0; background:transparent; padding:2px 4px; color:#e2a400; }
.sort-button { border:0; background:transparent; padding:0; color:#526078; white-space:nowrap; }
.sort-button:hover { color:#285fac; }

/* ---------- Status / banners ---------- */
.success, .notice, .error { padding:11px 13px; margin:12px 0; border-radius:9px; border:1px solid transparent; }
.success { background:#edf9f1; color:#087d38; border-color:#c9efd7; }
.notice { background:#eff5ff; color:#2d61aa; border-color:#d8e6fb; }
.error { background:#fff1f4; color:#b62b45; border-color:#f8d0d8; }
.edit-banner { display:flex; gap:15px; flex-wrap:wrap; background:#f1f6ff; border:1px solid #d7e5fb; color:#315f9f; border-radius:10px; padding:11px 14px; margin-bottom:14px; }
.bulk-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; background:#fff; border:1px solid var(--et-border); border-radius:10px; }
.bulk-toolbar strong { margin-right:4px; }
.disabled-document { background:#fafbfc; color:#8792a2; }

/* ---------- Results / tables ---------- */
.table-scroll { overflow-x:auto; }
.result-table { width:100%; border-collapse:separate; border-spacing:0; }
.result-table th { color:#66748a; background:#f7f9fc; border-top:1px solid #e8edf3; border-bottom:1px solid #e1e7ef; padding:10px 10px; text-align:left; }
.result-table th:first-child { border-left:1px solid #e8edf3; border-radius:8px 0 0 0; }
.result-table th:last-child { border-right:1px solid #e8edf3; border-radius:0 8px 0 0; }
.result-table td { border-bottom:1px solid #edf0f4; padding:10px; vertical-align:middle; }
.result-table tbody tr { transition:background .12s; }
.result-table tbody tr:hover { background:#f9fbfe; }
.total-row td { background:#f7f9fc; }
.actions-cell { white-space:nowrap; display:flex; gap:5px; align-items:center; }
.paging-row { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:15px; color:#758299; }
.paging-buttons { display:flex; gap:5px; flex-wrap:wrap; }
.page-btn { min-width:31px !important; padding:5px 8px !important; }

.result-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; border-bottom:1px solid #edf0f5; padding-bottom:12px; margin-bottom:14px; }
.result-header h2 { margin:0; }
.unit-box { display:flex; gap:7px; flex-wrap:wrap; }
.unit-box label { margin:0; min-width:110px; }
.unit-box select { margin-top:4px; }
.metric-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:8px 0 22px; }
.metric-grid > div { background:linear-gradient(180deg,#fafcff,#f6f8fc); border:1px solid #e7ecf3; border-radius:11px; padding:12px; }
.metric-grid span { display:block; color:#8290a4; }
.metric-grid strong { display:block; margin-top:5px; color:#2b3952; font-variant-numeric:tabular-nums; }
.loss-chart { display:grid; gap:8px; margin-top:10px; }
.bar-row { display:grid; grid-template-columns:150px minmax(100px,1fr) 125px; gap:9px; align-items:center; }
.bar-label { color:#56657b; }
.bar-track { height:13px; background:#edf1f6; border-radius:8px; overflow:hidden; }
.bar-fill { height:100%; background:linear-gradient(90deg,#5d8ed8,#3b71ca); border-radius:8px; }
.bar-value { text-align:right; font-variant-numeric:tabular-nums; }
.total-bar { border-top:1px solid #dce3ea; padding-top:10px; }
.total-bar .bar-fill { background:#2f466c; }

/* ---------- Master/admin ---------- */
.master-toolbar { margin-bottom:14px; }
.master-editor { margin-bottom:18px; }

/* ---------- Login ---------- */
.login-page { min-height:100vh; display:grid; grid-template-columns:minmax(400px,1.05fr) minmax(420px,.95fr); background:#fff; }
.login-visual { position:relative; display:flex; align-items:flex-end; padding:58px; overflow:hidden; background:linear-gradient(145deg,#17243e 0%,#213a68 58%,#315f9f 100%); color:#fff; }
.login-visual::before, .login-visual::after { content:""; position:absolute; border-radius:50%; border:1px solid rgba(255,255,255,.09); }
.login-visual::before { width:620px; height:620px; right:-220px; top:-170px; }
.login-visual::after { width:420px; height:420px; right:-90px; top:-40px; }
.login-visual-content { position:relative; z-index:2; max-width:540px; }
.login-logo { width:58px; height:58px; margin-bottom:34px; }
.eyebrow.light { color:#a8c7f3; }
.login-visual h1 { color:#fff; line-height:1.16; margin:9px 0 16px; }
.login-visual p { color:#c4d2e7; max-width:440px; line-height:1.7; }
.login-form-panel { display:grid; place-items:center; padding:48px; background:#fbfcfe; }
.login-card-new { width:min(390px,100%); }
.login-card-new h2 { margin:5px 0 5px; }
.login-card-new form { margin-top:24px; }
.field-group { margin-bottom:15px; }
.field-group label { margin:0 0 6px; }
.login-help { margin-top:20px; padding-top:15px; border-top:1px solid #e6eaf0; color:#8a95a4; text-align:center; }
.login-mobile-brand { display:none; }

/* ---------- Report ---------- */
.report-actions { max-width:210mm; margin:0 auto 14px; display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.report-sheet { width:210mm; min-height:297mm; margin:0 auto; background:#fff; padding:16mm 15mm; box-shadow:0 3px 22px rgba(20,34,59,.13); color:#111827; }
.report-title { text-align:center; border-bottom:2px solid #111827; padding-bottom:10px; margin-bottom:16px; }
.report-title h1 { margin:0 0 4px; }
.report-title div { }
.report-meta, .report-table { width:100%; border-collapse:collapse; margin:8px 0 18px; }
.report-meta th, .report-meta td, .report-table th, .report-table td { border:1px solid #9ca3af; padding:7px 8px; }
.report-meta th, .report-table th { background:#f3f4f6; text-align:left; width:18%; }
.report-sheet h2 { margin:18px 0 7px; border-left:4px solid #475569; padding-left:7px; }
.report-total th, .report-total td { background:#f8fafc; }
.report-bars { margin:8px 0 18px; display:grid; gap:5px; }
.report-bar-row { display:grid; grid-template-columns:145px 1fr 95px; gap:8px; align-items:center; }
.report-bar-row > div { height:14px; background:#edf2f7; }
.report-bar-row i { display:block; height:100%; background:#64748b; }
.report-bar-row b { text-align:right; }
.formula-box { line-height:1.55; border:1px solid #d1d5db; padding:9px 12px; }
.formula-box p { margin:3px 0; }
.report-footer { margin-top:28px; padding-top:8px; border-top:1px solid #d1d5db; text-align:right; color:#6b7280; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .search-grid { grid-template-columns:repeat(2,minmax(180px,1fr)); }
    .calc-grid { grid-template-columns:1fr; }
}
@media (max-width: 900px) {
    .app-shell { grid-template-columns:1fr; }
    .app-sidebar { position:static; height:auto; }
    .sidebar-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .nav-section-label { grid-column:1/-1; }
    .sidebar-footer { display:none; }
    .topbar { position:static; }
    .module-grid, .cards { grid-template-columns:1fr; }
    .form-grid { grid-template-columns:1fr; }
    .form-grid .span2 { grid-column:span 1; }
    .report-sheet { width:100%; min-height:auto; padding:18px; }
}
@media (max-width: 650px) {
    .content-area { padding:20px 14px 32px; }
    .topbar { height:auto; min-height:66px; padding:13px 16px; }
    .topbar-chip { display:none; }
    .page-hero { padding:20px; align-items:flex-start; flex-direction:column; }
    .page-hero h1 { }
    .search-grid, .qty-grid, .metric-grid { grid-template-columns:1fr; }
    .page-heading-actions, .paging-row, .result-header { align-items:flex-start; flex-direction:column; }
    .fitting-row { grid-template-columns:1fr 80px; }
    .fitting-row button { grid-column:2; }
    .transition-row { grid-template-columns:1fr 90px; }
    .transition-pipe { grid-column:1 / -1; }
    .transition-k-preview { margin-left:0; }
    .bar-row { grid-template-columns:100px minmax(70px,1fr); }
    .bar-value { grid-column:2; text-align:left; }
    .login-page { grid-template-columns:1fr; }
    .login-visual { display:none; }
    .login-form-panel { padding:30px 22px; min-height:100vh; }
    .login-mobile-brand { display:block; margin-bottom:28px; color:#25344f; }
}

@media print {
    body { background:#fff !important; }
    .app-sidebar, .topbar, .no-print { display:none !important; }
    .app-shell, .app-main { display:block !important; }
    .content-area { padding:0 !important; max-width:none !important; }
    .report-sheet { width:auto; min-height:auto; margin:0; padding:8mm; box-shadow:none; }
    @page { size:A4; margin:8mm; }
}

/* ==========================================================
   v0.6a - MDB Bootstrap container layout
   Layout reference: MDBootstrap Bootstrap 5 Containers
   ========================================================== */
body {
    background: #f7f8fa;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid #e7eaf0;
    backdrop-filter: blur(10px);
}

.header-row {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #25324a;
    text-decoration: none;
    min-width: 0;
}

.brand-link:hover { color: #25324a; }

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
}

.brand-copy small {
    margin-top: 4px;
    color: #8b95a7;
}

.account-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef3fb;
    color: #315fa9;
}

.account-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.account-copy strong { color: #354158; }
.account-copy small { margin-top: 3px; color: #8994a5; }

.main-nav {
    min-height: 49px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
    border-top: 1px solid #f0f2f5;
}

.nav-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 35px;
    padding: 7px 12px;
    border-radius: 8px;
    color: #657187;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.nav-pill:hover {
    color: #315fa9;
    background: #f3f6fb;
}

.nav-pill.active {
    color: #315fa9;
    background: #eaf1ff;
}

.nav-divider {
    width: 1px;
    height: 22px;
    margin: 0 5px;
    background: #e3e7ee;
    flex: 0 0 auto;
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
}

.site-main > .container {
    /* Keep Bootstrap/MDB responsive max-widths; only vertical rhythm is customized. */
    min-width: 0;
}

.site-footer {
    flex: 0 0 auto;
    background: #fff;
    border-top: 1px solid #e7eaf0;
}

.footer-row {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #939cab;
}

/* Container-oriented content surfaces */
.page-hero {
    margin-bottom: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: .75rem;
    background: #fff;
    border: 1px solid #e7eaf0;
    box-shadow: 0 2px 12px rgba(26, 39, 64, .06);
}

.panel,
.module-card,
.card-link {
    border-radius: .75rem;
    border-color: #e7eaf0;
    box-shadow: 0 2px 12px rgba(26, 39, 64, .055);
}

.module-card,
.card-link {
    min-height: 132px;
}

/* Give large data tables the full width of the current Bootstrap container. */
.table-scroll {
    width: 100%;
}

@media (max-width: 767.98px) {
    .site-header { position: static; }
    .header-row { min-height: 66px; gap: 12px; }
    .brand-copy small, .account-copy { display: none; }
    .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
    .main-nav { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
    .nav-divider { display: none; }
    .page-hero { padding: 1.25rem; }
    .footer-row { flex-direction: column; justify-content: center; padding: 12px 0; gap: 3px; }
}

@media print {
    .site-header, .site-footer { display: none !important; }
    .site-main > .container { max-width: none !important; width: 100% !important; padding: 0 !important; }
}

/* ==========================================================
   v0.6b - MDB Admin Dashboard inspired layout
   Reference: MDBootstrap Standard Admin Dashboard templates
   ========================================================== */
:root {
    --mdb-admin-sidebar-width: 248px;
    --mdb-admin-topbar-height: 58px;
    --mdb-admin-blue: #3b71ca;
    --mdb-admin-blue-soft: #edf3ff;
    --mdb-admin-bg: #f5f6f8;
    --mdb-admin-border: #e7e9ef;
    --mdb-admin-text: #3f4654;
    --mdb-admin-muted: #7d8493;
}

body {
    background: var(--mdb-admin-bg);
}

.mdb-admin-shell {
    min-height: 100vh;
    background: var(--mdb-admin-bg);
}

.mdb-admin-sidebar {
    position: fixed;
    top: var(--app-topbar-height);
    bottom: 0;
    left: 0;
    width: var(--mdb-admin-sidebar-width);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--app-sidebar-bg);
    box-shadow: 2px 0 8px rgba(0, 0, 0, .025);
}

.mdb-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 10px 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--bs-white-rgb), .28) transparent;
}

.mdb-sidebar-nav::-webkit-scrollbar {
    width: .5rem;
}

.mdb-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.mdb-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-white-rgb), .28);
    border-radius: var(--bs-border-radius-pill);
}

.mdb-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bs-white-rgb), .42);
}

.mdb-nav-section {
    padding: 18px 12px 6px;
}

.mdb-nav-section:first-child { padding-top: 6px; }

.mdb-side-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--bs-gray-300);
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.mdb-side-link:hover {
    color: var(--bs-white);
    background: rgba(255,255,255,.08);
}

.mdb-side-link.active {
    color: var(--bs-white);
    background: rgba(255,255,255,.14);
}


.mdb-sidebar-footer {
    margin-top: auto;
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    background: var(--app-sidebar-footer-bg);
}

.mdb-admin-main {
    min-height: 100vh;
    margin-left: var(--mdb-admin-sidebar-width);
    padding-top: var(--app-topbar-height);
    display: flex;
    flex-direction: column;
}

.mdb-admin-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1050;
    min-height: var(--mdb-admin-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    background: var(--app-topbar-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,.025);
    backdrop-filter: blur(8px);
}

.mdb-topbar-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--bs-gray-300);
}

.mdb-topbar-app {
    color: var(--bs-white);
}









.mdb-admin-content {
    flex: 1;
    padding: 0 24px 38px;
    background:
        linear-gradient(180deg, #90afd3 0, #b6cae1 104px, var(--mdb-admin-bg) 104px, var(--mdb-admin-bg) 100%);
}

.admin-dashboard-hero {
    max-width: 1240px;
    margin: 30px auto 0;
    padding: 0;
}

.admin-dashboard-hero-inner {
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid rgba(226, 230, 236, .95);
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(38, 53, 77, .075);
}

.admin-dashboard-kicker,
.admin-section-eyebrow {
    color: #6d8ebc;
}

.admin-dashboard-hero h1 {
    margin: 5px 0 5px;
    color: #3b414c;
}

.admin-dashboard-hero p {
    margin: 0;
    color: #7f8795;
}

.admin-dashboard-badge {
    white-space: nowrap;
    padding: 7px 11px;
    color: #3b71ca;
    background: #edf3fd;
    border-radius: 5px;
}

.admin-dashboard-body {
    max-width: 1240px;
    margin: 24px auto 0;
}

.admin-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.admin-section-heading h2 {
    margin: 3px 0 0;
    color: #454c58;
}

.admin-section-note {
    color: #969daa;
}

.admin-module-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-module-card {
    min-height: 150px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e5e8ed;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(38, 53, 77, .055);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.admin-module-card:hover {
    color: inherit;
    transform: translateY(-1px);
    border-color: #d4deec;
    box-shadow: 0 5px 18px rgba(38, 53, 77, .085);
}

.admin-module-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #3b71ca;
    background: #edf3fd;
}

.admin-module-content { min-width: 0; }

.admin-module-kicker {
    color: #7e95b6;
}

.admin-module-content h3 {
    margin: 4px 0 6px;
    color: #404754;
}

.admin-module-content p {
    margin: 0;
    color: #858c99;
    line-height: 1.55;
}

.admin-module-arrow {
    margin-left: auto;
    color: #7897c2;
}

/* Existing calculation/admin pages inside the dashboard shell */
.mdb-admin-content > .container-fluid > .page-hero,
.mdb-admin-content > .container-fluid > .page-heading-actions,
.mdb-admin-content > .container-fluid > .panel,
.mdb-admin-content > .container-fluid > .calc-grid,
.mdb-admin-content > .container-fluid > .cards,
.mdb-admin-content > .container-fluid > .report-actions,
.mdb-admin-content > .container-fluid > .report-sheet,
.mdb-admin-content > .container-fluid > h1,
.mdb-admin-content > .container-fluid > h2,
.mdb-admin-content > .container-fluid > p {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.mdb-admin-content > .container-fluid > .page-hero {
    margin-top: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(38, 53, 77, .075);
}

.mdb-admin-content .panel,
.mdb-admin-content .module-card,
.mdb-admin-content .card-link {
    border-radius: 8px;
}

@media (max-width: 980px) {
    :root { --mdb-admin-sidebar-width: 210px; }
    .admin-module-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .mdb-admin-sidebar {
        position: static;
        width: 100%;
        max-height: none;
    }
    .mdb-sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px 6px;
    }
    .mdb-nav-section { grid-column: 1 / -1; }
    .mdb-sidebar-footer { display: none; }
    .mdb-admin-main { margin-left: 0; }
    .mdb-admin-topbar { padding: 0 14px; }
    .mdb-topbar-left { display: none; }
    .mdb-admin-topbar { justify-content: flex-end; }
    .mdb-admin-content { padding: 0 14px 30px; }
    .admin-dashboard-hero { margin-top: 18px; }
    .admin-dashboard-hero-inner { align-items: flex-start; flex-direction: column; }
    .admin-dashboard-badge { align-self: flex-start; }
    .admin-section-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
    .mdb-sidebar-nav { grid-template-columns: 1fr; }
    .mdb-nav-section { grid-column: 1; }
    .mdb-account-copy { display: none; }
    .admin-dashboard-hero h1 { }
    .admin-module-card { align-items: flex-start; padding: 18px; }
    .admin-module-arrow { display: none; }
}

@media print {
    .mdb-admin-sidebar,
    .mdb-admin-topbar { display: none !important; }
    .mdb-admin-main { margin-left: 0 !important; }
    .mdb-admin-content { padding: 0 !important; background: #fff !important; }
}

/* ==========================================================
   v0.6c - Responsive MDB documentation/admin layout
   Shared theme variables.  Page components do not carry
   layout/color values; the UI is controlled from this file.
   ========================================================== */
:root {
    --app-sidebar-width: 248px;
    --app-topbar-height: 58px;
    --app-content-max-width: 1240px;
    --app-page-head-bg: #f5f6f8;
    --app-content-bg: #ffffff;
    --app-sidebar-bg: #343a40;
    --app-topbar-bg: #212529;
    --app-sidebar-footer-bg: #212529;
    --app-border-color: #e7e9ef;
    --app-link-color: #3b71ca;
    --app-overlay: rgba(20, 28, 40, .28);
    --app-transition: 180ms ease;
}

/* Shell */
.mdb-admin-shell {
    min-height: 100vh;
    background: var(--app-content-bg);
}

.mdb-admin-sidebar {
    width: var(--app-sidebar-width);
    background: var(--app-sidebar-bg);
    transition: transform var(--app-transition);
}

.mdb-admin-main {
    height: 100vh;
    min-height: 0;
    margin-left: var(--app-sidebar-width);
    overflow: hidden;
    background: var(--app-content-bg);
    transition: margin-left var(--app-transition);
}

.mdb-admin-topbar {
    min-height: var(--app-topbar-height);
    border-top: 3px solid #dc392d;
    background: var(--app-topbar-bg);
}

/* Hamburger in the fixed topbar */
.mdb-menu-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(var(--bs-white-rgb), .5);
}

.mdb-menu-toggle:hover { background: var(--app-sidebar-bg); }

.mdb-menu-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: currentColor;
}

.mdb-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1035;
    display: none;
    padding: 0;
    border: 0;
    background: var(--app-overlay);
}

/* White content body + shallow MDB documentation-like heading band */
.mdb-admin-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 24px 40px;
    background: var(--app-content-bg);
}

.mdb-page-content > h1 {
    max-width: none !important;
    display: flex;
    align-items: center;
    margin-left: -24px !important;
    margin-right: -24px !important;
    padding-left: max(24px, calc((100% - var(--app-content-max-width)) / 2 + 24px));
    padding-right: max(24px, calc((100% - var(--app-content-max-width)) / 2 + 24px));
    background: var(--app-page-head-bg);
}

/* Shared content width */
.mdb-page-content > .page-heading-actions,
.mdb-page-content > .panel,
.mdb-page-content > .calc-grid,
.mdb-page-content > .cards,
.mdb-page-content > .bulk-toolbar,
.mdb-page-content > .success,
.mdb-page-content > .notice,
.mdb-page-content > .error,
.mdb-page-content > .edit-banner,
.mdb-page-content > h2,
.mdb-page-content > h3,
.mdb-page-content > p {
    width: 100%;
    max-width: var(--app-content-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Cards/panels blend into the white content area */
.mdb-admin-content .panel,
.mdb-admin-content .module-card,
.mdb-admin-content .card-link,
.mdb-admin-content .search-panel,
.mdb-admin-content .bulk-toolbar {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.mdb-admin-content .panel {
    padding-left: 0;
    padding-right: 0;
}

.mdb-admin-content .bulk-toolbar {
    padding-left: 0;
    padding-right: 0;
}

/* Home uses the same heading band instead of a floating bordered card */
.admin-dashboard-hero {
    max-width: none;
    margin: 0 -24px;
    background: var(--app-page-head-bg);
}

.admin-dashboard-hero-inner {
    width: 100%;
    max-width: var(--app-content-max-width);
    margin: 0 auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.admin-dashboard-hero h1 {
    color: var(--bs-heading-color);
}

.admin-dashboard-hero p,
.admin-section-note,
.admin-module-content p {
    color: var(--bs-secondary-color);
}

.admin-dashboard-body {
    max-width: var(--app-content-max-width);
    margin-top: 26px;
}

.admin-section-heading h2,
.admin-module-content h3 {
}

.admin-module-card {
    background: var(--app-content-bg);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.admin-module-card:hover {
    border: 0;
    box-shadow: none;
    background: var(--app-page-head-bg);
}

/* Thin separators are preferred to card outlines */
.mdb-admin-content .section-row,
.mdb-admin-content .result-header {
    border-color: var(--app-border-color);
}

/* Responsive off-canvas sidebar */
@media (max-width: 991.98px) {
    .mdb-admin-sidebar {
        position: fixed;
        top: var(--app-topbar-height);
        right: auto;
        bottom: 0;
        left: 0;
        width: min(var(--app-sidebar-width), 86vw);
        height: calc(100vh - var(--app-topbar-height));
        max-height: none;
        z-index: 1040;
        transform: translateX(-100%);
        box-shadow: 6px 0 22px rgba(20, 28, 40, .12);
    }

    .mdb-admin-shell.sidebar-open .mdb-admin-sidebar {
        transform: translateX(0);
    }

    .mdb-admin-shell.sidebar-open .mdb-sidebar-backdrop {
        display: block;
    }

    .mdb-sidebar-nav {
        display: block;
        padding: 14px 10px 24px;
    }

    .mdb-nav-section { display: block; }
    .mdb-sidebar-footer { display: flex; }

    .mdb-admin-main {
        margin-left: 0;
    }

    .mdb-admin-topbar {
        padding: 0 16px;
    }

    .mdb-menu-toggle { display: inline-flex; }
    .mdb-topbar-left { display: flex; }

    .mdb-admin-content { padding: 0 16px 32px; }

    .mdb-page-content > h1 {
        margin-left: -16px !important;
        margin-right: -16px !important;
        padding-left: 16px;
        padding-right: 16px;
    }

    .admin-dashboard-hero {
        margin-left: -16px;
        margin-right: -16px;
    }

    .admin-dashboard-hero-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .admin-module-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
    .mdb-page-content > h1,
    .admin-dashboard-hero h1 { }

    .admin-dashboard-hero-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .admin-dashboard-badge { display: none; }
    .admin-module-card { padding: 16px 0; }
}

@media print {
    .mdb-menu-toggle,
    .mdb-sidebar-backdrop { display: none !important; }
}

@media (max-width: 991.98px) {
    body.sidebar-modal-open { overflow: hidden; }
}

/* ==========================================================
   v0.6d - Responsive topbar alignment + centered login shell
   All layout values remain in shared CSS; no page inline style.
   ========================================================== */
:root {
    --app-login-max-width: 520px;
    --app-login-hero-bg: #244474;
    --app-login-panel-bg: #ffffff;
    --app-login-page-bg: #f5f6f8;
    --app-login-radius: 12px;
}

/* Header actions: hamburger is always the first, far-left control on off-canvas layouts. */
@media (max-width: 991.98px) {
    .mdb-admin-topbar {
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .mdb-topbar-left {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
    }

    .mdb-menu-toggle {
        flex: 0 0 36px;
        order: 0;
        margin: 0;
    }

    .mdb-topbar-app {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

}

@media (max-width: 575.98px) {
    .mdb-admin-topbar {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Topbar links do not inherit the browser's underlined anchor presentation. */
.mdb-admin-topbar a,
.mdb-admin-topbar a:hover,
.mdb-admin-topbar a:focus {
    text-decoration: none !important;
}

/* Login page: one centered, vertically stacked brand + form surface. */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    background: var(--app-login-page-bg);
}

.login-shell {
    width: min(100%, var(--app-login-max-width));
    overflow: hidden;
    background: var(--app-login-panel-bg);
    border-radius: var(--app-login-radius);
    box-shadow: 0 10px 34px rgba(29, 43, 67, .10);
}

.login-visual {
    position: relative;
    display: block;
    min-height: 258px;
    padding: 28px 30px;
    overflow: hidden;
    background: var(--app-login-hero-bg);
    color: #fff;
}

.login-visual::before,
.login-visual::after {
    display: none;
}

.login-visual-content {
    position: relative;
    z-index: 1;
    max-width: none;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 0 36px;
    border-radius: 14px;
}

.login-visual .eyebrow.light {
    color: #d6e5fb;
}

.login-visual h1 {
    margin: 12px 0 18px;
    color: #fff;
    line-height: 1.12;
}

.login-visual p {
    max-width: 430px;
    margin: 0;
    color: #d9e4f3;
    line-height: 1.65;
}

.login-form-panel {
    display: block;
    min-height: 0;
    padding: 30px;
    background: var(--app-login-panel-bg);
}

.login-card-new {
    width: 100%;
}

.login-card-new h2 {
    margin: 6px 0 8px;
    color: var(--bs-heading-color);
}

.login-card-new .muted {
    margin-bottom: 0;
    color: var(--bs-secondary-color);
}

.login-card-new form {
    margin-top: 26px;
}

.login-card-new .field-group {
    margin-bottom: 16px;
}

.login-card-new .field-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--bs-body-color);
}

.login-card-new .form-control {
    border-color: var(--app-border-color);
    background: #fff;
}

.login-footer-brand {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--app-border-color);
    color: #a0a8b5;
    text-align: center;
}

.login-mobile-brand,
.login-help {
    display: none !important;
}

@media (max-width: 575.98px) {
    .login-page {
        align-items: flex-start;
        padding: 18px 12px 28px;
    }

    .login-shell {
        border-radius: 10px;
    }

    .login-visual {
        display: block;
        min-height: 0;
        padding: 24px 22px 26px;
    }

    .login-logo {
        width: 54px;
        height: 54px;
        margin-bottom: 28px;
    }

    .login-visual h1 {
    }

    .login-form-panel {
        min-height: 0;
        padding: 26px 22px;
    }
}


/* ==========================================================
   v0.7 - Component cleanup
   Bootstrap/MDB classes are the source for control sizing and pagination.
   ========================================================== */
/* Route headings must never retain a programmatic focus ring. Keyboard focus on real controls remains intact. */
h1:focus:not(:focus-visible),
h2:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
}

/* Let MDB define button appearance; shared CSS only normalizes layout/spacing. */
.mdb-admin-content .btn,
.login-card-new .btn {
    text-transform: none;
}

.mdb-admin-content .btn-sm {
    white-space: nowrap;
}

/* Login: compact MDB-based stacked layout, with no ET icon row. */
.login-visual {
    min-height: 0;
    padding: 26px 30px 28px;
}

.login-visual .eyebrow.light {
    margin: 0 0 7px;
}

.login-visual h1 {
    margin: 0 0 12px;
}

.login-card-new 
/* MDB circular pagination: centered with summary above it. */
.mdb-paging {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 18px;
    text-align: center;
}

.mdb-paging .paging-summary {
    width: 100%;
    color: var(--bs-secondary-color);
}

.mdb-paging .pagination {
    gap: 4px;
}

.mdb-paging .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 0;
    border-radius: 50% !important;
    background: transparent;
    box-shadow: none;
}

.mdb-paging .page-item.active .page-link {
    color: #fff;
    background: var(--et-primary);
}

.mdb-paging .page-item.disabled .page-link,
.mdb-paging .page-link:disabled {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .login-visual {
        padding: 22px 22px 24px;
    }
}
