/* ============================================================
   (주)청아시스템 인트라넷 - Base Design System
   밝은 파스텔 / B2B SaaS 스타일
   ============================================================ */

@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('../assets/fonts/PretendardVariable.woff2') format('woff2-variations');
}

:root {
  --brand-700: #3F5BE0;
  --brand-600: #4F6EF7;
  --brand-500: #6D8DFF;
  --brand-400: #93ACFF;
  --brand-200: #C9D7FF;
  --brand-100: #E3EBFF;
  --brand-50: #F2F6FF;

  --mint-700: #0F9B72;
  --mint-600: #16A87C;
  --mint-500: #34D399;
  --mint-100: #D9F8EC;
  --mint-50: #EFFCF7;

  --peach-700: #C97822;
  --peach-600: #E2862F;
  --peach-500: #F7A85C;
  --peach-100: #FFE9D2;
  --peach-50: #FFF8F0;

  --rose-700: #C94B60;
  --rose-600: #E05267;
  --rose-500: #FB7185;
  --rose-100: #FFE0E5;
  --rose-50: #FFF4F6;

  --lavender-700: #6C57CC;
  --lavender-600: #7A66D8;
  --lavender-500: #A78BFA;
  --lavender-100: #EDE8FF;
  --lavender-50: #F8F5FF;

  --sky-700: #2588BF;
  --sky-600: #2D9CDB;
  --sky-500: #56C7F5;
  --sky-100: #DCF4FF;
  --sky-50: #F1FBFF;

  --ink: #24304A;
  --ink-soft: #55617A;
  --muted: #8C98AE;
  --muted-light: #ABB5C7;

  --bg: #F6F8FD;
  --surface: #FFFFFF;
  --surface-soft: #FBFCFE;
  --line: #E8EDF7;
  --line-strong: #DCE4F2;

  --shadow-sm: 0 1px 2px rgba(78, 94, 130, .04);
  --shadow-card: 0 6px 20px -8px rgba(78, 94, 130, .10), 0 2px 6px rgba(78, 94, 130, .03);
  --shadow-float: 0 24px 60px -20px rgba(60, 76, 120, .22), 0 8px 24px -12px rgba(60, 76, 120, .10);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --sidebar-w: 268px;
  --sidebar-collapsed: 88px;
  --topbar-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.015em;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 380px at 8% -6%, rgba(147, 172, 255, .18), transparent 70%),
    radial-gradient(560px 340px at 102% 2%, rgba(255, 214, 196, .20), transparent 72%),
    radial-gradient(620px 420px at 55% 108%, rgba(217, 248, 236, .55), transparent 72%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--brand-100); color: var(--brand-700); }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
[hidden] { display: none !important; }
body.modal-open, body.nav-open { overflow: hidden; }

* { scrollbar-width: thin; scrollbar-color: #CFD9EA transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #D6DFEE; border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--brand-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.strong { font-weight: 700; color: var(--ink); }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn .icon { width: 17px; height: 17px; }
.btn:active { transform: translateY(1px); }
.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #7E99FF 0%, #5B7CFA 100%);
  box-shadow: 0 8px 18px -8px rgba(91, 124, 250, .60);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -9px rgba(91, 124, 250, .68); }
.btn--soft { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-100); }
.btn--soft:hover { background: var(--brand-100); }
.btn--ghost { color: var(--ink-soft); background: #fff; border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand-200); color: var(--brand-700); background: #FBFDFF; }
.btn--danger { color: var(--rose-600); background: var(--rose-50); border-color: var(--rose-100); }
.btn--danger:hover { background: var(--rose-100); }
.btn--sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.btn--sm .icon { width: 15px; height: 15px; }
.btn--block { width: 100%; }
.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.icon-btn .icon { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.icon-btn:active { transform: scale(.96); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-600);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.text-link .icon { width: 14px; height: 14px; transition: transform .18s; }
.text-link:hover .icon { transform: translateX(2px); }
.text-link--muted { color: var(--muted); }

/* ---------------- Badge / Avatar ---------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge--blue { color: var(--brand-700); background: var(--brand-50); }
.badge--mint { color: var(--mint-700); background: var(--mint-50); }
.badge--amber, .badge--peach { color: var(--peach-700); background: var(--peach-50); }
.badge--rose { color: var(--rose-700); background: var(--rose-50); }
.badge--lavender { color: var(--lavender-700); background: var(--lavender-50); }
.badge--sky { color: var(--sky-700); background: var(--sky-50); }
.badge--slate { color: var(--ink-soft); background: #F3F6FB; }
.badge--solid-blue { color: #fff; background: var(--brand-600); }
.badge--new { color: #fff; background: linear-gradient(135deg, #34D399, #16A87C); letter-spacing: .04em; }

.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  font-weight: 750;
  letter-spacing: -.02em;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(78, 94, 130, .10);
}
.avatar--xs { width: 22px; height: 22px; font-size: 9px; border-width: 1px; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--md { width: 38px; height: 38px; font-size: 13px; }
.avatar--lg { width: 48px; height: 48px; font-size: 17px; }
.avatar--xl { width: 64px; height: 64px; font-size: 22px; }
.avatar--blue { color: var(--brand-700); background: linear-gradient(135deg, #EAF0FF, #D7E2FF); }
.avatar--mint { color: var(--mint-700); background: linear-gradient(135deg, #E9FBF4, #D2F7E8); }
.avatar--lavender { color: var(--lavender-700); background: linear-gradient(135deg, #F2EDFF, #E5DDFF); }
.avatar--peach { color: var(--peach-700); background: linear-gradient(135deg, #FFF4E8, #FFE7CF); }
.avatar--sky { color: var(--sky-700); background: linear-gradient(135deg, #EAF9FF, #D6F2FF); }
.avatar--rose { color: var(--rose-700); background: linear-gradient(135deg, #FFF0F3, #FFDEE5); }
.avatar-online {
  position: absolute;
  right: -1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint-500);
  border: 2px solid #fff;
}

/* ---------------- Card / Surface ---------------- */
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}
.card-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.35;
}
.card-sub { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.card-body { padding: 20px 22px; }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}
.head-stat {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 11.5px;
  font-weight: 750;
  white-space: nowrap;
}
.head-stat--mint { background: var(--mint-50); color: var(--mint-700); }
.head-stat--peach { background: var(--peach-50); color: var(--peach-700); }
.head-stat--rose { background: var(--rose-50); color: var(--rose-700); }

/* ---------------- Forms ---------------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.field > label .req { color: var(--rose-500); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: 0;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-light); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(109, 141, 255, .12);
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.65; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
}
.form-note .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--brand-600); }
.form-note--mint { background: var(--mint-50); }
.form-note--mint .icon { color: var(--mint-600); }
.form-note--peach { background: var(--peach-50); }
.form-note--peach .icon { color: var(--peach-600); }

/* ---------------- Search / Segmented / Filters ---------------- */
.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.search-field:focus-within { border-color: var(--brand-400); box-shadow: 0 0 0 4px rgba(109, 141, 255, .10); }
.search-field .icon { width: 16px; height: 16px; color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; }
.search-field input::placeholder { color: var(--muted-light); }

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .18s, color .18s, box-shadow .18s;
}
.segmented button .count { font-size: 10px; opacity: .8; }
.segmented button:hover { color: var(--ink-soft); }
.segmented button.is-active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-sm); }

.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  transition: all .18s;
}
.filter-pill:hover { border-color: var(--brand-200); color: var(--brand-700); }
.filter-pill.is-active { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand-700); }

/* ---------------- Progress / Status ---------------- */
.progress { height: 7px; border-radius: 99px; background: #EFF3FA; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9AB0FF, #5B7CFA); transition: width .5s ease; }
.progress--mint > span { background: linear-gradient(90deg, #7DE7C4, #34D399); }
.progress--peach > span { background: linear-gradient(90deg, #FFD09F, #F7A85C); }
.progress--rose > span { background: linear-gradient(90deg, #FFB7C2, #FB7185); }
.progress--lavender > span { background: linear-gradient(90deg, #CDBFFF, #A78BFA); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }
.status-pill--pending { color: var(--peach-700); background: var(--peach-50); }
.status-pill--approved { color: var(--mint-700); background: var(--mint-50); }
.status-pill--rejected { color: var(--rose-700); background: var(--rose-50); }
.status-pill--blue { color: var(--brand-700); background: var(--brand-50); }
.status-pill--mint { color: var(--mint-700); background: var(--mint-50); }
.status-pill--slate { color: var(--ink-soft); background: #F3F6FB; }
.status-pill--lavender { color: var(--lavender-700); background: var(--lavender-50); }
.status-pill--peach { color: var(--peach-700); background: var(--peach-50); }

.dday {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 34px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.dday--rose { color: var(--rose-700); background: var(--rose-50); }
.dday--amber { color: var(--peach-700); background: var(--peach-50); }
.dday--blue { color: var(--brand-700); background: var(--brand-50); }
.dday--mint { color: var(--mint-700); background: var(--mint-50); }

/* ---------------- Page heading ---------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.page-head-copy { min-width: 0; }
.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brand-600);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .06em;
}
.page-eyebrow .icon { width: 14px; height: 14px; }
.page-title {
  margin-top: 5px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 790;
  letter-spacing: -.045em;
  line-height: 1.28;
}
.page-desc { margin-top: 5px; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (min-width: 721px) {
  .page-actions { flex-shrink: 0; max-width: 60%; }
}

/* ---------------- Dashboard stat cards ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  position: relative;
  min-width: 0;
  padding: 19px 20px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -34px;
  top: -44px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
}
.stat-card--blue::after { background: radial-gradient(circle, rgba(147, 172, 255, .20), transparent 68%); }
.stat-card--mint::after { background: radial-gradient(circle, rgba(52, 211, 153, .17), transparent 68%); }
.stat-card--peach::after { background: radial-gradient(circle, rgba(247, 168, 92, .18), transparent 68%); }
.stat-card--rose::after { background: radial-gradient(circle, rgba(251, 113, 133, .15), transparent 68%); }
.stat-card--lavender::after { background: radial-gradient(circle, rgba(167, 139, 250, .17), transparent 68%); }
.stat-card:hover { transform: translateY(-2px); border-color: #DDE7F8; box-shadow: 0 12px 26px -14px rgba(78, 94, 130, .18); }
.stat-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.stat-label { color: var(--ink-soft); font-size: 12.5px; font-weight: 650; line-height: 1.45; }
.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  flex: none;
}
.stat-icon .icon { width: 19px; height: 19px; }
.stat-icon--blue { color: var(--brand-600); background: var(--brand-50); }
.stat-icon--mint { color: var(--mint-600); background: var(--mint-50); }
.stat-icon--peach { color: var(--peach-600); background: var(--peach-50); }
.stat-icon--rose { color: var(--rose-600); background: var(--rose-50); }
.stat-icon--lavender { color: var(--lavender-600); background: var(--lavender-50); }
.stat-icon--sky { color: var(--sky-600); background: var(--sky-50); }
.stat-value {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--ink);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat-unit { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: -.02em; }
.stat-progress { position: relative; z-index: 1; margin-top: 11px; }
.stat-foot { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 11px; min-height: 21px; }
.stat-sub { color: var(--muted); font-size: 11.5px; }
.trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 750;
}
.trend .icon { width: 11px; height: 11px; }
.trend--up { color: var(--mint-700); background: var(--mint-50); }
.trend--down { color: var(--rose-700); background: var(--rose-50); }
.trend--warn { color: var(--peach-700); background: var(--peach-50); }
.trend--info { color: var(--brand-700); background: var(--brand-50); }
.trend--neutral { color: var(--ink-soft); background: #F3F6FB; }

/* ---------------- Table ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.data-table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #FBFCFE;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .015em;
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #FBFCFF; }
.data-table .cell-strong { color: var(--ink); font-weight: 650; }
.data-table .cell-sub { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.data-table .cell-actions { text-align: right; white-space: nowrap; }
.data-table .person-cell { display: flex; align-items: center; gap: 9px; min-width: 130px; }

/* ---------------- Empty state ---------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
  text-align: center;
}
.empty-state__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-50);
  color: var(--brand-400);
}
.empty-state__icon .icon { width: 25px; height: 25px; }
.empty-state strong { margin-top: 12px; color: var(--ink); font-size: 14px; font-weight: 700; }
.empty-state p { margin-top: 4px; max-width: 340px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.empty-state .btn { margin-top: 14px; }

/* ---------------- Modal ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(36, 48, 74, .34);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .18s ease both;
}
.modal {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
  animation: modalIn .24s cubic-bezier(.2, .8, .2, 1) both;
  overflow: hidden;
}
.modal--sm { width: min(420px, 100%); }
.modal--lg { width: min(760px, 100%); }
.modal--xl { width: min(940px, 100%); }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 0;
}
.modal-eyebrow {
  color: var(--brand-600);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .07em;
}
.modal-head h2 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.35;
}
.modal-close { flex: none; margin-top: -2px; }
.modal-body { padding: 18px 24px 22px; overflow-y: auto; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #FBFCFE;
}
.modal-message { color: var(--ink-soft); font-size: 13.5px; line-height: 1.7; }
.modal-section-title { margin: 4px 0 10px; color: var(--ink); font-size: 12px; font-weight: 750; }

/* ---------------- Toast ---------------- */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: #27344E;
  color: #fff;
  font-size: 12.5px;
  font-weight: 550;
  box-shadow: 0 16px 36px -14px rgba(30, 41, 66, .55);
  animation: toastIn .22s cubic-bezier(.2, .8, .2, 1) both;
}
.toast .icon { width: 16px; height: 16px; color: #6EE7B7; }
.toast--error .icon { color: #FDA4AF; }
.toast--warning .icon { color: #FCD34D; }
.toast--info .icon { color: #93C5FD; }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }

/* ---------------- Animations ---------------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.animate-rise { animation: riseIn .42s cubic-bezier(.2, .8, .2, 1) both; }

/* ---------------- Responsive (base) ---------------- */
@media (max-width: 1220px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  :root { --topbar-h: 68px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-title { font-size: 23px; }
  .page-desc { font-size: 12.5px; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 15px 15px 14px; border-radius: 16px; }
  .stat-label { font-size: 11.5px; }
  .stat-icon { width: 32px; height: 32px; border-radius: 10px; }
  .stat-icon .icon { width: 16px; height: 16px; }
  .stat-value { font-size: 27px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 90vh; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .modal--sm, .modal--lg, .modal--xl { width: 100%; }
  .modal-head { padding: 20px 20px 0; }
  .modal-body { padding: 16px 20px 20px; }
  .modal-footer { padding: 13px 20px max(13px, env(safe-area-inset-bottom, 0px)); flex-wrap: wrap; }
  .modal-footer .btn { flex: 1 1 auto; min-width: 0; }
  .toast-stack { bottom: 16px; }
}
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 21px; }
  .badge { padding: 3px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
