/* ============================================================
   Altto · Marketing — dashboard de contenido (mkt.jatto.mx)
   Sistema de diseño Altto (navy + azure) + minimalismo Apple.
   Light-first, dark automático por sistema. Sin emoji.
   ============================================================ */

:root {
  --navy:          #0b2340;
  --navy-deep:     #0f2a49;
  --azure:         #264a78;
  --azure-bright:  #345f95;
  --azure-tint:    #eef2f7;

  --bg:            #ffffff;
  --bg-alt:        #f6f7f9;
  --bg-elev:       #ffffff;

  --fg:            #15181d;
  --fg-muted:      #5f6875;
  --fg-subtle:     #9aa3af;

  --line:          #ececee;
  --line-strong:   #dcdde1;
  --hover:         #f4f5f7;
  --selected:      #eef2f7;

  --accent:        #264a78;
  --accent-hover:  #0f2a49;
  --accent-soft:   #eef2f7;
  --accent-fg:     #ffffff;
  --ok:            #1f7a4d;
  --ok-soft:       #e7f4ec;
  --warn:          #c98a16;
  --warn-soft:     #fbf2dd;
  --danger:        #b42318;
  --danger-soft:   #fbeae8;
  --info:          #345f95;

  /* series de gráficas — validadas (dataviz) contra #ffffff */
  --chart-1:       #2f6cc4;
  --chart-2:       #1f7a4d;
  --chart-3:       #a06a00;

  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     22px;
  --shadow-sm:     0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.03);
  --shadow:        0 1px 2px rgba(15,23,42,.04), 0 12px 28px -14px rgba(15,23,42,.12);
  --shadow-lg:     0 1px 3px rgba(15,23,42,.06), 0 28px 56px -22px rgba(15,23,42,.22);

  --font-sans:     "Inter Tight", -apple-system, BlinkMacSystemFont, system-ui, "SF Pro Display", "Segoe UI", sans-serif;
  --font-mono:     "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --ease:          cubic-bezier(.2,.8,.2,1);
  --ease-out:      cubic-bezier(.16,1,.3,1);

  --sidebar-w: 230px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0c1726;
    --bg-alt:        #0a1320;
    --bg-elev:       #122339;

    --fg:            #eef2f7;
    --fg-muted:      #9aa7ba;
    --fg-subtle:     #64748b;

    --line:          #1c2c44;
    --line-strong:   #2a3d5a;
    --hover:         #152439;
    --selected:      #18304f;

    --azure-tint:    #13294a;
    --accent:        #4E86C9;
    --accent-hover:  #76A8E4;
    --accent-soft:   #13294a;
    --ok:            #4cc38a;
    --ok-soft:       #12291c;
    --warn:          #e0a93c;
    --warn-soft:     #2e2410;
    --danger:        #e5675c;
    --danger-soft:   #3a1714;
    --info:          #76A8E4;

    /* series de gráficas — validadas (dataviz) contra #122339 */
    --chart-1:       #6096d6;
    --chart-2:       #37a06c;
    --chart-3:       #b8862a;

    --shadow-sm:     0 1px 2px rgba(0,0,0,.4);
    --shadow:        0 1px 2px rgba(0,0,0,.4), 0 16px 36px -18px rgba(0,0,0,.7);
    --shadow-lg:     0 24px 60px -20px rgba(0,0,0,.75);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(38, 74, 120, .05), transparent 60%),
    var(--bg-alt);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(38, 74, 120, .16); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
[hidden] { display: none !important; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

.overline, .panel__title, .field > span {
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--fg-subtle);
}

/* ============ login ============ */
.login {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
}
.login__card {
  width: min(380px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px 32px;
  display: flex; flex-direction: column; gap: 14px;
  text-align: center;
}
.login__mark {
  width: 56px; height: 56px; margin: 0 auto 4px;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 700; color: #fff;
  background: linear-gradient(150deg, var(--azure-bright), var(--navy));
  border-radius: 999px;
}
.login__card h1 { font-size: 22px; letter-spacing: -0.02em; }
.login__sub { color: var(--fg-muted); font-size: 13px; margin-bottom: 8px; }
.login__card .field { text-align: left; }
.login__error { color: var(--danger); font-size: 13px; }

/* ============ layout ============ */
.app { min-height: 100vh; }
.main {
  margin-left: var(--sidebar-w);
  padding: 32px 40px 60px;
  max-width: 1360px;
}

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 24px 14px 18px;
  z-index: 40;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 10px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.sidebar__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700;
  color: #fff;
  background: linear-gradient(150deg, var(--azure-bright), var(--navy));
  border-radius: 999px;
}
.sidebar__brandtext { display: flex; flex-direction: column; line-height: 1.25; }
.sidebar__brandtext strong { font-size: 15.5px; font-weight: 700; letter-spacing: -0.02em; }
.sidebar__brandtext span { font-size: 11px; font-weight: 500; color: var(--fg-subtle); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--fg-muted);
  font-weight: 500; cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav__item:hover { color: var(--fg); background: var(--hover); }
.nav__item.is-active { color: var(--accent); background: var(--selected); font-weight: 600; }
.nav__icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav__label { font-size: 13.5px; }

.sidebar__foot {
  border-top: 1px solid var(--line);
  padding: 12px 10px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sidebar__user {
  font-size: 11.5px; color: var(--fg-subtle);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ============ vistas ============ */
.view__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.view__head h2 { font-size: 24px; letter-spacing: -0.03em; }
.view__sub { color: var(--fg-muted); font-size: 13px; margin-top: 2px; }
.section-title {
  font-size: 15px; letter-spacing: -0.01em;
  margin: 28px 0 12px;
}

/* ============ botones / campos ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn--primary { background: var(--accent); color: var(--accent-fg); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg-muted); background: var(--bg-elev); }
.btn--ghost:hover { color: var(--fg); background: var(--hover); }
.btn--danger-ghost { border-color: var(--line-strong); color: var(--danger); background: var(--bg-elev); }
.btn--danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn--sm { padding: 6px 11px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ============ chips ============ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: var(--azure-tint); color: var(--azure-bright);
  white-space: nowrap;
}
.chip--ok       { background: var(--ok-soft); color: var(--ok); }
.chip--warn     { background: var(--warn-soft); color: var(--warn); }
.chip--danger   { background: var(--danger-soft); color: var(--danger); }
.chip--navy     { background: var(--navy); color: #fff; }
.chip--muted    { background: var(--hover); color: var(--fg-muted); }

/* ============ cards de proyectos ============ */
.cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  cursor: pointer;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: var(--line-strong); }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card__title { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.card__desc {
  color: var(--fg-muted); font-size: 12.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.card__stats { display: flex; gap: 14px; margin-top: 14px; color: var(--fg-subtle); font-size: 12px; }
.card__stats strong { color: var(--fg); font-weight: 650; }

/* ============ detalle de proyecto ============ */
.detail__head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.detail__title { display: flex; align-items: center; gap: 10px; flex: 1; }
.detail__title h2 { font-size: 21px; letter-spacing: -0.02em; }
.detail__desc { color: var(--fg-muted); font-size: 13px; margin: 4px 0 20px; }

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: 36px 20px;
  text-align: center;
  color: var(--fg-muted);
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone__ic { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.dropzone strong { color: var(--fg); }
.dropzone__hint { font-size: 12px; color: var(--fg-subtle); margin-top: 4px; }

.upload { margin-top: 14px; display: flex; align-items: center; gap: 12px; }
.upload__bar { flex: 1; height: 6px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.upload__fill { height: 100%; width: 0%; border-radius: 999px; background: var(--accent); transition: width .2s var(--ease); }
.upload__label { font-size: 12px; color: var(--fg-muted); min-width: 130px; text-align: right; }

.files {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.file {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.file:hover { background: var(--hover); border-color: var(--line-strong); }
.file__ic {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--azure-tint); color: var(--azure-bright);
}
.file__ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.file__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta { font-size: 11.5px; color: var(--fg-subtle); }
.file__text { min-width: 0; }

.file-preview { margin: 8px 0 14px; text-align: center; }
.file-preview video, .file-preview img {
  max-width: 100%; max-height: 420px;
  border-radius: var(--radius);
  background: #000;
}
.file-preview .file-preview__none {
  padding: 40px; color: var(--fg-subtle); font-size: 13px;
  background: var(--hover); border-radius: var(--radius);
}

.piezas { display: flex; flex-direction: column; gap: 8px; }
.pieza-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s var(--ease);
}
.pieza-row:hover { background: var(--hover); }
.pieza-row__hook { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pieza-row__meta { font-size: 11.5px; color: var(--fg-subtle); white-space: nowrap; }

/* ============ calendario ============ */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav__title { font-size: 15px; font-weight: 700; min-width: 150px; text-align: center; text-transform: capitalize; }

.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; color: var(--fg-muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.calendar {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.calendar__dow {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
}
.calendar__dow span {
  padding: 10px 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--fg-subtle);
}
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  min-height: 108px;
  min-width: 0;   /* sin esto, un evento largo estira la columna del grid */
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day__num { font-size: 12px; font-weight: 600; color: var(--fg-muted); }
.cal-day--out { background: var(--bg-alt); }
.cal-day--out .cal-day__num { color: var(--fg-subtle); opacity: .6; }
.cal-day--today { background: var(--accent-soft); }
.cal-day--today .cal-day__num {
  color: var(--accent-fg); background: var(--accent);
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
}
.cal-event {
  font-size: 11.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer;
  border-left: 3px solid transparent;
  background: var(--hover); color: var(--fg-muted);
}
.cal-event--draft     { background: var(--azure-tint); color: var(--azure-bright); border-left-color: var(--azure-bright); }
.cal-event--approved  { background: var(--ok-soft); color: var(--ok); border-left-color: var(--ok); }
.cal-event--published { background: var(--navy); color: #fff; border-left-color: var(--navy); }
.cal-event--rejected  { background: var(--danger-soft); color: var(--danger); border-left-color: var(--danger); opacity: .75; }
.cal-event--news      { background: var(--warn-soft); color: var(--warn); border-left-color: var(--warn); }
@media (prefers-color-scheme: dark) {
  .cal-event--published { background: var(--selected); color: var(--info); border-left-color: var(--info); }
}

.unscheduled { margin-top: 20px; }
.unscheduled h3 { font-size: 14px; margin-bottom: 10px; }
.unscheduled .pieza-row { margin-bottom: 6px; }

/* ============ métricas ============ */
.range { display: inline-flex; gap: 2px; background: var(--hover); border-radius: var(--radius); padding: 3px; }
.range__btn {
  padding: 6px 14px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; color: var(--fg-muted);
}
.range__btn.is-active { background: var(--bg-elev); color: var(--fg); box-shadow: var(--shadow-sm); }

.kpis {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 20px;
}
.kpi {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}
.kpi__label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-subtle); }
.kpi__value { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi__sub { font-size: 11.5px; color: var(--fg-muted); margin-top: 2px; }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.panel__title { margin-bottom: 14px; }

.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--fg-subtle); font-size: 10.5px; font-family: var(--font-sans); }
.chart .crosshair { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }

.chart-tip {
  position: absolute; pointer-events: none;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px 11px;
  font-size: 12px; line-height: 1.5;
  z-index: 10; white-space: nowrap;
}
.chart-tip__date { font-weight: 700; margin-bottom: 2px; }
.chart-tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--fg-muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 9px 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--fg-subtle);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: right; }

.note { color: var(--fg-subtle); font-size: 12px; margin-top: 4px; }

/* ============ newsletter ============ */
.empty {
  background: var(--bg-elev);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: var(--fg-muted);
}
.empty h3 { color: var(--fg); font-size: 16px; margin-bottom: 8px; }
.empty code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--hover); padding: 2px 7px; border-radius: 6px;
}

/* ============ modales ============ */
.backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 35, 64, .4);
  backdrop-filter: blur(3px);
  z-index: 90;
}
.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  z-index: 100;
  display: flex; flex-direction: column; gap: 14px;
}
.modal--wide { width: min(640px, calc(100vw - 32px)); }
.modal h3 { font-size: 17px; letter-spacing: -0.02em; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal__grid--3 { grid-template-columns: repeat(3, 1fr); }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

.pieza-body {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: 300px; overflow-y: auto;
}
.pieza-body h4 { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 2px; }
.pieza-body p { white-space: pre-wrap; }

/* ============ toast (errores) ============ */
.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 500;
  max-width: min(520px, calc(100vw - 32px));
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 200;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-color-scheme: dark) {
  .toast { background: var(--bg-elev); border: 1px solid var(--line-strong); }
}

/* ============ responsive ============ */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    position: fixed; inset: auto 0 0 0; top: auto;
    width: 100%; height: auto;
    flex-direction: row; align-items: center;
    padding: 8px 12px;
    border-top: 1px solid var(--line); border-right: none;
  }
  .sidebar__brand, .sidebar__foot { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav__label { display: none; }
  .nav__icon { width: 21px; height: 21px; }
  .main { margin-left: 0; padding: 20px 16px 90px; }
  .cal-day { min-height: 74px; }
  .modal__grid--3 { grid-template-columns: 1fr 1fr; }
}
