/* Otomobin Yönetim Paneli (admin2 tasarım sistemi + Yoldaş canlı operasyon bileşenleri)
 * Mavi/beyaz tasarım dili; açık ve koyu tema (data-theme).
 */
:root {
  --bg: #eef2fb;
  --surface: #ffffff;
  --surface2: #f6f8fd;
  --line: #dfe5f1;
  --ink: #0d1b33;
  --fg: #0d1b33;
  --mut: #5d6b86;
  --blue: #1a6bff;
  --blue-ink: #0b4fd6;
  --blue-soft: #e3edff;
  --nav: #0b3a73;
  --nav-ink: #c9d8f2;
  --nav-act: #1a6bff;
  --ok: #178a4f;
  --ok-soft: #dff4e8;
  --warn: #a15c00;
  --warn-soft: #fff0d4;
  --bad: #c62828;
  --bad-soft: #fde2e2;
  --info-soft: #e8eefb;
  --shadow: 0 1px 2px rgba(13, 27, 51, 0.06), 0 8px 24px -12px rgba(13, 27, 51, 0.18);
  --r: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1424;
    --surface: #111e35;
    --surface2: #15253f;
    --line: #22345a;
    --ink: #e8eefc;
    --fg: #e8eefc;
    --mut: #9db0d3;
    --blue: #4d8cff;
    --blue-ink: #8db4ff;
    --blue-soft: #1a2f5c;
    --nav: #07142b;
    --nav-ink: #9db0d3;
    --ok: #5ed39a;
    --ok-soft: #123a28;
    --warn: #ffc15e;
    --warn-soft: #3a2a0c;
    --bad: #ff8a8a;
    --bad-soft: #3d1515;
    --info-soft: #172640;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1424;
  --surface: #111e35;
  --surface2: #15253f;
  --line: #22345a;
  --ink: #e8eefc;
  --fg: #e8eefc;
  --mut: #9db0d3;
  --blue: #4d8cff;
  --blue-ink: #8db4ff;
  --blue-soft: #1a2f5c;
  --nav: #07142b;
  --nav-ink: #9db0d3;
  --ok: #5ed39a;
  --ok-soft: #123a28;
  --warn: #ffc15e;
  --warn-soft: #3a2a0c;
  --bad: #ff8a8a;
  --bad-soft: #3d1515;
  --info-soft: #172640;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin: 0; }
h3 { font-size: 12px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mut { color: var(--mut); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.full-w { width: 100%; }
.ml-auto { margin-left: auto; }
.lbl { display: block; font-weight: 700; margin: 10px 0 4px; }

/* İskelet (Otomobin admin2) */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.nav {
  background: var(--nav);
  color: var(--nav-ink);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.brand i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
}
.nav .grp { margin-bottom: 10px; }
.nav .grp-h {
  padding: 4px 10px 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.58;
}
.nav a.item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--nav-ink);
  text-decoration: none;
  margin-bottom: 2px;
}
.nav a.item b { display: block; flex: 1; color: #fff; font-size: 13.5px; font-weight: 600; }
.nav a.item:hover { background: rgba(255, 255, 255, 0.08); }
.nav a.item.on {
  background: rgba(26, 107, 255, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.nav .ico { width: 20px; text-align: center; opacity: 0.92; font-size: 14px; }
.badge {
  margin-left: auto;
  background: #fff;
  color: var(--nav);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  line-height: 1.4;
}
.badge.warn { background: #ffc15e; color: #0b1424; }
.nav .foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.me { display: flex; align-items: center; gap: 10px; padding: 8px; }
.me .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  flex: none;
}
.me b { display: block; color: #fff; font-size: 13px; }
.me small { opacity: 0.78; font-size: 11.5px; display: block; }
.nav .btn {
  background: transparent;
  color: var(--nav-ink);
  border-color: color-mix(in srgb, var(--nav-ink) 35%, transparent);
}
.nav .btn:hover { background: color-mix(in srgb, var(--nav-ink) 12%, transparent); }

/* Sağ ana alan + Yoldaş hızlı arama üst çubuğu */
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.qsearch { position: relative; flex: 1; max-width: 480px; }
.qsearch .input { padding-right: 46px; background: var(--surface2); }
.qsearch-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--mut);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  pointer-events: none;
}
.qsearch-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  z-index: 40;
  max-height: 380px;
  overflow-y: auto;
}
.qsearch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
.qsearch-row:first-child { border-top: 0; }
.qsearch-row:hover { background: var(--surface2); }
.topbar-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.stat-pill:hover { border-color: var(--blue); color: var(--blue-ink); }
.stat-pill b { color: var(--blue-ink); }

.main { padding: 22px 28px 60px; min-width: 0; flex: 1; }
.banner {
  background: var(--bad);
  color: #fff;
  padding: 9px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-weight: 700;
}
.banner.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.banner.info {
  background: var(--blue-soft);
  color: var(--blue-ink);
  border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
}
.lead { color: var(--mut); margin: 0 0 18px; max-width: 74ch; }

/* Bileşenler */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  padding: 7px 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.btn:hover { background: var(--surface2); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }

.input, select.input, textarea.input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
}
.input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
textarea.input { resize: vertical; }

.tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin: 6px 0 16px;
  overflow-x: auto;
}
.tabs button {
  background: none;
  border: 0;
  padding: 8px 2px 10px;
  font-weight: 700;
  color: var(--mut);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs button.on { color: var(--blue-ink); border-color: var(--blue); }

.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pill {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 99px;
  padding: 5px 14px;
  font-weight: 700;
  font-size: 13px;
}
.pill.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); }

.tools { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tools .input { max-width: 320px; width: auto; flex: 1 1 200px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-size: 11.5px;
  color: var(--mut);
  padding: 10px 14px;
  font-weight: 700;
  white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr.row { cursor: pointer; }
.tbl tr.row:hover td { background: var(--surface2); }
.tbl tr.row.selected td { background: var(--blue-soft); }
.tbl-wrap { overflow-x: auto; }
.count { padding: 8px 14px; font-size: 12px; color: var(--mut); border-top: 1px solid var(--line); }

.chip {
  display: inline-block;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 800;
  background: var(--info-soft);
  color: var(--blue-ink);
  white-space: nowrap;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.mut { background: var(--surface2); color: var(--mut); }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.grid2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { padding: 14px 16px; }
.stat small { color: var(--mut); font-size: 12px; display: block; }
.stat b { display: block; font-size: 28px; margin-top: 4px; line-height: 1.15; }
.card.stat.link { color: inherit; text-decoration: none; display: block; }
.card.stat.link:hover { background: var(--surface2); }

.state { text-align: center; padding: 36px 16px; }
.state b { display: block; font-size: 15px; margin-bottom: 4px; }
.state.err { border: 1px solid var(--bad); border-radius: var(--r); }

/* Genel Bakış (Otomobin admin2 düzeni) */
.dash-sec { margin-bottom: 22px; }
.dash-sec > h2 {
  margin: 0 0 10px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mut);
}
.dash-h3 { margin: 0; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.dash-tasks { display: flex; flex-direction: column; gap: 8px; }
.card.task {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  color: inherit;
  text-decoration: none;
  border-left: 4px solid var(--blue);
}
.card.task.urgent { border-left-color: var(--warn); }
.card.task.zero { border-left-color: var(--line); }
.card.task b { font-size: 24px; line-height: 1; min-width: 38px; text-align: center; }
.card.task span { flex: 1; font-size: 14px; font-weight: 600; }
.card.task small { display: block; font-weight: 400; color: var(--mut); font-size: 12px; margin-top: 2px; }
.card.task i { font-style: normal; opacity: 0.65; font-weight: 700; }
.card.task:hover { background: var(--surface2); }

.dash-kv { margin: 0; }
.dash-kv > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.dash-kv > div:first-child { border-top: 0; }
.dash-kv dt { font-size: 13.5px; }
.dash-kv dt small { display: block; font-size: 11.5px; }
.dash-kv dd { margin: 0; font-size: 18px; font-weight: 800; }
.dash-chart { width: 100%; margin-top: 6px; display: block; }

.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}
.setting:first-child { border-top: 0; }
.setting b { display: block; }
.setting small { color: var(--mut); }

.switch {
  width: 44px;
  height: 24px;
  border-radius: 99px;
  border: 0;
  background: var(--line);
  position: relative;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
label.switch { display: inline-block; cursor: pointer; }
label.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
label.switch:has(input:checked) { background: var(--blue); }
label.switch:has(input:checked)::after { left: 23px; }
label.switch:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }

/* Canlı Filo & Harita */
.fleet-map-card { overflow: hidden; margin-bottom: 16px; }
.fleet-map-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.fleet-map-box { width: 100%; height: 420px; background: var(--surface2); position: relative; }
.fleet-route-bar {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.fleet-route-bar.warn { background: var(--warn-soft); color: var(--warn); }
.fleet-ride-label {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--nav);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.fleet-driver-pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #178a4f;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.fleet-passenger-pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1a6bff;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Araç Onayları: Solda başvuru + belge listesi, sağda büyük belge önizleme paneli */
.doc-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-workspace.with-preview { grid-template-columns: minmax(340px, 1fr) minmax(380px, 48%); }
.doc-left { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.doc-preview-pane {
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 90px);
  overflow: hidden;
}
.doc-preview-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.doc-preview-body {
  padding: 14px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  max-height: calc(100vh - 200px);
  overflow: auto;
}
.doc-preview-body img {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.doc-preview-body iframe {
  width: 100%;
  height: 560px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}
.doc-list { display: flex; flex-direction: column; }
.doc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.doc-row:first-child { border-top: 0; }
.doc-row:hover { background: var(--surface2); }
.doc-row.active { background: var(--blue-soft); }

/* Destek ayrıntı ekranı (Otomobin admin2 .sd) */
.sd { display: grid; grid-template-columns: minmax(280px, 370px) minmax(0, 1fr); gap: 16px; align-items: start; }
.sd-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sd-chat { display: flex; flex-direction: column; height: min(72vh, 720px); min-width: 0; overflow: hidden; }
.sd-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sd-th { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface2); }
.sd-msg { max-width: 82%; display: flex; flex-direction: column; gap: 3px; align-self: flex-start; }
.sd-msg.agent { align-self: flex-end; align-items: flex-end; }
.sd-bub { padding: 9px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.sd-msg.agent .sd-bub { background: var(--blue-soft); border-color: transparent; }
.sd-comp { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sd-acts { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Çekmece, Dialog, Toast */
.scrim { position: fixed; inset: 0; background: rgba(5, 14, 32, 0.45); z-index: 40; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  background: var(--surface);
  z-index: 41;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px -12px rgba(0, 0, 0, 0.35);
}
.drawer header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.drawer .body { padding: 14px 18px; overflow-y: auto; flex: 1; }
.drawer footer {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; padding: 7px 0; border-top: 1px solid var(--line); margin: 0; }
.kv:first-child { border-top: 0; }
.kv dt { color: var(--mut); }
.kv dd { margin: 0; word-break: break-word; }

.tl { list-style: none; margin: 0; padding: 0; }
.tl li { padding-left: 18px; position: relative; margin: 6px 0; }
.tl li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

dialog.dlg {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  width: min(480px, 92vw);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog.dlg::backdrop { background: rgba(5, 14, 32, 0.5); }
dialog.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--nav);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 60;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow);
  font-weight: 600;
}
.toast.err { background: var(--bad); }

/* Giriş ekranı (Otomobin admin2 .login) */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(420px, 100%); padding: 26px; }
.login .brand { color: var(--ink); padding: 0 0 14px; }
.login label { display: block; font-weight: 700; margin: 12px 0 5px; }
.login .btn-full { width: 100%; margin-top: 14px; padding: 10px; }
.err { color: var(--bad); font-weight: 700; margin-top: 10px; }

.preview-box {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .nav {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    position: sticky;
    top: 0;
    height: auto;
    z-index: 30;
    white-space: nowrap;
  }
  .nav .brand { padding: 0 8px 0 0; font-size: 15px; flex: none; }
  .nav .brand i { width: 26px; height: 26px; }
  .nav .grp { display: contents; }
  .nav .grp-h { display: none; }
  .nav a.item { flex: none; margin: 0; padding: 7px 10px; }
  .nav .foot { margin: 0 0 0 auto; padding: 0 0 0 8px; border: 0; flex: none; display: flex; align-items: center; gap: 8px; }
  .nav .foot .me small { display: none; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .main { padding: 16px; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .grid2, .grid2-eq, .sd, .doc-workspace.with-preview { grid-template-columns: 1fr; }
  .doc-preview-pane { position: static; max-height: none; }
}
@media (max-width: 520px) {
  .grid4 { grid-template-columns: 1fr; }
  .main h1 { font-size: 21px; }
}
