/* AYO Solvex · Campaign — same design system as ops.ayosolvex.com (src/app.css of the ops app):
   navy ink, electric blue and cyan, DM Sans for text and Syne for headings, local font files. */

@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/dm-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/dm-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Syne"; font-style: normal; font-weight: 700 800; font-display: swap; src: url("/fonts/syne-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Syne"; font-style: normal; font-weight: 700 800; font-display: swap; src: url("/fonts/syne-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------------------------------------------------------------- tokens (identical to ops) */
:root {
  --bg: #f7f9ff; --card: #ffffff; --line: #cad7e9; --track: #e5ecf7;
  --s1: #0055d9; --s2: #eb6834; --s3: #12734e; --s4: #e09a00; --s5: #e87ba4;
  --field-line: #869bb6; --ink: #061b46; --sub: #4c607b;
  --accent: #0055d9; --accent-hover: #004bbb; --accent-end: #006aae; --on-accent: #ffffff; --accent-soft: #e1edff;
  --warn: #8a5c00; --warn-soft: #fcf1d9; --bad: #b72f43; --bad-soft: #fbe8eb;
  --shadow: 0 1px 2px rgb(6 27 70 / 0.04), 0 6px 20px -8px rgb(0 85 217 / 0.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #07132d; --card: #0c2041; --line: #263f61; --track: #1b3357;
    --s1: #26bcff; --s2: #ef8354; --s3: #55d6a0; --s4: #f0c56a; --s5: #e98bb0;
    --field-line: #5b7395; --ink: #f4f8ff; --sub: #a7bbd6;
    --accent: #26bcff; --accent-hover: #5ccdff; --accent-end: #00c7ea; --on-accent: #061b46; --accent-soft: #102e57;
    --warn: #f0c56a; --warn-soft: #382c12; --bad: #ef7182; --bad-soft: #3d1a26;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -10px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #07132d; --card: #0c2041; --line: #263f61; --track: #1b3357;
  --s1: #26bcff; --s2: #ef8354; --s3: #55d6a0; --s4: #f0c56a; --s5: #e98bb0;
  --field-line: #5b7395; --ink: #f4f8ff; --sub: #a7bbd6;
  --accent: #26bcff; --accent-hover: #5ccdff; --accent-end: #00c7ea; --on-accent: #061b46; --accent-soft: #102e57;
  --warn: #f0c56a; --warn-soft: #382c12; --bad: #ef7182; --bad-soft: #3d1a26;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -10px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

/* Campaign statuses, drawn from the ops series colours */
:root {
  --sc-pas_envoye: var(--field-line); --sc-envoye: var(--s3); --sc-repondu: var(--s1); --sc-interesse: var(--s5); --sc-pas_whatsapp: var(--s2);
  --st-pas_envoye: transparent;
  --st-envoye: color-mix(in srgb, var(--s3) 10%, transparent);
  --st-repondu: color-mix(in srgb, var(--s1) 10%, transparent);
  --st-interesse: color-mix(in srgb, var(--s5) 13%, transparent);
  --st-pas_whatsapp: color-mix(in srgb, var(--s2) 12%, transparent);
  --st-pas_envoye-ink: var(--sub); --st-envoye-ink: var(--s3); --st-repondu-ink: var(--s1); --st-interesse-ink: var(--s5); --st-pas_whatsapp-ink: var(--s2);
}

/* ---------------------------------------------------------------- base (tailwind preflight + ops) */
*, *::before, *::after { box-sizing: border-box; border: 0 solid; margin: 0; padding: 0; }
* { scrollbar-color: var(--field-line) transparent; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--ink); }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: "DM Sans", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: inherit; }
button, input, select, textarea { font: inherit; color: inherit; background: transparent; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1 { font-family: "Syne", "DM Sans", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.3; text-wrap-style: balance; }
h2 { font-size: 15px; font-weight: 700; text-wrap-style: balance; }
h3 { font-size: 14px; font-weight: 600; text-wrap-style: balance; }
p { text-wrap-style: pretty; }
b, strong { font-weight: 600; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; background: var(--track); border-radius: 4px; padding: 1px 4px; }
.muted { color: var(--sub); }
.small { font-size: 13px; }

/* ---------------------------------------------------------------- shell (live ops (app)/+layout) */
.shell { min-height: 100dvh; }
/* Phones: the sidebar becomes a tab bar fixed to the bottom of the screen. */
.sidebar {
  position: fixed; inset: auto 0 0 0; z-index: 10; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.sidebar .side-brand, .sidebar .side-foot { display: none; }
.side-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 4px; }
.side-brand { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.mobile-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.mobile-head .side-brand { gap: 6px; padding: 0; min-width: 0; margin-right: auto; }
.brand-logo-sm { width: 96px; flex: none; }
.main-col { min-width: 0; }
.main-col main { margin: 0 auto; width: 100%; max-width: 1152px; padding: 16px 16px calc(7rem + env(safe-area-inset-bottom)); }
.main-col .mobile-head { margin: 0 auto 0; max-width: 1152px; padding: 16px 16px 0; }
main:has(.table-wrap) { max-width: none; }

/* Tabs: icon over a short label on phones, text only in the sidebar. */
.nav-icon { flex-shrink: 0; display: block; }
.nav-icon .fill, .nav-icon .inner { transition: fill 120ms ease, stroke 120ms ease; }
.nav-tab[aria-current="page"] .nav-icon .fill { fill: currentColor; }
.nav-tab[aria-current="page"] .nav-icon .inner { stroke: var(--card); }
.nav-tab[aria-current="page"] .nav-icon circle.inner { fill: var(--card); }
.nav-full { display: none; }
.mobile-only { display: block; }
@media (max-width: 767.98px) {
  .nav-tab {
    -webkit-tap-highlight-color: transparent; flex-direction: column; justify-content: center;
    gap: 4px; min-height: 58px; padding: 8px 0 6px;
  }
  .side-nav .nav-tab[aria-current="page"] { background: none; }
  .nav-tab-label { font-size: 11px; line-height: 1.2; }
}

@media (min-width: 768px) {
  .shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; inset: 0 auto auto; height: 100dvh; border-top: 0; border-right: 1px solid var(--line); padding: 16px; }
  .sidebar .side-brand { display: flex; margin-bottom: 24px; }
  .sidebar .side-brand .brand-logo { width: 128px; }
  .sidebar .side-foot { display: block; position: absolute; right: 16px; bottom: 16px; left: 16px; }
  .side-foot .nav-item { width: 100%; }
  .side-user { display: block; margin-bottom: 8px; padding: 0 10px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 120ms ease; }
  .side-user:hover { color: var(--accent); }
  .side-nav { display: flex; flex-direction: column; gap: 4px; padding: 0; }
  .side-nav .nav-item { justify-content: flex-start; padding-left: 10px; padding-right: 10px; }
  .nav-icon, .nav-tab-label { display: none; }
  .nav-full { display: inline; }
  .mobile-head, .mobile-only { display: none; }
  .main-col main { padding: 32px; }
}

/* ---------------------------------------------------------------- ops components */
.card, .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 20px;
}
.panel { margin-bottom: 16px; }
.pill {
  display: inline-block; border-radius: 6px; font-size: 12px; font-weight: 500; padding: 1px 7px;
  background: var(--accent-soft); color: var(--accent);
}
.pill-quiet { background: var(--track); color: var(--sub); }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }

.nav-item {
  display: flex; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--sub); font-weight: 500;
  transition: background-color 120ms ease, color 120ms ease;
}
.nav-item:hover { color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.brand-logo { position: relative; display: block; aspect-ratio: 1536 / 362; }
.brand-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.brand-logo-dark { visibility: hidden; }
:root[data-theme="dark"] .brand-logo-light { visibility: hidden; }
:root[data-theme="dark"] .brand-logo-dark { visibility: visible; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .brand-logo-light { visibility: hidden; }
  :root[data-theme="system"] .brand-logo-dark { visibility: visible; }
}

/* inputs (.input in ops) */
input[type=text], input[type=number], input[type=search], select, textarea {
  height: 40px; padding: 0 12px; background: var(--card); color: var(--ink);
  border: 1px solid var(--field-line); border-radius: 8px; min-width: 0;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
select { padding-right: 8px; }
textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--accent); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input::placeholder, textarea::placeholder { color: var(--sub); opacity: .8; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=file] { font-size: 13px; color: var(--sub); }
input[type=file]::file-selector-button { height: 32px; padding: 0 12px; margin-right: 8px; font: inherit; font-weight: 500; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }

/* buttons (.btn / .btn-primary / .btn-small in ops) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px;
  font-weight: 500; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 200ms ease, filter 200ms ease, transform 80ms ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-end)); border-color: transparent; color: var(--on-accent); font-weight: 700;
  box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.btn.primary:hover { color: var(--on-accent); border-color: transparent; filter: brightness(1.08); box-shadow: 0 8px 28px -6px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn.primary:disabled { filter: saturate(0.6); opacity: 0.7; cursor: default; }
.btn.danger, .btn.danger:hover { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn.danger.armed { background: var(--bad); border-color: var(--bad); color: var(--card); font-weight: 700; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------------------------------------------------------------- page layout */
main > h1 { margin-bottom: 4px; }
.sub { color: var(--sub); font-size: 13px; margin-bottom: 20px; }
.panel h2 { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1024px) { .grid2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.grid2 > .panel { margin-bottom: 0; }
.grid2 + * { margin-top: 16px; }

.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 12px; align-items: end; }
.form input:not([type=checkbox]):not([type=file]), .form select { width: 100%; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.form .wide { grid-column: 1 / -1; }
.form textarea { min-height: 84px; width: 100%; }
.sources { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px 8px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.sources legend { font-size: 13px; font-weight: 500; padding: 0 4px; }
.sources label.check { min-height: 32px; }
.centers .phone small { display: block; color: var(--sub); font-size: 11px; max-width: 160px; white-space: normal; }
.centers .phone small.src { text-transform: uppercase; letter-spacing: .03em; font-size: 10px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; min-height: 40px; }

.jobs { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.job { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; font-size: 13px; background: var(--accent-soft); color: var(--ink); }
.job small { color: var(--sub); }
.job a { color: var(--accent); font-weight: 500; }
.job .spin { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.job.error { background: var(--bad-soft); color: var(--bad); }
.job.error small { color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- regions list */

#regions > h2 { margin-bottom: 12px; }
.regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.region-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px;
  transition: border-color 120ms ease;
}
.region-card:hover { border-color: var(--field-line); }
.region-card:hover h3 { color: var(--accent); }
.region-card h3 { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 120ms ease; }
.region-card .meta { color: var(--sub); font-size: 12px; margin-bottom: 12px; }
.bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--track); }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 12px; color: var(--sub); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.empty { text-align: center; color: var(--sub); padding: 48px 20px; }

/* ---------------------------------------------------------------- region page */
.region-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.region-head > div:first-child { min-width: 0; flex: 1 1 280px; }
.region-head h1 input { height: auto; font: inherit; letter-spacing: inherit; border-color: transparent; background: transparent; padding: 0 6px; margin-left: -6px; border-radius: 8px; width: 100%; max-width: 640px; }
.region-head h1 input:hover { border-color: var(--line); }
.region-head .sub { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, calc(50% - 6px)), 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; cursor: pointer; transition: border-color 120ms ease; }
.stat:hover { border-color: var(--field-line); }
.stat.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.stat span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); }
.stat b { display: block; font-size: 24px; line-height: 32px; font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { width: 280px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--sub); font-weight: 500; font-size: 13px; transition: background-color 120ms ease, color 120ms ease; }
.chip:hover { color: var(--ink); }
.chip.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.next-info { font-size: 12px; color: var(--sub); margin-left: auto; }

.table-wrap { overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: calc(100dvh - 140px); -webkit-overflow-scrolling: touch; }
table.centers { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.centers th { position: sticky; top: 0; z-index: 2; background: var(--card); text-align: left; font-weight: 500; color: var(--sub); padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.centers thead tr:first-child th { color: var(--ink); font-weight: 700; }
.centers thead tr:nth-child(2) th { top: 40px; font-size: 12px; text-align: center; }
.centers th.grp { text-align: center; border-left: 1px solid var(--line); }
.centers td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.centers tbody tr:last-child td { border-bottom: 0; }
.centers td.lang { border-left: 1px solid var(--line); text-align: center; white-space: nowrap; }
.centers td.lang + td.lang { border-left-style: dashed; }
.centers tr[data-status] td { background: var(--row); }
.centers .num { color: var(--sub); width: 30px; text-align: right; }
.centers .name { min-width: 200px; max-width: 360px; }
.centers .name strong { display: block; font-weight: 500; }
.centers .name small { color: var(--sub); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.centers .links a { font-size: 12px; margin-right: 8px; color: var(--accent); font-weight: 500; }
.centers .links a:hover { text-decoration: underline; }
.centers .opened { font-size: 12px; color: var(--accent); }
.centers .phone { white-space: nowrap; }
.centers .phone.bad { color: var(--bad); }
.open-btn { height: 28px; padding: 0 8px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); border-radius: 8px; transition: border-color 120ms ease, color 120ms ease; }
.open-btn:hover { border-color: var(--accent); color: var(--accent); }
.open-btn.web::before { content: "🌐 "; }
.open-btn.app::before { content: "📱 "; }
.open-btn + .open-btn { margin-left: 4px; }
select.status { height: 28px; border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 500; border: 0; background: var(--chip); color: var(--chip-ink); }
select.status[style*="pas_envoye"] { background: var(--track); }
select.status option { background: var(--card); color: var(--ink); }
input.note { width: 170px; height: 32px; padding: 0 10px; font-size: 13px; }

.media-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.media-strip .mcard { width: 150px; flex: none; }

/* ---------------------------------------------------------------- media page */
.drop { display: block; border: 1px dashed var(--field-line); border-radius: 12px; padding: 32px; text-align: center; color: var(--sub); background: var(--card); cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease; }
.drop b { color: var(--ink); font-weight: 500; }
.drop:hover { border-color: var(--accent); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 12px; margin-top: 16px; }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mcard .thumb { aspect-ratio: 4 / 3; background: var(--track); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mcard .thumb img, .mcard .thumb video { width: 100%; height: 100%; object-fit: cover; }
.mcard .info { padding: 8px 12px; font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .acts { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.mcard .acts .btn { flex: 1; }

/* ---------------------------------------------------------------- templates page */
.senders-table td, .senders-table th { padding: 4px 8px 4px 0; text-align: left; }
.senders-table th { font-size: 13px; font-weight: 500; color: var(--sub); }
.senders-table input { width: 150px; }
.tpl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.tpl { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 8px; transition: border-color 120ms ease; }
.tpl header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; gap: 6px; flex-wrap: wrap; }
.tpl .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tpl .tag { display: inline-block; border-radius: 6px; font-size: 12px; font-weight: 500; padding: 1px 7px; background: var(--accent-soft); color: var(--accent); }
.tpl textarea { width: 100%; min-height: 230px; resize: vertical; font-size: 13px; }
.tpl textarea[dir=rtl] { font-size: 14px; }
.tpl.dirty { border-color: var(--accent); }

/* ---------------------------------------------------------------- toast (ops .notice) */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px); z-index: 50;
  border-radius: 9px; font-size: 13px; font-weight: 500; padding: 10px 14px; max-width: min(560px, 90vw);
  background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 150ms ease, transform 150ms ease;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
@media (max-width: 767px) { #toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }

@media (max-width: 767.98px) {
  .toolbar input[type=search] { width: 100%; }
  .next-info { margin-left: 0; width: 100%; }
  .chips { width: 100%; }
  .region-head > div:last-child { width: 100%; }
  .region-head .btn { flex: 1; }
  .table-wrap { max-height: calc(100dvh - 7rem - env(safe-area-inset-bottom)); }
  .grid2 > .panel, .panel { padding: 16px; }
  .senders-wrap, .panel:has(.senders-table) { overflow-x: auto; }
  .senders-table input { width: 110px; }
  input.note { width: 130px; }
  #toast { left: 16px; right: 16px; max-width: none; transform: translateY(16px); text-align: center; }
  #toast.show { transform: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- login (ops AuthCard) */
.auth-wrap { display: grid; min-height: 100dvh; place-items: center; padding: 16px; }
.auth-box { width: 100%; max-width: 384px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 24px; }
.auth-brand .brand-logo { width: 176px; }
.auth-box h1 { margin-bottom: 16px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.field input { width: 100%; }
.btn-block { width: 100%; }
.notice { border-radius: 9px; font-size: 13px; padding: 10px 12px; margin-bottom: 14px; }
.notice-bad { background: var(--bad-soft); color: var(--bad); }
.notice-good { background: var(--accent-soft); color: var(--accent); }
.account-card { max-width: 448px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.team-row:first-child { border-top: 0; }
.team-who small { display: block; color: var(--sub); font-size: 12px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.notice { overflow-wrap: anywhere; }
.field small { display: block; color: var(--sub); font-size: 13px; margin-top: 5px; }
input[type=email], input[type=password] {
  height: 40px; padding: 0 12px; background: var(--card); color: var(--ink);
  border: 1px solid var(--field-line); border-radius: 8px; min-width: 0;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.remember { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; cursor: pointer; }
.field input[type=checkbox] { width: 16px; flex: none; }
