/* Taşımacım Workplace — arayüz stilleri.
   Tek dosya, build adımı yok. Renkler değişken (token) olarak tanımlı;
   açık ve koyu tema aynı değişken setini kullanır. */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef1;
  --surface-3: #dfe3e8;
  --fg: #16202a;
  --fg-muted: #5b6b7a;
  --fg-faint: #8695a3;
  --line: #d9dde2;
  --line-strong: #c3cad1;
  --accent: #1583c4;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1fb;

  --todo: #6b7a89;
  --doing: #0f7d85;
  --waiting: #b8890f;
  --review: #6b4fa8;
  --revision: #b3362c;
  --done: #2e7a52;

  --todo-soft: #e9ecef;
  --doing-soft: #ddf0f1;
  --waiting-soft: #fbf0d6;
  --review-soft: #ede7f7;
  --revision-soft: #f9e3e1;
  --done-soft: #e1f1e8;

  --danger: #b3362c;
  --danger-soft: #f9e3e1;

  /* Logonun ikinci rengi — yüksek öncelik ve vurgu için */
  --brand-yellow: #d9a216;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 42, .06), 0 4px 14px rgba(22, 32, 42, .05);
  --shadow-lg: 0 12px 40px rgba(22, 32, 42, .18);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11171d;
    --surface: #19222a;
    --surface-2: #222d37;
    --surface-3: #2b3842;
    --fg: #e5eaef;
    --fg-muted: #93a1ae;
    --fg-faint: #6e7f8e;
    --line: #2c3842;
    --line-strong: #3b4a56;
    --accent: #4fb2e8;
    --accent-ink: #052639;
    --accent-soft: #0e3246;

    --todo: #8d9caa;
    --doing: #45b8c0;
    --waiting: #e8c04f;
    --review: #a98fd6;
    --revision: #e9705f;
    --done: #4fae7c;

    --todo-soft: #232f39;
    --doing-soft: #10323a;
    --waiting-soft: #352c10;
    --review-soft: #2a2238;
    --revision-soft: #361a17;
    --done-soft: #15301f;

    --danger: #e9705f;
    --danger-soft: #361a17;
    --brand-yellow: #f2c64d;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ butonlar */
.btn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: none; border-color: transparent; color: var(--fg-muted); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-lg { padding: 11px 20px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.icon-btn {
  background: none; border: 0; padding: 6px 8px; border-radius: 8px;
  font-size: 17px; color: var(--fg-muted); line-height: 1;
}
.icon-btn:hover { background: var(--surface-2); }

/* -------------------------------------------------------------- giriş ekranı */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 40px 32px; max-width: 400px; width: 100%; text-align: center;
}
.login-mark {
  width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 26px; font-weight: 700;
}
.login-card h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.02em; }
.login-sub { margin: 0 0 26px; color: var(--fg-muted); font-size: 14px; }
.login-note { margin: 18px 0 0; color: var(--fg-faint); font-size: 12px; line-height: 1.5; }
.login-error {
  background: var(--danger-soft); color: var(--danger); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; margin: 0 0 18px; text-align: start;
}
.login .btn { display: block; width: 100%; text-decoration: none; text-align: center; }

.lang-switch { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.lang-btn {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px; font-size: 12.5px; color: var(--fg-muted);
}
.lang-btn:hover { border-color: var(--line-strong); }
.lang-btn.is-active { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }

/* ------------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-in {
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px));
  max-width: 1500px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: 0 0 auto;
}
.brand b { font-size: 15px; letter-spacing: -.01em; }

.search { flex: 1 1 auto; min-width: 0; max-width: 460px; }
.search input {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 12px; font-size: 13.5px;
}
.search input:focus { border-color: var(--accent); outline: none; }

.topbar-right { display: flex; align-items: center; gap: 9px; margin-inline-start: auto; }

.sync { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg-faint); }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--done); animation: pulse 2.6s ease-in-out infinite; }
.sync.is-stale i { background: var(--waiting); animation: none; }
.sync.is-off i { background: var(--fg-faint); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.avatar-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); padding: 0; overflow: hidden; flex: 0 0 auto;
  font-size: 11.5px; font-weight: 700; color: var(--fg-muted);
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ------------------------------------------------------------------- layout */
.layout {
  display: grid; grid-template-columns: 216px minmax(0, 1fr);
  gap: 20px; max-width: 1500px; margin: 0 auto;
  padding: 18px max(14px, env(safe-area-inset-right, 0px)) 48px max(14px, env(safe-area-inset-left, 0px));
}

.side-in { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; }
.views { display: flex; flex-direction: column; gap: 2px; }
.view-btn {
  background: none; border: 0; border-radius: 7px; padding: 7px 10px;
  text-align: start; font-size: 13.5px; color: var(--fg-muted);
}
.view-btn:hover { background: var(--surface-2); }
.view-btn.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.people-group { display: flex; flex-direction: column; gap: 4px; }
.side-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--fg-faint); font-weight: 600; padding-inline: 10px;
}
.people { display: flex; flex-direction: column; gap: 2px; }
.person-btn { display: flex; align-items: center; gap: 8px; }
.person-btn .person-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-btn .person-count {
  flex: none; min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--fg-muted);
}
.person-btn.is-active .person-count { background: var(--accent); color: #fff; }
.person-btn .person-count.is-zero { opacity: .55; }

.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--fg-faint); font-weight: 600;
}
.filter-group select {
  background: var(--surface); border: 1px solid var(--line); border-radius: 7px;
  padding: 6px 8px; font-size: 13px; width: 100%;
}
.side-foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-foot .btn { text-align: start; }
.side-logout { border-top: 1px solid var(--line); padding-top: 12px; }
.side-logout .btn { width: 100%; text-align: start; color: var(--fg-muted); }

/* ---------------------------------------------------------------- hızlı ekle */
.quickadd {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px; box-shadow: var(--shadow);
}
.quickadd-main { display: flex; gap: 8px; align-items: center; }
.quickadd-main input {
  flex: 1 1 auto; min-width: 0;
  background: transparent; border: 0; padding: 6px 4px; font-size: 14.5px;
}
.quickadd-main input:focus { outline: none; }
.quickadd-opts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.quickadd-opts select, .quickadd-opts input[type="date"] {
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 8px; font-size: 12.5px; max-width: 100%;
}
.quickadd-opts select:focus, .quickadd-opts input:focus { border-color: var(--accent); outline: none; }
.quickadd-opts select.is-set, .quickadd-opts input.is-set {
  background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600;
}

/* ------------------------------------------------------------------ gruplar */
.groups { display: flex; flex-direction: column; gap: 18px; }
.group-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px;
  padding-inline-start: 2px;
}
.group-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.group-head h2 { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.group-count {
  font-size: 11.5px; color: var(--fg-faint); background: var(--surface-2);
  border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums;
}
.group-list {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}

/* --------------------------------------------------------------- görev satırı */
.task {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--surface); padding: 11px 13px; width: 100%;
  border: 0; text-align: start;
}
.task:hover { background: var(--surface-2); }
.task.is-done .task-title { color: var(--fg-muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }

.task-check {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: var(--surface); flex: 0 0 auto; margin-top: 2px; padding: 0;
  display: grid; place-items: center; font-size: 11px; color: transparent; line-height: 1;
}
.task-check:hover { border-color: var(--done); color: var(--fg-faint); }
.task-check.is-done { background: var(--done); border-color: var(--done); color: #fff; }
.task-check.is-locked { border-style: dashed; }

.task-body { flex: 1 1 auto; min-width: 0; }
.task-title { font-size: 13.5px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; }

.chip {
  font-size: 10.5px; padding: 2px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--fg-muted); white-space: nowrap;
}
.chip-cat { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip-due { font-variant-numeric: tabular-nums; }
.chip-due.is-late { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.chip-due.is-soon { background: var(--waiting-soft); color: var(--waiting); font-weight: 600; }
.chip-claude { background: var(--doing-soft); color: var(--doing); font-weight: 600; }
.chip-sensitive { background: var(--revision-soft); color: var(--revision); font-weight: 600; }
.chip-status { font-weight: 600; }

.prio-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.prio-critical { background: var(--revision); }
.prio-high { background: var(--brand-yellow); }
.prio-normal { background: var(--line-strong); }
.prio-low { background: var(--surface-3); }

.task-code {
  display: inline-block; margin-inline-end: 7px; padding: 0 6px; border-radius: 5px;
  font: 600 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-2); color: var(--fg-muted); vertical-align: 1px; white-space: nowrap;
}
.task-code-head { margin-inline-start: 8px; margin-inline-end: 0; }
.wa-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px; color: #1fa855; flex: none;
}
.wa-btn:hover { background: var(--surface-2); }
.wa-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.task-right { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; margin-top: 1px; }

.av {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 700; color: #fff;
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-lg { width: 30px; height: 30px; font-size: 12px; }
.av-none { background: var(--surface-2); color: var(--fg-faint); border: 1px dashed var(--line-strong); }

/* ---------------------------------------------------------------- boş durum */
.empty { text-align: center; padding: 48px 20px; }
.empty-title { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.empty-sub { margin: 0; color: var(--fg-muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- çekmece */
.drawer-scrim { position: fixed; inset: 0; background: rgba(10, 16, 22, .4); z-index: 40; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 41;
  width: min(480px, 100%); background: var(--surface); border-inline-start: 1px solid var(--line);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.drawer-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot {
  flex: 0 0 auto; padding: 12px 16px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--fg-faint); font-weight: 600;
}
.field input[type="text"], .field input[type="date"], .field input[type="email"],
.field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px; font-size: 13.5px; width: 100%;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.status-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-btn {
  border: 1px solid var(--line); background: var(--bg); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; color: var(--fg-muted);
}
.status-btn[aria-pressed="true"] { font-weight: 600; border-color: transparent; }
.status-btn[data-s="todo"][aria-pressed="true"]              { background: var(--todo-soft);     color: var(--todo); }
.status-btn[data-s="in_progress"][aria-pressed="true"]       { background: var(--doing-soft);    color: var(--doing); }
.status-btn[data-s="waiting"][aria-pressed="true"]           { background: var(--waiting-soft);  color: var(--waiting); }
.status-btn[data-s="ready_for_review"][aria-pressed="true"]  { background: var(--review-soft);   color: var(--review); }
.status-btn[data-s="revision_required"][aria-pressed="true"] { background: var(--revision-soft); color: var(--revision); }
.status-btn[data-s="completed"][aria-pressed="true"]         { background: var(--done-soft);     color: var(--done); }

.checks { display: flex; flex-direction: column; gap: 5px; max-height: 236px; overflow-y: auto;
          border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: var(--bg); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.check input { margin: 0; flex: 0 0 auto; }

.note {
  font-size: 12px; color: var(--fg-muted); background: var(--surface-2);
  border-radius: 8px; padding: 9px 11px; line-height: 1.5;
}
.note-warn { background: var(--waiting-soft); color: var(--fg); }

.history { display: flex; flex-direction: column; gap: 9px; }
.history-item { display: flex; gap: 9px; font-size: 12px; color: var(--fg-muted); line-height: 1.45; }
.history-item b { color: var(--fg); font-weight: 600; }
.history-time { display: block; font-size: 10.5px; color: var(--fg-faint); margin-top: 1px; }

.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 9px; }
.comment-body { min-width: 0; flex: 1 1 auto; }
.comment-head { font-size: 11.5px; color: var(--fg-faint); margin-bottom: 2px; }
.comment-head b { color: var(--fg); font-weight: 600; font-size: 12.5px; }
.comment-text {
  font-size: 13px; line-height: 1.5; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; white-space: pre-wrap;
}
.comment-form { display: flex; gap: 7px; align-items: flex-start; }
.comment-form textarea {
  flex: 1 1 auto; min-height: 40px; min-width: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 13px; resize: vertical;
}
.comment-form textarea:focus { border-color: var(--accent); outline: none; }

.attach { display: flex; flex-direction: column; gap: 10px; }
.attach-drop {
  border: 1.5px dashed var(--line-strong); border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
  transition: border-color .12s ease, background .12s ease;
}
.attach-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.attach-hint { font-size: 11.5px; color: var(--fg-faint); line-height: 1.45; }
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.attach-thumb {
  position: relative; border: 1px solid var(--line); border-radius: 9px; overflow: hidden;
  aspect-ratio: 1; background: var(--bg); display: block;
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-thumb-fallback { display: grid; place-items: center; }
.attach-file {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit;
}
.attach-file:hover { border-color: var(--line-strong); }
.attach-icon {
  width: 30px; height: 30px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--surface-2); font-size: 10px; font-weight: 700; color: var(--fg-muted); letter-spacing: .02em;
}
.attach-meta { min-width: 0; flex: 1 1 auto; }
.attach-name { font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.attach-sub { font-size: 11px; color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.attach-row { display: flex; flex-direction: column; gap: 6px; }

/* ----------------------------------------------------------------- pencere */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(10, 16, 22, .5); z-index: 50;
  display: grid; place-items: center; padding: 18px; overflow-y: auto;
}
.modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  width: min(560px, 100%); box-shadow: var(--shadow-lg); max-height: 100%;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }

.spacer { flex: 1 1 auto; }

.row {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
}
.row-name { font-weight: 600; font-size: 13px; }
.row-sub { font-size: 11.5px; color: var(--fg-muted); }
.row.is-inactive { opacity: .55; }

/* ------------------------------------------------------------------- toast */
.toast {
  position: fixed; z-index: 60;
  inset-block-end: calc(18px + env(safe-area-inset-bottom, 0px));
  inset-inline: 18px; margin: 0 auto; width: fit-content; max-width: calc(100% - 36px);
  background: var(--fg); color: var(--bg);
  padding: 10px 16px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow-lg);
}
.toast.is-error { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------------ mobil */
.only-mobile { display: none; }

@media (max-width: 860px) {
  .only-mobile { display: inline-flex; }
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 14px; }
  .side {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 45;
    width: min(270px, 84%); background: var(--surface); border-inline-end: 1px solid var(--line);
    box-shadow: var(--shadow-lg); overflow-y: auto; display: none;
    padding: 16px; padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }
  .side.is-open { display: block; }
  .side-in { position: static; }
  .search { max-width: none; }
  .brand b { display: none; }
  .drawer { width: 100%; border-inline-start: 0; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar-right .btn-primary { padding: 7px 10px; }
  .sync span { display: none; }
}
