/* =========================================================================
   AI議事録 — デザインシステム
   白基調のSaaS型ダッシュボード / ライト・ダーク・OS連動テーマ / レスポンシブ
   ========================================================================= */

:root {
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f2f4f7;
  --border: #e6e8ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #667085;
  --text-inv: #ffffff;

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --primary-text: #3730a3;
  --success: #079455;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --info: #0b6bcb;
  --info-soft: #eff8ff;
  --rec: #e11d48;
  --rec-soft: #fff1f3;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, .12), 0 4px 8px -4px rgba(16, 24, 40, .06);
  --ring: 0 0 0 4px rgba(79, 70, 229, .16);

  --sidebar-w: 248px;
  --topbar-h: 60px;
  --bottomnav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c111d; --surface: #131a2a; --surface-2: #161e30; --surface-3: #1d2639;
    --border: #253047; --border-strong: #344054; --text: #f5f5f6; --text-2: #cecfd2; --text-3: #94969c;
    --primary: #7c74f2; --primary-hover: #8f88f5; --primary-soft: #23214a; --primary-text: #c7c3ff;
    --success: #47cd89; --success-soft: #0f2a1e; --warning: #fdb022; --warning-soft: #2e2210;
    --danger: #f97066; --danger-soft: #331715; --info: #53b1fd; --info-soft: #102a43;
    --rec: #fb6f84; --rec-soft: #3a1520;
    --shadow-sm: none; --shadow: 0 1px 3px rgba(0,0,0,.4); --shadow-lg: 0 12px 24px -6px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c111d; --surface: #131a2a; --surface-2: #161e30; --surface-3: #1d2639;
  --border: #253047; --border-strong: #344054; --text: #f5f5f6; --text-2: #cecfd2; --text-3: #94969c;
  --primary: #7c74f2; --primary-hover: #8f88f5; --primary-soft: #23214a; --primary-text: #c7c3ff;
  --success: #47cd89; --success-soft: #0f2a1e; --warning: #fdb022; --warning-soft: #2e2210;
  --danger: #f97066; --danger-soft: #331715; --info: #53b1fd; --info-soft: #102a43;
  --rec: #fb6f84; --rec-soft: #3a1520;
  --shadow-sm: none; --shadow: 0 1px 3px rgba(0,0,0,.4); --shadow-lg: 0 12px 24px -6px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.65; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "palt" 0;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: .01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 .75em; }
small, .small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-3); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
pre { background: var(--surface-3); padding: 12px 14px; border-radius: var(--radius); overflow: auto; font-size: 13px; }
img, svg, video { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 32px; height: 32px; }

/* ---------------------------------------------------------------- Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 40;
  transition: transform .2s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; font-weight: 800; font-size: 16px; color: var(--text); }
.sidebar-brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #8b5cf6); display: grid; place-items: center; color: #fff; }
.brand-mark .icon { width: 17px; height: 17px; stroke-width: 2.2; }
.sidebar-cta { padding: 4px 14px 10px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav-section { margin: 14px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--text-3); letter-spacing: .06em; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 8px; color: var(--text-2);
  font-weight: 600; font-size: 14px; margin-bottom: 1px;
}
.nav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-text); }
.nav a .count { margin-left: auto; font-size: 11.5px; background: var(--danger); color: #fff; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.sidebar-foot .who { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.sidebar-foot .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .menu-btn { display: none; }
.topbar-search { flex: 1; max-width: 460px; position: relative; }
.topbar-search input[type=search] { padding-left: 36px; background: var(--surface); }
.topbar-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.content { padding: 8px 28px 48px; width: 100%; max-width: 1360px; }
.content.narrow { max-width: 880px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 12px 0 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-3); margin-top: 4px; font-size: 13.5px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-3); }

.bottomnav { display: none; }
.backdrop { display: none; }

/* ---------------------------------------------------------------- Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad, .card > .card-body { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.card + .card { margin-top: 16px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.danger-text { color: var(--danger); }
.success-text { color: var(--success); }
.warning-text { color: var(--warning); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }

.stat { padding: 18px 20px; }
.stat .label { font-size: 13px; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.01em; line-height: 1.2; }
.stat .value small { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 4px; }
.stat .meta { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s, box-shadow .12s, color .12s; text-decoration: none !important; user-select: none;
}
.btn:hover { background: var(--surface-3); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); background: var(--danger); }
.btn-rec { background: var(--rec); border-color: var(--rec); color: #fff; }
.btn-rec:hover { filter: brightness(.95); background: var(--rec); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); box-shadow: none; }
.btn-soft:hover { background: color-mix(in srgb, var(--primary-soft) 80%, var(--primary) 20%); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 5px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; gap: 4px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-xs { width: 26px; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: rgba(255,255,255,.9) transparent rgba(255,255,255,.9) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn:not(.btn-primary):not(.btn-danger):not(.btn-rec).loading::after { border-color: var(--text-2) transparent var(--text-2) transparent; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 9px 9px 0; }
.btn-group .btn.active { background: var(--primary-soft); color: var(--primary-text); border-color: var(--primary); z-index: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Forms */
label, .label { display: block; font-weight: 650; font-size: 13.5px; margin-bottom: 6px; color: var(--text); }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.req { color: var(--danger); margin-left: 2px; }
.input, input[type=text], input[type=password], input[type=email], input[type=search], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], input[type=url], input[type=tel], select, textarea {
  width: 100%; height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 96px; line-height: 1.7; resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--primary); vertical-align: middle; margin: 0; flex: none; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; cursor: pointer; margin-bottom: 8px; }
.check input { margin-top: 3px; }
.check .hint { margin-top: 0; }
.input-sm, select.input-sm { height: 34px; font-size: 13.5px; padding: 5px 10px; }
select.input-sm { padding-right: 30px; }
.input-group { display: flex; gap: 8px; }
.input-group > :first-child { flex: 1; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: var(--shadow-sm); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; font-weight: 500; margin: 0; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.radio-card input { margin-top: 3px; }
.radio-card b { display: block; }
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button, .segmented a { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font: inherit; font-weight: 650; font-size: 13.5px; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented button.active, .segmented a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented a:hover { text-decoration: none; }

/* ---------------------------------------------------------------- Badges & tags */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1; }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-rec { background: var(--rec-soft); color: var(--rec); }
.badge .dot, .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.tag .swatch { width: 9px; height: 9px; border-radius: 3px; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------------------------------------------------------------- Alerts / flash */
.alert { display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-size: 13.5px; margin-bottom: 14px; align-items: flex-start; }
.alert .icon { margin-top: 2px; }
.alert > div { flex: 1; min-width: 0; }
.alert b { display: block; margin-bottom: 2px; }
.alert p:last-child { margin-bottom: 0; }
.alert-info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); color: var(--text); }
.alert-info .icon { color: var(--info); }
.alert-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-success .icon { color: var(--success); }
.alert-warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.alert-warning .icon { color: var(--warning); }
.alert-error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-error .icon { color: var(--danger); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(400px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .2s ease; }
.toast.error { background: var(--danger); color: #fff; }
.toast.success { background: var(--success); color: #fff; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------------------------------------------------------------- Tables & lists */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 650; color: var(--text-3); font-size: 12.5px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--border); color: var(--text); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-item .title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta { font-size: 12.5px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.list-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex: none; }
.list-icon.primary { background: var(--primary-soft); color: var(--primary-text); }
.list-icon.rec { background: var(--rec-soft); color: var(--rec); }

.empty { text-align: center; padding: 48px 24px; color: var(--text-3); }
.empty .icon-wrap { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-3); display: grid; place-items: center; margin: 0 auto 14px; color: var(--text-3); }
.empty h3 { color: var(--text); margin-bottom: 4px; }

/* ---------------------------------------------------------------- Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 11px 14px; border: 0; background: none; font: inherit; font-weight: 650; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .badge { height: 19px; font-size: 11px; }

/* ---------------------------------------------------------------- Progress */
.progress { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s ease; }
.progress.success > span { background: var(--success); }
.progress.warning > span { background: var(--warning); }
.progress.danger > span { background: var(--danger); }

.stages { display: flex; flex-direction: column; gap: 2px; }
.stage { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; position: relative; }
.stage-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-3); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); z-index: 1; }
.stage-dot .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.stage:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 34px; bottom: -8px; width: 2px; background: var(--border); }
.stage.succeeded .stage-dot { background: var(--success); color: #fff; box-shadow: none; }
.stage.running .stage-dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.stage.failed .stage-dot { background: var(--danger); color: #fff; box-shadow: none; }
.stage.awaiting_confirmation .stage-dot, .stage.blocked .stage-dot { background: var(--warning); color: #fff; box-shadow: none; }
.stage-body { flex: 1; min-width: 0; }
.stage-title { font-weight: 650; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-msg { font-size: 12.5px; color: var(--text-3); }
.stage.failed .stage-msg { color: var(--danger); }
.stage .progress { margin-top: 6px; height: 5px; }

/* ---------------------------------------------------------------- Dialog / dropdown */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-xl); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); }
dialog.modal.wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; gap: 12px; }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 16px 22px; overflow: auto; max-height: calc(100vh - 200px); }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 22px 20px; flex-wrap: wrap; }

.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; display: none; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; text-align: left; font-weight: 550; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); text-decoration: none; }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-menu hr { margin: 6px 0; }

/* ---------------------------------------------------------------- Auth / minimal */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background:
  radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent),
  radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, #8b5cf6 10%, transparent), transparent), var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-card.wide { width: min(760px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 800; font-size: 18px; margin-bottom: 22px; }
.auth-card .card { padding: 30px; }
.auth-card h1 { font-size: 20px; margin-bottom: 6px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-3); }

.steps { display: flex; gap: 6px; margin-bottom: 24px; }
.steps .s { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.steps .s.done { background: var(--primary); }
.steps .s.current { background: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.step-label { font-size: 12.5px; font-weight: 700; color: var(--primary); letter-spacing: .04em; margin-bottom: 4px; }

.diag-list { display: flex; flex-direction: column; }
.diag { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.diag:last-child { border-bottom: 0; }
.diag .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.diag .st .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.diag.ok .st { background: var(--success-soft); color: var(--success); }
.diag.warn .st { background: var(--warning-soft); color: var(--warning); }
.diag.error .st { background: var(--danger-soft); color: var(--danger); }
.diag.info .st { background: var(--info-soft); color: var(--info); }
.diag .d-body { flex: 1; min-width: 0; }
.diag .d-title { font-weight: 650; display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.diag .d-value { color: var(--text-2); font-weight: 600; font-size: 13px; }
.diag .d-msg { font-size: 12.5px; color: var(--text-3); }
.diag .d-fix { font-size: 12.5px; color: var(--warning); margin-top: 2px; }
.diag.error .d-fix { color: var(--danger); }

/* ---------------------------------------------------------------- Settings */
.settings-grid { grid-template-columns: 220px minmax(0, 1fr); align-items: start; }
.settings-grid > nav { position: sticky; top: calc(var(--topbar-h) + 8px); }

/* ---------------------------------------------------------------- Recording */
.meter-box { display: flex; flex-direction: column; gap: 6px; }
.meter { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; position: relative; }
.meter > span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--success), #84cc16 60%, var(--warning) 85%, var(--danger)); background-size: 300px 100%; transition: width .08s linear; border-radius: 999px; }
.meter.hot > span { background-color: var(--danger); }
.meter[title]::after { content: attr(title); position: absolute; right: 8px; top: -1px; font-size: 9px; color: var(--text-3); line-height: 12px; }
.rec-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title controls" "time controls" "meters controls"; gap: 4px 24px; padding: 20px 24px; align-items: center; }
.rec-title { grid-area: title; min-width: 0; }
.rec-name { font-weight: 800; font-size: 17px; }
.rec-time { grid-area: time; font-size: 44px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rec-meters { grid-area: meters; display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.rec-controls { grid-area: controls; display: flex; gap: 10px; }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--border-strong); flex: none; }
.rec-dot.on { background: var(--rec); box-shadow: 0 0 0 0 rgba(225, 29, 72, .5); animation: recpulse 1.6s infinite; }
.rec-dot.paused { background: var(--warning); }
@keyframes recpulse { 0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, .45); } 70% { box-shadow: 0 0 0 12px rgba(225, 29, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); } }
.rec-simple { padding: 32px 20px !important; }
.quick-marks { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.quick-marks.compact { justify-content: flex-start; gap: 6px; }
.mark { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; min-width: 92px; padding: 14px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-weight: 700; font-size: 13.5px; color: var(--text); cursor: pointer; transition: transform .08s, background .12s; }
.mark .icon { width: 22px; height: 22px; }
.mark:hover { background: var(--surface-3); }
.mark:active { transform: scale(.96); }
.quick-marks.compact .mark { flex-direction: row; min-width: 0; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; gap: 5px; }
.quick-marks.compact .mark .icon { width: 15px; height: 15px; }
.mark-important { color: #b45309; } .mark-decision { color: var(--primary); } .mark-task { color: var(--success); } .mark-question { color: var(--danger); }
.memo-list { list-style: none; padding: 0; margin: 12px 0 0; max-height: 420px; overflow: auto; }
.memo { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; align-items: baseline; }
.memo .t { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: 12px; flex: none; }
.memo .k { font-weight: 700; flex: none; font-size: 12px; }
.memo-important .k { color: #b45309; } .memo-decision .k { color: var(--primary); } .memo-task .k { color: var(--success); } .memo-question .k { color: var(--danger); }
.live-transcript { max-height: 60vh; overflow-y: auto; }
.live-seg { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.live-seg .t { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: 12px; flex: none; padding-top: 2px; width: 52px; }
.live-seg .x { color: var(--text-2); }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.chat-msg { padding: 9px 12px; border-radius: 12px; font-size: 13.5px; max-width: 92%; }
.chat-msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 4px; }
.chat-msg p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- Markdown */
.md { line-height: 1.85; word-break: break-word; }
.md h2, .md h3, .md h4, .md h5 { margin: 1.3em 0 .5em; }
.md h2 { font-size: 17px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.md h3 { font-size: 15.5px; }
.md > :first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 1.4em; margin: .4em 0 .9em; }
.md li { margin: .2em 0; }
.md blockquote { margin: .6em 0; padding: 4px 12px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md table { margin: .6em 0; }
.md .ts, a.ts { font-variant-numeric: tabular-nums; font-size: .86em; background: var(--primary-soft); color: var(--primary-text); padding: 0 5px; border-radius: 4px; text-decoration: none; white-space: nowrap; }
.md .ts:hover { text-decoration: none; filter: brightness(.95); }

details.more-fields > summary { cursor: pointer; color: var(--text-2); }
details.more-fields > summary::marker { color: var(--text-3); }

/* ---------------------------------------------------------------- Upload */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 36px 20px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .icon-wrap { width: 54px; height: 54px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; margin: 0 auto 10px; color: var(--primary); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- Meeting list */
.filter-bar { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-row select.input-sm { width: auto; min-width: 110px; }
.bulk-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--primary-soft); border-bottom: 1px solid var(--border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; position: sticky; top: var(--topbar-h); z-index: 5; }
.meeting-link { color: var(--text); display: inline-flex; gap: 6px; align-items: center; }
.meeting-link:hover { color: var(--primary); }
.snippet { margin-top: 3px; }
.snippet .badge { height: 18px; font-size: 10.5px; }

/* ---------------------------------------------------------------- Meeting detail */
.meeting-head { margin: 8px 0 16px; }
.meeting-title { font-size: 22px; cursor: text; border-radius: 6px; padding: 2px 4px; margin-left: -4px; word-break: break-word; }
.meeting-title:hover { background: var(--surface-3); }
.title-input { font-size: 20px; font-weight: 700; height: 42px; }
.meeting-meta { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; margin-top: 6px; }
.meeting-meta span { display: inline-flex; gap: 5px; align-items: center; }
.head-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.active-toggle { color: var(--warning) !important; background: var(--warning-soft) !important; }
.pipeline-card.collapsed .pipeline-body { display: none; }
.pipeline-card .card-head { padding: 12px 20px; }
.suggestion-bar .check { font-weight: 600; }
.meeting-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-pane, .side-pane { min-width: 0; }
.meeting-grid > .card + .card, .grid > .card + .card, .stack > .card + .card { margin-top: 0; }
.doc-pane .tabs, .side-pane .tabs { padding: 0 12px; }
.doc-panel { padding: 16px 20px 20px; }
.doc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.doc-toolbar h3 { font-size: 14px; display: flex; gap: 6px; align-items: center; }
.doc-body { min-height: 120px; }
.doc-foot { padding: 10px 20px; border-top: 1px solid var(--border); }
.quality-box, .cand-box { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.quality-box h3, .cand-box h3 { font-size: 14px; display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.cand-box { margin: 0 0 20px; }
.suggestion { padding: 10px 0; border-top: 1px solid var(--border); }
.suggestion:first-of-type { border-top: 0; }
.diff-line { font-size: 12.5px; padding: 3px 8px; border-radius: 4px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); }
.diff-line.del { background: var(--danger-soft); color: var(--danger); text-decoration: line-through; }
.diff-line.add { background: var(--success-soft); color: var(--success); }
.diff-line.same { color: var(--text-3); }
.rating-box { margin-top: 24px; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 6px; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; cursor: pointer; padding: 2px; color: var(--border-strong); }
.stars button.on { color: #f59e0b; }
.stars button.on .icon { fill: currentColor; }
.cand-table td { vertical-align: top; }
.cand-table .input-sm { min-width: 90px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.task-item input { margin-top: 3px; }
.task-item .title { font-weight: 600; }
.task-item .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.task-item.done .title { text-decoration: line-through; color: var(--text-3); }
.row-done td { color: var(--text-3); }
.row-done b { text-decoration: line-through; }
.side-pane { position: sticky; top: calc(var(--topbar-h) + 8px); }
.side-toolbar { display: flex; gap: 6px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.side-toolbar input { flex: 1; min-width: 0; }
.transcript { max-height: calc(100vh - 260px); overflow-y: auto; padding: 6px 14px 14px; }
body.has-player .transcript { max-height: calc(100vh - 320px); }
.seg { padding: 8px 8px; border-radius: 8px; margin: 2px -8px; transition: background .2s; }
.seg:hover { background: var(--surface-2); }
.seg.current { background: var(--primary-soft); }
.seg.flash { background: var(--warning-soft); }
.seg-head { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.seg-edit { margin-left: auto; opacity: 0; }
.seg:hover .seg-edit { opacity: 1; }
.seg-text { font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.seg-text mark { background: #fde68a; color: inherit; border-radius: 2px; }
.seg-tr { color: var(--text-3); margin-top: 2px; padding-left: 8px; border-left: 2px solid var(--border); }
.speaker-chip { --c: #64748b; border: 0; font: inherit; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); cursor: pointer; }
.side-panel .list-item { border-bottom-color: var(--border); }
.player { position: fixed; bottom: 16px; left: calc(var(--sidebar-w) + 28px); right: 28px; max-width: 1304px; z-index: 25; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); }
.player input[type=range] { accent-color: var(--primary); height: 4px; }
.pl-time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-2); white-space: nowrap; min-width: 92px; }
body.has-player .content { padding-bottom: 110px; }
.player video.has-video { display: none; }
.history-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
.history-grid .list { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.history-grid .list-item.active { background: var(--primary-soft); }
.history-view { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.editor-text { font-family: var(--mono); font-size: 13.5px; line-height: 1.7; min-height: 50vh; }
.editor-preview { min-height: 50vh; border: 1px solid var(--border); border-radius: 9px; padding: 12px 16px; }
.editor-toolbar { margin-bottom: 8px; gap: 6px; }
.share-steps { display: grid; gap: 16px; }
.share-step { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.share-step h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14.5px; }
.step-no { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 12px; }
.mask-list { margin-top: 10px; }
.share-link { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.share-link.inactive { opacity: .55; }
.share-body { background: var(--bg); }
.share-page { max-width: 860px; margin: 0 auto; padding: 32px 16px 48px; }
.share-card { padding: 28px 32px; }
.share-head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.share-head h1 { margin: 8px 0 4px; font-size: 22px; }
.share-sec { font-size: 16px; color: var(--primary-text); margin: 24px 0 10px; }
.share-foot { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 20px; }
@media (max-width: 1100px) {
  .meeting-grid { grid-template-columns: minmax(0, 1fr); }
  .side-pane { position: static; }
  .transcript { max-height: 70vh; }
}
@media (max-width: 900px) {
  .player { left: 8px; right: 8px; bottom: calc(var(--bottomnav-h) + 8px); padding: 8px 10px; gap: 6px; }
  body.has-player .content { padding-bottom: calc(var(--bottomnav-h) + 110px); }
  .history-grid { grid-template-columns: 1fr; }
  .doc-panel { padding: 14px 16px; }
  .share-card { padding: 20px 18px; }
  .meeting-title { font-size: 19px; }
  .meeting-head .row.between.nowrap { flex-wrap: wrap; }
  .meeting-head .head-actions { width: 100%; justify-content: flex-start; }
  .meeting-meta { gap: 4px 12px; }
  .card-head { flex-wrap: wrap; }
  .pipeline-card .card-head h2 { flex: 1; }
}

/* ---------------------------------------------------------------- Misc pages */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 8px; }
.bars .bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; text-decoration: none; }
.bars .bar span { width: 100%; background: color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 4px 4px 0 0; min-height: 3px; }
.bars .bar span.on { background: var(--primary); }
.bars .bar small { font-size: 10px; color: var(--text-3); }
.list-item.unread { background: color-mix(in srgb, var(--primary-soft) 50%, transparent); }

/* ---------------------------------------------------------------- Practice test */
.practice-steps { list-style: none; padding: 0; margin: 0; counter-reset: st; }
.practice-steps li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.practice-steps li:last-child { border-bottom: 0; }
.practice-steps .st { width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--surface-3); position: relative; counter-increment: st; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-3); }
.practice-steps .st::after { content: counter(st); }
.practice-steps li.running .st { background: var(--primary); color: #fff; animation: pulse 1.2s infinite; }
.practice-steps li.ok .st { background: var(--success); color: #fff; }
.practice-steps li.ok .st::after { content: "✓"; }
.practice-steps li.ng .st { background: var(--danger); color: #fff; }
.practice-steps li.ng .st::after { content: "!"; }
.practice-steps li.ng [data-msg] { color: var(--danger); }
.practice-steps li.warn .st { background: var(--warning); color: #fff; }
.practice-steps li.skip .st::after { content: "-"; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar-search { display: none; }
  .content { padding: 4px 16px calc(var(--bottomnav-h) + 32px); }
  .grid-2, .grid-3, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-grid > nav { position: static; }
  .settings-grid > nav .nav { display: flex; overflow-x: auto; gap: 4px; }
  .settings-grid > nav .nav a { white-space: nowrap; margin: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head { margin: 8px 0 16px; }
  h1 { font-size: 20px; }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); z-index: 30;
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 650; color: var(--text-3); }
  .bottomnav a.active { color: var(--primary); }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav .rec-fab { width: 50px; height: 50px; border-radius: 50%; background: var(--rec); color: #fff; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 16px rgba(225, 29, 72, .35); }
  .bottomnav .rec-fab .icon { width: 22px; height: 22px; }
  .toasts { bottom: calc(var(--bottomnav-h) + 16px); right: 12px; left: 12px; max-width: none; }
  .hide-mobile { display: none !important; }
  .rec-head { grid-template-columns: 1fr; grid-template-areas: "title" "time" "meters" "controls"; padding: 16px; }
  .rec-time { font-size: 38px; }
  .rec-controls .btn { flex: 1; }
  .mark { min-width: calc(50% - 6px); }
  .list-item { padding: 12px 16px; }
  .card-head, .card-pad, .card > .card-body { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 21px; }
  .auth-card .card { padding: 22px; }
  .table th, .table td { padding: 10px; }
}
@media (min-width: 901px) { .show-mobile { display: none !important; } }

@media print {
  .sidebar, .topbar, .bottomnav, .no-print, .toasts { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; color: #000; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
