/* OH Wear — App shell */

:root {
  --brand-red: #c41230;
  --brand-red-dark: #a00e28;
  --brand-red-soft: #fce8eb;
  --ink: #1c1c1c;
  --ink-secondary: #5c5c5c;
  --ink-muted: #8a8a8a;
  --surface: #ffffff;
  --canvas: #f4f5f7;
  --border: #e6e8ec;
  --border-strong: #d0d3d9;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-soft: 0 2px 8px rgba(16, 24, 40, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 248px;
  --topbar-height: 64px;
  --font: "Figtree", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* —— Login —— */

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196, 18, 48, 0.08), transparent 55%),
    linear-gradient(180deg, #fafbfc 0%, var(--canvas) 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 28px 36px 24px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand img {
  height: 70px;
  width: auto;
}

.login-brand p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-secondary);
  text-align: center;
}

.login-error {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fdecef;
  border: 1px solid #f3c5cc;
  color: var(--brand-red-dark);
  font-size: 0.875rem;
  font-weight: 550;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.field input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.12);
}

.field input::placeholder {
  color: #b0b4ba;
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: -4px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-red);
}

.login-meta a {
  font-size: 0.8125rem;
  color: var(--brand-red);
  font-weight: 600;
}

.login-meta a:hover {
  text-decoration: underline;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--brand-red);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--brand-red-dark);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* —— App shell —— */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.menu-toggle.icon-btn {
  display: none;
}

.menu-toggle-bars {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
}

.menu-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}

.menu-toggle-bars span:nth-child(1) {
  top: 0;
}

.menu-toggle-bars span:nth-child(2) {
  top: 6px;
}

.menu-toggle-bars span:nth-child(3) {
  top: 12px;
}

body.nav-open .menu-toggle-bars span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

body.nav-open .menu-toggle-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

body.nav-open .menu-toggle-bars span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.topbar-logo img {
  height: 52px;
  width: auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--canvas);
  color: var(--ink);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.user-chip:hover {
  background: var(--canvas);
}

.user-menu {
  position: relative;
}

.notif-menu {
  position: relative;
}

.notif-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(240px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
  padding: 14px 16px;
}

.notif-menu-panel[hidden] {
  display: none !important;
}

.notif-empty {
  margin: 0;
  text-align: center;
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.4;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(280px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
  padding: 12px;
}

.user-menu-panel[hidden] {
  display: none !important;
}

.user-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.user-menu-head strong {
  display: block;
  font-size: 0.9375rem;
}

.user-menu-meta {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.user-menu-info {
  margin: 0 0 10px;
  display: grid;
  gap: 8px;
}

.user-menu-info div {
  display: grid;
  gap: 2px;
}

.user-menu-info dt {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.user-menu-info dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink);
  word-break: break-word;
}

.user-menu-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 10px 10px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.user-menu-action:hover {
  background: var(--canvas);
}

.user-menu-logout {
  color: var(--brand-red);
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle:hover {
  background: var(--canvas);
  color: var(--ink);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.app-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--topbar-height));
}

/* —— Sidebar —— */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow: hidden;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 10px;
  border: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: #7a7a7a;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link:hover {
  background: var(--canvas);
}

.nav-link.is-active {
  color: #1a1a1a;
  font-weight: 650;
  background: var(--canvas);
}

.nav-link.is-active svg {
  stroke: #1a1a1a;
}

/* —— Main —— */

.main {
  flex: 1;
  padding: 28px 36px 48px;
  min-width: 0;
}

.page-greeting {
  margin: 0 0 28px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section {
  margin-bottom: 32px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.section-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}

.section-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.cards-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 20px 22px;
}

.card-label {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.card-value {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.card-meta {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-link:hover {
  color: var(--brand-red-dark);
}

.shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shortcut {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 18px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.shortcut::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 70%;
  height: 70%;
  border-radius: 100% 0 0 0;
  background: radial-gradient(
    ellipse at 100% 100%,
    rgba(0, 0, 0, 0.045) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.shortcut:hover {
  border-color: #d0d3d9;
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.shortcut:hover::after {
  opacity: 1;
}

.shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f0f1f3;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.shortcut-icon svg {
  width: 22px;
  height: 22px;
  stroke: #6b6b6b;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shortcut-label {
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.placeholder-note {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px dashed var(--border-strong);
  color: var(--ink-secondary);
  font-size: 0.875rem;
}

.flash {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 550;
}

.flash-success {
  background: #eaf7ee;
  border: 1px solid #c6e6d0;
  color: #1f6b3a;
}

.flash-error {
  background: #fdecef;
  border: 1px solid #f3c5cc;
  color: var(--brand-red-dark);
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-lead {
  margin: 0;
  max-width: 52rem;
  color: var(--ink-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.content-card-title {
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 700;
}

.simple-list,
.steps,
.toc-list {
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--ink);
  line-height: 1.55;
}

.simple-list li,
.steps li,
.toc-list li {
  margin-bottom: 6px;
}

.muted {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

.tab.is-active {
  color: var(--ink);
  border-color: #cfcfcf;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.split-panels {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-toolbar .section-head {
  margin-bottom: 0;
}

.btn-compact {
  height: 38px;
  padding: 0 14px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(16, 24, 40, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
  padding: 22px 22px 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-right: 28px;
}

.modal-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #9ca3af;
  color: #fff;
  font-size: 1.125rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.modal-close:hover {
  background: #6b7280;
  color: #fff;
}

.modal-inline-error {
  margin: 0 0 14px;
}

.modal-confirm[hidden] {
  display: none !important;
}

.modal.is-confirming #user-form {
  display: none !important;
}

.modal-confirm-text {
  margin: 0 0 16px;
  color: var(--ink-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.modal-confirm .btn-primary,
.modal-confirm .btn-secondary {
  cursor: pointer;
  pointer-events: auto;
}

body.modal-open {
  overflow: hidden;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9375rem;
  outline: none;
}

.field select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.12);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--ink-secondary);
  font-weight: 650;
  white-space: nowrap;
}

.cell-meta {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.75rem;
}

.table-actions {
  white-space: nowrap;
}

.inline-form {
  display: inline;
}

.link-action {
  border: none;
  background: none;
  padding: 0;
  margin-right: 10px;
  color: var(--brand-red);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
}

.badge-ok {
  background: #eaf7ee;
  color: #1f6b3a;
}

.badge-off {
  background: #f3f4f6;
  color: #6b7280;
}

.filters-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  gap: 12px;
  margin-bottom: 16px;
  align-items: end;
}

.filters-actions {
  padding-bottom: 2px;
}

.empty-row {
  text-align: center;
  color: var(--ink-muted);
  padding: 28px 10px !important;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.page-link {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0 8px;
}

.page-link.is-active {
  color: #fff;
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.manual-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.manual-toc {
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
  align-self: start;
}

.toc-list {
  list-style: decimal;
}

.toc-list a {
  color: var(--ink-secondary);
  font-weight: 550;
}

.toc-list a:hover {
  color: var(--brand-red);
}

.manual-section {
  scroll-margin-top: 0;
}

.manual-section h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.manual-section h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.manual-section p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.6;
}

.callout {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f7f8fa;
  border-left: 3px solid var(--brand-red);
  color: var(--ink-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

a.icon-btn {
  text-decoration: none;
}

.nav-backdrop {
  display: none;
}

/* —— Responsive —— */

@media (max-width: 1100px) {
  .cards-row {
    grid-template-columns: 1fr 1fr;
  }

  .shortcuts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .topbar {
    padding: 0 14px;
  }

  .menu-toggle.icon-btn {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(288px, 86vw);
    height: calc(100vh - var(--topbar-height));
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 16px 12px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
    overflow: hidden;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(16, 24, 40, 0.12);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: var(--topbar-height) 0 0 0;
    z-index: 45;
    background: rgba(16, 24, 40, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  .main {
    padding: 22px 18px 40px;
  }

  .user-name {
    display: none;
  }

  .cards-row,
  .shortcuts {
    grid-template-columns: 1fr;
  }

  .split-panels,
  .manual-layout,
  .filters-bar {
    grid-template-columns: 1fr;
  }

  .manual-toc {
    position: static;
  }

  .section-toolbar .btn-compact {
    height: 34px;
    padding: 0 12px;
    font-size: 0.8125rem;
  }

  .modal {
    padding: 12px;
    align-items: flex-start;
  }

  .modal-panel {
    margin-top: 12px;
    padding: 18px 16px 16px;
  }
}
