:root {
  --navy: #062c52;
  --navy-2: #075b62;
  --blue: #0b438c;
  --blue-soft: #edf7f5;
  --ink: #082844;
  --muted: #667392;
  --line: #dce4f0;
  --surface: #ffffff;
  --canvas: #f6f8fc;
  --yellow: #ffc400;
  --green: #12933e;
  --red: #dc2626;
  --orange: #df7800;
  --purple: #7c3aed;
  --shadow: 0 10px 28px rgba(11, 38, 89, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "DM Sans", sans-serif; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; stroke-width: 1.8; }
a { text-decoration: none; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 255px; display: flex; flex-direction: column; padding: 28px 14px 22px; color: #fff; background: linear-gradient(155deg, #063b3b 0%, #043d55 100%); box-shadow: 6px 0 30px rgba(0, 45, 55, .16); }
.brand { display: flex; padding: 0 12px 28px; font-size: 25px; letter-spacing: -.7px; }
.brand span { font-weight: 500; }
.brand strong { font-weight: 800; color: var(--yellow); }
.brand small { margin-left: 7px; font-size: 12px; font-weight: 500; letter-spacing: 0; opacity: .72; }
.main-nav { display: grid; gap: 6px; }
.nav-item, .logout { text-decoration: none; position: relative; width: 100%; display: flex; align-items: center; gap: 14px; min-height: 52px; border: 0; border-radius: 9px; padding: 0 14px; color: rgba(255,255,255,.9); background: transparent; text-align: left; font-weight: 500; transition: .2s ease; }
.nav-item:hover { background: rgba(255,255,255,.09); transform: translateX(2px); }
.nav-item.active { background: rgba(67, 151, 187, .34); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 0; bottom: 0; width: 5px; border-radius: 0 4px 4px 0; background: var(--yellow); }
.nav-item svg, .logout svg { width: 23px; height: 23px; flex: 0 0 auto; }
.nav-count { margin-left: auto; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; color: #1c3266; background: var(--yellow); font-size: 11px; }
.logout { margin-top: auto; border-top: 1px solid rgba(255,255,255,.18); border-radius: 0; padding-top: 24px; }

.workspace { width: calc(100% - 255px); margin-left: 255px; min-width: 0; }
.topbar { height: 74px; display: flex; align-items: center; gap: 16px; padding: 0 30px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 30; }
.topbar-spacer { flex: 1; }
.compact-select { height: 40px; min-width: 70px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; color: var(--ink); background: #fff; }
.notification-button, .profile-button, .icon-btn { border: 0; background: transparent; color: var(--ink); }
.notification-button { position: relative; display: grid; place-items: center; padding: 8px; }
.notification-button span { position: absolute; top: 0; right: 0; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #593900; background: var(--yellow); font-size: 10px; font-weight: 700; }
.profile-button { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.profile-button svg { width: 15px; }
.profile-menu { position: relative; }
.profile-dropdown { position: absolute; top: calc(100% + 10px); right: 0; min-width: 140px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.profile-dropdown[hidden] { display: none; }
.profile-dropdown a { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 10px; border-radius: 6px; color: var(--ink); font-size: 13px; font-weight: 600; }
.profile-dropdown a:hover { color: var(--green); background: #f0faf7; }
.profile-dropdown svg { width: 17px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); }
.mobile-menu { display: none; }

#app { padding: 28px 30px 42px; max-width: 1700px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: clamp(27px, 3vw, 38px); line-height: 1.1; letter-spacing: -1.2px; color: #07257e; }
.page-head p { margin: 0; color: var(--muted); }
.page-actions { display: flex; gap: 10px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--navy); border-radius: 7px; padding: 0 20px; color: var(--navy); background: #fff; font-weight: 600; transition: .16s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(4, 39, 100, .12); }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.button.yellow { border-color: var(--yellow); color: var(--ink); background: var(--yellow); }
.button.danger { border-color: #fecaca; color: var(--red); }
.button.small { min-height: 34px; padding: 0 13px; font-size: 13px; }
.button.icon-only { width: 38px; padding: 0; border-radius: 50%; }

.hero { min-height: 300px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; padding: 42px 48px; border-radius: 18px; color: #fff; background: radial-gradient(circle at 70% 20%, rgba(12,157,81,.62), transparent 31%), linear-gradient(125deg, #06253e 0%, #07534d 52%, #087143 100%); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 540px; height: 270px; right: -100px; bottom: -190px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.025), 0 0 0 50px rgba(255,255,255,.02), 0 0 0 75px rgba(255,255,255,.015); }
.hero h2 { margin: 0 0 10px; font-size: clamp(32px, 4vw, 50px); letter-spacing: -1.8px; }
.hero p { max-width: 720px; margin: 0 0 25px; color: rgba(255,255,255,.86); font-size: 17px; line-height: 1.7; }
/* .app-mark { justify-self: center; width: 184px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 38px; transform: rotate(-3deg); background: linear-gradient(145deg, #02a755 0 52%, var(--yellow) 52% 54%, #073567 54%); box-shadow: 0 25px 55px rgba(0,0,0,.25); font-size: 68px; font-weight: 800; letter-spacing: -9px; } */
.app-mark { position: relative; z-index: 1; justify-self: center; width: 184px; aspect-ratio: 1; padding: 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 42px; transform: rotate(-2deg); background: rgba(255,255,255,.1); box-shadow: 0 28px 60px rgba(0,0,0,.3); backdrop-filter: blur(10px); }
.app-mark img { width: 100%; height: 100%; display: block; border-radius: 34px; object-fit: cover; transform: rotate(2deg); }
.app-mark span { transform: rotate(3deg); color: #fff; }
.app-mark.dashboard-logo-frame { background:transparent; border-color:transparent; box-shadow:none; backdrop-filter:none; }
.dashboard-logo-frame::before { content:''; position:absolute; inset:-1px; border:1px solid rgba(255,255,255,.2); border-radius:inherit; background:rgba(255,255,255,.1); box-shadow:0 28px 60px rgba(0,0,0,.3); backdrop-filter:blur(10px); pointer-events:none; animation:dashboard-frame-drift 14s ease-in-out infinite; }
@keyframes dashboard-frame-drift {
  0%,100% { transform:translate(-4px,2px) rotate(-3deg) scale(1.02); border-radius:28% 24% 30% 22%; }
  25% { transform:translate(6px,-5px) rotate(5deg) scale(1.04,.99); border-radius:34% 22% 26% 32%; }
  50% { transform:translate(3px,6px) rotate(-2deg) scale(1,1.05); border-radius:22% 32% 24% 35%; }
  75% { transform:translate(-7px,-3px) rotate(-6deg) scale(1.04,1.01); border-radius:30% 35% 32% 23%; }
}
.dashboard-logo-art { position:relative; width:100%; aspect-ratio:1; transform:rotate(2deg); }
.auth-showcase .login-logo-frame { display:block; width:160px; margin-bottom:28px; }
.app-mark .dashboard-logo-art img { transform:none; }
.dashboard-logo-motion { position:absolute; inset:0; display:block; width:100%; height:100%; pointer-events:none; overflow:visible; }
@media (prefers-reduced-motion:reduce) { .dashboard-logo-motion { display:none; } }
@media (prefers-reduced-motion:reduce) { .dashboard-logo-frame::before { animation:none; transform:none; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.stat-card { display: flex; align-items: center; gap: 16px; min-height: 112px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 5px 16px rgba(9,40,91,.05); }
.stat-icon { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); }
.stat-icon.orange { color: var(--orange); background: #fff4e5; }
.stat-icon.green { color: var(--green); background: #eaf8ed; }
.stat-icon.red { color: var(--red); background: #fff0f0; }
.stat-icon.purple { color: var(--purple); background: #f2eaff; }
.stat-card label { display: block; color: var(--muted); font-size: 14px; }
.stat-card strong { display: block; margin-top: 5px; font-size: 26px; color: #09257d; }

/* Shared summary-card interactions across all portal pages. */
.stat-card { --card-accent: var(--blue); --card-glow: rgba(18,79,143,.16); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.stat-card:has(.stat-icon.orange) { --card-accent: var(--orange); --card-glow: rgba(239,132,12,.18); }
.stat-card:has(.stat-icon.green) { --card-accent: var(--green); --card-glow: rgba(18,147,62,.16); }
.stat-card:has(.stat-icon.red) { --card-accent: var(--red); --card-glow: rgba(239,52,64,.16); }
.stat-card:has(.stat-icon.purple) { --card-accent: var(--purple); --card-glow: rgba(123,61,196,.17); }
.stat-card:focus-within { border-color:var(--card-accent); box-shadow:0 0 0 1px var(--card-accent),0 12px 28px var(--card-glow); }
@media (hover:hover) and (pointer:fine) {
  .stat-card:hover { transform:translateY(-4px); border-color:var(--card-accent); box-shadow:0 0 0 1px var(--card-accent),0 12px 28px var(--card-glow); }
}

/* Global SweetAlert2 theme, including alerts hosted inside native dialogs. */
body .swal2-container.swal2-backdrop-show { background:rgba(5,30,45,.48); backdrop-filter:blur(5px); }
body .swal2-popup {
  --alert-accent:#08776a;
  --alert-soft:#e9f6f2;
  font-family:"DM Sans",sans-serif; color:var(--ink); border:1px solid #e0ebe8;
  border-top:5px solid var(--alert-accent); border-radius:24px; padding:0 0 28px;
  background:linear-gradient(160deg,#f2faf7 0,#fff 38%);
  box-shadow:0 30px 90px rgba(3,28,42,.24),0 6px 20px rgba(3,28,42,.08);
}
body .swal2-popup:has(.swal2-warning) { --alert-accent:#c57912; --alert-soft:#fff5e6; }
body .swal2-popup:has(.swal2-error) { --alert-accent:#d44350; --alert-soft:#fff0f1; }
body .swal2-popup:has(.swal2-info),body .swal2-popup:has(.swal2-question) { --alert-accent:#17698b; --alert-soft:#eaf5fa; }
body .swal2-popup .swal2-title { padding:20px 30px 0; color:var(--ink); font-size:25px; font-weight:700; line-height:1.3; letter-spacing:-.5px; }
body .swal2-popup .swal2-html-container { padding:0; margin:16px 32px 0; color:var(--muted); font-size:15px; line-height:1.75; overflow-wrap:anywhere; }
body .swal2-popup .swal2-icon { margin:30px auto 0; border-width:2px; box-shadow:0 0 0 10px var(--alert-soft); }
body .swal2-popup .swal2-actions { gap:12px; margin:26px 24px 0; }
body .swal2-popup .swal2-styled { margin:0; min-height:46px; padding:12px 23px; border-radius:12px; font-family:inherit; font-size:14px; font-weight:700; transition:transform .18s ease,box-shadow .18s ease; }
body .swal2-popup .swal2-confirm { background:linear-gradient(120deg,#075b62,#087c62) !important; color:white; box-shadow:0 5px 14px #075b6226; }
body .swal2-popup .swal2-cancel { background:#f0f4f6 !important; color:#395364 !important; border:1px solid #dce5e9; box-shadow:none; }
body .swal2-popup .swal2-deny { background:#c83c4a !important; color:white; }
body .swal2-popup .swal2-styled:hover { transform:translateY(-1px); box-shadow:0 5px 16px #08284420; }
body .swal2-popup .swal2-styled:focus-visible,body .swal2-popup .swal2-close:focus-visible { outline:3px solid #6ab7a5; outline-offset:3px; box-shadow:none; }
body .swal2-popup .swal2-close { margin:10px; border-radius:50%; color:#748992; }
body .swal2-popup .swal2-input,body .swal2-popup .swal2-textarea,body .swal2-popup .swal2-select { border:1px solid #d6e3e0; border-radius:10px; color:var(--ink); font-family:inherit; box-shadow:none; }
body .swal2-popup .swal2-validation-message { background:#fff3eb; color:#a75016; font-size:14px; }
body .swal2-popup .swal2-footer { border-color:#e5eeeb; color:var(--muted); font-size:13px; }
body .swal2-popup.swal2-show { animation:portal-alert-in .24s ease-out; }
body .swal2-popup.swal2-hide { animation:portal-alert-out .15s ease-in forwards; }
body .swal2-popup.swal2-toast { border-top:1px solid #e0ebe8; border-left:4px solid var(--alert-accent); border-radius:15px; padding:14px 18px; background:white; box-shadow:0 12px 36px #08284424; }
body .swal2-popup.swal2-toast .swal2-title { font-size:14px; padding:0; margin:8px 12px; letter-spacing:0; }
body .swal2-popup.swal2-toast .swal2-icon { margin:0; box-shadow:none; }
body .swal2-popup.swal2-toast .swal2-html-container { margin:4px 12px; font-size:13px; }
body .swal2-popup .swal2-timer-progress-bar { background:var(--alert-accent); }
@keyframes portal-alert-in { from { opacity:0; transform:translateY(14px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes portal-alert-out { from { opacity:1; } to { opacity:0; transform:translateY(8px) scale(.98); } }
@media (prefers-reduced-motion:reduce) {
  .stat-card,body .swal2-popup .swal2-styled { transition:none; }
  .stat-card:hover,body .swal2-popup .swal2-styled:hover { transform:none; }
  body .swal2-popup.swal2-show,body .swal2-popup.swal2-hide { animation:none; }
}

.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 5px 16px rgba(9,40,91,.04); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 13px; }
.card-header h2, .card-header h3 { margin: 0; color: #09257d; font-size: 20px; }
.card-body { padding: 20px 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--line); }
.text-link { border: 0; padding: 0; color: var(--blue); background: none; font-weight: 600; }

.filter-bar { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(2, minmax(150px, .75fr)) auto; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--blue); }
.control { width: 100%; height: 42px; border: 1px solid #d3ddec; border-radius: 7px; padding: 0 13px; outline: none; color: var(--ink); background: #fff; transition: .15s ease; }
.search-wrap .control { padding-left: 42px; }
.control:focus, textarea.control:focus { border-color: #6c92e7; box-shadow: 0 0 0 3px rgba(12,70,215,.08); }
textarea.control { height: auto; min-height: 110px; padding-top: 12px; resize: vertical; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.filters-wide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
.data-table th { padding: 14px 16px; color: #56627c; background: #fbfcfe; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .45px; }
.data-table td { padding: 15px 16px; border-top: 1px solid var(--line); }
.data-table tbody tr { transition: .14s ease; }
.data-table tbody tr:hover, .data-table tr.selected { background: #f1f6ff; }
.table-title { font-weight: 600; color: var(--ink); }
.badge { display: inline-flex; align-items: center; min-height: 27px; border-radius: 6px; padding: 0 10px; color: #0c46c2; background: #eaf1ff; font-size: 12px; font-weight: 600; }
.badge.green { color: #08752d; background: #e8f7e9; }
.badge.orange { color: #b35a00; background: #fff3df; }
.badge.red { color: #d11414; background: #ffeded; }
.badge.purple { color: #6c21d8; background: #f1e8ff; }
.notification-list { list-style: none; margin: 0; padding: 0; }
.notification-list li { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 13px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.notification-list li:last-child { border: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); }
.muted { color: var(--muted); }
.small-text { font-size: 12px; }

.toolbar { display: flex; align-items: center; gap: 10px; padding: 0 20px 18px; }
.tabs { display: flex; gap: 6px; padding: 0 20px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { min-height: 45px; border: 0; border-bottom: 2px solid transparent; padding: 0 13px; color: #53617d; background: none; white-space: nowrap; font-weight: 500; }
.tab.active { color: var(--blue); border-color: var(--blue); }
/* .pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; } */
.pages { display: flex; gap: 7px; }
.page-dot { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; }
.page-dot.active { border-color: var(--blue); color: #fff; background: var(--blue); }

.info-strip { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 15px 18px; border: 1px solid #cbdcfb; border-radius: 8px; color: #234b9a; background: #f4f8ff; font-size: 13px; }
.approval-layout { display: grid; grid-template-columns: 2fr .8fr; gap: 16px; }
.doc-preview { min-height: 570px; padding: 34px; color: #1e1e1e; background: #f4f4f4; }
.paper { max-width: 680px; min-height: 500px; margin: auto; padding: 45px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.11); }
.paper h3 { text-align: center; color: #111; }
.paper dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px; font-size: 13px; }
.paper table { width: 100%; border-collapse: collapse; font-size: 11px; }
.paper td, .paper th { border: 1px solid #333; padding: 6px; }
.decision { display: grid; gap: 12px; }
.decision-option { display: flex; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.decision-option:has(input:checked) { border-color: #33a45a; background: #f5fff8; }
.decision-option.revise:has(input:checked) { border-color: #f59e0b; background: #fffaf1; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px; }
.chart-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.chart-card h3 { margin: 0 0 20px; color: #09257d; }
.chart { height: 190px; display: flex; align-items: flex-end; gap: clamp(5px, 1vw, 13px); padding: 12px 8px 23px; border-left: 1px solid #aab4c6; border-bottom: 1px solid #aab4c6; background: repeating-linear-gradient(to top, transparent 0 44px, #edf0f5 45px); }
.bar { flex: 1; position: relative; min-width: 9px; border-radius: 2px 2px 0 0; background: var(--navy); }
.bar.over { background: #e32b2b; }
.bar::after { content: attr(data-month); position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); color: #67738b; font-size: 10px; }

.detail-drawer { position: fixed; z-index: 80; top: 0; right: 0; width: min(440px, 100%); height: 100vh; overflow-y: auto; padding: 28px; border-left: 1px solid var(--line); background: #fff; box-shadow: -18px 0 45px rgba(4,31,77,.14); transform: translateX(102%); transition: transform .25s ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(2,17,48,.28); opacity: 0; pointer-events: none; transition: .2s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.drawer-head h2 { margin: 0; color: #09257d; }
.drawer-close { border: 0; background: none; color: var(--ink); }
.detail-list { display: grid; grid-template-columns: 1fr 1.2fr; gap: 15px 10px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 600; text-align: right; }
.drawer-actions { display: grid; gap: 10px; margin-top: 22px; }

.complaint-subject { max-width: 220px; white-space: normal; }
.assistant-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.assistant-hero { padding: 22px; border-radius: 12px; color: #fff; text-align: center; background: linear-gradient(120deg, #06253e, #087143); }
.chat-window { height: 420px; overflow-y: auto; padding: 22px; }
.message { width: fit-content; max-width: 78%; margin-bottom: 16px; padding: 14px 16px; border-radius: 7px 16px 16px 16px; background: #f1f5fb; line-height: 1.55; font-size: 14px; }
.message.user { margin-left: auto; border-radius: 16px 7px 16px 16px; background: #e7f0ff; }
.chat-input { display: flex; gap: 10px; padding: 15px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; }
.quick-list { display: grid; gap: 9px; }
.quick-action { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 50px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; color: var(--ink); background: #fff; text-align: left; }

.select2-container { width: 100% !important; }
.select2-container .select2-selection--single { height: 42px; border-color: #d3ddec; border-radius: 7px; }
.select2-container .select2-selection--single .select2-selection__rendered { padding-left: 13px; line-height: 40px; color: var(--ink); }
.select2-container .select2-selection--single .select2-selection__arrow { height: 40px; right: 7px; }
.select2-dropdown { border-color: #d3ddec; box-shadow: var(--shadow); }
.select2-results__option--highlighted.select2-results__option--selectable { background: var(--blue) !important; }
.swal2-popup { font-family: "DM Sans", sans-serif; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .button { width: 100%; }
  .filters-wide { grid-template-columns: 1fr 1fr; }
  .assistant-layout { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; margin-left: 0; }
  .mobile-menu { display: grid; place-items: center; }
  .profile-button > span:not(.avatar), .profile-button svg { display: none; }
  #app { padding: 20px 16px 35px; }
  .topbar { height: 64px; padding: 0 16px; }
  .hero { grid-template-columns: 1fr; padding: 34px 26px; }
  .app-mark { display: none; }
  .grid-2, .approval-layout { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .page-head { align-items: flex-start; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 96px; }
  .filter-bar, .filters-wide { grid-template-columns: 1fr; }
  .hero h2 { font-size: 34px; }
  .hero p { font-size: 15px; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .chart-grid { padding: 8px; }
  .detail-drawer { padding: 22px 18px; }
}

/* Authentication */
.auth-page { min-height: 100vh; background: #fff; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .9fr) minmax(540px, 1.1fr); }
.auth-showcase { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 100vh; padding: 40px 54px; color: #fff; background: radial-gradient(circle at 75% 22%, rgba(12, 157, 81, .5), transparent 29%), linear-gradient(145deg, #063b3b 0%, #064c52 62%, #087143 100%); }
.auth-showcase::before, .auth-showcase::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; pointer-events: none; }
.auth-showcase::before { width: 620px; height: 330px; left: -290px; bottom: -185px; box-shadow: 0 0 0 32px rgba(255,255,255,.018), 0 0 0 64px rgba(255,255,255,.014), 0 0 0 96px rgba(255,255,255,.01); }
.auth-showcase::after { width: 480px; height: 240px; top: -170px; right: -210px; box-shadow: 0 0 0 28px rgba(255,255,255,.018), 0 0 0 56px rgba(255,255,255,.012); }
.auth-brand, .auth-mobile-brand { position: relative; z-index: 1; display: flex; align-items: baseline; font-size: 27px; letter-spacing: -.8px; }
.auth-brand strong, .auth-mobile-brand strong { color: var(--yellow); }
.auth-brand small { margin-left: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0; opacity: .72; }
.auth-showcase-content { position: relative; z-index: 1; max-width: 590px; margin: auto 0; }
.auth-logo-mark { width: 92px; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 32px; border-radius: 24px; background: linear-gradient(145deg, #06a858 0 52%, var(--yellow) 52% 55%, #052d63 55%); box-shadow: 0 20px 40px rgba(0,0,0,.22); transform: rotate(-3deg); }
.auth-logo-mark span { transform: rotate(3deg); font-size: 37px; font-weight: 800; letter-spacing: -5px; }
.auth-eyebrow, .auth-kicker { margin: 0 0 12px; color: var(--yellow); font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.auth-showcase h1 { margin: 0 0 22px; font-size: clamp(40px, 4.2vw, 65px); line-height: 1.05; letter-spacing: -2.5px; }
.auth-showcase-content > p:not(.auth-eyebrow) { max-width: 540px; margin: 0; color: rgba(255,255,255,.78); font-size: 17px; line-height: 1.7; }
.auth-benefits { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 32px; }
.auth-benefits span { display: inline-flex; align-items: center; gap: 8px; min-height: 39px; padding: 0 13px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; background: rgba(255,255,255,.07); font-size: 12px; }
.auth-benefits svg { width: 17px; color: var(--yellow); }
.auth-showcase-footer { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.54); font-size: 12px; }
.auth-security-note { display: flex; align-items: flex-start; gap: 13px; max-width: 530px; margin-top: 30px; padding: 17px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 9px; color: rgba(255,255,255,.82); background: rgba(255,255,255,.07); font-size: 13px; line-height: 1.55; }
.auth-security-note svg { flex: 0 0 auto; color: var(--yellow); }
.auth-panel { display: grid; place-items: center; padding: 40px; background: linear-gradient(145deg, #fff, #f2f8f7); }
.auth-card { width: min(100%, 480px); }
.auth-mobile-brand { display: none; margin-bottom: 36px; color: var(--navy); font-size: 21px; }
.auth-card .auth-kicker { color: var(--green); }
.auth-card h2 { margin: 0 0 10px; color: var(--navy); font-size: clamp(30px, 3vw, 42px); letter-spacing: -1.4px; }
.auth-intro { margin: 0 0 31px; color: var(--muted); line-height: 1.6; }
.auth-form { display: grid; gap: 20px; }
.auth-field label { display: block; margin-bottom: 8px; color: #253353; font-size: 13px; font-weight: 600; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.label-row a, .auth-help a, .auth-legal a, .back-link { color: var(--blue); text-decoration: none; font-size: 13px; font-weight: 600; }
.label-row a:hover, .auth-help a:hover, .back-link:hover { text-decoration: underline; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > svg { position: absolute; left: 15px; top: 50%; width: 19px; transform: translateY(-50%); color: #73809c; }
.auth-input-wrap input { width: 100%; height: 50px; border: 1px solid #ced8e8; border-radius: 8px; padding: 0 48px 0 45px; outline: none; color: var(--ink); background: #fff; transition: .16s ease; }
.auth-input-wrap input:focus { border-color: #168b79; box-shadow: 0 0 0 4px rgba(12,126,105,.1); }
.password-toggle { position: absolute; right: 9px; top: 50%; width: 37px; height: 37px; display: grid; place-items: center; border: 0; border-radius: 6px; transform: translateY(-50%); color: #687590; background: transparent; }
.password-toggle:hover { background: var(--blue-soft); color: var(--blue); }
.password-toggle svg { width: 18px; }
.field-error { display: block; min-height: 0; margin-top: 5px; color: var(--red); font-size: 12px; }
.auth-field.invalid .auth-input-wrap input { border-color: #ef4444; background: #fffafa; }
.remember-row { display: flex; align-items: center; gap: 9px; color: #4f5d78; font-size: 13px; cursor: pointer; }
.remember-row input { width: 17px; height: 17px; accent-color: var(--blue); }
.recaptcha-wrap { min-height: 78px; overflow: hidden; }
.g-recaptcha { transform-origin: left top; }
.auth-submit { width: 100%; min-height: 50px; border-radius: 8px; }
.auth-submit svg { width: 18px; transition: transform .15s ease; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit:disabled { cursor: wait; opacity: .8; }
.button-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: auth-spin .65s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-help { display: flex; gap: 12px; margin-top: 28px; padding: 16px; border: 1px solid #cde6df; border-radius: 8px; color: #64718c; background: #f0faf7; font-size: 12px; line-height: 1.55; }
.auth-help svg { width: 19px; flex: 0 0 auto; color: var(--blue); }
.auth-legal { margin: 24px 0 0; color: #8a94a8; text-align: center; font-size: 11px; line-height: 1.55; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 35px; }
.back-link svg { width: 17px; }
.reset-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 23px; border-radius: 14px; color: var(--blue); background: var(--blue-soft); }
.reset-icon svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-panel { min-height: 100vh; padding: 36px 22px; }
  .auth-mobile-brand { display: flex; }
}

@media (max-width: 370px) {
  .auth-panel { padding-inline: 15px; }
  .recaptcha-wrap { height: 70px; }
  .g-recaptcha { transform: scale(.88); }
}
