/* Dashboard layout and component styles */
:root {
  color-scheme: light;
  --page: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #182230;
  --muted: #6b7788;
  --line: #e5eaf1;
  --accent: #3157d5;
  --accent-hover: #2446b8;
  --accent-soft: #edf1ff;
  --success: #16845b;
  --danger: #c43d4b;
  --sidebar: #17233b;
  --sidebar-ink: #dce5f5;
  --sidebar-muted: #9eacc4;
  --shadow: 0 12px 32px rgba(24, 34, 48, .07);
  --radius: 16px;
  font-family: "Outfit", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101522;
  --surface: #192132;
  --surface-2: #202b3e;
  --ink: #edf2fa;
  --muted: #aab6c8;
  --line: #303c50;
  --accent: #8ca5ff;
  --accent-hover: #a6b8ff;
  --accent-soft: #263251;
  --success: #5bd3a2;
  --danger: #ff8790;
  --sidebar: #0d1422;
  --sidebar-ink: #e4ebf7;
  --sidebar-muted: #aab6c8;
  --shadow: 0 14px 36px rgba(0, 0, 0, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--page); scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--page); color: var(--ink); font-size: 15px; line-height: 1.55; }
body, button, input { font-family: "Outfit", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img, svg { max-width: 100%; }
button { color: inherit; }

.shell { display: flex; align-items: stretch; min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 20; display: flex; flex: 0 0 250px; flex-direction: column; width: 250px; height: 100vh; min-height: 100vh; overflow-y: auto; padding: 24px 16px; background: var(--sidebar); color: var(--sidebar-ink); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 54px; margin: 0 8px 30px; color: var(--sidebar-ink); }
.brand:hover { color: #fff; }
.brand .mark { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #d9b46c; color: #18233b; font-family: "Cormorant Garamond", Georgia, serif; font-size: 27px; font-weight: 600; }
.brand strong, .brand em { display: block; }
.brand strong { font-size: 15px; letter-spacing: .04em; }
.brand em { margin-top: 2px; color: var(--sidebar-muted); font-size: 12px; font-style: normal; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; min-height: 43px; padding: 10px 13px; border: 1px solid transparent; border-radius: 10px; color: var(--sidebar-muted); font-size: 14px; font-weight: 500; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.is-on { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.13); color: #fff; }

.content { display: flex; flex: 1 1 auto; flex-direction: column; width: calc(100% - 250px); min-width: 0; padding: 0 clamp(20px, 3vw, 48px) 30px; }
.top { position: relative; z-index: 15; display: flex; align-items: center; gap: 18px; min-height: 82px; margin: 0 calc(clamp(20px, 3vw, 48px) * -1) 28px; padding: 14px clamp(20px, 3vw, 48px); border-bottom: 1px solid var(--line); background: var(--surface); }
.who { flex: 1; margin: 0; color: var(--muted); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
#google_translate_element { max-width: 170px; overflow: hidden; }
.goog-te-gadget, .goog-te-gadget span { color: var(--muted) !important; font-size: 12px !important; }
.goog-te-gadget select { max-width: 150px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.theme, #bellBtn, .menu { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.theme:hover, #bellBtn:hover, .menu:hover { border-color: var(--accent); color: var(--accent); }
.menu { display: none; width: 42px; height: 42px; padding: 10px; }
.menu span { display: block; width: 18px; height: 2px; margin: 2px auto; border-radius: 2px; background: currentColor; }
.bell { position: relative; }
#bellBtn b { display: inline-grid; min-width: 19px; height: 19px; margin-left: 5px; padding: 0 5px; place-items: center; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; }
.bell-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; display: none; width: min(360px, calc(100vw - 32px)); max-height: 420px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.bell:focus-within .bell-menu, .bell:hover .bell-menu { display: block; }
.bell-head { display: flex; justify-content: space-between; gap: 10px; padding: 10px; color: var(--muted); font-size: 13px; }
.bell-menu > a:not(.all) { display: grid; gap: 3px; padding: 11px 10px; border-top: 1px solid var(--line); color: var(--ink); }
.bell-menu > a span, .bell-menu > a em { color: var(--muted); font-size: 12px; font-style: normal; }
.bell-menu > p { padding: 8px 10px; color: var(--muted); }
.bell-menu > a.all { display: block; padding: 11px 10px; border-top: 1px solid var(--line); font-weight: 600; }

.content > main { width: 100%; min-width: 0; }
.content > main > div { min-width: 0; }
.kicker { margin: 0 0 7px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0 0 24px; color: var(--ink); font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(34px, 4vw, 46px); font-weight: 600; line-height: 1.08; }
h3 { color: var(--ink); }
.container-fluid { width: 100%; }
.row { display: flex; flex-wrap: wrap; margin: 0 -10px 20px; }
.row > * { min-width: 0; padding: 0 10px; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-12 { flex: 0 0 100%; width: 100%; }
.col-6 { flex: 0 0 50%; width: 50%; }
.col-xxl-3 { flex: 0 0 25%; width: 25%; }
.col-xxl-6 { flex: 0 0 50%; width: 50%; }
.d-flex { display: flex; }
.flex-fill { flex: 1 1 auto; }
.flex-grow-1 { flex: 1 1 auto; min-width: 0; }
.align-items-start { align-items: flex-start; }
.align-self-end { align-self: flex-end; }
.text-end { text-align: right; }
.text-start { text-align: left; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 16px !important; }
.m-1 { margin: 4px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 10px !important; }
.mb-xl-3 { margin-bottom: 20px !important; }
.ms-3 { margin-left: 16px !important; }
.g-0 { gap: 0; }
.w-100 { width: 100%; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }
.d-sm-block { display: block; }

.card { position: relative; width: 100%; min-width: 0; margin-bottom: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-body { width: 100%; padding: 22px; }
.card-body.py-4 { padding-top: 23px; padding-bottom: 23px; }
.card-body h3 { margin-top: 0; font-size: clamp(24px, 2vw, 31px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.card-body p { color: var(--muted); }
.illustration { min-height: 190px; border: 0; background: linear-gradient(135deg, #233b70, #3157d5); color: #fff; }
.illustration .card-body { min-height: 190px; }
.illustration-text { color: #fff !important; }
h4.illustration-text { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(20px, 2vw, 26px); line-height: 1.25; }
.illustration-img { display: block; width: 100%; max-height: 160px; object-fit: contain; object-position: bottom right; }
.text-muted { color: var(--muted) !important; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-soft-success { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.me-2 { margin-right: 8px; }
.stat { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.stat i { font-size: 21px; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-info { color: #3183b9 !important; }
.input-group { display: flex; width: 100%; min-width: 0; }
.form-control { display: block; flex: 1 1 auto; width: 1%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-right: 0; border-radius: 9px 0 0 9px; outline: none; background: var(--surface-2); color: var(--ink); font-size: 13px; }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.input-group-append { display: flex; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border: 1px solid transparent; border-radius: 0 9px 9px 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.flash { margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); }
.flash.success { border-color: color-mix(in srgb, var(--success) 35%, var(--line)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); color: var(--success); }
.flash.error, .flash.danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--danger); }

.site-footer { width: 100%; margin-top: auto; padding: 24px 0 4px; border-top: 1px solid var(--line); }
.site-footer .wrap { width: 100%; }
.footer-brand { display: flex; }
.site-footer .kicker { width: 100%; margin: 0; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.site-footer .col-6 { max-width: 100%; }
.site-footer p { color: var(--muted); }
.site-footer a { color: var(--ink); font-weight: 600; }

@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50%; width: 50%; }
}
@media (min-width: 768px) {
  .row { margin-right: -10px; margin-left: -10px; }
}
@media (min-width: 1200px) {
  .col-xxl-3 { flex: 0 0 25%; width: 25%; }
  .col-xxl-6 { flex: 0 0 50%; width: 50%; }
}
@media (max-width: 1199px) {
  .sidebar { flex-basis: 225px; width: 225px; }
  .content { width: calc(100% - 225px); }
  .col-xxl-3 { flex-basis: 50%; width: 50%; }
}
@media (max-width: 767px) {
  .shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(285px, 84vw); height: 100dvh; min-height: 0; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .sidebar:focus-within { transform: translateX(0); }
  .sidebar.is-open { transform: translateX(0); }
  body.sidebar-open::before { position: fixed; inset: 0; z-index: 45; background: rgba(9, 15, 27, .55); content: ""; }
  .content { width: 100%; padding: 0 18px 24px; }
  .top { min-height: 68px; gap: 10px; margin: 0 -18px 22px; padding: 10px 18px; }
  .menu { display: flex; flex-direction: column; }
  .who { font-size: 13px; }
  .top-actions { gap: 6px; }
  #google_translate_element { max-width: 95px; }
  .goog-te-gadget select { max-width: 95px; font-size: 11px; }
  .theme { min-width: 38px; padding: 7px 9px; }
  .content > main { min-width: 0; }
  .col-xxl-6 { flex-basis: 100%; width: 100%; }
  .site-footer { margin-top: 20px; }
}
@media (max-width: 575px) {
  .content { padding-right: 14px; padding-left: 14px; }
  .top { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .row { margin-right: -7px; margin-left: -7px; }
  .row > * { padding-right: 7px; padding-left: 7px; }
  .col-sm-6, .col-xxl-3, .col-xxl-6 { flex-basis: 100%; width: 100%; }
  .card { margin-bottom: 14px; }
  .card-body { padding: 18px; }
  .illustration .card-body { padding: 12px !important; }
  .illustration-img { max-height: 125px; }
  .top-actions #google_translate_element { display: none; }
  .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .input-group { flex-wrap: nowrap; }
  .form-control { font-size: 11px; }
  .btn { padding-right: 11px; padding-left: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
