/* ═══════════════════════════════════════════════════════
   Nirvaa Unitas — Global Stylesheet
   ═══════════════════════════════════════════════════════ */

/* Override Bootstrap's own theme variables — without this, utility classes
   like .btn-outline-primary, .text-primary, .border-primary, .bg-primary,
   .badge.bg-primary-subtle, etc. keep using Bootstrap's default blue no
   matter what individual classes get overridden below, since they all pull
   from these CSS variables under the hood, not from hardcoded hex values. */
:root {
    --bs-primary: #1B836F;
    --bs-primary-rgb: 27, 131, 111;
    --bs-primary-text-emphasis: #156253;
    --bs-primary-bg-subtle: #EAF6F4;
    --bs-primary-border-subtle: #99D8CE;
    --bs-link-color: #1B836F;
    --bs-link-color-rgb: 18, 140, 116;
    --bs-link-hover-color: #156253;
    --bs-link-hover-color-rgb: 10, 82, 69;
}

/* Explicit overrides too — Bootstrap's compiled CSS bakes some component
   colors directly rather than always referencing --bs-primary dynamically,
   so the variable override above isn't guaranteed to reach every utility. */
a { color: #1B836F; }
a:hover { color: #156253; }
.text-primary { color: #1B836F !important; }
.border-primary { border-color: #1B836F !important; }
.bg-primary-subtle { background-color: #EAF6F4 !important; }
.border-primary-subtle { border-color: #99D8CE !important; }
.btn-outline-primary {
    color: #1B836F !important;
    border-color: #1B836F !important;
}
.btn-outline-primary:hover, .btn-outline-primary:active {
    background-color: #1B836F !important;
    border-color: #1B836F !important;
    color: #fff !important;
}
.badge.bg-primary { background-color: #1B836F !important; }
.form-check-input:checked {
    background-color: #1B836F !important;
    border-color: #1B836F !important;
}
.nav-tabs .nav-link.active {
    color: #1B836F !important;
    border-color: #99D8CE #99D8CE #fff !important;
}
.spinner-border.text-primary { color: #1B836F !important; }
.progress-bar { background-color: #1B836F !important; }
.page-link { color: #1B836F !important; }
.page-item.active .page-link { background-color: #1B836F !important; border-color: #1B836F !important; }

/* Kill Blazor SVG circle loader */
.loading-progress, .loading-progress circle, .loading-progress-text { display: none !important; }
.loading-progress-text:after { content: '' !important; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; font-family: 'Segoe UI', system-ui, sans-serif; }

/* ── LAYOUT ─────────────────────────────────────────── */
.mis-layout {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.mis-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 20% 8%, rgba(64,224,208,.14), transparent 40%),
        radial-gradient(circle at 85% 92%, rgba(93,202,165,.12), transparent 45%),
        linear-gradient(165deg, #0F4A3F 0%, #156253 45%, #1B836F 100%);
    box-shadow: 2px 0 12px rgba(0,0,0,.15);
}
.mis-brand {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #0F5245;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mis-logo-img {
    height: 40px;
    width: auto;
}

.mis-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0 16px;
}
.mis-nav::-webkit-scrollbar {
    width: 4px;
}
.mis-nav::-webkit-scrollbar-track {
    background: transparent;
}
.mis-nav::-webkit-scrollbar-thumb {
    background: #125445;
    border-radius: 4px;
}
.mis-nav::-webkit-scrollbar-thumb:hover {
    background: #1B7A64;
}

.mis-nav-brand {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #0F5245;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}
.mis-nav-logo {
    font-size: 20px;
    font-weight: 800;
    color: #23A48A;
    letter-spacing: -1px;
}
.mis-nav-title {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mis-nav-links {
    flex: 1;
    padding: 10px 0 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mis-nav-group {
    padding: 16px 16px 6px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9FD8C7;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(159,216,199,.12);
    transition: color .15s ease;
}
.mis-nav-group:first-of-type { border-top: none; margin-top: 0; }
.mis-nav-group:hover { color: #D4F5EA; }
.mis-nav-group::after {
    content: "▾";
    font-size: 11px;
    transition: transform .15s ease;
    opacity: .7;
}
.mis-nav-group-collapsed::after { transform: rotate(-90deg); }

.mis-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 18px;
    margin: 1px 8px 1px 0;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #C9E9E0;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.18s ease;
    cursor: pointer;
}
.mis-nav-item:hover {
    background: #0E4A3D;
    color: #e2f5f0;
    border-left-color: #1B7A64;
    text-decoration: none;
    transform: translateX(2px);
}
.mis-nav-item:hover .nav-icon { transform: scale(1.12); }
.mis-nav-item.active {
    background: linear-gradient(90deg, #155E4E 0%, #123B37 100%);
    color: #2DD4BF;
    border-left-color: #23A48A;
    font-weight: 500;
    box-shadow: 0 1px 6px rgba(35,164,138,.25);
}
.nav-icon { font-size: 14px; width: 18px; flex-shrink: 0; display: inline-block; transition: transform 0.18s ease; }

.mis-nav-footer {
    padding: 12px 16px;
    border-top: 1px solid #0F5245;
    flex-shrink: 0;
    background: linear-gradient(165deg, #0F4A3F 0%, #156253 45%, #1B836F 100%);
}
.mis-signout {
    width: 100%;
    background: none;
    border: 1px solid rgba(159,216,199,.35);
    color: #C9E9E0;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.mis-signout:hover { background: rgba(248,113,113,.12); color: #FCA5A5; border-color: rgba(248,113,113,.5); }

/* ── MAIN AREA ───────────────────────────────────────── */
.mis-main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── TOPBAR ──────────────────────────────────────────── */
.mis-topbar {
    background: #fff;
    border-bottom: 1px solid #EAF0EF;
    box-shadow: 0 1px 3px rgba(21,98,83,.04);
    padding: 10px 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    height: 52px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-user  { font-size: 13px; color: #475569; }
.topbar-role  {
    font-size: 11px; font-weight: 600;
    background: #1B836F; color: #fff;
    padding: 3px 10px; border-radius: 4px;
    letter-spacing: 0.3px;
}
.topbar-login { font-size: 13px; color: #1B836F; text-decoration: none; }

/* ── CONTENT ─────────────────────────────────────────── */
.mis-content {
    flex: 1;
    padding: 24px 28px;
    width: 100%;
}

/* ── PAGE HEADING ────────────────────────────────────── */
h3 { font-size: 20px; font-weight: 600; color: #0f172a; margin-bottom: 20px; }
h4 { font-size: 16px; font-weight: 600; color: #1e293b; margin-bottom: 12px; }
h5 { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 8px; }

/* ── CARDS ───────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.card-header {
    font-size: 13px; font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 16px;
}

/* ── TABLES ──────────────────────────────────────────── */
.table {
    background: #fff;
    font-size: 13.5px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0;
}
.table thead th {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-bottom: none;
    padding: 12px 14px;
    white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid #F1F5F4; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table-responsive { border-radius: 12px; box-shadow: 0 1px 6px rgba(11,38,63,.06); overflow-x: auto; overflow-y: hidden; border: 1px solid #EAF0EF; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100%; }
.table-hover tbody tr:hover { background: #F0FAF8; }
.table-dark th { background: #0F4A3F !important; color: #9FE1CB !important; }
.table-light th { background: #F0FAF8 !important; color: #156253 !important; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn { font-size: 13px; font-weight: 500; border-radius: 7px; padding: 7px 14px; transition: all 0.15s; }
.btn-sm { font-size: 12px; padding: 4px 10px; border-radius: 6px; }
.btn-primary { background: linear-gradient(135deg, #156253, #23A48A); border-color: #1B836F; }
.btn-primary:hover { background: linear-gradient(135deg, #156253, #1B836F); border-color: #156253; }
.btn-success { background: #059669; border-color: #059669; }
.btn-success:hover { background: #047857; border-color: #047857; }
.btn-danger  { background: #dc2626; border-color: #dc2626; }
.btn-outline-secondary { border-color: #cbd5e1; color: #475569; }
.btn-outline-secondary:hover { background: #f1f5f9; }

/* ── FORMS ───────────────────────────────────────────── */
.form-control, .form-select {
    font-size: 13.5px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 8px 12px;
    color: #0f172a;
    transition: border-color 0.15s;
}
.form-control:focus, .form-select:focus {
    border-color: #23A48A;
    box-shadow: 0 0 0 3px rgba(35,164,138,.15);
    outline: none;
}
.form-label { font-size: 12.5px; font-weight: 500; color: #374151; margin-bottom: 5px; }
.form-control-sm, .form-select-sm { font-size: 12.5px; padding: 5px 10px; }
.input-group-sm .form-control, .input-group-sm .form-select { font-size: 12.5px; }

/* ── BADGES ──────────────────────────────────────────── */
.badge { font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 5px; }
.bg-success { background: #059669 !important; }
.bg-danger  { background: #dc2626 !important; }
.bg-warning { background: #d97706 !important; }
.bg-primary { background: #1B836F !important; }
.bg-info    { background: #0891b2 !important; }
.bg-secondary { background: #64748b !important; }
.bg-dark    { background: #0f172a !important; }

/* ── ALERTS ──────────────────────────────────────────── */
.alert { font-size: 13px; border-radius: 8px; padding: 10px 14px; border: none; }
.alert-success { background: #ecfdf5; color: #065f46; border-left: 3px solid #059669; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-left: 3px solid #dc2626; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 3px solid #d97706; }
.alert-info    { background: #EAF6F4; color: #156253; border-left: 3px solid #23A48A; }

/* ── NAV TABS ────────────────────────────────────────── */
.nav-tabs { border-bottom: 1px solid #e2e8f0; margin-bottom: 20px; gap: 0; }
.nav-tabs .nav-link, .nav-tabs button.nav-link {
    background: none; border: none; border-bottom: 2px solid transparent;
    color: #64748b; font-size: 13px; padding: 9px 16px;
    cursor: pointer; font-family: inherit; margin-bottom: -1px;
    transition: all 0.15s;
}
.nav-tabs .nav-link.active, .nav-tabs button.nav-link.active {
    color: #1B836F; border-bottom-color: #1B836F; font-weight: 500;
}
.nav-tabs .nav-link:hover:not(.active) { color: #1e293b; }

/* ── DROPDOWN ────────────────────────────────────────── */
.dropdown-menu { font-size: 13px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.1); border: 1px solid #e2e8f0; }
.dropdown-item { font-size: 13px; padding: 8px 14px; }
.dropdown-item:hover { background: #f8fafc; }

/* ── KANBAN (Presales) ───────────────────────────────── */
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
    flex: 0 0 200px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.kanban-header {
    padding: 10px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
}
.kanban-body { padding: 8px; min-height: 100px; display: flex; flex-direction: column; gap: 6px; }
.kanban-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 10px 12px;
    font-size: 12.5px;
}
.kanban-card .kc-title { font-weight: 500; color: #0f172a; margin-bottom: 2px; }
.kanban-card .kc-sub   { color: #64748b; font-size: 11.5px; }
.kanban-card .kc-val   { color: #059669; font-size: 11.5px; font-weight: 500; margin-top: 4px; }
.kanban-card .kc-ref   { color: #94a3b8; font-size: 11px; }
.kanban-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 7px; }
.kbtn {
    font-size: 11px; padding: 2px 7px; border-radius: 4px;
    border: none; cursor: pointer; font-family: inherit; font-weight: 500;
}
.kbtn-award { background: #ecfdf5; color: #059669; }
.kbtn-award:hover { background: #d1fae5; }
.kbtn-lost { background: #fef2f2; color: #dc2626; }
.kbtn-lost:hover { background: #fee2e2; }
.kbtn-lapse { background: #f8fafc; color: #64748b; }
.kbtn-lapse:hover { background: #f1f5f9; }

/* ── AWARDED TABLE ───────────────────────────────────── */
.awarded-section { margin-top: 24px; }
.awarded-section h5 { color: #059669; }

/* ── STAT CARDS (Dashboard) ──────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #EAF0EF;
    border-top: 3px solid #1B836F;
    box-shadow: 0 1px 4px rgba(21,98,83,.06);
    transition: box-shadow .18s ease, transform .18s ease;
}
.stat-card:hover { box-shadow: 0 4px 14px rgba(21,98,83,.12); transform: translateY(-1px); }
.stat-card .sv { font-size: 28px; font-weight: 700; margin-bottom: 2px; letter-spacing: -.01em; }
.stat-card .sl { font-size: 12.5px; color: #64748b; font-weight: 500; }

/* ── SERVICE CARDS ───────────────────────────────────── */
.service-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.service-card .sc-header { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; }
.service-card .sc-body { padding: 14px 16px; }
.sc-ok { background: #f8fafc; }
.sc-warn { background: #fffbeb; }
.sc-danger { background: #fef2f2; }
.sc-header-ok { border-bottom: 2px solid #e2e8f0; }
.sc-header-warn { border-bottom: 2px solid #d97706; }
.sc-header-danger { border-bottom: 2px solid #dc2626; }
.sc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.sc-meta-item .label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.sc-meta-item .value { font-size: 13px; font-weight: 500; color: #0f172a; }

/* ── LOADING (startup screen) ────────────────────────── */
.mis-loading { min-height: 100vh; background: linear-gradient(155deg, #F5F9F8 0%, #EAF3F1 55%, #E3F1EE 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.mis-loading-logo { font-size: 28px; font-weight: 800; color: #10263F; letter-spacing: -0.5px; }
.mis-loading-bar { width: 200px; height: 3px; background: #d7e8e5; border-radius: 2px; overflow: hidden; }
.mis-loading-fill { height: 100%; width: 40%; background: #1B836F; border-radius: 2px; animation: mis-slide 1.2s ease-in-out infinite; }
@keyframes mis-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(600%); } }
.mis-loading-text { font-size: 12px; color: #5B7D77; }

/* ── AUTH pages ──────────────────────────────────────── */
.public-page { min-height: 100vh; background: linear-gradient(135deg, #0f1523 0%, #1a2d52 100%); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: #fff; border-radius: 14px; padding: 36px 32px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-logo { font-size: 22px; font-weight: 700; color: #1B836F; text-align: center; margin-bottom: 8px; }
.auth-title { text-align: center; color: #0f1523; font-weight: 600; margin-bottom: 4px; font-size: 17px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 13px; color: #64748b; }
.auth-footer a { color: #1B836F; font-weight: 500; }

/* ── BLAZOR ERROR UI ─────────────────────────────────── */
#blazor-error-ui { background: #fef3c7; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; font-size: 13px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ── UTILITIES ───────────────────────────────────────── */
.fw-500 { font-weight: 500; }
.text-muted { color: #64748b !important; }
.small, .text-sm { font-size: 12px; }
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,.06) !important; }
details > summary { cursor: pointer; font-size: 12.5px; color: #1B836F; user-select: none; }
details[open] > summary { margin-bottom: 8px; }
code { font-size: 12px; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; color: #0f172a; }

/* ── Wide table fixes ─────────────────────────────── */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}
thead .sticky-col {
    z-index: 3;
    background: #1e293b;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════
   MIS DATA TABLE — financial ledger treatment
   Replaces default Bootstrap .table for ledgers, schedules,
   payables/receivables, and any currency-heavy listing.
   Signature move: tabular-figure monospace for every number
   column, right-aligned, so digits stack like a real ledger.
   ═══════════════════════════════════════════════════════ */

.mis-dt-wrap {
    background: #fff;
    border: 1px solid #e7eaee;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.mis-dt {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
    color: #1e293b;
}

.mis-dt thead th {
    background: #0c1322;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid #1e293b;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}

.mis-dt thead th.mis-num,
.mis-dt td.mis-num {
    text-align: right;
}

.mis-dt tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f3f6;
    vertical-align: middle;
    white-space: nowrap;
}

.mis-dt tbody tr {
    transition: background-color .12s ease;
}

.mis-dt tbody tr:hover {
    background: #f7f9fc;
}

.mis-dt tbody tr:last-child td {
    border-bottom: none;
}

/* Numeric / currency cells — tabular figures keep digits aligned */
.mis-dt .mis-amt {
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    letter-spacing: -.01em;
}

.mis-dt .mis-amt-pos   { color: #15803d; }
.mis-dt .mis-amt-neg   { color: #b91c1c; }
.mis-dt .mis-amt-muted { color: #94a3b8; }
.mis-dt .mis-amt-strong{ font-weight: 600; color: #0f172a; }

/* Reference / ID columns — also monospace, but neutral, for PO numbers etc */
.mis-dt .mis-ref {
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
    font-size: 11.5px;
    color: #23A48A;
    letter-spacing: -.01em;
}

/* Status — dot + label, not a loud pill, reads faster in a dense ledger */
.mis-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}
.mis-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mis-status.is-pending::before   { background: #d97706; }
.mis-status.is-approved::before  { background: #1B836F; }
.mis-status.is-paid::before      { background: #15803d; }
.mis-status.is-overdue::before   { background: #dc2626; }
.mis-status.is-cancelled::before { background: #94a3b8; }
.mis-status.is-pending   { color: #92400e; }
.mis-status.is-approved  { color: #1e40af; }
.mis-status.is-paid      { color: #166534; }
.mis-status.is-overdue   { color: #991b1b; }
.mis-status.is-cancelled { color: #64748b; }

/* Vertical rule separating descriptive columns from the numeric block —
   echoes a real ledger's ruled columns rather than zebra striping */
.mis-dt .mis-divider {
    border-left: 1px solid #eef0f3;
}

/* Sticky first column (used for PO/ref no. on wide tables) */
.mis-dt .mis-sticky-left {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
}
.mis-dt thead .mis-sticky-left {
    background: #0c1322;
    z-index: 6;
}
.mis-dt tbody tr:hover .mis-sticky-left {
    background: #f7f9fc;
}

/* Footer / totals row */
.mis-dt tfoot td {
    background: #f8fafc;
    font-weight: 600;
    padding: 11px 14px;
    border-top: 2px solid #e2e8f0;
    color: #0f172a;
}

/* Empty state */
.mis-dt-empty {
    padding: 48px 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* Toolbar above the table — search, filters, page size */
.mis-dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f3;
    background: #fbfcfd;
}
.mis-dt-toolbar .form-select,
.mis-dt-toolbar .form-control {
    font-size: 12.5px;
}

/* Footer summary bar below the table */
.mis-dt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    font-size: 11.5px;
    color: #64748b;
    border-top: 1px solid #eef0f3;
    background: #fbfcfd;
}

/* ── Login page (dedicated, does not affect Signup/.auth-card) ────────── */
.login-page-shell {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background:
        linear-gradient(155deg, rgba(0,110,110,.75) 0%, rgba(0,139,139,.55) 45%, rgba(0,90,90,.80) 100%),
        radial-gradient(circle at 15% 20%, rgba(93,202,165,.22), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(64,224,208,.20), transparent 50%),
        url('/img/login-bg.png'),
        #008B8B;
    background-size: auto, auto, auto, cover, auto;
    background-position: center, center, center, center center, center;
    background-repeat: no-repeat;
}

.login-brand-panel {
    flex: 1 1 56%;
    position: relative;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.login-brand-top {
    position: absolute;
    top: 40px; left: 64px; right: 64px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    z-index: 1;
}
.login-hero-logo {
    line-height: 1;
}
.login-hero-logo-img {
    height: 56px;
    width: auto;
    display: block;
}
.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(64,224,208,.14);
    border: 1px solid rgba(64,224,208,.35);
    color: #7FFFD4;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    padding: 8px 16px;
    border-radius: 999px;
    width: fit-content;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.login-hero-headline {
    font-size: 42px;
    line-height: 1.15;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.02em;
    max-width: 480px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 12px rgba(0,30,30,.35);
}
.login-hero-accent { color: #40E0D0; }

.login-hero-sub {
    font-size: 15.5px;
    line-height: 1.6;
    color: #B8C9CB;
    max-width: 420px;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 8px rgba(0,30,30,.3);
}

.login-value-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    max-width: 460px;
    position: relative;
    z-index: 1;
}
.login-value-item { display: flex; align-items: flex-start; gap: 10px; }
.login-value-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.login-value-text { font-size: 13.5px; font-weight: 600; color: #E5EDEE; line-height: 1.35; }

.login-glow-wave {
    position: absolute;
    left: -10%;
    bottom: -18%;
    width: 130%;
    height: 55%;
    background:
        radial-gradient(closest-side, rgba(64,224,208,.16), transparent),
        radial-gradient(closest-side, rgba(0,139,139,.20), transparent 70%);
    background-position: 15% 40%, 70% 70%;
    background-size: 55% 100%, 50% 90%;
    background-repeat: no-repeat;
    filter: blur(6px);
    pointer-events: none;
}
.login-glow-line {
    position: absolute;
    left: 0; right: 0; bottom: 78px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(64,224,208,.45) 30%, rgba(64,224,208,.2) 65%, transparent);
    opacity: .8;
}

/* Server-rack corridor motif — evokes the data-centre reference imagery
   (glowing rack LEDs receding into the distance) without using a photo. */
.login-server-row {
    position: absolute;
    right: 6%;
    bottom: 8%;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    height: 46%;
    opacity: .55;
    pointer-events: none;
    z-index: 0;
}
.login-rack {
    width: 20px;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    padding-top: 12px;
}
.login-rack:nth-child(2) { height: 80%; }
.login-rack:nth-child(3) { height: 95%; }
.login-rack:nth-child(4) { height: 70%; }
.login-rack:nth-child(5) { height: 88%; }
.login-rack:nth-child(6) { height: 62%; }
.login-rack .led {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #40E0D0;
    box-shadow: 0 0 5px 1px rgba(64,224,208,.7);
    animation: ledPulse 2.4s ease-in-out infinite;
}
.login-rack .led2 { background: #5DCAA5; box-shadow: 0 0 5px 1px rgba(93,202,165,.7); animation-delay: .6s; }
.login-rack .led3 { background: #7FFFD4; box-shadow: 0 0 5px 1px rgba(127,255,212,.7); animation-delay: 1.2s; }
@keyframes ledPulse {
    0%, 100% { opacity: .35; }
    50% { opacity: 1; }
}

.login-form-panel {
    flex: 0 1 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    margin: 32px 32px 32px 0;
    background: linear-gradient(160deg, #F4F8F7 0%, #E9F1EF 100%);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,20,20,.35);
    border: 1px solid rgba(93,202,165,.25);
}

.login-form-card { width: 100%; max-width: 360px; }
.login-form-title { font-size: 24px; font-weight: 800; color: #10263F; margin-bottom: 6px; letter-spacing: -.01em; }
.login-form-sub { font-size: 13.5px; color: #64748B; margin-bottom: 28px; }

.login-form-panel .form-label { font-size: 12.5px; font-weight: 600; color: #334155; }
.login-input-wrap { position: relative; }
.login-input-icon {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    pointer-events: none;
}
.login-form-panel .form-control {
    border: 1px solid #E2E8F0;
    background: #ffffff;
    border-radius: 9px;
    padding: 10px 12px 10px 36px;
    font-size: 14px;
}
.login-form-panel .form-control:focus {
    border-color: #23A48A;
    box-shadow: 0 0 0 3px rgba(35,164,138,.15);
    background: #ffffff;
}

.login-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #23A48A, #156253);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 14.5px;
    padding: 11px 16px;
    border-radius: 9px;
    transition: filter .15s ease, transform .15s ease;
}
.login-submit-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.login-submit-btn:disabled { opacity: .7; }

.login-creds-section {
    border-top: 1px solid #EAF0EF;
    padding-top: 16px;
}
.login-creds-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748B;
    margin-bottom: 10px;
}
.login-creds-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #23A48A;
    box-shadow: 0 0 4px 1px rgba(35,164,138,.5);
}
.login-creds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
    padding-right: 2px;
}
.login-creds-grid::-webkit-scrollbar { width: 5px; }
.login-creds-grid::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
.login-cred-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F8FAFB;
    border: 1px solid #EAF0EF;
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
    text-align: left;
    transition: all .15s ease;
}
.login-cred-card:hover {
    background: #EAF6F4;
    border-color: #99D8CE;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(21,98,83,.10);
}
.login-cred-avatar {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1B836F, #0A5245);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-cred-info { min-width: 0; }
.login-cred-role { font-size: 11px; font-weight: 600; color: #10263F; }
.login-cred-name { font-size: 10.5px; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px) {
    .login-page-shell { flex-direction: column; }
    .login-brand-panel { flex: none; padding: 28px 24px 24px; }
    .login-brand-top { position: static; margin-bottom: 14px; }
    .login-hero-logo-img { height: 40px; }
    .login-hero-badge { margin-bottom: 12px; }
    .login-hero-headline { font-size: 24px; margin-bottom: 10px; }
    .login-hero-sub { font-size: 13.5px; margin-bottom: 16px; }
    .login-value-grid { display: none; }
    .login-server-row { display: none; }
    .login-glow-line { display: none; }
    .login-form-panel { flex: none; padding: 24px; margin: 16px; }
}
