/* Tender Documents - design system on top of Bootstrap 5.3 */
:root {
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-700: #3730a3;
  --brand-50: #eef2ff;
  --brand-100: #e0e7ff;
  --accent: #06b6d4;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e6eaf2;
  --surface: #ffffff;
  --canvas: #f4f6fb;
  --side-w: 256px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, .08), 0 2px 6px -2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, .22);
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #4338ca 100%);
  --grad-hero: linear-gradient(120deg, #312e81 0%, #4338ca 40%, #6366f1 75%, #06b6d4 130%);

  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-primary-bg-subtle: #eef2ff;
  --bs-primary-border-subtle: #c7d2fe;
  --bs-primary-text-emphasis: #3730a3;
  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: #3730a3;
  --bs-link-hover-color-rgb: 55, 48, 163;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: #1e293b;
  --bs-body-bg: #f4f6fb;
  --bs-border-color: #e6eaf2;
  --bs-border-radius: .625rem;
  --bs-border-radius-sm: .5rem;
  --bs-border-radius-lg: .875rem;
  --bs-secondary-color: #64748b;
  --bs-success: #059669;
  --bs-success-rgb: 5, 150, 105;
  --bs-focus-ring-color: rgba(79, 70, 229, .22);
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background: var(--canvas); font-size: .925rem; letter-spacing: -.003em; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; letter-spacing: -.018em; }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: .95rem; }
a { text-underline-offset: 2px; }
.text-muted { color: var(--muted) !important; }
::selection { background: var(--brand-100); }
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 1040;
  display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 0% 0%, #312e81 0%, rgba(49, 46, 129, 0) 60%), linear-gradient(180deg, #0f172a 0%, #111936 100%);
  color: #cbd5e1; transition: transform .25s ease;
}
.app-brand { display: flex; align-items: center; gap: .7rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.app-brand:hover { color: #fff; }
.app-brand .logo {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem;
  background: var(--grad-brand); box-shadow: 0 6px 18px -4px rgba(99, 102, 241, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.app-brand .name { font-weight: 800; font-size: 1.02rem; line-height: 1.1; letter-spacing: -.02em; }
.app-brand .tag { font-size: .7rem; color: #94a3b8; font-weight: 500; letter-spacing: .02em; }
.side-nav { flex: 1; overflow-y: auto; padding: .5rem .75rem; }
.side-label { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: #64748b; padding: 1rem .75rem .4rem; }
.side-link {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; margin-bottom: 2px;
  border-radius: 10px; color: #cbd5e1; text-decoration: none; font-weight: 500; font-size: .9rem; position: relative;
  transition: background .15s, color .15s;
}
.side-link .bi { font-size: 1.05rem; width: 1.25rem; text-align: center; color: #94a3b8; transition: color .15s; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link:hover .bi { color: #fff; }
.side-link.active { background: linear-gradient(90deg, rgba(99, 102, 241, .32), rgba(99, 102, 241, .08)); color: #fff; font-weight: 600; }
.side-link.active .bi { color: #a5b4fc; }
.side-link.active::before { content: ""; position: absolute; left: -.75rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #818cf8; }
.side-cta { margin: .5rem .75rem 0; }
.side-cta .btn { width: 100%; }
.side-user { display: flex; align-items: center; gap: .65rem; margin: .75rem; padding: .7rem; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); }
.side-user .who { min-width: 0; flex: 1; }
.side-user .who b { display: block; color: #fff; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { display: block; color: #94a3b8; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user a { color: #94a3b8; font-size: 1.1rem; }
.side-user a:hover { color: #fff; }
.avatar {
  width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center;
  font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #06b6d4, #6366f1);
}

.app-main { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; }
.app-top {
  position: sticky; top: 0; z-index: 1030; display: flex; align-items: center; gap: .75rem;
  height: 64px; padding: 0 1.75rem; background: rgba(244, 246, 251, .82);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
}
.app-top .crumbs { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.app-top .crumbs b { color: var(--ink); font-weight: 600; font-size: .92rem; }
.app-top .crumbs .sep { color: #cbd5e1; }
.app-top .today { font-size: .78rem; color: var(--muted); padding: .35rem .7rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.top-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.top-btn:hover { color: var(--brand); border-color: var(--brand-100); }
.user-chip { display: flex; align-items: center; gap: .55rem; padding: 3px 10px 3px 3px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .82rem; }
.user-chip .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: .75rem; }
.user-chip:hover { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.app-content { flex: 1; width: 100%; max-width: 1400px; padding: 1.75rem; }
.app-foot { padding: 1rem 1.75rem 1.5rem; font-size: .75rem; color: #94a3b8; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.side-backdrop { display: none; }

@media (max-width: 991.98px) {
  .app-side { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.side-open .app-side { transform: none; }
  body.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1035; }
  .app-main { margin-left: 0; }
  .app-top { padding: 0 1rem; }
  .app-content { padding: 1.1rem; }
}

/* Page titles: "<h4><i class="bi ..."></i> Title</h4>" */
.app-content h4 > .bi:first-child, .page-icon {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: .6rem; vertical-align: -12px;
  border-radius: 12px; font-size: 1.1rem; color: #fff !important; background: var(--grad-brand);
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, .8);
}
.app-content h4 { margin-bottom: .35rem; }

/* ---------- Cards ---------- */
.card {
  --bs-card-border-color: var(--line); --bs-card-border-radius: var(--radius); --bs-card-inner-border-radius: calc(var(--radius) - 1px);
  --bs-card-cap-bg: #fff; --bs-card-spacer-y: 1.15rem; --bs-card-spacer-x: 1.25rem;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); border-radius: var(--radius);
}
.card-header { font-weight: 650; color: var(--ink); border-bottom-color: var(--line); padding-top: .85rem; padding-bottom: .85rem; }
.card-header .bi { margin-right: .2rem; }
.card-footer { background: #fafbfe; border-top-color: var(--line); }
.card h6 { font-weight: 700; }
a.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-100); }

/* ---------- Buttons ---------- */
.btn {
  --bs-btn-font-weight: 600; --bs-btn-border-radius: 10px; --bs-btn-padding-x: 1rem; --bs-btn-padding-y: .5rem; --bs-btn-font-size: .875rem;
  --bs-btn-focus-box-shadow: 0 0 0 .22rem rgba(79, 70, 229, .22);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; letter-spacing: -.005em;
  transition: transform .12s ease, box-shadow .15s ease, background-color .15s, border-color .15s, color .15s, filter .15s;
}
.btn > .bi { font-size: 1.02em; line-height: 1; }
.btn-sm { --bs-btn-padding-x: .7rem; --bs-btn-padding-y: .3rem; --bs-btn-font-size: .8rem; --bs-btn-border-radius: 8px; gap: .3rem; }
.btn-lg { --bs-btn-padding-x: 1.4rem; --bs-btn-padding-y: .72rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: 12px; }
.btn.w-100 { display: flex; }
.btn-link { --bs-btn-font-weight: 500; display: inline; }
.btn:active { transform: translateY(1px); }

.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-dark {
  border: 0; position: relative; color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary { background: var(--grad-brand); --bs-btn-disabled-bg: #a5b4fc; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.btn-warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #422006; }
.btn-info { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.btn-dark { background: linear-gradient(135deg, #334155, #0f172a); }
.btn-primary:hover, .btn-success:hover, .btn-danger:hover, .btn-info:hover, .btn-dark:hover,
.btn-primary:focus-visible, .btn-success:focus-visible { color: #fff; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(79, 70, 229, .55); }
.btn-success:hover { box-shadow: 0 8px 18px -6px rgba(5, 150, 105, .55); }
.btn-danger:hover { box-shadow: 0 8px 18px -6px rgba(225, 29, 72, .5); }
.btn-warning:hover { color: #422006; filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(245, 158, 11, .55); }
.btn-primary:disabled, .btn-success:disabled, .btn-primary.disabled { filter: grayscale(.35) opacity(.6); box-shadow: none; transform: none; }
.btn-primary:active, .btn-success:active, .btn-check:checked + .btn-primary { color: #fff; filter: brightness(.95); }

.btn-light, .btn-secondary {
  --bs-btn-bg: #fff; --bs-btn-color: var(--ink-2); --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: #f8fafc; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #cbd5e1;
  --bs-btn-active-bg: #f1f5f9; --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}
.btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-danger, .btn-outline-warning, .btn-outline-info, .btn-outline-dark {
  --bs-btn-bg: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: #c7d2fe; --bs-btn-hover-bg: var(--brand-50); --bs-btn-hover-color: var(--brand-700); --bs-btn-hover-border-color: #a5b4fc; --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); }
.btn-outline-secondary { --bs-btn-color: var(--ink-2); --bs-btn-border-color: #dbe1ea; --bs-btn-hover-bg: #f8fafc; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #b8c2d1; --bs-btn-active-bg: #e2e8f0; --bs-btn-active-color: var(--ink); --bs-btn-active-border-color: #b8c2d1; }
.btn-outline-success { --bs-btn-color: #047857; --bs-btn-border-color: #a7f3d0; --bs-btn-hover-bg: #ecfdf5; --bs-btn-hover-color: #065f46; --bs-btn-hover-border-color: #6ee7b7; --bs-btn-active-bg: #059669; --bs-btn-active-border-color: #059669; }
.btn-outline-danger { --bs-btn-color: #be123c; --bs-btn-border-color: #fecdd3; --bs-btn-hover-bg: #fff1f2; --bs-btn-hover-color: #9f1239; --bs-btn-hover-border-color: #fda4af; }
.btn-outline-warning { --bs-btn-color: #b45309; --bs-btn-border-color: #fde68a; --bs-btn-hover-bg: #fffbeb; --bs-btn-hover-color: #92400e; --bs-btn-hover-border-color: #fcd34d; --bs-btn-active-bg: #f59e0b; --bs-btn-active-border-color: #f59e0b; }
.btn-outline-info { --bs-btn-color: #0e7490; --bs-btn-border-color: #a5f3fc; --bs-btn-hover-bg: #ecfeff; --bs-btn-hover-color: #155e75; --bs-btn-hover-border-color: #67e8f9; --bs-btn-active-bg: #0891b2; --bs-btn-active-border-color: #0891b2; }
.btn-outline-dark { --bs-btn-color: var(--ink-2); --bs-btn-border-color: #cbd5e1; --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: #94a3b8; --bs-btn-active-bg: #0f172a; --bs-btn-active-border-color: #0f172a; }
[class*="btn-outline-"]:hover { transform: translateY(-1px); }
.btn .badge { font-size: .7em; padding: .25em .5em; }

/* Segmented radio buttons (btn-check) */
.btn-check + .btn-outline-primary, .btn-check + .btn-outline-secondary { box-shadow: none; }
.btn-check:checked + .btn-outline-primary { background: var(--grad-brand); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .6); }

/* ---------- Tabs ---------- */
.nav.nav-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #eaeef6;
  margin-bottom: .9rem !important;
}
.nav-tabs .nav-link {
  border: 0 !important; border-radius: 10px; margin: 0; color: var(--muted); font-weight: 600; font-size: .86rem; padding: .5rem 1rem;
  display: inline-flex; align-items: center; gap: .45rem; transition: background .15s, color .15s, box-shadow .15s;
}
.nav-tabs .nav-link:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.nav-tabs .nav-link.active { color: var(--brand-700); background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .1), 0 1px 2px rgba(15, 23, 42, .06); }
.nav-tabs .nav-link .badge { background: rgba(100, 116, 139, .14) !important; color: var(--ink-2) !important; font-weight: 700; }
.nav-tabs .nav-link.active .badge { background: var(--brand) !important; color: #fff !important; }
.nav-tabs + .card { border-radius: var(--radius) !important; }
.nav-pills .nav-link { border-radius: 10px; font-weight: 600; color: var(--muted); }
.nav-pills .nav-link.active { background: var(--grad-brand); }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .84rem; color: var(--ink-2); margin-bottom: .35rem; }
.form-control, .form-select {
  border-color: #dbe1ea; border-radius: 10px; padding: .55rem .85rem; font-size: .9rem; color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .15s, box-shadow .15s;
}
.form-control-sm, .form-select-sm { border-radius: 8px; padding: .32rem .65rem; font-size: .82rem; }
.form-select { padding-right: 2.25rem; }
.form-select-sm { padding-right: 2rem; }
.form-control:hover, .form-select:hover { border-color: #c3ccda; }
.form-control:focus, .form-select:focus { border-color: #818cf8; box-shadow: 0 0 0 .22rem rgba(99, 102, 241, .16); }
.form-control::placeholder { color: #a0aec0; }
.form-control:disabled, .form-control[readonly]:not([type=file]) { background: #f6f8fb; }
.form-control[type=file] { padding: .42rem .6rem; }
.form-control[type=file]::file-selector-button { border: 0; border-radius: 7px; margin: -.1rem .7rem -.1rem 0; padding: .32rem .8rem; background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.form-control-sm[type=file]::file-selector-button { padding: .22rem .7rem; }
.form-control[type=file]:hover::file-selector-button { background: var(--brand-100) !important; }
.input-group-text { background: #f6f8fb; border-color: #dbe1ea; color: var(--muted); border-radius: 10px; }
.input-group > .btn { box-shadow: none; }
.form-check-input { border-color: #b8c2d1; width: 1.1em; height: 1.1em; margin-top: .18em; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: #818cf8; box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .18); }
.form-switch .form-check-input { width: 2.2em; }
input[type=checkbox]:not(.form-check-input), input[type=radio]:not(.form-check-input):not(.btn-check) { accent-color: var(--brand); width: 1rem; height: 1rem; vertical-align: -2px; }
.form-text { color: var(--muted); }

/* ---------- Tables ---------- */
.table { --bs-table-border-color: #eef1f6; --bs-table-hover-bg: #f7f8fe; color: var(--ink-2); }
.table > thead > tr > th, .table thead th {
  background: #f8fafc; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line); padding-top: .7rem; padding-bottom: .7rem; white-space: nowrap;
}
.table > thead > tr > th:first-child { border-top-left-radius: 10px; }
.table > thead > tr > th:last-child { border-top-right-radius: 10px; }
.table > tbody > tr > td { padding-top: .7rem; padding-bottom: .7rem; }
.table-sm > tbody > tr > td { padding-top: .45rem; padding-bottom: .45rem; }
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table-bordered > thead > tr > th { border-radius: 0 !important; }

/* ---------- Badges ---------- */
.badge { font-weight: 650; letter-spacing: .01em; border-radius: 7px; padding: .38em .62em; }
.badge.rounded-pill { border-radius: 999px; }
.badge.bg-primary { background: var(--brand-50) !important; color: var(--brand-700) !important; box-shadow: inset 0 0 0 1px #c7d2fe; }
.badge.bg-secondary { background: #f1f5f9 !important; color: #475569 !important; box-shadow: inset 0 0 0 1px #e2e8f0; }
.badge.bg-success { background: #ecfdf5 !important; color: #047857 !important; box-shadow: inset 0 0 0 1px #a7f3d0; }
.badge.bg-danger { background: #fff1f2 !important; color: #be123c !important; box-shadow: inset 0 0 0 1px #fecdd3; }
.badge.bg-warning { background: #fffbeb !important; color: #b45309 !important; box-shadow: inset 0 0 0 1px #fde68a; }
.badge.bg-info { background: #ecfeff !important; color: #0e7490 !important; box-shadow: inset 0 0 0 1px #a5f3fc; }
.badge.bg-dark { background: #1e293b !important; }
.badge.bg-light { background: #f1f5f9 !important; color: var(--ink-2) !important; }
.badge.text-bg-primary { background: var(--grad-brand) !important; }

/* ---------- Alerts ---------- */
.alert {
  --bs-alert-border-radius: 12px; border: 1px solid transparent; border-left-width: 4px;
  display: block; padding: .85rem 1.1rem; box-shadow: var(--shadow-sm); font-size: .88rem;
}
.alert-flash { display: flex; align-items: flex-start; gap: .7rem; padding-right: 3rem; }
.alert-flash > .bi { font-size: 1.15rem; line-height: 1.2; }
.alert-success { background: #f0fdf7; border-color: #bbf7d0; border-left-color: #10b981; color: #065f46; }
.alert-danger { background: #fff5f6; border-color: #fecdd3; border-left-color: #f43f5e; color: #9f1239; }
.alert-warning { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; color: #78350f; }
.alert-info { background: #f0f7ff; border-color: #c7dcfe; border-left-color: #3b82f6; color: #1e3a8a; }
.alert-primary { background: var(--brand-50); border-color: #c7d2fe; border-left-color: var(--brand); color: var(--brand-700); }
.alert-secondary, .alert-light { background: #f8fafc; border-color: #e2e8f0; border-left-color: #94a3b8; color: var(--ink-2); }
.alert .alert-link, .alert a { font-weight: 600; }

/* ---------- Misc components ---------- */
.list-group { --bs-list-group-border-color: #eef1f6; }
.list-group-item-action:hover { background: #f7f8fe; }
.progress { --bs-progress-bg: #e9edf5; --bs-progress-border-radius: 999px; }
.progress-bar { background: var(--grad-brand); }
.dropdown-menu { --bs-dropdown-border-color: var(--line); --bs-dropdown-border-radius: 12px; --bs-dropdown-link-active-bg: var(--brand); box-shadow: var(--shadow-lg); padding: .4rem; font-size: .88rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; display: flex; align-items: center; gap: .55rem; }
.dropdown-item .bi { color: var(--muted); }
.modal-content { border: 0; border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--line); }
.accordion { --bs-accordion-border-color: var(--line); --bs-accordion-active-bg: var(--brand-50); --bs-accordion-active-color: var(--brand-700); --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .16); }
.tooltip { --bs-tooltip-bg: #0f172a; --bs-tooltip-border-radius: 8px; }
.border-bottom, .border-top { border-color: #eef1f6 !important; }
.bg-light { background-color: #f8fafc !important; }
.text-primary { color: var(--brand) !important; }
hr { border-color: var(--line); opacity: 1; }
code { color: #be185d; background: #fdf2f8; padding: .1em .35em; border-radius: 5px; }
.sticky-bottom { bottom: 12px; z-index: 1020; }
.card.sticky-bottom { background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-lg); border-color: rgba(226, 232, 240, .9); }
.img-preview { max-height: 70px; max-width: 160px; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 4px; background: #fff; }
.doc-row { border-bottom: 1px solid #eef1f6; padding: 12px 0; }
.doc-row:last-child { border-bottom: none; }

/* ---------- Dashboard ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 1.9rem 2rem; color: #fff; margin-bottom: 1.4rem;
  background: var(--grad-hero); box-shadow: 0 20px 40px -18px rgba(67, 56, 202, .65);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 380px; height: 380px; right: -90px; top: -170px; background: radial-gradient(circle, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 65%); }
.hero::after { width: 260px; height: 260px; right: 18%; bottom: -170px; background: radial-gradient(circle, rgba(34, 211, 238, .35), rgba(34, 211, 238, 0) 65%); }
.hero > * { position: relative; z-index: 1; }
.hero h2 { color: #fff; font-size: 1.65rem; font-weight: 800; margin-bottom: .3rem; }
.hero p { color: rgba(255, 255, 255, .82); margin-bottom: 0; max-width: 620px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: .3rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); margin-bottom: .8rem; }
.btn-glass { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); color: #fff; backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-1px); }
.btn-white { background: #fff; color: var(--brand-700); border: 0; box-shadow: 0 8px 20px -8px rgba(15, 23, 42, .5); }
.btn-white:hover { background: #fff; color: var(--brand-600); transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(15, 23, 42, .55); }

.stat { display: flex; flex-direction: row; align-items: center; gap: .9rem; padding: 1.05rem 1.15rem; height: 100%; text-decoration: none; color: inherit; }
.stat .ico { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; font-size: 1.25rem; }
.stat .num { font-size: 1.55rem; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -.03em; }
.stat .lbl { font-size: .78rem; color: var(--muted); font-weight: 500; }
.ico-indigo { background: #eef2ff; color: #4f46e5; }
.ico-cyan { background: #ecfeff; color: #0891b2; }
.ico-amber { background: #fffbeb; color: #d97706; }
.ico-emerald { background: #ecfdf5; color: #059669; }
.ico-rose { background: #fff1f2; color: #e11d48; }
.ico-violet { background: #f5f3ff; color: #7c3aed; }

.action-card { padding: 1.3rem; height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.action-card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: .9rem; }
.action-card h6 { font-size: 1rem; margin-bottom: .3rem; }
.action-card p { font-size: .83rem; color: var(--muted); margin-bottom: .8rem; }
.action-card .go { margin-top: auto; font-size: .82rem; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: .3rem; }
.action-card:hover .go .bi { transform: translateX(3px); }
.action-card .go .bi { transition: transform .15s; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 1.6rem 0 .8rem; }
.section-title h5 { margin: 0; }
.empty-state { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty-state .bi { font-size: 2.2rem; color: #c7d2fe; display: block; margin-bottom: .5rem; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; background: #fff; }
.auth.wide { grid-template-columns: minmax(340px, 34%) 1fr; }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 3rem 3.2rem; display: flex; flex-direction: column;
  background: radial-gradient(90% 60% at 100% 0%, rgba(6, 182, 212, .35), rgba(6, 182, 212, 0) 60%), radial-gradient(80% 60% at 0% 100%, rgba(129, 140, 248, .45), rgba(129, 140, 248, 0) 60%), linear-gradient(160deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
}
.auth-brand::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 80%); pointer-events: none; }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .app-brand { padding: 0; margin-bottom: auto; }
.auth-brand h1 { color: #fff; font-size: 2.1rem; font-weight: 800; line-height: 1.15; letter-spacing: -.03em; margin: 2.5rem 0 .8rem; }
.auth-brand h1 span { background: linear-gradient(90deg, #a5f3fc, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand .lead { color: rgba(255, 255, 255, .78); font-size: .98rem; max-width: 460px; }
.auth-feats { list-style: none; padding: 0; margin: 1.8rem 0 auto; display: grid; gap: .85rem; }
.auth-feats li { display: flex; gap: .8rem; align-items: flex-start; font-size: .9rem; color: rgba(255, 255, 255, .88); }
.auth-feats li .bi { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); font-size: 1rem; }
.auth-feats li b { display: block; color: #fff; font-size: .92rem; }
.auth-foot { margin-top: 2rem; font-size: .75rem; color: rgba(255, 255, 255, .55); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; background: radial-gradient(60% 50% at 50% 0%, #f5f7ff, #fff 70%); }
.auth-form-inner { width: 100%; max-width: 420px; }
.auth.wide .auth-form { align-items: flex-start; }
.auth.wide .auth-form-inner { max-width: 880px; }
.auth-form h3 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .3rem; }
.auth-form .sub { color: var(--muted); margin-bottom: 1.8rem; }
.auth-form .form-control { padding: .7rem .95rem; }
.auth-form .input-icon { position: relative; }
.auth-form .input-icon > .bi { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.auth-form .input-icon > .form-control { padding-left: 2.5rem; }
.auth-form .form-section { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin: 1.4rem 0 .8rem; display: flex; align-items: center; gap: .5rem; }
.auth-form .form-section::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form h6.text-primary { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 1.4rem 0 .8rem; display: flex; align-items: center; gap: .5rem; }
.auth-form h6.text-primary::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-flash { max-width: 880px; margin: 0 auto 1rem; }
@media (max-width: 991.98px) {
  .auth, .auth.wide { grid-template-columns: 1fr; }
  .auth-brand { padding: 2rem 1.5rem; }
  .auth-brand h1 { font-size: 1.6rem; margin-top: 1.5rem; }
  .auth-feats, .auth-foot { display: none; }
  .auth-form { padding: 2rem 1.2rem; }
}

.auto-upload-btn { cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.auto-upload-btn.disabled { pointer-events: none; opacity: .8; }
