/* ==========================================================================
   Base / reset
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink-900);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 { font-size: 48px; font-weight: 800; }
h2 { font-size: 28px; font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

p  { margin: 0; }
a  { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ==========================================================================
   Shell
   ========================================================================== */
.site-shell { display: flex; flex-direction: column; min-height: 100vh; }
.site-main  { flex: 1 0 auto; background: var(--surface); }
.site-main--alt { background: var(--surface-alt); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide   { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.stack  { display: flex; flex-direction: column; }
.row    { display: flex; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.gap-4  { gap: 4px; }  .gap-6  { gap: 6px; }  .gap-8  { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

.mt-8  { margin-top: 8px; }  .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }  .mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }

.hidden     { display: none !important; }
.text-muted { color: var(--ink-500); }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 12px; }
.grow       { flex: 1 1 auto; min-width: 0; }
.nowrap     { white-space: nowrap; }
.truncate   { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.clamp-3 {
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

.section       { padding: 48px 0; }
.section--tight{ padding: 28px 0; }
.section--alt  { background: var(--surface-alt); }

.section-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 20px;
  margin-bottom: 24px;
}
.section-head h2    { font-size: 27px; }
.section-head .section-sub {
  color: var(--ink-500); font-size: 14.5px;
  margin-top: 4px; max-width: 720px;
}

.link-more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue-600); font-weight: 600; font-size: 14px;
  transition: gap var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.link-more:hover { gap: 10px; color: var(--blue-700); }
.link-more svg   { width: 16px; height: 16px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-md);
  padding: 11px 18px; font-size: 14px; font-weight: 600;
  font-family: var(--font-body); line-height: 1.2;
  transition: background var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled,
.btn.is-disabled { opacity: 0.55; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }

/* Primary – blue */
.btn--primary {
  background: var(--blue-600); color: #fff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0));
}
.btn--primary:hover {
  background-color: var(--blue-700);
  box-shadow: 0 10px 24px rgba(27,95,235,.32);
  transform: translateY(-1px);
}

/* Dark navy */
.btn--dark { background: var(--navy-800); color: #fff; }
.btn--dark:hover { background: var(--navy-900); box-shadow: var(--sh-md); transform: translateY(-1px); }

/* Ghost */
.btn--ghost { background: #fff; color: var(--blue-600); border-color: var(--blue-200); }
.btn--ghost:hover { background: var(--blue-050); border-color: var(--blue-600); box-shadow: var(--sh-sm); transform: translateY(-1px); }

/* Outline */
.btn--outline { background: #fff; color: var(--ink-700); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--ink-400); background: var(--surface-alt); transform: translateY(-1px); }

/* Soft */
.btn--soft { background: var(--blue-100); color: var(--blue-700); }
.btn--soft:hover { background: var(--blue-200); transform: translateY(-1px); }

/* White (used inside dark surfaces) */
.btn--white { background: #fff; color: var(--navy-800); }
.btn--white:hover { box-shadow: 0 12px 26px rgba(0,0,0,.22); transform: translateY(-1px); }

/* Sizes */
.btn--block  { width: 100%; }
.btn--sm  { padding: 8px 14px;  font-size: 13px; }
.btn--xs  { padding: 6px 10px;  font-size: 12px; border-radius: var(--r-sm); }
.btn--lg  { padding: 14px 24px; font-size: 15px; }
.btn--icon      { padding: 9px; border-radius: var(--r-md); }
.btn--icon-round{ padding: 0; width: 38px; height: 38px; border-radius: 50%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: transparent; border: 1px solid transparent; color: var(--ink-600);
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn:hover  { background: var(--surface-alt); color: var(--ink-900); }
.icon-btn.is-active { color: var(--blue-600); background: var(--blue-100); }
.icon-btn svg { width: 19px; height: 19px; }

/* ==========================================================================
   Chips / badges / pills
   ========================================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-sm);
  background: var(--surface-alt); border: 1px solid var(--line);
  color: var(--ink-600); font-size: 12.5px; font-weight: 500;
  white-space: nowrap;
}
.chip svg { width: 14px; height: 14px; }
.chip--plain  { background: transparent; border-color: transparent; padding: 0; }
.chip--accent {
  background: var(--accent-soft, var(--blue-100));
  color: var(--accent, var(--blue-700));
  border-color: transparent;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--line-strong);
  color: var(--ink-700); font-size: 13px; font-weight: 500;
  transition: all var(--t-fast); cursor: pointer;
}
.pill:hover   { border-color: var(--blue-600); color: var(--blue-600); }
.pill.is-active {
  background: var(--blue-600); border-color: var(--blue-600);
  color: #fff; font-weight: 600;
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  background: var(--accent-soft, var(--blue-100));
  color: var(--accent, var(--blue-700));
}
.badge--success { background: var(--green-050);  color: var(--green-600); }
.badge--muted   { background: var(--surface-alt); color: var(--ink-500);  }
.badge--outline { background: #fff; border: 1px solid var(--line); color: var(--ink-600); }
.badge--info    { background: var(--blue-050);   color: var(--blue-700);  }
.badge--warning { background: var(--amber-050);  color: var(--amber-600); }
.badge--error   { background: #fef2f3;           color: #b4232f; }
.badge svg { width: 13px; height: 13px; }

/* ==========================================================================
   Cards / panels
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.card--pad   { padding: 20px; }
.card--hover { transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base); }
.card--hover:hover { box-shadow: var(--sh-md); transform: translateY(-2px); border-color: var(--line-strong); }

.card-head { display: flex; align-items: flex-start; gap: 12px; }
.card-head .card-head-icon {
  width: 34px; height: 34px; border-radius: var(--r-md);
  display: grid; place-items: center; flex: none;
  background: var(--accent-soft, var(--blue-100));
  color: var(--accent, var(--blue-600));
}
.card-head .card-head-icon svg { width: 19px; height: 19px; }
.card-head h3 { font-size: 19px; }
.card-head .card-sub { color: var(--ink-500); font-size: 13.5px; margin-top: 2px; }

.tile {
  width: 46px; height: 46px; border-radius: var(--r-md);
  display: grid; place-items: center; flex: none;
  background: var(--accent-soft, var(--blue-100));
  color: var(--accent, var(--blue-600));
}
.tile svg { width: 23px; height: 23px; }
.tile--lg  { width: 56px; height: 56px; border-radius: var(--r-lg); }
.tile--lg svg { width: 27px; height: 27px; }
.tile--soft { background: var(--accent-soft, var(--blue-050)); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label,
.field__label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.field .hint   { font-size: 12px;   color: var(--ink-400); }
.field .error  { font-size: 12.5px; color: #d92d3c; font-weight: 500; }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: #fff; font-size: 14px; color: var(--ink-800);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-300); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue-600); box-shadow: var(--sh-focus);
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: #e0565f; }
.textarea { min-height: 110px; resize: vertical; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6b82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.checkline { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 0; }
.checkline input[type="checkbox"] {
  appearance: none; width: 16px; height: 16px; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: 4px; background: #fff;
  transition: all var(--t-fast); position: relative; cursor: pointer;
}
.checkline input[type="checkbox"]:checked {
  background: var(--blue-600); border-color: var(--blue-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 11px; background-repeat: no-repeat; background-position: center;
}
.checkline span  { font-size: 13.5px; color: var(--ink-700); }
.checkline .count{ margin-left: auto; font-size: 12.5px; color: var(--ink-400); }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--line-strong); border-radius: var(--r-pill);
  transition: background var(--t-base);
}
.switch .slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform var(--t-base);
  box-shadow: var(--sh-xs);
}
.switch input:checked + .slider { background: var(--green-500); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ==========================================================================
   Header  (ref: img1, img2, img3, img4, img5, img6 — exact pixel match)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: #fff; border-bottom: 1px solid var(--line);
}
.site-header .header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
}

/* Brand mark */
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand__mark { width: 28px; height: 28px; }
.brand__text {
  font-family: var(--font-head); font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em; color: var(--ink-900);
}
.brand__text em { font-style: normal; color: var(--blue-600); }

/* Nav links */
.main-nav { display: flex; align-items: center; gap: 4px; height: 100%; margin-inline: auto; }
.main-nav a {
  position: relative; display: inline-flex; align-items: center; height: 100%;
  padding: 0 14px; font-size: 14px; font-weight: 500; color: var(--ink-700);
  transition: color var(--t-fast);
}
.main-nav a:hover { color: var(--blue-600); }
.main-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2.5px; border-radius: 2px 2px 0 0; background: var(--blue-600);
  transform: scaleX(0); transition: transform var(--t-base);
}
.main-nav a.is-active            { color: var(--blue-600); font-weight: 600; }
.main-nav a.is-active::after     { transform: scaleX(1); }
.main-nav a svg                  { width: 18px; height: 18px; margin-right: 6px; flex: none; }

/* Header right actions */
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.header-signin  { font-size: 14px; font-weight: 500; color: var(--ink-700); padding: 8px 10px; }
.header-signin:hover { color: var(--blue-600); }

/* User chip (authenticated) */
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: #fff; transition: all var(--t-base);
}
.user-chip:hover             { border-color: var(--blue-200); box-shadow: var(--sh-sm); transform: translateY(-1px); }
.user-chip[aria-expanded="true"] { border-color: var(--blue-200); box-shadow: var(--sh-sm); }
.user-chip .avatar           { width: 32px; height: 32px; font-size: 12px; }
.user-chip > svg             { width: 16px; height: 16px; color: var(--ink-400); transition: transform var(--t-base); }
.user-chip[aria-expanded="true"] > svg { transform: rotate(180deg); }
.user-chip__meta  { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.user-chip__name  { font-size: 13px; font-weight: 600; color: var(--ink-800); }
.user-chip__role  { font-size: 11px; font-weight: 500; color: var(--ink-400); letter-spacing: .01em; white-space: nowrap; }

/* Avatar component */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--blue-100); color: var(--blue-700);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
}
.avatar img     { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg     { width: 64px;  height: 64px;  font-size: 20px; }
.avatar--xl     { width: 120px; height: 120px; font-size: 34px; }
.avatar--ring   { box-shadow: 0 0 0 4px #fff; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown__panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 244px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 8px; z-index: var(--z-header);
  animation: dropdown-in var(--t-base) both;
}
.dropdown__panel[hidden] { display: none; }
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.dropdown__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-sm); font-size: 14px;
  color: var(--ink-700); background: none; border: 0; text-align: left;
}
.dropdown__item:hover    { background: var(--surface-alt); color: var(--ink-900); }
.dropdown__item svg      { width: 17px; height: 17px; color: var(--ink-400); }
.dropdown__divider       { height: 1px; background: var(--line); margin: 6px 4px; }
.dropdown__header        { padding: 10px 11px; }
.dropdown__header strong { display: block; font-size: 14px; color: var(--ink-900); }
.dropdown__header span   { font-size: 12.5px; color: var(--ink-500); }
.dropdown__header .dropdown__role {
  display: inline-block; margin-top: 8px; padding: 2px 9px;
  border-radius: var(--r-pill); background: var(--blue-100);
  color: var(--blue-700); font-size: 11px; font-weight: 600; letter-spacing: .02em;
}

/* Mobile-only elements (hidden on desktop) */
.nav-mobile-actions { display: none; }
.nav-toggle         { display: none; }

/* ==========================================================================
   Footer  (ref: img2 bottom — exact 4-col grid, navy bg)
   ========================================================================== */
.site-footer   { background: var(--footer-bg); color: #c8d6e6; }
.site-footer a { color: #c8d6e6; transition: color var(--t-fast); }
.site-footer a:hover { color: #fff; }

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding: 44px 0 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .brand__text    { color: #fff; }
.footer-brand .brand__text em { color: #4d8bff; }
.footer-brand p               { margin-top: 10px; font-size: 14px; color: #9fb3c9; }

.footer-col h4 {
  color: var(--teal-500); font-size: 13.5px; font-weight: 700;
  margin-bottom: 14px; font-family: var(--font-body); letter-spacing: .01em;
}
.footer-col ul               { display: flex; flex-direction: column; gap: 9px; }
.footer-col li a             { font-size: 13.5px; }

.footer-contact              { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.footer-contact svg          { width: 16px; height: 16px; color: #7d95b0; }

.footer-socials { display: flex; gap: 9px; margin-top: 16px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  transition: background var(--t-fast), transform var(--t-fast), border-color var(--t-fast);
}
.footer-socials a:hover { background: var(--blue-600); border-color: var(--blue-600); transform: translateY(-2px); }
.footer-socials svg { width: 16px; height: 16px; }

.footer-bottom { background: var(--footer-bar); margin-top: -1px; }
.footer-bottom .footer-bottom-inner {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 16px; font-size: 13px; color: #8ba2ba;
}

/* ==========================================================================
   States: loading / empty / alerts / toasts
   ========================================================================== */
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f6f8fc 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0   50%; }
}
.skeleton-card { height: 160px; border-radius: var(--r-lg); }
.skeleton-line  { height: 12px; margin-bottom: 10px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--blue-600);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 48px 20px; color: var(--ink-500); font-size: 14px;
}

.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 48px 24px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface-soft);
}
.empty-state__icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-050); color: var(--blue-600);
}
.empty-state__icon svg { width: 24px; height: 24px; }
.empty-state h3 { font-size: 17px; }
.empty-state p  { font-size: 13.5px; color: var(--ink-500); max-width: 420px; }

.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px;
  border: 1px solid transparent;
}
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.alert--error   { background: #fef2f3; border-color: #fbd5d8; color: #b4232f; }
.alert--success { background: var(--green-050); border-color: var(--green-200); color: var(--green-600); }
.alert--info    { background: var(--blue-050);  border-color: var(--blue-200);  color: var(--blue-700);  }
.alert--warning { background: var(--amber-050); border-color: var(--amber-100); color: var(--amber-600); }

.toast-host {
  position: fixed; right: 20px; bottom: 22px; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 360px;
  padding: 12px 16px; border-radius: var(--r-md);
  background: var(--ink-900); color: #fff; font-size: 13.5px;
  box-shadow: var(--sh-lg);
  animation: toast-in var(--t-base) both;
}
.toast svg { width: 17px; height: 17px; flex: none; }
.toast--success svg { color: var(--teal-500); }
.toast--error  { background: #7f1d25; }
.toast--error svg { color: #ffb4b9; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(8,22,40,.58);
  display: grid; place-items: center; padding: 24px;
  animation: fade-in var(--t-fast) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto;
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  animation: modal-in var(--t-base) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 22px 14px; border-bottom: 1px solid var(--line);
}
.modal__head h3 { font-size: 19px; }
.modal__body    { padding: 20px 22px; }
.modal__foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 22px; border-top: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}
.modal--wide { max-width: 720px; }

/* ==========================================================================
   Utilities
   ========================================================================== */
.divider   { height: 1px; background: var(--line); border: 0; margin: 0; }
.scroll-x  { overflow-x: auto; scrollbar-width: thin; }
.scroll-x::-webkit-scrollbar       { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
