:root {
  --navy: #123a52;
  --navy-2: #164d6c;
  --navy-3: #1a5a7d;
  --navy-active: #1c5b85;
  --navy-soft: #e9f2f8;
  --gold: #d4941e;
  --gold-2: #e8b04a;
  --gold-text: #9c6b14;
  --bg: #f7fafc;
  --card: #ffffff;
  --ink: #16232e;
  --muted: #64798c;
  --line: #e2eaf1;
  --pending: #d97706;
  --pending-bg: #fff4e5;
  --progress: #2563eb;
  --progress-bg: #eaf1ff;
  --ok: #0f7a4a;
  --ok-bg: #e6f6ee;
  --danger: #c0352b;
  --danger-bg: #fdecea;
  --shadow: 0 8px 24px rgba(18, 58, 82, 0.07);
  --shadow-lg: 0 18px 40px rgba(18, 58, 82, 0.12);
  --radius: 14px;
  --sidebar: 248px;
  --header: 68px;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
a { color: var(--navy-active); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--header) 1fr auto;
  grid-template-columns: var(--sidebar) 1fr;
  grid-template-areas:
    "top top"
    "side main"
    "foot foot";
}
.app.no-sidebar {
  grid-template-columns: 1fr;
  grid-template-areas:
    "top"
    "main"
    "foot";
}

/* ——— Header ——— */
.topbar {
  grid-area: top;
  height: var(--header);
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
  color: inherit;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 2px var(--gold);
}
.brand h1 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.brand p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 10px;
}
.search {
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #f4f7fa;
  border: 1px solid #e8eef3;
  border-radius: 999px;
  padding: 0 6px 0 16px;
  height: 42px;
}
.search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
}
.search input::placeholder { color: #9aa8b6; }
.search button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.icon-chip {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  background: #f4f7fa;
  color: var(--navy);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.icon-chip .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.icon-chip .badge.gold { background: #f59e0b; }
.user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  color: var(--ink);
}
.user-btn:hover { background: #f4f7fa; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-btn .who { text-align: left; line-height: 1.2; }
.user-btn .who b { display: block; font-size: 13px; }
.user-btn .who span { font-size: 11px; color: var(--muted); }
.caret { color: var(--muted); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 50;
  overflow: hidden;
}
.dropdown.open { display: block; }
.dropdown h4 {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.drop-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  color: inherit;
  border-bottom: 1px solid #f1f4f7;
}
.drop-item:hover { background: #f7fafc; }
.drop-item .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--navy-active); margin-top: 6px; flex-shrink: 0;
}
.drop-item.read .dot { background: #c5d0da; }
.drop-item small { color: var(--muted); display: block; font-size: 11px; }
.drop-foot {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
}
.menu-pop { width: 220px; }
.menu-pop a, .menu-pop button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  color: var(--ink);
}
.menu-pop a:hover, .menu-pop button:hover { background: #f7fafc; }
.wrap-rel { position: relative; }

/* ——— Sidebar ——— */
.sidebar {
  grid-area: side;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header);
  height: calc(100vh - var(--header));
  overflow: auto;
  z-index: 30;
}
.sidebar nav { padding: 14px 12px 28px; }
.nav-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  padding: 14px 12px 6px;
  font-weight: 700;
}
.nav a, .nav button.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  color: rgba(255,255,255,0.84);
  background: transparent;
  border: 0;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 2px;
}
.nav a svg, .nav button.nav-link svg { opacity: 0.9; flex-shrink: 0; }
.nav a:hover, .nav button.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav a.active {
  background: var(--navy-active);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold);
}
.nav a.danger, .nav button.danger { color: #ffb4ab; }

/* ——— Main ——— */
.main {
  grid-area: main;
  min-width: 0;
  padding: 22px 24px 36px;
}
.content { max-width: 1280px; margin: 0 auto; }

.site-foot {
  grid-area: foot;
  background: var(--navy);
  color: rgba(255,255,255,0.72);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 24px;
  font-size: 12.5px;
}
.site-foot a { color: rgba(255,255,255,0.78); }
.site-foot a:hover { color: #fff; }

/* ——— Welcome banner ——— */
.welcome {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 168px;
  background: var(--navy) center/cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 28px 32px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8,18,32,0.82) 0%, rgba(8,18,32,0.35) 58%, rgba(8,18,32,0.15) 100%);
}
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy .kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  opacity: 0.95;
}
.welcome-copy h2 {
  margin: 2px 0 8px;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-2);
  letter-spacing: -0.02em;
}
.welcome-copy p { margin: 0; opacity: 0.9; font-size: 14.5px; }

/* ——— KPI / stats ——— */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.kpi .ico {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
}
.kpi .ico.navy { background: #e8eef5; color: var(--navy); }
.kpi .ico.teal { background: #e6f6f1; color: #0f766e; }
.kpi .ico.purple { background: #efe9fb; color: #6d28d9; }
.kpi .ico.blue { background: #e8f0fb; color: #1d4ed8; }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 28px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; margin: 2px 0 6px; }
.kpi a { font-size: 12.5px; font-weight: 600; }

/* ——— Panels / cards ——— */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.panel h3, .panel h4 {
  margin: 0 0 12px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.panel h3 a, .panel h4 a { font-size: 12.5px; font-weight: 600; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1.7fr 1fr; }
.grid-dash { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

.quick {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.qtile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 10px 14px;
  text-align: center;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.qtile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #c9d7e6;
}
.qtile .ico {
  width: 42px; height: 42px; margin: 0 auto 8px;
  border-radius: 12px; background: #eef3f8; color: var(--navy);
  display: grid; place-items: center;
}
.qtile b { display: block; font-size: 13px; font-weight: 650; }
.qtile .note { font-size: 11px; color: #e11d48; font-weight: 700; }

.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 118px;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #bcd0de; }
.tile .ico {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--navy-soft); color: var(--navy);
  display: grid; place-items: center; padding: 5px; flex-shrink: 0;
}
.tile .ico img { width: 100%; height: 100%; object-fit: contain; }
.tile b { font-size: 14.5px; }
.tile span { font-size: 12.5px; color: var(--muted); }

.jl-hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 8px; }
.jl-hero-card {
  position: relative; overflow: hidden; border-radius: var(--radius); min-height: 172px;
  padding: 20px; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow-lg);
  transition: transform .15s ease;
}
.jl-hero-card:hover { transform: translateY(-3px); }
.jl-hero-a { background: linear-gradient(135deg, #123a52 0%, #1a5a7d 100%); }
.jl-hero-b { background: linear-gradient(135deg, #164d6c 0%, #1c5b85 100%); }
.jl-hero-c { background: linear-gradient(135deg, #1a5a7d 0%, #123a52 100%); }
.jl-hero-crest { position: absolute; right: -18px; top: 50%; transform: translateY(-50%); height: 190px; opacity: .16; filter: brightness(0) invert(1); pointer-events: none; }
.jl-hero-body { position: relative; z-index: 1; }
.jl-hero-kicker { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); font-weight: 700; }
.jl-hero-card h3 { font-family: var(--serif); font-size: 21px; margin: 4px 0 2px; }
.jl-hero-card p { margin: 0 0 10px; font-size: 13px; color: rgba(255,255,255,.8); }
.jl-hero-cta { font-size: 12.5px; font-weight: 600; color: #fff; border-top: 1px solid rgba(255,255,255,.25); padding-top: 8px; display: inline-block; }
.jl-section-label { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--navy); margin: 0 0 10px; letter-spacing: .2px; }
.jl-zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.jl-zone-card {
  position: relative; display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 18px; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; color: inherit;
}
.jl-zone-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.jl-zone-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.jl-zone-icon { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, white); display: grid; place-items: center; flex-shrink: 0; padding: 6px; }
.jl-zone-icon img { width: 100%; height: 100%; object-fit: contain; }
.jl-zone-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.jl-zone-body b { font-size: 13.5px; color: var(--ink); }
.jl-zone-body span { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.jl-zone-arrow { color: var(--accent); font-weight: 700; font-size: 16px; flex-shrink: 0; }
@media (max-width: 900px) {
  .jl-hero-grid { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 600;
  background: var(--navy); color: #fff;
}
.btn:hover { background: var(--navy-2); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid #c5d3df; }
.btn.gold { background: var(--gold); color: #2a220c; }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.lg { padding: 13px 26px; font-size: 15.5px; border-radius: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.page-head .kicker {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.page-head h3 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f5f9fc; }
.eye {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--navy); display: grid; place-items: center;
}

.pill {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650;
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--pending-bg); color: var(--pending); }
.pill.info { background: var(--progress-bg); color: var(--progress); }
.pill.muted { background: #eef2f5; color: var(--muted); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.pill.gold { background: #f8eed3; color: #3d3014; }

.form { display: grid; gap: 12px; }
.form.two { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 550; }
input, select, textarea {
  width: 100%; border: 1px solid #c9d6e0; border-radius: 10px;
  padding: 10px 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
.notice {
  background: #f8eed3; color: #3d3014; border-radius: 12px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 14px;
}
.empty {
  text-align: center; padding: 40px 16px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 14px; background: #fff;
}

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 11px; color: var(--muted); padding: 4px; font-weight: 600; }
.cal .day {
  background: #fff; border: 1px solid transparent; border-radius: 8px;
  min-height: 36px; padding: 6px; font-size: 12.5px; color: inherit; text-decoration: none;
  display: grid; place-items: center;
}
.cal.large .day { min-height: 88px; align-content: start; place-items: start; overflow: hidden; }
.cal .day.mute { opacity: 0.35; pointer-events: none; }
.cal .day.today { background: #7352C7; color: #fff; font-weight: 700; }
.cal .day.today .cal-chip { background: #fff; color: #7352C7; }
.cal .day.hol { background: #fdecec; }
.cal .day.vac { background: #fff7e6; }
.cal .day.selected { outline: 2px solid #7352C7; background: #f5f3ff; }
.cal .day.has { font-weight: 700; }
.cal-stats {
  display: flex; align-items: flex-end; padding: 8px 8px 16px;
}
.cal-stat { flex: 1; }
.cal-stat.left { text-align: left; }
.cal-stat.center { text-align: center; }
.cal-stat.right { text-align: right; }
.cal-stat .k { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.cal-stat .v { font-size: 22px; font-weight: 800; color: #7352C7; }
.cal-year { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 8px; }
.cal-month-panel { overflow: auto; }
.cal-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.cal-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cal-side-panel { max-height: min(70vh, 720px); overflow: auto; }
@media (max-width: 980px) {
  .cal-split { grid-template-columns: 1fr; }
}
.cal-event-card {
  display: flex; gap: 12px; padding: 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); margin-bottom: 10px; color: inherit;
}
.cal-event-card .bar { width: 4px; border-radius: 4px; flex-shrink: 0; }
.cal-event-card b { display: block; margin-bottom: 6px; }
.cal-event-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
a.month-chip {
  display: inline-block; padding: 8px 16px; border-radius: 20px; border: 1px solid #E5E7EB;
  background: #F9FAFB; color: #4B5563; white-space: nowrap; font-weight: 500;
}
a.month-chip.on { background: #fff; color: #111827; font-weight: 700; border-color: #E5E7EB; }
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-weight: 650;
}
.cal-nav a { color: var(--navy); }
.hearing {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.hearing:last-child { border-bottom: 0; }
.hearing .datebox {
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  text-align: center;
  padding: 6px 4px;
  line-height: 1.1;
}
.hearing .datebox b { display: block; font-size: 16px; }
.hearing .datebox span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.hearing .time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.links a { display: block; padding: 6px 0; }

.case-item {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px;
  background: #fff; color: inherit;
}
.today-case { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; color: inherit; }
.today-case .bar { width: 4px; height: 28px; border-radius: 2px; background: var(--navy); }

.plan {
  border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: #fff;
  display: flex; flex-direction: column; gap: 8px;
}
.plan.featured { border-color: var(--navy); box-shadow: var(--shadow); }
.plan .price { font-family: var(--serif); font-size: 28px; margin: 4px 0; }
.plan ul { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 13.5px; }

.offline-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
  background: #fff8ef; border: 1px solid #f3d5a8;
}
.offline-banner.on { background: #e6f6ee; border-color: #b7e4c7; }
.offline-banner.off { background: #fff4e5; border-color: #f3d5a8; }
.offline-banner .dot {
  width: 10px; height: 10px; border-radius: 50%; background: #22c55e; flex: none;
}
.offline-banner.off .dot { background: #f59e0b; }
.offline-banner b { display: block; }
.offline-banner div { font-size: 13px; color: var(--muted); }

.upgrade-wrap {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: #fff8ef;
  border: 1px solid #f3d5a8;
  border-radius: 12px;
  text-align: center;
}
.upgrade-link {
  display: inline-block;
  font-weight: 800;
  color: #c05621;
  animation: upgradeBlink 1.2s ease-in-out infinite;
}
@keyframes upgradeBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .18; }
}
.paid-upto { margin-top: 6px; font-size: 13px; color: #1c5b85; font-weight: 600; }
.paid-expired { margin-top: 4px; font-size: 13px; color: #c0352b; font-weight: 600; }

.pkg-head {
  background: #1c5b85;
  color: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.pkg-head h3 { margin: 0; font-size: 22px; }
.pkg-head p { margin: 6px 0 0; font-size: 13px; color: rgba(255,255,255,.85); }
.pkg-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pkg-card {
  background: #fff;
  border: 1px solid #e2eaf0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.pkg-card.popular { border: 2px solid #1c5b85; }
.pkg-badge {
  display: inline-block;
  background: #fb8d33;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.pkg-card h3 { margin: 0 0 4px; font-size: 20px; }
.pkg-days { font-size: 13px; color: #1c5b85; font-weight: 600; margin-bottom: 8px; }
.pkg-price { display: flex; align-items: baseline; gap: 10px; }
.pkg-old { font-size: 16px; color: #999; text-decoration: line-through; }
.pkg-new { font-size: 30px; font-weight: 800; color: #fb8d33; }
.pkg-save { font-size: 13px; color: #22c55e; font-weight: 700; margin: 4px 0 10px; }
.pkg-feat { background: #f7fafc; border-radius: 10px; padding: 12px; margin: 10px 0 14px; }
.pkg-sec { font-size: 14px; font-weight: 800; color: #1c5b85; margin: 10px 0 6px; }
.pkg-item { font-size: 13px; color: #333; margin-bottom: 4px; line-height: 1.5; }
.pkg-cta { width: 100%; justify-content: center; background: #1c5b85; }
.pkg-cta.gold { background: #fb8d33; color: #fff; }

.pay-card {
  background: #fff;
  border: 1px solid #f5f5f5;
  border-radius: 8px;
  padding: 20px;
  max-width: 420px;
  text-align: center;
  margin-bottom: 20px;
}
.pay-label { font-size: 14px; color: #888; margin-bottom: 8px; }
.pay-amount { font-size: 32px; font-weight: 700; color: #fb8d33; }
.pay-meta { margin-top: 6px; font-size: 13px; color: #666; }
.pay-result { text-align: center; max-width: 480px; }
.pay-msg { font-size: 28px; font-weight: 700; margin: 0 0 16px; }
.pay-msg.ok { color: #22c55e; }
.pay-msg.pending { color: #f59e0b; }
.pay-msg.failed { color: #ef4444; }

.pay-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(11, 42, 63, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
}
.pay-sheet {
  background: #fff;
  width: min(1100px, 100%);
  border-radius: 12px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pay-sheet-wait { width: min(520px, 100%); }
.pay-wait { padding: 28px 24px 24px; text-align: center; }
.pay-wait h3 { margin: 0 0 8px; }
.pay-wait p { margin: 0; color: var(--muted); font-size: 14px; }
.pay-poll { font-size: 13px; color: #1c5b85; font-weight: 600; margin-top: 14px; }

.overlay {
  display: none; position: fixed; inset: 0; background: rgba(11, 42, 63, 0.46); z-index: 35;
}
.overlay.show { display: block; }

.toast {
  position: fixed; right: 18px; bottom: 18px; background: var(--navy); color: #fff;
  padding: 10px 14px; border-radius: 10px; z-index: 60; display: none;
  box-shadow: var(--shadow-lg);
}

.disclaimer { font-size: 12px; color: var(--muted); margin-top: 16px; }

.cd-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.cd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.cd-k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cd-file { font-size: 22px; font-weight: 750; margin-top: 2px; }
.cd-title { font-size: 17px; font-weight: 650; line-height: 1.35; margin: 0 0 16px; }
.cd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.cd-val { font-size: 14px; font-weight: 650; }
.cd-section { font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 8px 0; }
.cd-block { background: #f1f5f9; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.cd-block .cd-k { margin-bottom: 2px; }
.cd-block .cd-val { margin-bottom: 10px; }
.cd-vc { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cd-copy { font-size: 12px; font-weight: 700; color: var(--progress); background: none; border: 0; text-decoration: underline; padding: 0; }
.cd-url {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; color: var(--progress); font-weight: 650; word-break: break-all; margin-bottom: 10px;
}
.cd-stage { background: #f1f5f9; border-radius: 10px; padding: 12px; font-weight: 650; margin-bottom: 16px; }
.cd-dates { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 12px; background: #f1f5f9; border-radius: 12px; padding: 14px; text-align: center; }
.cd-dates hr { width: 1px; background: var(--line); border: 0; margin: 0; }
.cd-date { font-size: 14px; font-weight: 650; }
.cd-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cd-act, a.cd-act {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; border: 0; border-radius: 12px; padding: 14px; font-weight: 650;
}
.cd-act.update { background: #3B82F6; }
.cd-act.history { background: #22C55E; }
.cd-act.order { background: #8B5CF6; }
.cd-act.doc { background: #F59E0B; }
.cd-act.del { background: #EF4444; grid-column: 1 / -1; }
.cd-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cd-up {
  display: inline-block; margin-left: 8px; font-size: 9px; font-weight: 800; letter-spacing: .06em;
  color: #F97316; border: 1px solid #F59E0B; background: rgba(249,115,22,.12); border-radius: 6px; padding: 3px 8px;
}
.cd-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700;
  border: 1px solid transparent;
}
.cd-tag {
  font-size: 12px; font-weight: 700; color: var(--gold-text); background: var(--navy-soft);
  border-radius: 8px; padding: 4px 10px; max-width: 55%; text-align: right;
}
.cd-quick {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0;
  background: #f1f5f9; border-radius: 12px; padding: 12px 8px; margin: 14px 0 4px;
}
.cd-quick div { text-align: center; padding: 0 8px; border-right: 1px solid var(--line); }
.cd-quick div:last-child { border-right: 0; }
.cd-sec {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 18px 0 8px;
}
.hist-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.jc-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.jc-photo {
  width: 130px; aspect-ratio: 3.5 / 4.5; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--line); box-shadow: var(--shadow);
  flex-shrink: 0; background: #f1f5f9;
}
.jc-photo-fallback { display: grid; place-items: center; background: var(--navy-soft); color: var(--navy-active); font-weight: 700; font-size: 30px; }
.jc-name { font-weight: 700; font-size: 16px; color: var(--navy); align-self: center; }
@media (max-width: 480px) {
  .jc-photo { width: 100px; }
}
.jc-head-stack { flex-direction: column; align-items: stretch; gap: 14px; }
.jc-bench-row { display: flex; align-items: center; gap: 14px; }
.jc-bench-row + .jc-bench-row { padding-top: 14px; border-top: 1px dashed var(--line); }
.hist-box {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 4px;
}
.info-row { padding: 6px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.folder-toolbar { display: flex; justify-content: flex-end; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.folder-btn { background: #555 !important; color: #fff !important; }
.doc-plus { background: #2e7d32 !important; color: #fff !important; }
.doc-item {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; color: inherit; box-shadow: var(--shadow);
}
.doc-item b { display: block; margin-top: 2px; font-size: 16px; }
.doc-date { font-size: 12px; color: var(--muted); }
.doc-tap { margin-top: 4px; font-size: 12px; color: var(--muted); }
form.form textarea { width: 100%; min-height: 90px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.slides { display: flex; gap: 10px; overflow: auto; padding: 8px 0 16px; }
.slides img { height: 160px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.perm-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.perm { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 8px; }
.perm.on { background: #dcfce7; color: #166534; }
.perm.off { background: #fee2e2; color: #991b1b; }

.perm-panel { grid-column: 1/-1; border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px; background: #fafbfc; }
.perm-panel h4 { margin: 12px 0 2px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch-row span:first-child { font-size: 13.5px; color: var(--ink); font-weight: 500; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .15s; pointer-events: none; }
.switch .slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(18px); }
@media (max-width: 700px) {
  .cd-quick { grid-template-columns: 1fr; }
  .cd-quick div { border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .cd-quick div:last-child { border-bottom: 0; }
}
@media (max-width: 560px) {
  .cd-row, .cd-dates { grid-template-columns: 1fr; }
  .cd-dates hr { display: none; }
}

.cl-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.cl-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.cl-file { font-size: 12px; font-weight: 800; color: #2563eb; letter-spacing: .04em; }
.cl-title { font-size: 15px; font-weight: 750; margin: 0 0 12px; }
.cl-box { background: #f1f5f9; border-radius: 12px; padding: 12px; }
.cl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.cl-k { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.cl-v { font-size: 13.5px; font-weight: 650; }
.cl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cl-acts a, .cl-acts button {
  border: 0; border-radius: 10px; padding: 8px 12px; color: #fff; font-weight: 650; font-size: 13px;
}
.cl-search { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cl-search input { flex: 1; min-width: 180px; }
.filter-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; color: var(--ink);
}
.filter-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cnr-row { display: flex; gap: 8px; }
.cnr-row input { flex: 1; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 18px 0; font-size: 12px; font-weight: 700; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.month-chips { display: flex; gap: 6px; overflow: auto; padding: 4px 0 14px; }
.month-chips a button, .month-chips button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 13px; color: var(--ink); white-space: nowrap;
}
.month-chips button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cal-chip {
  margin-top: 4px; background: #7352C7; color: #fff; font-size: 10px;
  width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 4px; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-chip.prev { background: #34D399; }
.cal-more { margin-top: 3px; font-size: 10px; color: var(--muted); font-weight: 700; }
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 25;
  background: var(--navy); color: #fff; border: 0; border-radius: 18px;
  padding: 12px 14px; box-shadow: var(--shadow); font-weight: 650; text-align: center; min-width: 72px;
}
.fab small { display: block; font-size: 10px; font-weight: 600; }

.logo-watermark { position: relative; overflow: hidden; }
.logo-watermark::before {
  content: ""; position: absolute; inset: 8% 18%;
  background: url("../logo.png") center/contain no-repeat;
  opacity: 0.07; pointer-events: none;
}

.ticker {
  overflow: hidden; white-space: nowrap;
  background: var(--navy); color: #f8eed3;
  font-size: 13px; padding: 8px 0; margin-bottom: 16px;
  border-radius: 10px; letter-spacing: 0.02em;
}
.ticker span { display: inline-block; padding-left: 100%; animation: ticker 28s linear infinite; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.login-card {
  max-width: 440px;
  margin: 24px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-card img { width: 110px; height: 110px; }
.login-card .form { text-align: left; margin-top: 12px; }

.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: min(640px, calc(100vh - var(--header) - 40px));
  margin: 24px auto;
  max-width: 1060px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.auth-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 55%, var(--navy-active) 100%);
  color: #fff;
  padding: 48px 42px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.auth-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -15%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.35), transparent 70%);
}
.auth-hero::after {
  content: "";
  position: absolute;
  left: -18%;
  bottom: -22%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}
.auth-hero-in { position: relative; z-index: 1; }
.auth-hero-logo {
  width: 56px; height: 56px; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--gold);
  margin-bottom: 20px;
}
.auth-hero-kicker {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 11px;
  color: var(--gold-2); font-weight: 700; margin: 0 0 10px;
}
.auth-hero h1 { font-family: var(--serif); font-size: 30px; line-height: 1.25; margin: 0 0 14px; }
.auth-hero-tag { color: rgba(255, 255, 255, 0.78); font-size: 14.5px; line-height: 1.6; margin: 0 0 28px; max-width: 420px; }
.auth-hero-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.auth-hero-list li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: rgba(255, 255, 255, 0.92); }
.auth-hero-list li svg { flex-shrink: 0; color: var(--gold-2); }
.auth-panel { background: #fff; display: flex; align-items: center; justify-content: center; padding: 36px 30px; }
.auth-panel .login-card { margin: 0; box-shadow: none; border: 0; padding: 0; max-width: 360px; width: 100%; }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; margin: 0; border-radius: 0; min-height: auto; }
  .auth-hero { padding: 40px 24px 32px; }
  .auth-hero-tag { max-width: none; }
}

.scroll-cue {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; border: 0; border-radius: 999px;
  padding: 11px 18px 11px 20px; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 28px rgba(18, 58, 82, 0.35);
  z-index: 45; opacity: 1; transition: opacity .25s, transform .25s;
}
.scroll-cue svg { animation: scroll-cue-bounce 1.4s ease-in-out infinite; color: var(--gold-2); }
.scroll-cue.is-hidden { opacity: 0; transform: translateX(-50%) translateY(12px); pointer-events: none; }
@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@media (max-width: 480px) {
  .scroll-cue span { display: none; }
  .scroll-cue { padding: 12px; }
}

/* ——— Pre-login landing / feature showcase ——— */
.landing-section { max-width: 1180px; margin: 56px auto 0; padding: 0 12px 40px; }
.landing-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.landing-kicker {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 700;
  color: var(--gold-text); margin: 0 0 10px;
}
.landing-head h2 { font-family: var(--serif); font-size: 30px; margin: 0 0 12px; color: var(--navy); line-height: 1.25; }
.landing-sub { color: var(--muted); font-size: 15px; margin: 0; }
.landing-group { margin-bottom: 40px; }
.landing-group h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  color: var(--navy-active); margin: 0 0 16px; padding-left: 2px;
}
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.feat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.feat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feat-ico {
  width: 42px; height: 42px; border-radius: 10px; background: var(--navy-soft); color: var(--navy-active);
  display: grid; place-items: center; margin-bottom: 12px;
}
.feat-card b { display: block; font-size: 14.5px; color: var(--navy); margin-bottom: 6px; }
.feat-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.landing-cta {
  text-align: center; margin-top: 48px; padding: 40px 24px; border-radius: 20px;
  background: linear-gradient(135deg, var(--navy), var(--navy-active)); color: #fff;
}
.landing-cta h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; }
.landing-cta p { margin: 0 0 20px; color: rgba(255,255,255,0.8); font-size: 14px; }
@media (max-width: 600px) {
  .landing-head h2 { font-size: 24px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .feat-grid { grid-template-columns: 1fr; }
}

.pdf-shell { background: #1e293b; border-radius: 14px; overflow: hidden; }
.pdf-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: #0f172a; }
.pdf-tools button {
  background: #334155; color: #fff; border: 0; border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.pdf-tools button.on { background: var(--gold); color: #1a1408; }
.pdf-pagebar, .pdf-searchbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; background: #111827; color: #cbd5e1; font-size: 13px;
}
.pdf-pagebar input, .pdf-searchbar input {
  background: #1e293b; color: #fff; border: 1px solid #334155; border-radius: 8px;
  padding: 6px 8px; min-width: 64px;
}
.pdf-searchbar input { flex: 1; min-width: 140px; }
.pdf-pagebar button, .pdf-searchbar button {
  background: #334155; color: #fff; border: 0; border-radius: 8px; padding: 6px 10px;
}
.pdf-body { display: flex; min-height: 70vh; }
.pdf-stage { flex: 1; max-height: 78vh; overflow: auto; padding: 16px; background: #1e293b; }
.pdf-sidebar {
  width: 280px; max-width: 85%; background: #0f172a; border-left: 1px solid #334155;
  overflow: auto; color: #e2e8f0; flex-shrink: 0;
}
.pdf-side-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px; border-bottom: 1px solid #334155; font-weight: 700;
}
.pdf-side-head button { background: none; color: #94a3b8; border: 0; font-size: 18px; }
.pdf-side-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: #e2e8f0; padding: 14px; border-bottom: 1px solid #1e293b; cursor: pointer;
}
.pdf-side-item:hover { background: #1e293b; }
.pdf-side-page { display: block; color: #60a5fa; font-size: 12px; margin-bottom: 4px; }
.pdf-side-empty { color: #64748b; text-align: center; padding: 40px 16px; }
.pdf-side-row { display: flex; align-items: stretch; border-bottom: 1px solid #1e293b; }
.pdf-side-row .pdf-side-item { border-bottom: 0; flex: 1; }
.pdf-side-del { background: none; border: 0; color: #f87171; padding: 8px 12px; }
.pdf-note-modal {
  position: fixed; inset: 0; background: rgba(15,23,42,.55); display: grid; place-items: center; z-index: 40;
}
.pdf-note-modal[hidden] { display: none !important; }
.pdf-note-box {
  width: min(420px, 92vw); background: #fff; border-radius: 14px; padding: 16px;
}
.pdf-note-box textarea { width: 100%; min-height: 120px; margin: 10px 0; }
#pdfViewer { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pdf-page { position: relative; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.pdf-page canvas { display: block; }
.pdf-overlay { position: absolute; inset: 0; }
.pdf-draw { position: absolute; inset: 0; pointer-events: none; }
.pdf-ann { position: absolute; }
.pdf-ann-highlight { background: #fef08a; mix-blend-mode: multiply; }
.pdf-ann-underline { border-bottom: 3px solid #2563eb; }
.pdf-ann-note {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(251, 191, 36, 0.55); color: #111;
  font-size: 11px; font-weight: 800; display: grid; place-items: center; cursor: pointer;
  z-index: 3; pointer-events: auto;
}
.pdf-ann-note.on { outline: 3px solid #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.35); }
.pdf-hit { position: absolute; background: #86efac; mix-blend-mode: multiply; }
.pdf-hit.current { background: #fbbf24; mix-blend-mode: multiply; }
.pdf-rubber { position: absolute; border: 2px dashed #3b82f6; background: rgba(59,130,246,.18); pointer-events: none; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 8px 0 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }

.guest-cta {
  background: linear-gradient(135deg, var(--navy), var(--navy-active));
  color: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.guest-cta h3 { margin: 0 0 4px; font-size: 20px; }
.guest-cta p { margin: 0; opacity: .88; }

@media (max-width: 1100px) {
  .quick { grid-template-columns: repeat(3, 1fr); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid-dash, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas: "top" "main" "foot";
  }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100vh;
    transform: translateX(-105%); transition: transform .2s ease;
    width: min(86vw, 280px);
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; place-items: center; }
  .brand h1, .brand p, .user-btn .who { display: none; }
  .brand { min-width: auto; }
  .search { max-width: none; }
  .kpis, .quick, .form.two, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .welcome-copy h2 { font-size: 24px; }
  .main { padding: 14px; }
  .site-foot { flex-direction: column; }
}
@media (max-width: 560px) {
  .kpis, .quick, .form.two { grid-template-columns: 1fr; }
  .search { display: none; }
}
