:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --brand: #059669;
    --brand-dark: #047857;
    --danger: #dc2626;
    --radius: 8px;
    --shadow: 0 14px 36px rgba(15, 23, 42, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    --bg: #050505;
    --panel: #111113;
    --text: #fafafa;
    --muted: #a1a1aa;
    --line: #27272a;
    --shadow: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 20px; border-right: 1px solid var(--line); background: var(--panel); }
.brand, .login-brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius); background: var(--brand); color: #fff; font-weight: 800; letter-spacing: 0; }
.brand strong, .login-brand strong { display: block; font-size: 16px; }
.brand small, .login-brand small, small { color: var(--muted); }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius); color: var(--muted); font-weight: 650; font-size: 14px; }
.nav a:hover, .nav a.active { background: rgba(5, 150, 105, .1); color: var(--brand); }
.nav-icon { width: 18px; height: 18px; border: 1.8px solid currentColor; border-radius: 5px; display: inline-block; }
.nav-icon[data-icon="clock"] { border-radius: 50%; }
.nav-icon[data-icon="scan"] { border-style: dashed; }
.nav-icon[data-icon="star"] { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: currentColor; border: 0; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.user-card { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: flex-end; gap: 8px; height: 64px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(10px); }
.page { padding: 28px; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-header h1 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: 0; }
.actions, .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-actions { display: inline-flex; align-items: center; gap: 8px; }
.inline-actions form, .menu-card-actions form, .page-header .actions form { margin: 0; }

.btn, .icon-button { border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; transition: .18s ease; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; font-weight: 750; font-size: 14px; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.secondary { border-color: var(--line); background: var(--panel); color: var(--text); }
.btn.secondary:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn.success-soft { border-color: #bbf7d0; background: #dcfce7; color: #047857; }
.btn.success-soft:hover { border-color: #22c55e; background: #bbf7d0; }
.btn.danger { border-color: rgba(220, 38, 38, .25); color: var(--danger); background: transparent; }
.btn.solid-danger { border-color: #e11d48; background: #e11d48; color: #fff; }
.btn.solid-danger:hover { background: #be123c; }
.btn.dark { background: var(--text); color: var(--panel); }
.btn.full { width: 100%; }
.icon-button { width: 40px; height: 40px; background: var(--panel); border-color: var(--line); color: var(--text); }
.icon-button.success { color: var(--brand); }
.icon-button.danger { color: var(--danger); }
.icon-button[data-dialog-close],
.modal .icon-button[data-dialog-close] {
  width: auto;
  min-width: 96px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(220, 38, 38, .16);
}
.modal-title-row [data-dialog-close],
.compact-title-row [data-dialog-close],
.modal header [data-dialog-close] {
  position: static !important;
  inset: auto !important;
  transform: none !important;
}
.modal-title-row,
.compact-title-row,
.modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-title-row > :first-child,
.compact-title-row > :first-child,
.modal header > :first-child {
  min-width: 0;
}
.modal-title-row [data-dialog-close].icon-button,
.compact-title-row [data-dialog-close].icon-button,
.modal header [data-dialog-close].icon-button,
.settings-modal-close {
  flex: 0 0 auto;
  white-space: nowrap;
}
.btn.danger-light[data-dialog-close],
.modal .btn.danger-light[data-dialog-close] {
  min-height: 42px;
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #b91c1c;
  box-shadow: 0 10px 22px rgba(220, 38, 38, .16);
}
.btn.danger-light[data-dialog-close]:hover,
.modal .btn.danger-light[data-dialog-close]:hover {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}
.icon-button[data-dialog-close]:hover,
.modal .icon-button[data-dialog-close]:hover {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}
.icon-button[data-dialog-close] i { font-size: 16px; }
.mobile-only { display: none; }
.desktop-only { display: inline-flex; }

input, select, textarea { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); outline: none; }
textarea { min-height: 120px; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(5, 150, 105, .12); }
label { display: grid; gap: 8px; font-weight: 700; font-size: 14px; color: var(--muted); }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 390px); display: grid; gap: 16px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.worldcamp-login { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(115deg, rgba(236, 253, 245, .86), rgba(239, 246, 255, .9)); }
.worldcamp-login::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(rgba(15, 23, 42, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, .06) 1px, transparent 1px); background-size: 48px 48px; }
.worldcamp-login::after { content: "WORLD CAMP"; position: absolute; inset: -8vh -4vw auto; z-index: -1; color: rgba(255,255,255,.38); font-size: clamp(130px, 16vw, 260px); font-weight: 950; letter-spacing: .08em; line-height: .9; text-align: center; transform: skewX(-8deg); text-shadow: 0 1px 0 rgba(15,23,42,.03); }
.worldcamp-login-card { width: min(100%, 548px); gap: 18px; padding: 42px; border-radius: 24px; border-color: rgba(148, 163, 184, .42); box-shadow: 0 28px 70px rgba(15, 23, 42, .16); }
.worldcamp-brand { align-items: center; justify-content: center; gap: 16px; }
.worldcamp-brand img { width: 84px; height: 84px; object-fit: contain; border-radius: 999px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .10); }
.worldcamp-brand strong { font-size: 20px; letter-spacing: .03em; text-transform: uppercase; }
.worldcamp-brand small { font-size: 15px; }
.login-heading { padding-bottom: 18px; border-bottom: 1px solid #e5eaf2; }
.login-heading h1 { margin: 0 0 8px; color: #111827; font-size: 30px; line-height: 1.1; }
.login-heading p { margin: 0; color: #5b6f91; font-size: 16px; }
.worldcamp-login-card label { gap: 8px; color: #334155; font-size: 15px; }
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-wrap > .bi:first-child { position: absolute; left: 18px; z-index: 1; color: #74849f; font-size: 18px; }
.login-input-wrap input { min-height: 60px; padding-left: 52px; padding-right: 52px; border-radius: 14px; background: #fffec9; font-size: 17px; }
.password-toggle { position: absolute; right: 12px; display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 999px; background: transparent; color: #64748b; cursor: pointer; }
.password-toggle:hover { color: #059669; background: rgba(5,150,105,.08); }
.forgot-link { justify-self: end; margin-top: -8px; color: #064e3b; font-size: 15px; font-weight: 800; }
.login-submit { gap: 12px; min-height: 62px; border-radius: 14px; font-size: 18px; box-shadow: 0 14px 30px rgba(5, 150, 105, .22); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px; border-radius: 14px; background: #f8fafc; color: #64748b; font-size: 14px; }
.alert { padding: 11px 12px; border-radius: var(--radius); font-size: 14px; }
.alert.success { color: #047857; background: #d1fae5; }
.alert.warning { color: #92400e; background: #fef3c7; }
.alert.danger { color: #be123c; background: #fff1f2; }
.muted { color: var(--muted); line-height: 1.5; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stats-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card, .panel, .table-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.stat-card { display: grid; gap: 8px; padding: 18px; }
.stat-card strong { font-size: 32px; line-height: 1; letter-spacing: 0; }
.stat-card span { color: var(--muted); font-size: 14px; }
.stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius); }
.stat-card.emerald .stat-icon { background: rgba(5, 150, 105, .12); }
.stat-card.blue .stat-icon { background: rgba(2, 132, 199, .12); }
.stat-card.amber .stat-icon { background: rgba(217, 119, 6, .14); }
.stat-card.rose .stat-icon { background: rgba(225, 29, 72, .12); }

.gt-overview { margin: -10px 0 22px; }
.gt-overview span { display: block; color: #8a96aa; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.gt-overview h2 { margin: 3px 0 2px; color: #172033; font-size: 24px; line-height: 1.15; }
.gt-overview p { margin: 0; color: #7a879c; font-size: 14px; }
.gt-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.gt-kpi-card { position: relative; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 16px; min-height: 104px; padding: 20px; border: 1px solid #dfe5ee; border-radius: 8px; background: #fff; box-shadow: 0 8px 22px rgba(15, 23, 42, .06); overflow: hidden; }
.gt-kpi-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; font-size: 18px; }
.gt-kpi-card small { display: block; color: #737f95; font-size: 13px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.gt-kpi-card strong { display: block; color: #101827; font-size: 28px; line-height: 1; }
.gt-kpi-card em { display: block; margin-top: 5px; color: #738198; font-style: normal; font-size: 13px; }
.gt-kpi-card.teal .gt-kpi-icon { color: #14b8a6; background: #ecfdf5; }
.gt-kpi-card.blue .gt-kpi-icon { color: #2487d8; background: #eff6ff; }
.gt-kpi-card.amber .gt-kpi-icon { color: #f59e0b; background: #fff7ed; }
.gt-kpi-card.green .gt-kpi-icon { color: #16a34a; background: #f0fdf4; }
.gt-kpi-card.indigo .gt-kpi-icon { color: #4f46e5; background: #eef2ff; }
.gt-kpi-card.red .gt-kpi-icon { color: #ef4444; background: #fff1f2; }
.gt-kpi-card.purple .gt-kpi-icon { color: #b43bd6; background: #faf5ff; }
.gt-spark { display: grid; grid-template-columns: repeat(5, 5px); align-items: end; gap: 4px; width: 42px; height: 30px; }
.gt-spark::before, .gt-spark::after { content: ""; }
.gt-spark, .gt-spark::before, .gt-spark::after { background: linear-gradient(to top, currentColor var(--h1), transparent var(--h1)); color: #6ee7d8; border-radius: 4px; }
.gt-spark::before { height: 100%; background: linear-gradient(to top, currentColor var(--h3), transparent var(--h3)); }
.gt-spark::after { height: 100%; background: linear-gradient(to top, currentColor var(--h5), transparent var(--h5)); }
.gt-progress { display: block; width: 176px; height: 5px; border-radius: 999px; background: #eff2f6; overflow: hidden; }
.gt-progress b { display: block; height: 100%; border-radius: inherit; background: currentColor; }
.gt-kpi-card.red .gt-progress { color: #ef4444; }
.gt-kpi-card.purple .gt-progress { color: #c03bd9; }
.gt-panel { border: 1px solid #dfe5ee; border-radius: 8px; background: #fff; box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
.gt-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 16px 20px; border-bottom: 1px solid #e8edf4; }
.gt-panel h3 { margin: 0; color: #101827; font-size: 16px; line-height: 1.2; }
.gt-panel p { margin: 4px 0 0; color: #7a879c; font-size: 13px; }
.gt-panel a { color: #2563eb; font-weight: 800; font-size: 13px; }
.gt-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 18px; margin-bottom: 18px; }
.gt-chart-panel nav { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #e0e6ef; border-radius: 7px; color: #64748b; font-size: 13px; }
.gt-line-chart { display: block; width: 100%; height: auto; padding: 8px 18px 0; }
.gt-line-chart line { stroke: #edf1f6; stroke-width: 1; }
.gt-line-chart text { fill: #748197; font-size: 13px; }
.gt-bar-chart { display: block; width: 100%; height: auto; padding: 12px 18px 20px; }
.gt-bar-chart line { stroke: #e8edf4; stroke-width: 1; stroke-dasharray: 5 5; }
.gt-bar-chart text { font-size: 13px; fill: #718198; }
.gt-bar-axis { text-anchor: end; }
.gt-bar-label { text-anchor: middle; font-weight: 700; fill: #6b778c; }
.gt-bar-value { text-anchor: middle; font-size: 12px; font-weight: 900; fill: #243149; }
.gt-bar { transform-box: fill-box; transform-origin: bottom; transition: .18s ease; }
.gt-bar:hover { filter: brightness(1.06); transform: scaleY(1.02); }
.gt-bar.teal { fill: #22bda5; }
.gt-bar.blue { fill: #489be0; }
.gt-bar.amber { fill: #f59f00; }
.gt-bar.green { fill: #2fb344; }
.gt-bar.purple { fill: #ae3ec9; }
.gt-bar.red { fill: #dc3545; }
.gt-line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.gt-line.teal { stroke: #14b8a6; }
.gt-line.blue { stroke: #4aa3f0; stroke-dasharray: 8 7; }
.gt-line.amber { stroke: #f59e0b; }
.gt-chart-legend { display: flex; align-items: center; gap: 28px; padding: 0 20px 18px; color: #52627a; font-size: 14px; }
.gt-chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.gt-chart-legend i, .gt-mini-list i { display: inline-block; width: 8px; height: 8px; border-radius: 999px; }
.gt-chart-legend i.teal, .gt-mini-list i.teal { background: #14b8a6; }
.gt-chart-legend i.blue { background: #4aa3f0; }
.gt-chart-legend i.amber, .gt-mini-list i.amber { background: #f59e0b; }
.gt-mini-list i.red { background: #ef4444; }
.gt-activity-list { display: grid; gap: 0; padding: 8px 18px 18px; }
.gt-activity-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eef2f7; }
.gt-activity-item:last-child { border-bottom: 0; }
.gt-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 900; }
.gt-avatar.success { background: #14b8a6; }
.gt-avatar.warning { background: #f59e0b; }
.gt-avatar.danger { background: #ef4444; }
.gt-avatar.neutral, .gt-avatar.info { background: #64748b; }
.gt-activity-item p { margin: 0; color: #52627a; line-height: 1.35; }
.gt-activity-item strong { color: #172033; }
.gt-activity-item small { display: block; margin-top: 3px; color: #8a96aa; }
.gt-lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 18px; }
.gt-orders-panel header .btn { min-height: 32px; }
.gt-table-wrap { overflow-x: auto; }
.gt-table { min-width: 740px; font-size: 14px; }
.gt-table th { background: #f8fafc; color: #66748a; }
.gt-table td, .gt-table th { padding: 13px 20px; }
.gt-table a { color: #2563eb; font-weight: 850; }
.gt-side-stack { display: grid; gap: 18px; align-content: start; }
.gt-side-stack .gt-panel { padding: 18px; }
.gt-side-stack .gt-panel h3 { margin-bottom: 16px; }
.gt-storage-bar { display: flex; height: 9px; margin-bottom: 14px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.gt-storage-bar span.teal { background: #14b8a6; }
.gt-storage-bar span.amber { background: #f59e0b; }
.gt-mini-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; color: #52627a; font-size: 13px; }
.gt-mini-list span { display: grid; gap: 4px; }
.gt-mini-list strong { color: #111827; }
.gt-service-list { display: grid; gap: 14px; }
.gt-service-list div { display: grid; gap: 8px; }
.gt-service-list span { display: flex; justify-content: space-between; gap: 14px; color: #52627a; font-size: 13px; }
.gt-service-list b { display: block; height: 5px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.gt-service-list i { display: block; height: 100%; border-radius: inherit; background: #14b8a6; }

.dashboard-topline { display: flex; align-items: center; gap: 10px; margin: -8px 0 28px; color: #5b6f91; font-size: 18px; }
.line-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 2px solid currentColor; border-radius: 50%; font-size: 0; }
.resto-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; margin-bottom: 34px; }
.resto-stat-card { display: flex; align-items: center; gap: 24px; min-height: 158px; padding: 34px 36px; border: 1.5px solid #111827; border-radius: 34px; background: var(--panel); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }
.resto-stat-card small { display: block; margin-bottom: 8px; color: #5b6f91; font-size: 20px; letter-spacing: .08em; text-transform: uppercase; }
.resto-stat-card strong { display: block; font-size: 42px; line-height: 1; color: #0f172a; }
.resto-icon { display: inline-grid; place-items: center; flex: 0 0 82px; width: 82px; height: 82px; border-radius: 22px; font-size: 36px; font-weight: 900; }
.resto-icon.purple { color: #4f46e5; background: #eef2ff; }
.resto-icon.green { color: #059669; background: #e9fbf3; }
.resto-icon.orange { color: #d97706; background: #fff8e6; }
.resto-icon.rose { color: #e11d48; background: #fff1f4; }
.meal-progress-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; margin-bottom: 28px; }
.meal-progress-card { position: relative; min-height: 248px; padding: 36px; border: 1.5px solid #111827; border-radius: 34px; background: var(--panel); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); overflow: hidden; }
.meal-progress-card.current { border-width: 4px; }
.service-admin-card.current, .menu-card.current { border: 3px solid #0d6efd; }
.service-admin-card.done, .menu-card.done { opacity: .78; }
.service-admin-card.upcoming, .menu-card.upcoming { border-color: #d8dde4; }
.meal-status-pill { display: inline-flex; align-items: center; width: fit-content; min-height: 30px; margin-bottom: 14px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.meal-status-pill.current { color: #047857; background: #d1fae5; border: 1px solid #86efac; }
.meal-status-pill.done { color: #64748b; background: #f1f5f9; border: 1px solid #cbd5e1; }
.meal-status-pill.upcoming { color: #0369a1; background: #e0f2fe; border: 1px solid #bae6fd; }
.current-ribbon { position: absolute; top: 0; right: 0; padding: 11px 22px; border-radius: 0 28px 0 18px; background: #10b981; color: #fff; font-weight: 900; letter-spacing: .08em; }
.meal-card-head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.meal-card-head .resto-icon { width: 58px; height: 58px; flex-basis: 58px; border-radius: 16px; font-size: 24px; }
.meal-card-head h2 { margin: 0 0 6px; font-size: 24px; }
.meal-progress-line { display: flex; justify-content: space-between; gap: 16px; color: #5b6f91; font-size: 20px; }
.meal-progress-line strong { color: #0f172a; }
.progress-track { height: 12px; margin: 12px 0 14px; border-radius: 999px; background: #edf1f7; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.meal-percent { text-align: right; color: #8ca0bd; font-weight: 800; letter-spacing: .04em; }
.dashboard-lower { margin-top: 10px; }

.content-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.panel { padding: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 17px; letter-spacing: 0; }
.panel p { color: var(--muted); line-height: 1.6; }
.span-2 { min-width: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.page-subtitle { margin: -14px 0 34px; color: #5b6f91; font-size: 20px; }
.add-dish-button { min-height: 66px; padding-inline: 34px; border-radius: 26px; font-size: 24px; box-shadow: 0 18px 36px rgba(16, 185, 129, .25); }
.filter-band { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; min-height: 100px; margin-bottom: 38px; padding: 24px; border: 1.5px solid #111827; border-radius: 34px; background: var(--panel); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }
.filter-band select { width: 190px; height: 50px; border-radius: 18px; font-weight: 750; color: #334155; background: #f8fafc; }
.filter-label { color: #5b6f91; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.menu-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.menu-card { position: relative; min-height: 354px; padding: 30px 28px 28px; border-radius: 34px; background: var(--panel); box-shadow: 0 8px 20px rgba(15, 23, 42, .10); }
.menu-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.menu-card-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.menu-card-actions .icon-button { width: 42px; height: 42px; border-radius: 18px; color: #59708f; background: #f8fafc; }
.menu-card-actions .icon-button.edit-action { border-color: #86efac; color: #047857; background: #ecfdf5; font-weight: 800; }
.menu-card-actions .icon-button.edit-action:hover { color: #fff; background: #16a34a; border-color: #16a34a; }
.menu-card-actions .icon-button.delete-action { border-color: #fecaca; color: #dc2626; background: #fff1f2; font-weight: 800; }
.menu-card-actions .icon-button.delete-action:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
.menu-kicker { display: inline-flex; max-width: 100%; margin-bottom: 24px; padding: 8px 18px; border-radius: 999px; background: #f8fafc; color: #5b6f91; font-weight: 900; letter-spacing: .08em; line-height: 1.45; text-transform: uppercase; overflow-wrap: anywhere; }
.menu-card h2 { margin: 0 0 14px; font-size: 27px; line-height: 1.25; color: #0f172a; }
.menu-card p { min-height: 80px; color: #415574; font-size: 20px; line-height: 1.7; }
.menu-time { display: block; color: #64748b; font-weight: 700; }
.menu-divider { height: 1px; margin: 26px 0; background: #e5eaf2; }
.menu-service-card { display: grid; gap: 18px; min-height: 254px; padding: 36px; border: 1px solid #d8dde4; border-radius: 18px; background: #fff; box-shadow: 0 10px 24px rgba(15, 23, 42, .10); }
.menu-service-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.menu-service-head h2 { margin: 0 0 8px; color: #050505; font-size: 27px; line-height: 1.15; }
.menu-service-head small { display: block; color: #4f5d78; font-size: 20px; line-height: 1.4; }
.service-state { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; min-height: 32px; padding: 0 14px; border-radius: 10px; font-size: 18px; font-weight: 800; }
.service-state.open { color: #fff; background: #09a84f; box-shadow: 0 6px 14px rgba(9, 168, 79, .22); }
.service-state.closed { color: #102033; background: #eef3f7; }
.menu-service-dish { display: grid; gap: 8px; }
.menu-service-dish .meal-status-pill { margin-bottom: 2px; }
.menu-service-dish strong { color: #111827; font-size: 18px; }
.menu-service-dish p { margin: 0; color: #5b6f91; line-height: 1.45; }
.menu-service-progress { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #4f5d78; font-size: 20px; }
.menu-service-progress strong { color: #050505; font-weight: 800; }
.menu-service-actions { display: grid; grid-template-columns: minmax(0, 1fr) 62px auto; gap: 12px; align-items: center; }
.menu-service-actions form { margin: 0; }
.service-toggle-btn { display: inline-flex; align-items: center; justify-content: center; gap: 18px; width: 100%; min-height: 48px; border: 0; border-radius: 10px; font-size: 18px; cursor: pointer; box-shadow: 0 4px 10px rgba(15, 23, 42, .12); }
.service-toggle-btn.open { color: #fff; background: #09a84f; }
.service-toggle-btn.close { color: #102033; background: #edf4f8; }
.service-toggle-btn .bi { font-size: 22px; line-height: 1; }
.service-edit-btn, .service-delete-btn { display: inline-grid; place-items: center; width: 62px; height: 48px; border: 1px solid #d8dde4; border-radius: 10px; background: #fff; color: #102033; font-size: 26px; cursor: pointer; box-shadow: 0 4px 10px rgba(15, 23, 42, .12); }
.service-edit-btn .bi, .service-delete-btn .bi { font-size: 22px; line-height: 1; }
.service-delete-btn { color: #dc2626; font-weight: 800; }
.wide-modal { width: min(760px, calc(100vw - 28px)); padding: 0; border-radius: 0; }
.wide-modal form { padding: 28px 34px; }
.modal-title-row { display: flex; align-items: center; justify-content: space-between; margin: -28px -34px 28px; padding: 16px 34px 34px; border-bottom: 1px solid #111827; }
.modal-title-row h2 { margin: 0; font-size: 28px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.check-tile { display: flex; align-items: center; min-height: 56px; padding: 0 18px; border: 1px solid var(--line); border-radius: 16px; color: #5b6f91; background: #f8fafc; }
.check-tile input { width: auto; min-height: auto; margin-right: 10px; }
.scanner-grid { display: grid; grid-template-columns: minmax(500px, 620px) 1fr; gap: 20px; align-items: start; }
.operator-strip { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.operator-strip strong, .operator-strip small { display: block; }
.active-service-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .08); }
.active-service-card small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.active-service-card strong { display: block; color: var(--text); font-size: 18px; }
.active-service-actions { display: grid; justify-items: end; gap: 8px; }
.btn.compact { min-height: 32px; padding-inline: 12px; font-size: 12px; }
.active-menu-modal-body { display: grid; gap: 14px; padding: 18px; }
.active-menu-service { padding: 14px; border: 1px solid #d8dde4; border-radius: 8px; background: #f8fafc; }
.active-menu-service small, .active-menu-service span { display: block; color: #64748b; }
.active-menu-service strong { display: block; margin: 4px 0; color: #111827; font-size: 20px; }
.active-menu-item { padding: 14px; border: 1px solid #e1e6ed; border-radius: 8px; background: #fff; }
.active-menu-item strong { display: block; color: #111827; font-size: 16px; }
.active-menu-item p { margin: 8px 0 0; color: #475569; line-height: 1.5; }
.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.footer-line { margin-top: 18px; align-items: center; }
.stack { display: grid; gap: 10px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--text) 4%, transparent); }
.list-row span { display: grid; gap: 3px; }

.bars { height: 300px; display: grid; grid-template-columns: repeat(9, minmax(42px, 1fr)); align-items: end; gap: 12px; padding-top: 20px; overflow-x: auto; }
.bar-item { display: grid; gap: 8px; justify-items: center; min-width: 42px; }
.bar-track { position: relative; width: 100%; height: 230px; border-radius: var(--radius); background: color-mix(in srgb, var(--text) 6%, transparent); overflow: hidden; }
.bar-track span { position: absolute; left: 0; right: 0; bottom: 0; display: block; border-radius: var(--radius) var(--radius) 0 0; background: var(--brand); }

.toolbar { margin-bottom: 16px; max-width: 620px; }
.toolbar input { flex: 1; min-width: 260px; }
.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: color-mix(in srgb, var(--text) 4%, transparent); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td small { display: block; margin-top: 3px; }

.badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 900; border: 1px solid transparent; box-shadow: 0 5px 12px rgba(15, 23, 42, .08); }
.badge.success { color: #005f3d; background: #8ff0bd; border-color: #21c879; }
.badge.warning { color: #8a3b00; background: #ffd45a; border-color: #f59e0b; }
.badge.danger { color: #9f1239; background: #ffb8c4; border-color: #fb7185; }
.badge.info { color: #075985; background: #93dcff; border-color: #38bdf8; }
.badge.neutral { color: #334155; background: #dbe3ee; border-color: #b7c4d4; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.full-field { grid-column: 1 / -1; }
.qr-reader { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; min-height: min(82vh, 620px); margin: 16px 0; border: 3px solid #facc15; border-radius: 14px; background: #0f172a; color: var(--muted); overflow: hidden; box-shadow: 0 0 0 5px rgba(250, 204, 21, .2); }
.qr-reader video, .qr-reader canvas { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.qr-reader #qr-shaded-region { border-width: 16px !important; }
.qr-reader div[style*="border-style: solid"] { border-color: #fff !important; }
.qr-reader::after { content: ""; position: absolute; inset: 2.5%; border: 4px solid rgba(250, 204, 21, .95); border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 999px rgba(15, 23, 42, .1); }
.qr-reader.scanning::after { animation: scanFocusPulse 1.2s ease-in-out infinite; }
@keyframes scanFocusPulse {
    0%, 100% { inset: 4.5%; border-color: rgba(250, 204, 21, .95); box-shadow: 0 0 0 999px rgba(15, 23, 42, .1); }
    50% { inset: 7%; border-color: #22c55e; box-shadow: 0 0 0 999px rgba(15, 23, 42, .2); }
}
.manual-scan { display: flex; gap: 8px; margin-top: 12px; }
.sync-line { margin-top: 12px; color: var(--muted); font-size: 14px; }
.scan-result { display: grid; gap: 4px; min-height: 92px; margin-bottom: 18px; padding: 16px; border: 2px solid transparent; border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.scan-result.success { border-color: #00a95c; background: #c8fadd; color: #064e3b; }
.scan-result.warning { border-color: #f59e0b; background: #fff1a8; color: #7c2d12; }
.scan-result.danger { border-color: #ef174f; background: #ffd1dc; color: #881337; }
.scan-popup { position: fixed; inset: 84px 24px auto auto; z-index: 1200; width: min(460px, calc(100vw - 32px)); pointer-events: none; opacity: 0; transform: translateY(-16px) scale(.98); transition: opacity .18s ease, transform .18s ease; }
.scan-popup.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.scan-popup-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) 38px; gap: 16px; align-items: center; min-height: 148px; padding: 22px; border: 3px solid currentColor; border-radius: 20px; background: #fff; color: #0f172a; box-shadow: 0 22px 58px rgba(15, 23, 42, .28); }
.scan-popup.success .scan-popup-card { color: #006b3f; background: linear-gradient(135deg, #dcffe9, #ffffff); }
.scan-popup.warning .scan-popup-card { color: #9a4a00; background: linear-gradient(135deg, #fff4b8, #ffffff); }
.scan-popup.danger .scan-popup-card { color: #b00031; background: linear-gradient(135deg, #ffe0e7, #ffffff); }
.scan-popup-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; background: currentColor; color: #fff; font-size: 38px; }
.scan-popup-content { display: grid; gap: 5px; min-width: 0; }
.scan-popup-content small { color: #64748b; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.scan-popup-content strong { color: currentColor; font-size: 32px; line-height: 1; }
.scan-popup-content span { color: #0f172a; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.scan-popup-content span:last-child { color: #475569; font-size: 13px; font-weight: 700; }
.scan-popup-close { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid #d8dde4; border-radius: 999px; background: #fff; color: #475569; cursor: pointer; }
.scan-popup-pulse { animation: scanPopupPulse .42s ease; }
@keyframes scanPopupPulse {
    0% { transform: scale(.96); }
    55% { transform: scale(1.03); }
    100% { transform: scale(1); }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.modal { width: min(560px, calc(100vw - 28px)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(0, 0, 0, .42); }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-actions form { margin: 0; }
.empty-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .mobile-only { display: inline-grid; place-items: center; }
    .topbar { justify-content: space-between; }
    .stats-grid, .content-grid, .scanner-grid, .card-grid, .resto-stats, .meal-progress-grid, .menu-card-grid { grid-template-columns: 1fr 1fr; }
    .resto-stats, .meal-progress-grid, .menu-card-grid { gap: 18px; }
}

.participant-add-choice-modal { width: min(1120px, calc(100vw - 24px)); }
.add-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.choice-card { position: relative; display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 18px; min-height: 142px; padding: 20px; border: 0; border-radius: 12px; color: #fff; text-align: left; cursor: pointer; box-shadow: 0 18px 36px rgba(15, 23, 42, .12); overflow: hidden; }
.choice-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 0 57%, rgba(0, 0, 0, .18) 57% 73%, transparent 73%); pointer-events: none; }
.choice-card i { position: relative; z-index: 1; width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .48); border-radius: 14px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 32px; box-shadow: inset -7px -7px 0 rgba(255, 255, 255, .14); }
.choice-card span { position: relative; z-index: 1; display: grid; gap: 8px; }
.choice-card strong { font-size: 22px; line-height: 1.15; }
.choice-card small { color: rgba(255, 255, 255, .88); line-height: 1.45; font-weight: 650; }
.choice-card:hover { transform: translateY(-2px); filter: saturate(1.08); }
.choice-card-qr { background: linear-gradient(135deg, #2f7df6 0%, #2164dd 55%, #143a7c 100%); }
.choice-card-manual { background: linear-gradient(135deg, #8b7cf6 0%, #6d5cf4 55%, #4b35e4 100%); }
.choice-card-batch { background: linear-gradient(135deg, #ff6b86 0%, #ff3f5f 55%, #e6002a 100%); }
.participant-badge-modal, .participant-batch-modal, .participant-staff-modal { width: min(1040px, calc(100vw - 24px)); }
.badge-enroll-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; }
.badge-scan-box, .badge-form-fields { display: grid; gap: 14px; align-content: start; }
.badge-qr-reader { min-height: min(76vh, 540px); display: grid; place-items: center; border: 2px solid #0d6efd; border-radius: 18px; background: #09111f; color: #fff; overflow: hidden; }
.badge-qr-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.batch-enroll-scan { display: grid; gap: 10px; padding: 12px 0; border: 0; border-radius: 0; background: transparent; }
.participant-batch-qr-reader { min-height: 260px; max-height: 360px; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.participant-batch-qr-reader.is-hidden, .participant-batch-qr-reader[hidden] { display: none !important; }
.participant-batch-qr-reader:hover { border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .16); }
.participant-batch-qr-reader:focus-visible { outline: 3px solid rgba(34, 197, 94, .35); outline-offset: 4px; }
.participant-batch-qr-reader.scanning { cursor: default; border-color: #22c55e; }
.participant-batch-reader-empty { display: grid; place-items: center; gap: 10px; text-align: center; padding: 20px; }
.participant-batch-reader-empty i { font-size: 34px; color: #93c5fd; }
.participant-batch-reader-empty strong { font-size: 18px; }
.participant-batch-reader-empty small { color: #cbd5e1; }
.batch-scan-actions { align-items: center; gap: 12px; }
.batch-scan-start-btn { border-color: #15803d !important; background: #16a34a !important; color: #fff !important; box-shadow: 0 10px 24px rgba(22, 163, 74, .22); }
.batch-scan-start-btn:hover { background: #047857 !important; border-color: #047857 !important; }
.batch-scan-stop-btn { border-color: #dc2626 !important; background: #fee2e2 !important; color: #b91c1c !important; box-shadow: 0 10px 24px rgba(220, 38, 38, .15); }
.batch-scan-stop-btn[hidden], .batch-scan-start-btn[hidden] { display: none !important; }
.batch-scan-stop-btn:hover { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
.batch-single-id-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: end; gap: 12px; padding: 14px; border: 1px solid #93c5fd; border-radius: 16px; background: linear-gradient(135deg, #eff6ff, #eef2ff); box-shadow: 0 12px 28px rgba(37, 99, 235, .08); }
.batch-single-id-row label { display: grid; gap: 7px; margin: 0; color: #334155; font-weight: 850; }
.batch-single-id-button { min-height: 48px; border-color: #16a34a !important; background: #16a34a !important; color: #fff !important; box-shadow: 0 12px 26px rgba(22, 163, 74, .22); }
.batch-single-id-button:hover { background: #047857 !important; border-color: #047857 !important; }
.batch-inline-counter { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 10px 14px; border: 1px solid #bae6fd; border-radius: 12px; background: #fff; color: #0369a1; font-weight: 900; white-space: nowrap; }
.batch-inline-counter strong { color: #0f172a; font-size: 20px; line-height: 1; }
.batch-inline-counter[data-count="0"] { color: #64748b; background: #f8fafc; border-color: #e2e8f0; }
.batch-total-counter { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 14px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-weight: 850; white-space: nowrap; }
.batch-total-counter i { font-size: 18px; }
.batch-total-counter strong { color: #0f172a; font-size: 20px; line-height: 1; }
.batch-total-counter[data-count="0"] { border-color: #e2e8f0; background: #f8fafc; color: #64748b; }
.scanner-inline-message { padding: 10px 12px; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; color: #9a3412; font-weight: 800; }
.scanner-inline-message.success { border-color: #86efac; background: #dcfce7; color: #047857; }
.scanner-inline-message.danger { border-color: #fecaca; background: #fee2e2; color: #b91c1c; }
.external-lookup-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; }
.batch-responsible-lookup { padding: 14px; border: 1px solid #bfdbfe; border-radius: 16px; background: linear-gradient(135deg, #eff6ff, #ecfdf5); }
.batch-responsible-lookup label { margin: 0; color: #1e3a8a; font-weight: 900; }
.batch-responsible-lookup input { background: #fff; }
.batch-responsible-lookup .btn { min-height: 48px; border-color: #2563eb !important; background: #2563eb !important; color: #fff !important; box-shadow: 0 12px 26px rgba(37, 99, 235, .22); }
.batch-responsible-lookup .btn:hover { border-color: #1d4ed8 !important; background: #1d4ed8 !important; }
.reset-camp-panel { border-color: #ffb3b3; background: linear-gradient(135deg, rgba(220, 53, 69, .08), var(--panel)); }
.collaborator-kicker { display: inline-flex; width: fit-content; padding: 4px 10px; border-radius: 6px; background: #eef2ff; color: #4338ca; font-weight: 800; text-transform: uppercase; }
.participant-pass-card { display: grid; gap: 24px; margin: 18px 0; padding: 28px 26px; border-radius: 14px; background: linear-gradient(135deg, #312e81, #111827); color: #fff; box-shadow: var(--shadow); }
.participant-pass-card small { color: #c7d2fe; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }
.participant-pass-card strong { display: block; margin-top: 8px; font-size: 20px; }
.participant-pass-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.25); }
.modal-section-title { margin: 22px 0 10px; color: var(--muted); font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.participant-pass-history { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--line) 25%, transparent); }
.participant-pass-history-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.participant-pass-history-row:last-child { border-bottom: 0; }
.participant-pass-history-row span:first-child { display: grid; gap: 4px; }
.scan-devices-panel { display: grid; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.scan-devices-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scan-devices-head h2 { margin: 0; font-size: 20px; }
.scan-devices-head p { margin: 4px 0 0; color: var(--muted); }
.scan-device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.scan-device-card { position: relative; display: grid; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--bg) 58%, var(--panel)); }
.scan-device-status-dot { position: absolute; top: 22px; right: 22px; width: 13px; height: 13px; border-radius: 50%; background: #94a3b8; }
.scan-device-card.online .scan-device-status-dot { background: #10b981; }
.scan-device-card.offline .scan-device-status-dot { background: #ef4444; }
.scan-device-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: #059669; background: var(--panel); font-size: 22px; }
.scan-device-card small { color: #8a9bb7; font-weight: 800; text-transform: uppercase; }
.scan-device-card > strong { font-size: 22px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.scan-device-meta { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.link-button { border: 0; background: none; color: #00856f; font-weight: 800; cursor: pointer; justify-self: end; }
.scan-fullscreen { position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column; color: #fff; background: #0f172a; }
.scan-fullscreen.show { display: flex; }
.scan-fullscreen.success { background: #059669; }
.scan-fullscreen.warning { background: #d97706; }
.scan-fullscreen.danger { background: #dc2626; }
.scan-fullscreen-top { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: rgba(15, 23, 42, .82); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.scan-fullscreen-top span { color: #22d3ee; font-size: 13px; }
.scan-fullscreen-body { flex: 1; display: grid; place-items: center; align-content: center; gap: 18px; padding: 28px; text-align: center; }
.scan-fullscreen-icon { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.2); font-size: 56px; }
.scan-fullscreen h2 { margin: 12px 0 0; color: #fff; font-size: clamp(28px, 7vw, 56px); }
.scan-fullscreen h3 { margin: 0; color: #fff; font-size: clamp(20px, 5vw, 34px); }
.scan-fullscreen p { margin: 0; font-size: 18px; font-weight: 800; }
.scan-fullscreen small { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.scan-fullscreen button { margin-top: 20px; padding: 14px 28px; border: 0; border-radius: 10px; background: rgba(0,0,0,.24); color: #fff; font-weight: 900; cursor: pointer; }

@media (max-width: 720px) {
    .page { padding: 18px; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .stats-grid, .content-grid, .scanner-grid, .card-grid, .form-grid, .resto-stats, .meal-progress-grid, .menu-card-grid, .option-grid { grid-template-columns: 1fr; }
    .scanner-grid .panel { padding: 14px; }
    .qr-reader { min-height: min(78vh, calc(100vw - 28px)); border-radius: 12px; }
    .qr-reader::after { inset: 2%; border-width: 4px; }
    .resto-stat-card, .meal-progress-card, .filter-band, .menu-card { border-radius: 22px; padding: 22px; }
    .batch-single-id-row { grid-template-columns: 1fr; }
    .batch-single-id-button { width: 100%; }
    .batch-inline-counter { width: 100%; }
    .resto-stat-card { min-height: 120px; }
    .resto-icon { width: 62px; height: 62px; flex-basis: 62px; font-size: 26px; }
    .resto-stat-card small, .meal-progress-line, .page-subtitle { font-size: 16px; }
    .resto-stat-card strong { font-size: 34px; }
    .add-dish-button { min-height: 48px; font-size: 16px; border-radius: 16px; }
    .filter-band select { width: 100%; }
    .menu-card-top { align-items: stretch; flex-direction: column; }
    .menu-card-actions { justify-content: flex-start; }
    .menu-kicker { max-width: 100%; margin-right: 0; }
    .menu-card h2 { font-size: 22px; }
    .menu-card p { font-size: 16px; }
    .manual-scan { flex-direction: column; }
}

/* AdminLTE v4 inspired shell */
body.bg-body-tertiary { background: #f4f6f9; color: #212529; }
.app-wrapper { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 57px 1fr; }
html.sidebar-collapsed .app-wrapper { grid-template-columns: 76px 1fr; }
.app-header { grid-column: 2; grid-row: 1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 57px; padding: 0 1rem; border-bottom: 1px solid #dee2e6; background: #fff; box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2); }
.navbar-start, .navbar-end { display: flex; align-items: center; gap: .25rem; }
.nav-link { display: inline-flex; align-items: center; min-height: 40px; padding: .5rem .75rem; color: #495057; border-radius: 4px; background: transparent; border: 0; }
.nav-link:hover { color: #0d6efd; background: #f8f9fa; }
.nav-with-badge { position: relative; font-size: 18px; }
.navbar-badge { position: absolute; top: 3px; right: 0; min-width: 18px; padding: 2px 4px; border-radius: 999px; color: #fff; font-size: 11px; line-height: 1; text-align: center; }
.navbar-badge.danger { background: #dc3545; }
.navbar-badge.warning { background: #ffc107; color: #111; }
.theme-button { color: #495057; }
.theme-button:hover { color: #fff; background: #198754; }
[data-theme="dark"] .theme-button { color: #fff; background: #198754; }
.notification-menu { position: relative; }
.notification-dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; display: none; width: min(360px, calc(100vw - 24px)); border: 1px solid #dee2e6; border-radius: .25rem; background: #fff; box-shadow: 0 .5rem 1rem rgba(0,0,0,.15); overflow: hidden; }
.notification-dropdown.open { display: block; }
.notification-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #dee2e6; font-size: 16px; }
.notification-list { display: grid; gap: 8px; max-height: 360px; padding: 12px; overflow-y: auto; }
.notification-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 8px; color: #212529; background: #f4f5f7; }
.notification-item:hover { background: #eef2f7; color: #212529; }
.notification-item span { display: grid; gap: 3px; }
.notification-item strong { font-size: 18px; }
.notification-item small { color: #6c757d; font-size: 14px; }
.notification-item form { margin: 0; }
.notification-delete-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #fecaca; border-radius: 8px; background: #fff1f2; color: #dc2626; cursor: pointer; }
.notification-delete-btn:hover { background: #dc2626; color: #fff; }
.notification-empty { padding: 14px; color: #6c757d; text-align: center; }
.notification-footer { display: block; padding: 10px 14px; border-top: 1px solid #dee2e6; color: #0d6efd; text-align: center; }
.notification-footer-form { padding: 10px 12px; border-top: 1px solid #dee2e6; background: #f8fafc; }
.notification-footer-form button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 38px; border: 1px solid #fecaca; border-radius: 8px; background: #fff; color: #dc2626; font-weight: 800; cursor: pointer; }
.notification-footer-form button:hover { background: #dc2626; color: #fff; }
.header-user { display: flex; align-items: center; gap: .55rem; padding-left: .5rem; color: #495057; }
.header-user small, .user-panel small { display: block; color: #6c757d; }
.user-avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #0d6efd; color: #fff; font-weight: 800; }
.app-sidebar { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #343a40; color: #c2c7d0; box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2); }
.sidebar-brand { min-height: 57px; display: flex; align-items: center; padding: .8125rem .5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-link { display: flex; align-items: center; gap: .65rem; color: #fff; flex: 1 1 auto; min-width: 0; padding: 0 .5rem; }
.sidebar-collapse-button { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(255,255,255,.08); color: #c2c7d0; cursor: pointer; }
.sidebar-collapse-button:hover { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.brand-image { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; background: #0d6efd; color: #fff; font-weight: 900; }
.brand-text { font-size: 1.25rem; font-weight: 300; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-wrapper { flex: 1; padding: .5rem; overflow-y: auto; }
.nav-sidebar { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-sidebar .nav-link { width: 100%; justify-content: flex-start; gap: .65rem; min-height: 44px; color: #c2c7d0; border-radius: .25rem; }
.nav-sidebar .nav-link p { margin: 0; }
.nav-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav-sidebar .nav-link.active { color: #fff; background: #0d6efd; }
.app-sidebar .nav-icon { width: 1.35rem; height: 1.35rem; border-color: currentColor; opacity: .9; }
.app-sidebar .nav-icon.bi {
    display: inline-grid;
    place-items: center;
    flex: 0 0 1.35rem;
    border: 0;
    border-radius: 0;
    font-size: 1.18rem;
    line-height: 1;
}
.app-sidebar .sidebar-footer { padding: .75rem; border-top: 1px solid rgba(255,255,255,.12); }
.user-panel { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.app-main { grid-column: 2; grid-row: 2; min-width: 0; }
.app-content { padding: 1rem; }
.container-fluid { width: 100%; max-width: none; margin: 0 auto; }
.app-wrapper,
.app-sidebar,
.brand-text,
.nav-sidebar .nav-link p,
.user-panel span,
.sidebar-footer .btn {
    transition: .18s ease;
}
html.sidebar-collapsed .app-sidebar {
    width: 76px;
}
html.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding-left: .35rem;
    padding-right: .35rem;
}
html.sidebar-collapsed .brand-link {
    justify-content: center;
    padding: 0;
}
html.sidebar-collapsed .sidebar-collapse-button { display: none; }
html.sidebar-collapsed .brand-text,
html.sidebar-collapsed .nav-sidebar .nav-link p,
html.sidebar-collapsed .user-panel span,
html.sidebar-collapsed .sidebar-footer .btn {
    width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
}
html.sidebar-collapsed .sidebar-wrapper {
    padding: .5rem .35rem;
}
html.sidebar-collapsed .nav-sidebar .nav-link {
    justify-content: center;
    padding-left: .5rem;
    padding-right: .5rem;
}
html.sidebar-collapsed .app-sidebar .nav-icon.bi {
    margin: 0;
    font-size: 1.35rem;
}
html.sidebar-collapsed .user-panel {
    justify-content: center;
}
.app-content-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; padding: .5rem 0 1rem; }
.app-content-header h1 { margin: 0; font-size: 1.8rem; font-weight: 500; color: #212529; }
.breadcrumb { display: flex; gap: .5rem; margin: .25rem 0 0; padding: 0; list-style: none; color: #6c757d; font-size: .875rem; }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: #adb5bd; }
.card { border: 0; border-radius: .25rem; background: #fff; box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2); }
.card { min-width: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: .75rem 1rem; border-bottom: 1px solid rgba(0,0,0,.125); background: transparent; }
.card-title { margin: 0; font-size: 1.1rem; font-weight: 400; }
.card-tools { display: flex; align-items: center; gap: .25rem; }
.btn-tool { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: #6c757d; cursor: pointer; }
.btn-tool:hover { background: #f8f9fa; color: #212529; }
.card-body { padding: 1rem; }
.card-footer { padding: .75rem 1rem; border-top: 1px solid rgba(0,0,0,.125); background: rgba(0,0,0,.03); }
.info-box-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.info-box { display: flex; min-height: 90px; border-radius: .25rem; box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2); overflow: hidden; }
.info-box-icon { display: grid; place-items: center; width: 90px; flex: 0 0 90px; background: rgba(0,0,0,.15); color: rgba(255,255,255,.95); font-size: 34px; font-weight: 900; line-height: 1; }
.text-bg-warning .info-box-icon { color: #111; }
.info-box-content { flex: 1; padding: .5rem .75rem; color: #fff; }
.info-box-text { display: block; text-transform: uppercase; font-size: .875rem; }
.info-box-number { display: block; margin-top: .2rem; font-size: 1.5rem; font-weight: 700; }
.text-bg-primary { background: #0d6efd; }
.text-bg-danger { background: #dc3545; }
.text-bg-success { background: #198754; }
.text-bg-warning { background: #ffc107; color: #111; }
.text-bg-warning .info-box-content { color: #111; }
.progress { height: 4px; margin: .35rem 0; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.35); }
.progress div { height: 100%; background: rgba(255,255,255,.85); }
.progress.sm { height: 8px; background: #e9ecef; }
.progress.sm div { background: #0d6efd; }
.progress-description { font-size: .8rem; opacity: .9; }
.dashboard-row { margin-bottom: 1rem; }
.recap-layout { display: grid; grid-template-columns: minmax(0, 2fr) 320px; gap: 1.25rem; }
.recap-layout > * { min-width: 0; }
.text-center { text-align: center; }
.float-end { float: right; }
.goal-list { border-left: 1px solid #dee2e6; padding-left: 1rem; }
.progress-group { margin-bottom: 1rem; color: #495057; font-size: .95rem; }
.recap-footer { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.recap-footer div { display: grid; gap: .25rem; border-right: 1px solid #dee2e6; }
.recap-footer div:last-child { border-right: 0; }
.recap-footer strong { font-size: 1.25rem; }
.recap-footer span { color: #6c757d; text-transform: uppercase; font-size: .78rem; }
.line-chart-card { padding: 12px 8px 4px; overflow-x: auto; }
.recap-line-chart { width: 100%; min-width: 620px; height: auto; display: block; }
.chart-grid line { stroke: #e9edf2; stroke-width: 1.4; }
.chart-axis text, .chart-months text { fill: #41506a; font-size: 15px; }
.chart-axis text { fill: #6d84ad; font-size: 18px; }
.line { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.line.loyal { stroke: #9d00ff; }
.line.new { stroke: #f43f3f; }
.line.unique { stroke: #34c95a; }
.chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 36px; padding: 20px 26px 8px; color: #34425a; font-size: 18px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 14px; }
.legend { display: inline-block; width: 18px; height: 18px; border-radius: 3px; }
.legend.loyal { background: #9d00ff; }
.legend.new { background: #f43f3f; }
.legend.unique { background: #34c95a; }
.kpi-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px; margin: 0 0 1rem; }
.kpi-card { min-height: 170px; padding: 30px 36px; border-radius: 6px; background: #fff; box-shadow: 0 16px 32px rgba(81, 101, 116, .12); }
.kpi-card small { display: block; margin-top: 8px; color: #6f8296; font-size: 20px; font-weight: 700; }
.kpi-card strong { display: block; margin-top: 18px; color: #3d4650; font-size: 46px; line-height: 1; }
.kpi-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; font-size: 34px; font-weight: 900; }
.kpi-icon.blue { color: #5b6cff; }
.kpi-icon.green { color: #16b84e; }
.kpi-icon.red { color: #ff4650; }
.kpi-icon.amber { color: #3d83ff; }
.admin-meal-grid { gap: 1rem; margin-bottom: 1rem; }
.service-admin-card { min-height: 160px; }
.service-admin-card.current { outline: 3px solid #0d6efd; }
.service-admin-card h3 { margin: .35rem 0 .15rem; font-size: 1.35rem; }
.two-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 1rem; }
.two-columns > * { min-width: 0; }
.table-card.flat { border: 0; border-radius: 0; box-shadow: none; }
.table-card.flat { max-width: 100%; min-width: 0; overflow-x: auto; }
.table-card.flat table { min-width: 640px; }
.report-export-panel { margin-bottom: 14px; padding: 14px; border: 1px solid #d8dde4; border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.report-export-panel form { display: flex; align-items: end; gap: 10px; max-width: 680px; }
.report-export-panel label { flex: 1; margin: 0; }
.report-selection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.report-selection-toolbar strong { color: #334155; }
.orders-preview { max-width: 100%; overflow-x: auto; }
.orders-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 22px; background: #fff; }
.orders-table th { padding: 16px 32px; color: #050505; font-size: 23px; font-weight: 800; letter-spacing: 0; text-transform: none; background: #fff; border-bottom: 1px solid #d9dee5; }
.orders-table td { padding: 16px 32px; color: #050505; border-bottom: 1px solid #d9dee5; vertical-align: middle; }
.orders-table td a { color: #0d6efd; text-decoration: underline; text-underline-offset: 3px; }
.order-status { display: inline-flex; align-items: center; min-height: 31px; padding: 0 12px; border-radius: 8px; color: #fff; font-size: 17px; font-weight: 800; }
.order-status.shipped { background: #198754; }
.order-status.pending { background: #ffc107; color: #050505; }
.order-status.delivered { background: #dc3545; }
.order-status.processing { background: #00c0ef; color: #050505; }
.orders-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fff; }
.project-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.project-summary-card { min-height: 110px; padding: 22px 18px; border: 1px solid #ced4da; border-radius: 6px; background: #fff; box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 5px rgba(0,0,0,.2); }
.project-summary-card span { display: block; margin-bottom: 12px; color: #5f6b7a; font-size: 16px; }
.project-summary-card strong { display: block; color: #071523; font-size: 32px; line-height: 1; font-weight: 500; }
.project-summary-card.success strong { color: #047857; }
.project-summary-card.warning strong { color: #f0ad00; }
.project-summary-card.muted-card strong { color: #64748b; }
.project-board { border: 1px solid #ced4da; border-radius: 6px; background: #fff; box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 4px rgba(0,0,0,.18); overflow: hidden; }
.project-board-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border-bottom: 1px solid #ced4da; }
.project-board-header h2 { margin: 0; font-size: 20px; font-weight: 400; }
.project-toolbar { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.project-toolbar select { width: 190px; min-height: 38px; border-radius: 4px; }
.search-box { position: relative; display: block; width: 310px; color: #5f6b7a; font-size: 0; }
.search-box span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border: 1.8px solid currentColor; border-radius: 50%; font-size: 0; pointer-events: none; }
.search-box span::after { content: ""; position: absolute; width: 7px; height: 1.8px; right: -5px; bottom: 0; background: currentColor; transform: rotate(45deg); transform-origin: center; }
.search-box input { min-height: 38px; padding-left: 38px; border-radius: 4px; }
.project-table-wrap { overflow-x: auto; }
.project-table { width: 100%; min-width: 980px; border-collapse: collapse; background: #fff; font-size: 16px; }
.project-table th { padding: 14px 28px; color: #050505; background: #fff; border-bottom: 1px solid #d8dde3; font-size: 18px; font-weight: 800; text-transform: none; letter-spacing: 0; }
.project-table td { padding: 16px 28px; border-bottom: 1px solid #d8dde3; color: #071523; vertical-align: middle; }
.project-link { color: #0d6efd; font-weight: 800; }
.project-table small { display: block; margin-top: 4px; color: #6c757d; }
.segmented-actions { display: inline-flex; border: 1px solid #8f9aa8; border-radius: 5px; overflow: hidden; }
.segmented-actions form { margin: 0; }
.segmented-actions button { min-width: 40px; height: 36px; border: 0; border-right: 1px solid #8f9aa8; background: #fff; color: #506176; cursor: pointer; font-weight: 800; }
.segmented-actions form:last-child button { border-right: 0; color: #dc3545; }
.segmented-actions form:first-child button { color: #047857; }
.segmented-actions button:hover { background: #f4f6f9; }
.pending-row-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pending-row-actions form { margin: 0; }
.pending-action { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; font-size: 17px; }
.pending-action.edit-action { border-color: #60a5fa; background: #dbeafe; color: #1d4ed8; box-shadow: 0 8px 18px rgba(37, 99, 235, .16); }
.pending-action.edit-action:hover { border-color: #2563eb; background: #2563eb; color: #fff; }
.pending-action.validate-action { border-color: #22c55e; background: #bbf7d0; color: #047857; box-shadow: 0 8px 18px rgba(22, 163, 74, .16); }
.pending-action.validate-action:hover { border-color: #16a34a; background: #16a34a; color: #fff; }
.pending-action.reject-action { border-color: #f87171; background: #fee2e2; color: #dc2626; box-shadow: 0 8px 18px rgba(220, 38, 38, .16); }
.pending-action.reject-action:hover { border-color: #dc2626; background: #dc2626; color: #fff; }
.pending-action:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.3); }
.pending-action-done { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 999px; background: #e2e8f0; color: #334155; font-weight: 800; }
.pending-edit-modal { width: min(720px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.pending-edit-modal .compact-title-row { margin: 0; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; }
.pending-edit-modal form { padding-bottom: 18px; }
.pending-edit-grid { padding: 18px; }
.pending-edit-modal .modal-actions { padding: 0 18px; }
.project-board-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px; border-top: 1px solid #ced4da; color: #5f6b7a; }
.project-pagination { display: inline-flex; }
.project-pagination button { min-height: 36px; padding: 0 12px; border: 1px solid #dee2e6; background: #fff; color: #506176; cursor: pointer; }
.project-pagination button.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }

.directory-board { border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .05); overflow: hidden; }
.directory-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 74px; padding: 18px 22px; border-bottom: 1px solid #edf1f6; }
.directory-header h2 { margin: 0; color: #172033; font-size: 18px; line-height: 1.2; }
.directory-header p { margin: 4px 0 0; color: #708096; font-size: 13px; }
.directory-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.directory-actions form { margin: 0; }
.external-sync-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.external-sync-events { display: grid; gap: 5px; min-width: min(360px, 100%); }
.external-sync-events span { color: #52627a; font-size: 12px; font-weight: 800; }
.external-sync-events small { max-width: 360px; color: #7a8799; font-size: 11px; line-height: 1.35; }
.external-sync-events select { min-width: min(360px, 100%); min-height: 42px; padding: 8px 10px; border: 1px solid #d9e1ec; border-radius: 8px; background: #fff; color: #243149; font-size: 12px; font-weight: 700; }
.pending-import-header {
    align-items: stretch;
    padding: 24px 26px;
    background:
        radial-gradient(circle at 98% 0, rgba(59, 130, 246, .14), transparent 26%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}
.pending-import-copy { display: grid; align-content: center; gap: 8px; max-width: 520px; }
.pending-import-copy h2 { font-size: clamp(20px, 2vw, 26px); }
.pending-import-copy p { max-width: 520px; font-size: 15px; line-height: 1.45; }
.pending-import-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 850;
}
.pending-import-actions {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) repeat(2, auto);
    align-items: end;
    gap: 12px;
    min-width: min(760px, 100%);
}
.pending-import-actions .external-sync-form {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    align-items: end;
    gap: 12px;
}
.pending-event-picker {
    gap: 8px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 12px 28px rgba(37, 99, 235, .08);
}
.pending-event-picker span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e3a8a;
    font-size: 13px;
}
.pending-event-picker span::before {
    content: "\F3E2";
    font-family: "bootstrap-icons";
    color: #2563eb;
}
.pending-event-picker select {
    min-width: 0;
    min-height: 118px;
    border-color: #cbdaf0;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    line-height: 1.6;
}
.pending-event-picker option { padding: 4px 6px; border-radius: 6px; }
.pending-event-picker option:checked { background: #dcfce7; color: #047857; }
.pending-event-table {
    display: grid;
    max-height: 232px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.pending-event-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
    cursor: pointer;
}
.pending-event-row:last-child { border-bottom: 0; }
.pending-event-row:hover { background: #f0fdf4; }
.pending-event-row input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: #059669;
}
.pending-event-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.pending-event-main strong {
    overflow: hidden;
    color: #111827;
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pending-event-main small {
    color: #64748b;
    font-size: 11px;
}
.pending-event-status {
    justify-self: end;
    box-shadow: none;
}
.pending-event-status.open {
    border-color: #86efac;
    background: #dcfce7;
    color: #047857;
}
.pending-event-status.closed {
    border-color: #fecaca;
    background: #fee2e2;
    color: #b91c1c;
}
.pending-event-status.neutral {
    border-color: #bae6fd;
    background: #e0f2fe;
    color: #0369a1;
}
.directory-filterbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-bottom: 1px solid #edf1f6; background: #fbfcfe; }
.directory-filterbar select { width: 180px; min-height: 38px; border-radius: 7px; color: #52627a; }
.directory-search { width: min(360px, 100%); }
.directory-table-wrap { overflow-x: auto; }
.directory-table { width: 100%; min-width: 1320px; table-layout: auto; border-collapse: collapse; background: #fff; color: #243149; font-size: 14px; }
.directory-table th { height: 42px; padding: 10px 22px; border-bottom: 1px solid #e8edf4; background: #f8fafc; color: #66748a; font-size: 12px; font-weight: 900; letter-spacing: .03em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.directory-table td { height: 58px; padding: 10px 22px; border-bottom: 1px solid #eef2f7; vertical-align: middle; white-space: nowrap; }
.directory-table tr:hover td { background: #fcfdff; }
.directory-table input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; padding: 0; }
.directory-person { display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 320px; }
.directory-person > span:last-child { min-width: 0; }
.directory-person strong { display: block; overflow: hidden; color: #111827; font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.directory-person small { display: block; overflow: hidden; margin-top: 3px; color: #8a96aa; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.directory-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 999px; background: #3b82f6; color: #fff; font-size: 12px; font-weight: 900; }
.directory-row-actions { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.directory-row-actions form { margin: 0; }
.directory-table th:nth-child(1), .directory-table td:nth-child(1) { width: 48px; }
.directory-table th:nth-child(2), .directory-table td:nth-child(2) { width: 320px; }
.directory-table th:nth-child(9), .directory-table td:nth-child(9) { width: 150px; }
.directory-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 22px; color: #6b7890; font-size: 13px; background: #fff; }
.directory-pagination { display: inline-flex; align-items: center; gap: 6px; }
.directory-pagination button { min-width: 34px; min-height: 34px; border: 1px solid #dde5ef; border-radius: 7px; background: #fff; color: #52627a; cursor: pointer; }
.directory-pagination button.active { border-color: #3b82f6; background: #3b82f6; color: #fff; }
.directory-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.directory-pagination .page-link { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; padding: 0 10px; border: 1px solid #dde5ef; border-radius: 7px; background: #fff; color: #52627a; font-size: 13px; font-weight: 800; text-decoration: none; }
.directory-pagination .page-link.active { border-color: #2563eb; background: #2563eb; color: #fff; }
.directory-pagination .page-link.disabled { pointer-events: none; opacity: .45; }
.pending-board-compact .directory-table { min-width: 1160px; font-size: 12.5px; }
.pending-board-compact .directory-table th { height: 38px; padding: 8px 16px; font-size: 11px; }
.pending-board-compact .directory-table td { height: 48px; padding: 8px 16px; font-size: 12.5px; }
.pending-board-compact .directory-person { min-width: 220px; max-width: 280px; gap: 10px; }
.pending-board-compact .directory-person strong { font-size: 12.5px; }
.pending-board-compact .directory-person small { font-size: 11px; }
.pending-board-compact .directory-avatar { flex-basis: 28px; width: 28px; height: 28px; font-size: 10px; }
.pending-board-compact .badge { padding: 6px 10px; font-size: 11px; }
.pending-board-compact .pending-action { width: 34px; min-width: 34px; height: 34px; min-height: 34px; border-radius: 8px; font-size: 15px; }
.pending-board-compact .directory-row-actions { gap: 6px; }
.pending-board-compact .directory-table th:nth-child(1), .pending-board-compact .directory-table td:nth-child(1) { width: 42px; }
.pending-board-compact .directory-table th:nth-child(2), .pending-board-compact .directory-table td:nth-child(2) { width: 280px; }
.pending-board-compact .directory-table th:nth-child(9), .pending-board-compact .directory-table td:nth-child(9) { width: 132px; }
.dictionary-options-field { display: grid; gap: 8px; margin-top: 18px; }
.dictionary-options-field textarea { width: 100%; min-height: 280px; resize: vertical; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; line-height: 1.45; }
.batch-scan-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--panel) 88%, #ecfdf5); }
.batch-scan-panel summary { cursor: pointer; font-weight: 800; color: var(--brand-dark); }
.batch-scan-form { display: grid; gap: 12px; margin-top: 14px; }
.batch-scan-form textarea { resize: vertical; min-height: 92px; }
.batch-scan-form small { color: var(--muted); line-height: 1.45; }
.batch-qr-reader { min-height: min(58vh, 360px); margin: 4px 0; border-color: #059669; box-shadow: 0 0 0 5px rgba(5, 150, 105, .14); }
.batch-qr-reader::after { border-color: rgba(16, 185, 129, .95); }
.batch-scan-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.batch-scan-actions .btn { flex: 1 1 210px; }
.batch-scan-meter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 14px; border: 1px solid #bfdbfe; border-radius: 14px; background: #eff6ff; color: #1e3a8a; box-shadow: 0 10px 24px rgba(37, 99, 235, .08); }
.batch-scan-meter span { display: inline-flex; align-items: center; gap: 8px; font-weight: 850; }
.batch-scan-meter strong { display: inline-flex; align-items: baseline; gap: 2px; color: #0f172a; font-size: 28px; line-height: 1; }
.batch-scan-meter strong b { font: inherit; }
.batch-scan-meter small { flex: 1 0 100%; color: #475569; font-weight: 650; }
.batch-scan-meter[data-tone="success"] { border-color: #86efac; background: #dcfce7; color: #047857; }
.batch-scan-meter[data-tone="warning"] { border-color: #fbbf24; background: #fef3c7; color: #92400e; }
.batch-scan-meter[data-tone="danger"] { border-color: #fb7185; background: #fee2e2; color: #be123c; }
.responsible-modal-summary { display: grid; gap: 8px; margin: 16px 18px; padding: 14px; border: 1px solid #dbeafe; border-radius: 14px; background: #eff6ff; }
.responsible-modal-summary > strong { color: #0f172a; font-size: 20px; }
.responsible-modal-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.responsible-modal-counts span { padding: 10px 12px; border-radius: 12px; background: #fff; color: #475569; font-weight: 750; }
.responsible-modal-counts b { color: #047857; font-size: 26px; }
.responsible-member-list { display: grid; gap: 8px; margin: 0 18px 18px; max-height: 260px; overflow: auto; }
.responsible-member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.responsible-member-row span { display: grid; gap: 3px; }
.responsible-member-row small { color: #64748b; }
.batch-scan-feedback { display: block; padding: 10px 12px; border-radius: 10px; background: #f8fafc; }
.batch-scan-feedback[data-tone="success"] { background: #dcfce7; color: #047857; }
.batch-scan-feedback[data-tone="warning"] { background: #fef3c7; color: #b45309; }
.batch-scan-feedback[data-tone="danger"] { background: #fee2e2; color: #be123c; }
.project-pagination button:disabled { color: #adb5bd; cursor: default; }
.tabulator-panel { border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; box-shadow: 0 12px 32px rgba(15, 23, 42, .08); overflow: hidden; }
.advanced-table-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 20px 12px; }
.advanced-table-title { display: flex; align-items: flex-start; gap: 14px; }
.advanced-table-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #eef4ff; color: #2563eb; font-size: 20px; }
.advanced-table-title h2 { margin: 0; color: #0f172a; font-size: 24px; font-weight: 700; }
.advanced-table-title p { margin: 8px 0 0; color: #64748b; font-size: 15px; }
.advanced-table-search { display: flex; align-items: center; gap: 8px; min-width: min(330px, 100%); min-height: 40px; padding: 0 12px; border: 1px solid #d8e1ee; border-radius: 8px; background: #fff; color: #64748b; }
.advanced-table-search input { width: 100%; min-height: 36px; padding: 0; border: 0; background: transparent; color: #0f172a; outline: 0; }
.tabulator-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 20px 18px; border-bottom: 1px solid #dbe3ee; }
.tabulator-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 12px; border: 1px solid #d8e1ee; border-radius: 8px; background: #fff; color: #334155; font-size: 14px; font-weight: 700; cursor: pointer; transition: .16s ease; }
.tabulator-btn:hover { transform: translateY(-1px); border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.tabulator-btn i { color: currentColor; font-size: 15px; }
.tabulator-btn.compact { min-height: 36px; padding: 0 12px; font-size: 13px; }
.tabulator-btn.success-action { border-color: #bbf7d0; background: #ecfdf5; color: #047857; }
.tabulator-btn.success-action:hover { background: #d1fae5; color: #065f46; }
.tabulator-btn.qr-action { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.tabulator-btn.import-action { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.tabulator-btn.print-action { border-color: #e2e8f0; background: #f8fafc; color: #475569; }
.tabulator-table-wrap { overflow-x: auto; }
.tabulator-table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 15px; background: #fff; }
.tabulator-table th { position: relative; padding: 14px 20px; border-bottom: 1px solid #dbe3ee; color: #64748b; background: #fff; text-align: left; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.tabulator-table .col-index { width: 64px; text-align: center; }
.sort-caret { position: absolute; right: 14px; top: 50%; width: 0; height: 0; margin-top: -3px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 5px solid #cbd5e1; }
.tabulator-table td { padding: 20px; border-bottom: 1px solid #dbe3ee; color: #0f172a; font-size: 15px; vertical-align: middle; }
.tabulator-table tbody tr { background: #fff; }
.tabulator-table tbody tr:hover { background: #f8fafc; }
.tabulator-table tbody tr:nth-child(even) { background: #fff; }
.tabulator-table tbody tr:nth-child(even):hover { background: #f8fafc; }
.tabulator-table td strong { color: #0f172a; font-weight: 800; }
.participant-cell { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.participant-avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, #dcfce7, #dbeafe); color: #047857; font-weight: 900; }
.tabulator-table .badge { border-radius: 9px; padding: 7px 11px; font-size: 13px; font-weight: 800; }
.tabulator-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid #d5d9de; background: #e5e5e5; }
.tabulator-powered { color: #5f6b7a; font-size: 14px; }
.tabulator-powered a { color: #0d6efd; text-decoration: underline; }
.tabulator-pager { display: flex; align-items: center; gap: 2px; }
.tabulator-page-summary { min-width: 84px; padding: 0 8px; color: #5f6b7a; font-size: 14px; text-align: center; }
.tabulator-pager label { display: flex; align-items: center; gap: 8px; color: #111827; font-size: 16px; }
.tabulator-pager select { width: 64px; min-height: 36px; border-radius: 4px; }
.tabulator-pager button { min-height: 40px; padding: 0 14px; border: 1px solid #dee2e6; background: #fff; color: #111827; cursor: pointer; }
.tabulator-pager button.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.tabulator-pager button:disabled { color: #adb5bd; cursor: default; }
.participants-print-table { display: none; }
.participant-modal { width: min(620px, calc(100vw - 28px)); padding: 0; }
.participant-modal .compact-title-row { margin: 0; padding: 16px 18px; border-bottom-color: #dee2e6; }
.participant-modal h2 { margin: 0; font-size: 22px; }
.participant-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.participant-detail-grid div { min-height: 74px; padding: 12px; border: 1px solid #e1e6ed; border-radius: 6px; background: #f8fafc; }
.participant-detail-grid small { display: block; margin-bottom: 6px; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.participant-detail-grid strong { display: block; overflow-wrap: anywhere; color: #111827; font-size: 15px; }
.participant-modal .modal-actions { padding: 0 18px 18px; }
.qr-content-panel { max-width: 820px; margin: 0 auto; }
.qr-content-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 18px; border-bottom: 1px solid #e2e8f0; }
.qr-content-head h2 { margin: 0; color: #0f172a; font-size: 28px; }
.qr-content-head p { margin: 6px 0 0; color: #64748b; }
.qr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.qr-toolbar p { margin: 6px 0 0; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.qr-card { display: grid; justify-items: center; gap: 10px; min-height: 330px; padding: 18px; border: 1px solid #d8dde4; border-radius: 8px; background: #fff; text-align: center; box-shadow: 0 6px 18px rgba(15, 23, 42, .08); break-inside: avoid; }
.qr-brand { display: flex; align-items: center; gap: 8px; color: #0f172a; font-size: 12px; font-weight: 800; }
.qr-brand img { width: 48px; height: 32px; object-fit: contain; }
.qr-card canvas { width: 170px; height: 170px; }
.qr-card strong { color: #111827; font-size: 16px; }
.qr-code { padding: 6px 12px; border-radius: 999px; background: #ecfdf5; color: #047857; font-weight: 900; letter-spacing: .08em; }
.qr-session-sheet { align-items: start; }
.qr-session-card { position: relative; min-height: 620px; padding: 26px; overflow: hidden; border: 1px solid #d7e4d0; border-radius: 18px; background: #fff; color: #0f172a; box-shadow: 0 18px 42px rgba(15, 23, 42, .14); }
.qr-session-card::before { content: ""; position: absolute; inset: 0; background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(244, 139, 64, .52) 10px 14px, transparent 14px 24px),
    repeating-linear-gradient(-45deg, transparent 0 10px, rgba(244, 139, 64, .32) 10px 14px, transparent 14px 24px);
    clip-path: polygon(0 0, 30% 0, 8% 100%, 0 100%);
    opacity: .85;
    pointer-events: none;
}
.qr-session-card::after { content: ""; position: absolute; inset: 0; background:
    linear-gradient(135deg, transparent 0 14%, #111827 14% 19%, #f28c13 19% 24%, #ffffff 24% 27%, #111827 27% 32%, #f28c13 32% 37%, transparent 37%) top right / 70% 16px no-repeat,
    linear-gradient(135deg, transparent 0 52%, #111827 52% 57%, #f28c13 57% 62%, #ffffff 62% 65%, #111827 65% 70%, #f28c13 70% 75%, transparent 75%) bottom right / 72% 16px no-repeat,
    linear-gradient(90deg, #f28c13, #f4a13b) bottom left / 100% 5px no-repeat;
    pointer-events: none;
}
.qr-session-card > * { position: relative; z-index: 1; }
.qr-card-header { display: flex; align-items: center; gap: 12px; justify-self: stretch; color: #fff; }
.qr-card-header img { width: 74px; height: 46px; object-fit: contain; padding: 5px; border-radius: 8px; background: rgba(255, 255, 255, .92); }
.qr-card-header strong { display: block; color: #0f172a; font-size: 18px; text-align: left; }
.qr-card-header span { display: block; margin-top: 3px; color: #64748b; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: left; }
.qr-card-title { margin-top: 8px; text-align: center; }
.qr-card-title h2 { margin: 0 0 8px; color: #0f172a; font-size: 26px; line-height: 1.1; }
.qr-card-title span { display: inline-flex; min-height: 38px; align-items: center; padding: 0 18px; border-radius: 999px; background: rgba(236, 253, 245, .96); color: #047857; font-size: 18px; font-weight: 900; letter-spacing: .08em; }
.qr-image-box { display: grid; place-items: center; width: min(100%, 330px); aspect-ratio: 1; margin: 14px 0 8px; padding: 26px; border-radius: 34px; background: #fff; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06); }
.qr-image-box canvas, .qr-image-box .qr-image { width: 280px; height: 280px; image-rendering: pixelated; object-fit: contain; }
.qr-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 340px); }
.qr-card-actions .btn { justify-content: center; min-height: 50px; border-color: #dbe3ee; background: rgba(255, 255, 255, .88); color: #334155; backdrop-filter: blur(8px); }
.qr-card-actions .btn:hover { background: #f8fafc; color: #0f766e; }
.qr-card-footer { display: flex; align-items: end; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; padding-top: 22px; border-top: 1px solid #e2e8f0; color: #0f172a; font-size: 13px; text-align: left; }
.qr-card-footer span { color: #475569; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.qr-card-footer strong { color: #0f172a; font-size: 14px; }
.kanban-help { margin: -8px 0 24px; color: #5f6b7a; font-size: 16px; }
.kanban-actions { display: flex; align-items: center; gap: 8px; }
.kanban-actions select { width: auto; min-width: 120px; min-height: 40px; border-radius: 4px; }
.service-kanban { display: grid; grid-template-columns: repeat(4, minmax(280px, 1fr)); gap: 28px; align-items: start; overflow-x: auto; padding-bottom: 18px; }
.kanban-lane { min-width: 280px; }
.kanban-lane-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 0 4px; }
.lane-count { display: inline-grid; place-items: center; min-width: 23px; height: 22px; padding: 0 7px; border-radius: 8px; background: #64748b; color: #fff; font-size: 13px; font-weight: 800; }
.kanban-lane:nth-child(2) .lane-count { background: #0d6efd; }
.kanban-lane:nth-child(3) .lane-count { background: #ffc107; color: #111; }
.kanban-lane:nth-child(4) .lane-count { background: #059669; }
.kanban-lane-header h2 { margin: 0; color: #111827; font-size: 18px; font-weight: 500; }
.lane-menu { margin-left: auto; border: 0; background: transparent; color: #64748b; font-size: 18px; cursor: pointer; }
.lane-menu-wrap { position: relative; margin-left: auto; }
.lane-dropdown { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; display: none; min-width: 170px; border: 1px solid #d8dde4; border-radius: 6px; background: #fff; box-shadow: 0 10px 20px rgba(15,23,42,.12); overflow: hidden; }
.lane-dropdown.open { display: grid; }
.lane-dropdown button, .lane-dropdown a { display: block; width: 100%; padding: 10px 12px; border: 0; background: #fff; color: #111827; text-align: left; font-size: 14px; cursor: pointer; }
.lane-dropdown button:hover, .lane-dropdown a:hover { background: #f4f6f9; color: #0d6efd; }
.kanban-cards { display: grid; gap: 10px; }
.kanban-card { min-height: 132px; padding: 16px; border: 1px solid #d8dde4; border-radius: 7px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.kanban-card h3 { margin: 12px 0 8px; color: #111827; font-size: 16px; line-height: 1.45; }
.kanban-card p { margin: 0 0 12px; color: #5f6b7a; line-height: 1.55; }
.task-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 7px; color: #fff; font-size: 14px; font-weight: 800; }
.task-tag.feature { background: #0d6efd; }
.task-tag.tech { background: #64748b; }
.kanban-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #64748b; font-size: 13px; }
.kanban-card .progress.sm { margin: 6px 0 14px; }
.kanban-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kanban-card footer form { margin: 0; }
.badge-button { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 750; border: 1px solid transparent; cursor: pointer; }
.badge-button.success { color: #047857; background: #d1fae5; border-color: #a7f3d0; }
.badge-button.neutral { color: var(--muted); background: color-mix(in srgb, var(--text) 6%, transparent); border-color: var(--line); }
.avatar-pill { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: #e9ecef; color: #64748b; font-size: 12px; font-weight: 800; }
.add-card { min-height: 48px; border: 1px dashed #d8dde4; border-radius: 7px; background: transparent; color: #5f6b7a; font-size: 16px; cursor: pointer; }
.add-card:hover { border-color: #0d6efd; color: #0d6efd; background: #f8fbff; }
.admin-bars { height: 260px; }
.admin-bars, .bars { max-width: 100%; min-width: 0; }
.settings-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.settings-help { position: sticky; top: 74px; }
.settings-help h2 { margin-top: 0; }
.settings-list { display: grid; gap: 14px; }
.settings-user-card { display: grid; gap: 14px; padding: 16px; border: 1px solid #d8dde4; border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.settings-user-summary { cursor: pointer; transition: .18s ease; }
.settings-user-summary:hover, .settings-user-summary:focus { transform: translateY(-2px); border-color: #38bdf8; box-shadow: 0 14px 30px rgba(15, 23, 42, .12); outline: 0; }
.settings-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; color: #475569; font-size: 13px; }
.settings-summary-grid span { min-height: 42px; padding: 10px; border-radius: 8px; background: #f8fafc; }
.settings-summary-grid strong { display: inline; font-size: 18px; color: #0f172a; }
.settings-user-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #e5e7eb; }
.settings-user-head strong { display: block; font-size: 16px; }
.user-permission-card { align-content: start; }
.users-summary-grid .user-permission-card { min-height: 178px; }
.user-summary-card { cursor: pointer; transition: .18s ease; }
.user-summary-card:hover, .user-summary-card:focus { transform: translateY(-2px); border-color: #38bdf8; box-shadow: 0 14px 30px rgba(15, 23, 42, .12); outline: 0; }
.user-summary-card > .btn { justify-self: start; margin-top: auto; }
.user-summary-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; border-radius: 8px; background: #f8fafc; color: #475569; }
.user-summary-meta span { font-size: 13px; font-weight: 750; }
.user-summary-meta strong { color: #0f172a; font-size: 18px; }
.help-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 24px; }
.help-hero h2 { margin: 8px 0 6px; color: #0f172a; font-size: 26px; }
.help-hero p { margin: 0; color: #64748b; }
.help-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #e0f2fe; color: #0369a1; font-size: 26px; }
.help-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.help-card { display: grid; gap: 10px; align-content: start; min-height: 190px; padding: 18px; }
.help-card > i { color: #0d6efd; font-size: 30px; }
.help-card h3 { margin: 0; color: #0f172a; font-size: 17px; }
.help-card p { margin: 0; color: #475569; line-height: 1.55; }
.documentation-panel { padding: 0; overflow: hidden; }
.documentation-list { display: grid; gap: 10px; padding: 18px; }
.documentation-list details { border: 1px solid #d8dde4; border-radius: 8px; background: #fff; }
.documentation-list summary { padding: 14px 16px; color: #0f172a; font-weight: 900; cursor: pointer; }
.documentation-list p { margin: 0; padding: 0 16px 16px; color: #475569; line-height: 1.55; }
.guided-tour-modal { width: min(640px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.guided-tour-body { display: grid; justify-items: center; gap: 12px; padding: 28px; text-align: center; }
.guided-tour-body i { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: #dcfce7; color: #008f55; font-size: 38px; }
.guided-tour-body h3 { margin: 0; color: #0f172a; font-size: 26px; }
.guided-tour-body p { max-width: 480px; margin: 0; color: #475569; line-height: 1.6; }
.guided-tour-actions { padding: 0 18px 18px; }
.user-management-modal { width: min(760px, calc(100vw - 24px)); max-height: 88vh; padding: 0; overflow: hidden; }
.user-management-modal .compact-title-row { margin: 0; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; }
.user-modal-body { display: grid; gap: 14px; max-height: calc(88vh - 72px); padding: 18px; overflow: auto; }
.user-modal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-modal-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.user-modal-actions form { margin: 0; }
.password-admin-form { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid #e1e6ed; border-radius: 6px; background: #f8fafc; }
.password-admin-form label { color: #334155; }
.user-rights-block { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.user-rights-block h3 { margin: 0; color: #475569; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.compact-chips { margin-top: 0; gap: 6px; }
.compact-chips .badge { font-size: 11px; padding: 4px 7px; }
.permission-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.permission-columns fieldset { display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid #e1e6ed; border-radius: 6px; }
.permission-columns legend { padding: 0 6px; color: #334155; font-weight: 800; }
.access-modal { width: min(980px, calc(100vw - 24px)); max-height: min(86vh, 860px); padding: 0; overflow: auto; }
.access-modal form { display: grid; gap: 16px; padding: 18px; }
.access-modal .compact-title-row { margin: -18px -18px 0; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; }
.access-modal .modal-actions { position: sticky; bottom: -18px; margin: 0 -18px -18px; padding: 14px 18px; border-top: 1px solid #e2e8f0; background: #fff; }
.switch-line { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; min-height: 30px; color: #334155; font-size: 13px; font-weight: 600; }
.switch-line input { width: 17px; min-height: 17px; margin: 0; accent-color: #0d6efd; }
.settings-actions { display: flex; justify-content: flex-end; }
.audit-panel { margin-top: 18px; border: 1px solid #ced4da; border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); overflow: hidden; }
.audit-summary-panel { padding: 18px; }
.audit-summary-panel .project-board-header { padding: 0; border: 0; }
.audit-summary-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.operator-stats-panel { margin-top: 22px; border: 1.5px solid #111827; border-radius: 28px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .08); overflow: hidden; }
.operator-stats-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 30px; border-bottom: 1px solid #d8dde4; }
.operator-stats-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.operator-stats-title h2 { margin: 0 0 4px; color: #0f172a; font-size: 20px; font-weight: 900; }
.operator-stats-title p { margin: 0; color: #5b6f91; line-height: 1.4; }
.operator-stats-icon { display: inline-grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; background: #eef2ff; color: #4f46e5; font-size: 20px; }
.operator-export-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.operator-stats-table { min-width: 980px; }
.operator-stats-table td strong { font-size: 16px; }
.rank-summary-panel { margin-top: 22px; }
.rank-modal { width: min(1180px, calc(100vw - 24px)); max-height: 88vh; padding: 0; overflow: hidden; }
.rank-modal .compact-title-row { margin: 0; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; }
.rank-create-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; padding: 18px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.rank-modal .project-table-wrap { max-height: calc(88vh - 170px); overflow: auto; }
.rank-table input { min-height: 42px; }
.rank-table .small-number { width: 96px; text-align: center; font-weight: 800; }
.evaluation-report-panel, .event-settings-panel { margin-bottom: 22px; }
.evaluation-report-grid, .event-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.evaluation-report-card, .event-card { display: grid; gap: 12px; align-content: start; min-height: 160px; padding: 16px; border: 1px solid #d8dde4; border-radius: 8px; background: #f8fafc; }
.evaluation-report-card h3 { margin: 0; color: #0f172a; font-size: 16px; }
.rating-report-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #e2e8f0; }
.rating-report-line:first-of-type { border-top: 0; }
.rating-report-line strong, .event-card strong { display: block; color: #0f172a; }
.rating-score-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.rating-score-grid span { padding: 10px; border-radius: 8px; background: #f8fafc; color: #475569; font-size: 12px; font-weight: 700; }
.rating-score-grid strong { display: block; color: #0f172a; font-size: 16px; }
.evaluation-card { min-height: 230px; }
.evaluation-modal { width: min(860px, calc(100vw - 24px)); max-height: 88vh; padding: 0; overflow: hidden; }
.evaluation-modal .compact-title-row, .event-modal .compact-title-row { margin: 0; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; }
.evaluation-modal form { max-height: 88vh; overflow: auto; }
.evaluation-form-grid, .event-form-grid { padding: 18px; }
.evaluation-modal .modal-actions, .event-modal .modal-actions { position: sticky; bottom: 0; padding: 14px 18px; border-top: 1px solid #e2e8f0; background: #fff; }
.event-modal { width: min(620px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.event-card form { margin: 0; }
.odk-settings-panel { padding: 18px; }
.odk-settings-panel .project-board-header { padding: 0; border: 0; }
.odk-url-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.odk-url-grid input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; background: #f8fafc; }
.quota-summary-panel { padding: 18px; }
.quota-summary-panel .project-board-header { padding: 0; border: 0; }
.quota-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.quota-summary-grid span { min-height: 72px; padding: 14px; border: 1px solid #d8dde4; border-radius: 8px; background: #f8fafc; color: #475569; font-weight: 750; }
.quota-summary-grid strong { display: block; color: #0f172a; font-size: 26px; line-height: 1; }
.settings-mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 18px;
    margin: 18px auto 0;
}
.settings-mini-stat-grid.three {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
}
.settings-mini-stat-card {
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: #e6fbff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .06);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
}
.settings-mini-stat-card.violet { background: #fde7ff; }
.settings-mini-stat-card.amber { background: #fff3d8; }
.settings-mini-stat-card i {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #35aee2;
    color: #fff;
    font-size: 26px;
    box-shadow: 0 12px 24px rgba(53, 174, 226, .22);
}
.settings-mini-stat-card.violet i {
    background: #bd27dd;
    box-shadow: 0 12px 24px rgba(189, 39, 221, .18);
}
.settings-mini-stat-card.amber i {
    background: #f59e0b;
    box-shadow: 0 12px 24px rgba(245, 158, 11, .2);
}
.settings-mini-stat-card span {
    color: #0f172a;
    font-size: 18px;
    font-weight: 650;
}
.settings-mini-stat-card strong {
    color: #1f2937;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
}
.audit-modal { width: min(1180px, calc(100vw - 24px)); max-height: 88vh; padding: 0; overflow: hidden; }
.audit-modal .compact-title-row, .quota-modal .compact-title-row { margin: 0; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; }
.audit-modal-toolbar { display: flex; justify-content: flex-end; padding: 12px 18px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.audit-modal .project-table-wrap { max-height: calc(88vh - 132px); overflow: auto; }
.quota-modal { width: min(1180px, calc(100vw - 24px)); max-height: 88vh; padding: 0; overflow: hidden; }
.quota-modal form { display: grid; max-height: 88vh; }
.quota-modal .project-table-wrap { max-height: calc(88vh - 132px); overflow: auto; }
.quota-modal .settings-actions { position: sticky; bottom: 0; padding: 14px 18px; border-top: 1px solid #e2e8f0; background: #fff; }
.quota-settings-panel { margin-top: 22px; }
.quota-table input[type="checkbox"] { width: 18px; height: 18px; }
.quota-input { width: 120px; min-height: 38px; border-radius: 7px; text-align: right; font-weight: 800; }
.quota-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.service-label-input { width: min(320px, 100%); min-height: 38px; border-radius: 7px; font-weight: 800; }
.time-input-pair { display: flex; gap: 8px; flex-wrap: wrap; }
.time-input-pair input { width: 118px; min-height: 38px; border-radius: 7px; }
.mini-switch { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: #475569; font-size: 13px; font-weight: 800; }
.mini-switch input { width: 16px; height: 16px; }
.canteen-access-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font-weight: 900; box-shadow: 0 8px 18px rgba(15, 23, 42, .08); }
.canteen-access-badge.allowed { color: #047857; background: #bbf7d0; border: 1px solid #34d399; }
.canteen-access-badge.blocked { color: #be123c; background: #ffe4e6; border: 1px solid #fb7185; }

.participants-table-header { justify-content: flex-end; min-height: 66px; padding: 14px 20px; border-bottom: 1px solid #e6ebf2; }
.participants-table-header .advanced-table-search { width: min(250px, 100%); min-width: 0; background: #f6f8fb; }
.participants-table-header .advanced-table-search input { color: #475569; }
.tabulator-table { min-width: 1220px; }
.tabulator-table th { padding: 12px 20px; background: #f8fafc; color: #7a879c; font-size: 12px; }
.tabulator-table td { padding: 11px 20px; color: #41506a; font-size: 14px; }
.tabulator-table tbody tr { height: 48px; }
.tabulator-table tbody tr:hover { background: #fbfdff; }
.table-card tbody tr.row-selected,
.advanced-table tbody tr.row-selected,
.tabulator-table tbody tr.row-selected,
.project-table tbody tr.row-selected,
.directory-table tbody tr.row-selected {
    background: #dcfce7 !important;
    box-shadow: inset 5px 0 0 #16a34a;
}
.table-card tbody tr.row-selected > td,
.advanced-table tbody tr.row-selected > td,
.tabulator-table tbody tr.row-selected > td,
.project-table tbody tr.row-selected > td,
.directory-table tbody tr.row-selected > td {
    background: #dcfce7 !important;
}
.table-card tbody tr.row-selected:hover > td,
.advanced-table tbody tr.row-selected:hover > td,
.tabulator-table tbody tr.row-selected:hover > td,
.project-table tbody tr.row-selected:hover > td,
.directory-table tbody tr.row-selected:hover > td {
    background: #bbf7d0 !important;
}
.table-card tbody tr.row-selected input[type="checkbox"],
.advanced-table tbody tr.row-selected input[type="checkbox"],
.tabulator-table tbody tr.row-selected input[type="checkbox"],
.project-table tbody tr.row-selected input[type="checkbox"],
.directory-table tbody tr.row-selected input[type="checkbox"] {
    accent-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .20);
}
.participant-cell { gap: 10px; color: #0f172a; font-weight: 700; }
.participant-avatar { width: 28px; height: 28px; border-radius: 999px; background: #14b8a6; color: #fff; font-size: 11px; }
.tabulator-table .badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; box-shadow: none; }
.canteen-access-badge { padding: 5px 10px; gap: 6px; font-size: 13px; box-shadow: none; }
.participant-actions, .tabulator-table td:last-child { white-space: nowrap; }
.icon-only-action { display: inline-grid; place-items: center; width: 34px; height: 34px; margin: 0 3px 0 0; border: 1px solid #d8e1ee; border-radius: 8px; background: #fff; color: #64748b; cursor: pointer; transition: .16s ease; }
.icon-only-action i { font-size: 16px; line-height: 1; }
.icon-only-action:hover { transform: translateY(-1px); background: #f8fafc; }
.icon-only-action.success-action { color: #047857; border-color: #bbf7d0; background: #ecfdf5; }
.icon-only-action.success-action:hover { background: #d1fae5; }
.icon-only-action.danger-action { color: #dc2626; border-color: #fecaca; background: #fff1f2; }
.icon-only-action.danger-action:hover { background: #ffe4e6; }
.icon-only-action.view-action { color: #334155; border-color: #d8e1ee; background: #fff; }
.icon-only-action.view-action:hover { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.icon-only-action.batch-action { color: #7c2d12; border-color: #fed7aa; background: #fff7ed; }
.icon-only-action.batch-action:hover { color: #9a3412; border-color: #fdba74; background: #ffedd5; }
.icon-only-action.staff-action { color: #6d28d9; border-color: #ddd6fe; background: #f5f3ff; }
.icon-only-action.staff-action:hover { color: #5b21b6; border-color: #c4b5fd; background: #ede9fe; }
.staff-add-form { display: grid; gap: 8px; margin: 14px 0 18px; }
.inline-input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.staff-member-list { display: grid; gap: 10px; margin-top: 12px; }
.staff-member-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.staff-member-row small { display: block; color: var(--muted); margin-top: 2px; }
.responsible-staff-modal .modal-card { width: min(920px, calc(100vw - 28px)); }
.responsible-staff-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.responsible-staff-summary > div { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--brand) 6%, var(--panel)); }
.responsible-staff-summary small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.responsible-staff-summary strong { display: block; margin-top: 4px; font-size: 17px; word-break: break-word; }
.responsible-staff-member-list { display: grid; gap: 10px; margin-top: 14px; max-height: 320px; overflow: auto; }
.responsible-staff-row { grid-template-columns: 42px minmax(0, 1fr) auto auto; background: #fff; }
.responsible-staff-row-main { min-width: 0; }
.responsible-staff-row-main strong,
.responsible-staff-row-main small { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .responsible-staff-summary { grid-template-columns: 1fr; }
  .responsible-staff-row { grid-template-columns: 38px minmax(0, 1fr); }
  .responsible-staff-row .icon-only-action,
  .responsible-staff-row form { justify-self: start; }
  .responsible-staff-row form { grid-column: 2; }
  .inline-input-action { grid-template-columns: 1fr; }
}
.tabulator-footer { background: #fff; border-top: 1px solid #e6ebf2; }
.tabulator-pager button { min-height: 34px; border-radius: 7px; }
.tabulator-pager button.active { background: #14b8a6; border-color: #14b8a6; }
.phone-field { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; align-items: center; }
.phone-field select, .phone-field input { width: 100%; }
.phone-field select { min-height: 44px; border-radius: 8px; font-weight: 800; }
.hidden-info-panel { display: grid; gap: 10px; padding: 14px; border: 1px solid #dbe3ef; border-radius: 10px; background: #f8fafc; }
.hidden-info-panel > strong { color: #334155; font-size: 14px; }
.hidden-info-panel div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid #e2e8f0; color: #64748b; font-size: 13px; }
.hidden-info-panel b { color: #0f172a; font-size: 13px; text-align: right; }

.tv-screen { min-height: calc(100vh - 96px); display: grid; gap: 20px; color: #e8f3ff; }
.tv-hero { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; padding: 28px; border-radius: 18px; background: linear-gradient(135deg, #0f172a 0%, #0f766e 56%, #16a34a 100%); box-shadow: 0 20px 50px rgba(15, 23, 42, .22); }
.tv-hero span, .tv-hero p, .tv-active-service small { color: rgba(232, 243, 255, .78); }
.tv-hero h1 { margin: 6px 0; font-size: clamp(38px, 4vw, 72px); line-height: 1; letter-spacing: 0; }
.tv-hero p { margin: 0; font-size: 18px; }
.tv-active-service { display: grid; align-content: center; gap: 8px; padding: 22px; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.12); backdrop-filter: blur(12px); }
.tv-active-service strong { font-size: clamp(24px, 2.4vw, 42px); line-height: 1.05; }
.tv-active-service span { font-size: 18px; font-weight: 800; }
.tv-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tv-kpi-grid article { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 14px; padding: 22px; border: 1px solid #dbe5f2; border-radius: 16px; background: #fff; color: #0f172a; box-shadow: 0 12px 28px rgba(15, 23, 42, .08); }
.tv-kpi-grid i { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: #ecfdf5; color: #059669; font-size: 28px; }
.tv-kpi-grid span { display: block; color: #64748b; font-size: 16px; font-weight: 800; text-transform: uppercase; }
.tv-kpi-grid strong { display: block; color: #0f172a; font-size: clamp(34px, 3vw, 58px); line-height: .95; }
.tv-main-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); gap: 18px; align-items: stretch; }
.tv-panel { min-width: 0; padding: 22px; border: 1px solid #dbe5f2; border-radius: 16px; background: #fff; color: #0f172a; box-shadow: 0 12px 28px rgba(15, 23, 42, .08); }
.tv-wide { grid-row: span 2; }
.tv-panel header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.tv-panel h2 { margin: 0; font-size: clamp(22px, 2vw, 34px); }
.tv-panel header span { color: #64748b; font-weight: 800; }
.tv-bars { height: 420px; display: grid; grid-template-columns: repeat(10, minmax(42px, 1fr)); align-items: end; gap: 16px; padding: 26px 8px 4px; border-top: 1px dashed #dbe5f2; border-bottom: 1px solid #e2e8f0; }
.tv-bar-item { height: 100%; display: grid; grid-template-rows: 32px 1fr 28px; justify-items: center; align-items: end; gap: 8px; }
.tv-bar-item strong { color: #0f766e; font-size: 22px; }
.tv-bar-item span { width: 76%; min-height: 8px; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, #22c55e, #14b8a6); box-shadow: 0 10px 22px rgba(20, 184, 166, .25); }
.tv-bar-item small { color: #64748b; font-weight: 800; }
.tv-service-list, .tv-operator-list, .tv-recent-list { display: grid; gap: 14px; }
.tv-service-list div { display: grid; gap: 9px; }
.tv-service-list span, .tv-operator-list div, .tv-recent-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tv-service-list span strong, .tv-recent-list strong { font-size: 17px; }
.tv-service-list b, .tv-operator-list strong { color: #059669; font-size: 22px; }
.tv-service-list i { display: block; height: 10px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.tv-service-list em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14b8a6, #22c55e); }
.tv-operator-list div, .tv-recent-list div { padding: 12px 0; border-bottom: 1px solid #eef2f7; }
.tv-recent-list small { display: block; margin-top: 4px; color: #64748b; font-weight: 700; }

@media (max-width: 1200px) {
    .tv-hero, .tv-main-grid { grid-template-columns: 1fr; }
    .tv-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tv-wide { grid-row: auto; }
}

@media (max-width: 720px) {
    .tv-kpi-grid { grid-template-columns: 1fr; }
    .tv-bars { height: 300px; overflow-x: auto; }
    .tv-bar-item { min-width: 56px; }
    .phone-field { grid-template-columns: 1fr; }
    .responsible-mode-card { grid-template-columns: 1fr; min-height: 138px; }
    .responsible-mode-icon { width: 60px; height: 60px; }
    .staff-card-actions { grid-template-columns: 1fr; }
}
.preprinted-control-panel { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.preprinted-control-panel form { display: flex; align-items: end; gap: 10px; }
.preprinted-control-panel input { width: 130px; }
.preprinted-qr-sheet { grid-template-columns: repeat(3, 1fr); gap: 10mm; align-items: start; }
.preprinted-card { break-inside: avoid; page-break-inside: avoid; }
.preprinted-frame { min-height: 86mm; padding: 8mm; border: 1px solid #f59e0b; background: #fff; display: grid; grid-template-rows: auto 1fr auto auto; gap: 5mm; position: relative; overflow: hidden; }
.preprinted-frame::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(245, 158, 11, .18), rgba(255,255,255,.08)); pointer-events: none; }
.preprinted-brand, .preprinted-qr-box, .preprinted-empty-zone, .preprinted-frame footer { position: relative; z-index: 1; }
.preprinted-brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: #0f172a; }
.preprinted-brand img { width: 58px; height: 34px; object-fit: contain; background: #fff; border-radius: 6px; }
.preprinted-qr-box { display: grid; place-items: center; align-self: center; gap: 3mm; }
.preprinted-qr-box img { width: 42mm; height: 42mm; object-fit: contain; background: #fff; padding: 3mm; border-radius: 8px; }
.preprinted-code { display: inline-flex; align-items: center; justify-content: center; min-width: 34mm; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.9); color: #0f172a; font-size: 13px; letter-spacing: .06em; box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }
.preprinted-empty-zone { min-height: 12mm; border-bottom: 1px dashed #f59e0b; }
.preprinted-card-actions { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.preprinted-card-actions .btn { min-height: 38px; justify-content: center; font-size: 13px; }
.preprinted-frame footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #64748b; font-weight: 900; text-transform: uppercase; font-size: 12px; }

.responsible-badge-tools { display: grid; gap: 14px; }
.responsible-badge-assign { display: grid; gap: 14px; }
.responsible-badge-assign form { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)) auto; align-items: end; gap: 10px; }
.responsible-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.responsible-mode-card { min-height: 150px; border: 0; border-radius: 8px; padding: 24px; display: grid; grid-template-columns: 86px 1fr; align-items: center; gap: 18px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; }
.responsible-mode-card:hover { transform: translateY(-2px); filter: saturate(1.08); }
.responsible-mode-card:focus-visible { outline: 4px solid rgba(13, 110, 253, .28); outline-offset: 3px; }
.responsible-mode-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 0 48%, rgba(15, 23, 42, .22) 48% 62%, transparent 62%); pointer-events: none; }
.responsible-mode-card > * { position: relative; z-index: 1; }
.responsible-mode-card.mode-blue { background: linear-gradient(135deg, #2563eb, #123b88); }
.responsible-mode-card.mode-purple { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.responsible-mode-card.mode-red { background: linear-gradient(135deg, #fb7185, #e11d48); }
.responsible-mode-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 14px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.18); font-size: 30px; }
.responsible-mode-card h2 { margin: 0 0 8px; color: #fff; font-size: clamp(20px, 2vw, 28px); line-height: 1.05; }
.responsible-mode-card p { margin: 0; color: rgba(255,255,255,.9); font-weight: 750; line-height: 1.45; }
.responsible-action-modal .modal-card { width: min(680px, calc(100vw - 28px)); display: grid; gap: 18px; }
.responsible-action-modal .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.responsible-action-modal .modal-header h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); }
.responsible-action-modal .modal-header p { margin: 0; color: var(--muted); line-height: 1.45; }
.responsible-action-modal label { display: grid; gap: 8px; color: var(--muted); font-weight: 850; }
.responsible-action-modal input,
.responsible-action-modal select { width: 100%; min-height: 46px; }
.responsible-action-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }
.responsible-badge-scan-grid { display: grid; grid-template-columns: minmax(260px, 430px) minmax(260px, 1fr); gap: 18px; align-items: start; }
.responsible-badge-scan-panel { display: grid; gap: 12px; align-content: start; }
.responsible-badge-reader { min-height: min(62vh, 430px); }
.badge-qr-placeholder { display: grid; place-items: center; gap: 8px; text-align: center; padding: 22px; }
.badge-qr-placeholder i { font-size: 34px; color: #93c5fd; }
.badge-qr-placeholder strong { font-size: 18px; color: #fff; }
.badge-qr-placeholder span { color: rgba(255,255,255,.72); }
.responsible-add-choice-modal .modal-card { width: min(1280px, calc(100vw - 32px)); }
.responsible-add-choice-modal .responsible-mode-grid { margin: 0; }
.staff-qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; align-items: start; }
.badge-page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; margin-bottom: 14px; }
.badge-page-toolbar-bottom { margin-top: 16px; margin-bottom: 0; }
.badge-page-toolbar .directory-pagination { margin-left: auto; }
.directory-pagination .page-link.disabled { opacity: .45; pointer-events: none; cursor: default; }
.staff-badge-grid { grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .staff-badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .staff-badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .badge-page-toolbar { align-items: stretch; flex-direction: column; padding: 12px; }
    .badge-page-toolbar .directory-pagination { justify-content: flex-start; margin-left: 0; overflow-x: auto; padding-bottom: 2px; width: 100%; }
    .responsible-badge-tools .filters-row { grid-template-columns: 1fr; }
    .responsible-badge-assign form { grid-template-columns: 1fr; }
    .responsible-badge-tools select,
    .responsible-badge-tools input,
    .responsible-badge-tools .btn,
    .responsible-badge-assign input,
    .responsible-badge-assign .btn { width: 100%; }
    .staff-badge-card { width: 100%; }
    .staff-badge-frame { min-height: 0; padding: 22px; }
    .staff-badge-qr img { width: min(58vw, 190px); height: min(58vw, 190px); }
}
.staff-badge-card { break-inside: avoid; page-break-inside: avoid; }
.staff-badge-frame { min-height: 86mm; padding: 8mm; border: 1px solid var(--staff-badge-accent, #0f9f8f); border-radius: 16px; background-color: var(--staff-badge-bg, #ecfdf5); background-image: var(--staff-badge-bg-image, none); background-size: cover; background-position: center; display: grid; grid-template-rows: auto auto 1fr auto; gap: 5mm; position: relative; overflow: hidden; box-shadow: 0 18px 38px rgba(15, 23, 42, .12); }
.staff-badge-frame::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--staff-badge-accent, #0f9f8f) 14%, transparent), rgba(255, 255, 255, .16)); pointer-events: none; }
.staff-badge-frame > * { position: relative; z-index: 1; }
.staff-badge-frame header { display: flex; align-items: center; gap: 10px; color: #0f172a; }
.staff-badge-frame header img { width: 62px; height: 38px; object-fit: contain; background: rgba(255, 255, 255, .92); border-radius: 8px; padding: 3px; }
.staff-badge-frame header strong { display: block; font-weight: 950; }
.staff-badge-frame header small { display: block; color: #64748b; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.staff-badge-function { justify-self: start; padding: 7px 12px; border-radius: 999px; background: var(--staff-badge-accent, #0f9f8f); color: #fff; font-weight: 950; text-transform: uppercase; letter-spacing: .05em; box-shadow: 0 10px 22px rgba(15, 23, 42, .16); }
.staff-badge-qr { display: grid; place-items: center; align-self: center; gap: 3mm; }
.staff-badge-qr img { width: 42mm; height: 42mm; object-fit: contain; background: #fff; padding: 3mm; border-radius: 10px; box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.staff-badge-qr strong { display: inline-flex; align-items: center; justify-content: center; min-width: 34mm; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.94); color: #0f172a; font-size: 13px; letter-spacing: .06em; }
.staff-badge-frame footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px dashed color-mix(in srgb, var(--staff-badge-accent, #0f9f8f) 60%, transparent); padding-top: 8px; color: #334155; font-weight: 900; }
.staff-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.staff-card-actions form { margin: 0; }
.staff-card-actions .btn { width: 100%; justify-content: center; min-height: 38px; font-size: 13px; }
.staff-card-edit { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 10px; }
.staff-card-edit summary { cursor: pointer; font-weight: 950; color: #0f172a; list-style: none; }
.staff-card-edit summary::-webkit-details-marker { display: none; }
.staff-card-edit form { margin-top: 10px; display: grid; gap: 8px; }
.staff-card-edit label { display: grid; gap: 5px; color: #64748b; font-size: 12px; font-weight: 900; }
.staff-card-edit input, .staff-card-edit select { width: 100%; min-height: 38px; }
.staff-card-edit .inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-badge-frame.staff-design-diagonal { background-image: var(--staff-badge-bg-image, linear-gradient(135deg, color-mix(in srgb, var(--staff-badge-accent, #0f9f8f) 18%, #fff), #fff 54%, color-mix(in srgb, var(--staff-badge-accent, #0f9f8f) 10%, #fff))), linear-gradient(135deg, transparent 0 70%, color-mix(in srgb, var(--staff-badge-accent, #0f9f8f) 26%, transparent) 70%); }
.staff-badge-frame.staff-design-minimal { background-color: #fff; background-image: var(--staff-badge-bg-image, none); border-width: 2px; box-shadow: 0 10px 26px rgba(15, 23, 42, .08); }
.staff-badge-frame.staff-design-dark { background-color: #111827; background-image: var(--staff-badge-bg-image, linear-gradient(135deg, #111827, color-mix(in srgb, var(--staff-badge-accent, #0f9f8f) 38%, #111827))); border-color: color-mix(in srgb, var(--staff-badge-accent, #0f9f8f) 70%, #fff); }
.staff-badge-frame.staff-design-dark header, .staff-badge-frame.staff-design-dark footer { color: #fff; }
.staff-badge-frame.staff-design-dark header small { color: rgba(255,255,255,.72); }
.staff-badge-frame.staff-design-dark .staff-badge-function { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); }
.audit-table { min-width: 1040px; }
.audit-table code { display: block; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #475569; font-size: 12px; }

/* Compact responsive scale */
body { font-size: 14px; }
.app-content { padding: .85rem; }
.app-content-header h1 { font-size: 1.55rem; }
.page-header h1 { font-size: 24px; }
.btn { min-height: 36px; padding-inline: 12px; font-size: 13px; }
input, select, textarea { min-height: 38px; font-size: 13px; }
table { font-size: 13px; }
th, td { padding: 11px 13px; }
.info-box { min-height: 78px; }
.info-box-icon { width: 76px; flex-basis: 76px; font-size: 28px; }
.info-box-number { font-size: 1.25rem; }
.resto-stat-card { min-height: 126px; padding: 24px; border-radius: 24px; }
.resto-stat-card small { font-size: 15px; }
.resto-stat-card strong { font-size: 32px; }
.resto-icon { width: 62px; height: 62px; flex-basis: 62px; border-radius: 16px; font-size: 28px; }
.meal-progress-card { min-height: 200px; padding: 24px; border-radius: 24px; }
.meal-card-head h2 { font-size: 20px; }
.meal-progress-line { font-size: 16px; }
.page-subtitle { font-size: 16px; }
.add-dish-button { min-height: 52px; padding-inline: 24px; border-radius: 18px; font-size: 18px; }
.menu-card { min-height: 300px; padding: 28px 24px 24px; border-radius: 24px; }
.menu-card h2 { font-size: 22px; }
.menu-card p { font-size: 16px; }
.orders-table { font-size: 17px; }
.orders-table th { font-size: 18px; }
.project-table { font-size: 14px; }
.project-table th { font-size: 15px; }
.project-summary-card { min-height: 92px; padding: 16px; }
.project-summary-card strong { font-size: 26px; }
.tabulator-table { font-size: 14px; }
.tabulator-table th, .tabulator-table td { font-size: 14px; }

@media (max-width: 1100px) {
    .app-wrapper { grid-template-columns: 1fr; }
    html.sidebar-collapsed .app-wrapper { grid-template-columns: 1fr; }
    .app-header, .app-main { grid-column: 1; }
    .app-sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 250px; transform: translateX(-100%); transition: .2s ease; }
    .app-sidebar.open { transform: translateX(0); }
    html.sidebar-collapsed .app-sidebar { width: 250px; }
    html.sidebar-collapsed .brand-text,
    html.sidebar-collapsed .nav-sidebar .nav-link p,
    html.sidebar-collapsed .user-panel span,
    html.sidebar-collapsed .sidebar-footer .btn {
        width: auto;
        max-width: none;
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
    }
    html.sidebar-collapsed .brand-link,
    html.sidebar-collapsed .nav-sidebar .nav-link,
    html.sidebar-collapsed .user-panel {
        justify-content: flex-start;
    }
    .desktop-only { display: none; }
    .mobile-only { display: inline-flex; }
    .info-box-grid, .recap-layout, .two-columns, .kpi-card-grid, .project-summary-grid, .settings-layout { grid-template-columns: 1fr 1fr; }
    .settings-help { position: static; }
    .operator-stats-head { align-items: flex-start; flex-direction: column; }
    .evaluation-report-grid, .event-card-grid { grid-template-columns: 1fr; }
    .odk-url-grid { grid-template-columns: 1fr; }
    .quota-summary-grid { grid-template-columns: 1fr; }
    .goal-list { border-left: 0; padding-left: 0; }
}

@media (max-width: 720px) {
    .app-content { padding: .75rem; }
    body { font-size: 13px; }
    .app-content-header { align-items: flex-start; flex-direction: column; }
    .app-content-header h1 { font-size: 1.35rem; }
    .navbar-end .header-user, .navbar-start .nav-link:not(.mobile-only) { display: none; }
    .info-box-grid, .recap-layout, .two-columns, .recap-footer, .kpi-card-grid, .project-summary-grid, .settings-layout, .permission-columns { grid-template-columns: 1fr; }
    .project-board-header, .project-toolbar, .project-board-footer { align-items: stretch; flex-direction: column; }
    .project-toolbar, .search-box, .project-toolbar select, .project-toolbar .btn { width: 100%; }
    .directory-header, .directory-filterbar, .directory-footer { align-items: stretch; flex-direction: column; }
    .directory-actions, .directory-actions .btn, .directory-actions form, .external-sync-form, .external-sync-events, .external-sync-events select, .directory-filterbar select, .directory-search { width: 100%; }
    .directory-actions .btn { justify-content: center; }
    .pending-import-header { padding: 18px; }
    .pending-import-actions,
    .pending-import-actions .external-sync-form {
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
    }
    .pending-import-hint { width: 100%; justify-content: center; text-align: center; }
    .pending-event-picker { padding: 12px; }
    .pending-event-picker select { min-height: 104px; }
    .report-export-panel form { align-items: stretch; flex-direction: column; }
    .settings-summary-grid { grid-template-columns: 1fr; }
    .user-summary-meta { grid-template-columns: 1fr; }
    .user-management-modal { width: calc(100vw - 12px); max-height: 92vh; }
    .user-modal-body { max-height: calc(92vh - 70px); padding: 14px; }
    .user-modal-actions { grid-template-columns: 1fr; }
    .operator-stats-panel { border-radius: 16px; }
    .operator-stats-head { padding: 16px; }
    .operator-export-actions, .operator-export-actions .btn, .audit-summary-actions .btn { width: 100%; }
    .rating-score-grid { grid-template-columns: 1fr; }
    .evaluation-modal, .event-modal { width: calc(100vw - 12px); max-height: 92vh; }
    .evaluation-modal form { max-height: 92vh; }
    .evaluation-form-grid, .event-form-grid { padding: 14px; }
    .evaluation-modal .modal-actions, .event-modal .modal-actions { flex-wrap: wrap; }
    .quota-modal, .rank-modal { width: calc(100vw - 12px); max-height: 92vh; }
    .quota-modal form { max-height: 92vh; }
    .quota-modal .project-table-wrap { max-height: calc(92vh - 144px); }
    .rank-modal .project-table-wrap { max-height: calc(92vh - 176px); }
    .rank-create-form { grid-template-columns: 1fr; }
    .quota-modal .settings-actions { justify-content: stretch; }
    .quota-modal .settings-actions .btn { width: 100%; }
    .access-modal { width: calc(100vw - 12px); max-height: 92vh; }
    .access-modal form { padding: 14px; }
    .access-modal .compact-title-row { margin: -14px -14px 0; }
    .access-modal .modal-actions { bottom: -14px; margin: 0 -14px -14px; flex-wrap: wrap; }
    .access-modal .modal-actions .btn { flex: 1 1 160px; }
    .kpi-card-grid { gap: 16px; }
    .kpi-card { min-height: 130px; padding: 22px; }
    .kpi-card strong { font-size: 36px; }
    .chart-legend { gap: 14px; padding-inline: 8px; font-size: 15px; }
    .admin-bars { grid-template-columns: repeat(9, minmax(38px, 1fr)); overflow-x: auto; }
    .bar-item { min-width: 38px; }
    .recap-footer div { border-right: 0; border-bottom: 1px solid #dee2e6; padding: .5rem 0; }
    .recap-footer div:last-child { border-bottom: 0; }
    .tabulator-actions, .tabulator-footer, .tabulator-pager { align-items: stretch; flex-direction: column; }
    .tabulator-btn, .tabulator-pager button, .tabulator-pager label { width: 100%; justify-content: center; }
    .participant-detail-grid { grid-template-columns: 1fr; }
    .add-choice-grid, .badge-enroll-grid, .external-lookup-row { grid-template-columns: 1fr; }
    .participant-pass-row, .scan-device-grid { grid-template-columns: 1fr; }
    .scan-devices-panel { padding: 14px; }
    .scan-devices-head { align-items: flex-start; flex-direction: column; }
    .participant-pass-card { padding: 20px; }
    .participant-badge-modal { width: calc(100vw - 12px); max-height: 92vh; }
    .badge-qr-reader { min-height: min(70vh, calc(100vw - 36px)); }
    .settings-user-head { flex-direction: column; }
    .btn { width: auto; max-width: 100%; }
    .resto-stat-card, .meal-progress-card, .menu-card { padding: 18px; }
    .resto-stat-card strong, .meal-progress-line strong { font-size: 26px; }
    .project-table th, .project-table td { padding: 10px 12px; }
    .preprinted-control-panel, .preprinted-control-panel form { align-items: stretch; flex-direction: column; }
    .preprinted-qr-sheet { grid-template-columns: 1fr; }
    .responsible-badge-assign form { grid-template-columns: 1fr; }
    .staff-qr-sheet { grid-template-columns: 1fr; }
    .staff-card-actions { grid-template-columns: 1fr; }
}

@media print {
    @page { size: A4 portrait; margin: 7mm; }
    html, body { width: 210mm; min-width: 0; background: #fff; }
    body { margin: 0; font-size: 10pt; }
    .app-header, .app-sidebar, .tabulator-panel, .app-content-header, .app-content-header .actions, .qr-toolbar, .preprinted-control-panel, .responsible-badge-tools, .responsible-badge-assign, .badge-page-toolbar, .alert { display: none !important; }
    .app-wrapper { display: block; }
    .app-main { display: block; min-width: 0; }
    .app-content { padding: 0 !important; }
    .page { padding: 0 !important; }
    .participants-print-table { display: block; }
    .qr-sheet { grid-template-columns: repeat(3, 62mm); justify-content: center; gap: 4mm; width: 196mm; margin: 0 auto; }
    .qr-card { box-shadow: none; border-color: #111; }
    .qr-session-card { width: 62mm; min-height: 88mm; height: 88mm; padding: 4mm; border: 1px solid #8fb37e; border-radius: 4mm; color: #0f172a; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .qr-session-card::before { clip-path: polygon(0 0, 26% 0, 8% 100%, 0 100%); background-size: auto; }
    .qr-card-header { gap: 3mm; align-items: center; }
    .qr-card-header img { width: 18mm; height: 10mm; padding: 1mm; border-radius: 2mm; }
    .qr-card-header strong { font-size: 10pt; line-height: 1.05; }
    .qr-card-header span { font-size: 6.5pt; letter-spacing: .08em; }
    .qr-card-title { margin-top: 2mm; }
    .qr-card-title h2 { margin: 0; font-size: 13pt; line-height: 1.1; }
    .qr-image-box { width: 52mm; margin: 3mm 0 1mm; padding: 4mm; border-radius: 7mm; }
    .qr-card-actions { display: none; }
    .qr-image-box canvas, .qr-image-box .qr-image { width: 44mm; height: 44mm; }
    .qr-card-footer { margin-top: auto; padding-top: 2.5mm; font-size: 7.5pt; }
    .qr-card-footer strong { font-size: 7.5pt; }
    .preprinted-qr-sheet { grid-template-columns: repeat(3, 60mm); justify-content: center; gap: 3mm; width: 186mm; margin: 0 auto; }
    .preprinted-card { width: 60mm; height: 86mm; overflow: hidden; }
    .preprinted-frame { width: 60mm; min-height: 86mm; height: 86mm; padding: 3mm; border: 1px solid #f59e0b; box-shadow: none; grid-template-rows: 10mm 47mm 8mm 8mm; gap: 1.5mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .preprinted-brand { gap: 2mm; }
    .preprinted-brand img { width: 17mm; height: 9mm; }
    .preprinted-brand strong { font-size: 8pt; line-height: 1.05; }
    .preprinted-qr-box { gap: 1mm; }
    .preprinted-qr-box img { width: 36mm; height: 36mm; padding: 1.2mm; border-radius: 2mm; }
    .preprinted-code { min-width: 28mm; padding: .8mm 2mm; font-size: 6.2pt; box-shadow: none; }
    .preprinted-empty-zone { min-height: 6mm; }
    .preprinted-card-actions { display: none; }
    .preprinted-frame footer { align-items: center; justify-content: center; text-align: center; font-size: 5.8pt; line-height: 1; }
    .preprinted-frame footer .badge { display: none !important; }
    .staff-qr-sheet { display: grid; grid-template-columns: repeat(3, 60mm); justify-content: center; gap: 3mm; width: 186mm; margin: 0 auto; }
    .staff-badge-card { width: 60mm; height: 86mm; overflow: hidden; box-shadow: none; }
    .staff-badge-frame { width: 60mm; min-height: 86mm; height: 86mm; padding: 3mm; border-radius: 2mm; box-shadow: none; grid-template-rows: 10mm 7mm 45mm 9mm; gap: 1.5mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .staff-badge-frame header { gap: 2mm; }
    .staff-badge-frame header img { width: 17mm; height: 9mm; padding: .6mm; border-radius: 1.2mm; }
    .staff-badge-frame header strong { font-size: 8pt; line-height: 1.05; }
    .staff-badge-frame header small { font-size: 5.6pt; line-height: 1; }
    .staff-badge-function { padding: .8mm 2mm; font-size: 6.2pt; box-shadow: none; }
    .staff-badge-qr { gap: 1mm; }
    .staff-badge-qr img { width: 34mm; height: 34mm; padding: 1.2mm; border-radius: 2mm; box-shadow: none; }
    .staff-badge-qr strong { min-width: 28mm; padding: .8mm 2mm; font-size: 6.2pt; box-shadow: none; }
    .staff-badge-frame footer { align-items: center; justify-content: center; text-align: center; font-size: 5.8pt; line-height: 1; padding-top: 1mm; }
    .staff-badge-frame footer .badge,
    .staff-badge-assignment,
    .staff-badge-status,
    .staff-card-actions,
    .staff-card-edit { display: none !important; }
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 1100px) {
    .app-wrapper {
        grid-template-columns: 1fr !important;
    }

    .app-header,
    .app-main {
        grid-column: 1 !important;
        min-width: 0;
    }

    .app-header {
        z-index: 60;
    }

    .navbar-start {
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .navbar-start .sidebar-toggle,
    .mobile-only.sidebar-toggle {
        display: inline-flex !important;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        font-size: 24px;
        color: var(--text);
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    }

    .desktop-only {
        display: none !important;
    }

    .app-sidebar {
        position: fixed !important;
        z-index: 80;
        inset: 0 auto 0 0;
        width: min(86vw, 292px) !important;
        max-width: 292px;
        transform: translateX(-105%) !important;
        transition: transform .22s ease;
    }

    .app-sidebar.open {
        transform: translateX(0) !important;
    }

    .app-sidebar.open::after {
        display: none !important;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        display: none;
        border: 0;
        padding: 0;
        background: rgba(15, 23, 42, .56);
        backdrop-filter: blur(2px);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
}

@media (min-width: 1101px) {
    .sidebar-backdrop,
    .mobile-only.sidebar-toggle {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .responsible-mode-grid,
    .responsible-badge-scan-grid { grid-template-columns: 1fr; }
    .responsible-mode-card { grid-template-columns: 64px 1fr; min-height: auto; }
    .responsible-action-modal .modal-actions { flex-direction: column; }
    .responsible-action-modal .modal-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 1100px) {
    .gt-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gt-dashboard-grid, .gt-lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .gt-kpi-grid { grid-template-columns: 1fr; }
    .gt-kpi-card { grid-template-columns: 42px 1fr; min-height: auto; }
    .gt-spark, .gt-progress { grid-column: 1 / -1; width: 100%; }
    .gt-panel > header { align-items: flex-start; flex-direction: column; }
    .gt-chart-legend { align-items: flex-start; flex-direction: column; gap: 10px; }
    .gt-mini-list { grid-template-columns: 1fr; }
    .gt-line-chart { min-width: 620px; }
    .gt-chart-panel { overflow-x: auto; }
}

/* Production polish: vivid dashboard cards and compact anonymous badge counters. */
.gt-kpi-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 18px; }
.gt-kpi-card {
    min-height: 88px;
    padding: 16px 22px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 16px 28px rgba(15, 23, 42, .14);
}
.gt-kpi-card.teal { background: linear-gradient(135deg, #0f9f8f, #23c5ad); }
.gt-kpi-card.blue { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.gt-kpi-card.amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.gt-kpi-card.green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.gt-kpi-card.cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.gt-kpi-card.indigo { background: linear-gradient(135deg, #4338ca, #6366f1); }
.gt-kpi-card.red { background: linear-gradient(135deg, #dc2626, #fb7185); }
.gt-kpi-card.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.gt-kpi-card small,
.gt-kpi-card strong,
.gt-kpi-card em { color: #fff; }
.gt-kpi-card small { opacity: .9; font-size: 12px; }
.gt-kpi-card strong { font-size: 30px; }
.gt-kpi-card em { opacity: .86; }
.gt-kpi-icon {
    color: #fff !important;
    background: rgba(255, 255, 255, .18) !important;
    border: 1px solid rgba(255, 255, 255, .24);
}
.gt-spark i,
.gt-spark::before,
.gt-spark::after,
.gt-progress b { background: rgba(255, 255, 255, .78); }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 18px;
}
.kpi-grid .kpi-card {
    min-height: 104px;
    padding: 20px 24px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}
.kpi-grid .kpi-card:nth-child(1) { border-left: 6px solid #10b981; }
.kpi-grid .kpi-card:nth-child(2) { border-left: 6px solid #2563eb; }
.kpi-grid .kpi-card:nth-child(3) { border-left: 6px solid #f59e0b; }
.kpi-grid .kpi-card span {
    display: block;
    color: #64748b;
    font-size: 15px;
    font-weight: 800;
}
.kpi-grid .kpi-card strong {
    display: block;
    margin-top: 10px;
    color: #111827;
    font-size: 38px;
    line-height: 1;
}

@media (max-width: 900px) {
    .gt-kpi-grid,
    .kpi-grid { grid-template-columns: 1fr; }
}

/* TV dashboard capsules, inspired by the rounded status cards reference. */
.tv-kpi-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 24px;
    margin: 4px 6px 8px;
}
.tv-kpi-grid article {
    position: relative;
    min-height: 112px;
    display: grid;
    grid-template-columns: 84px 1fr;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    column-gap: 18px;
    padding: 20px 28px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 20px 36px rgba(15, 23, 42, .16);
}
.tv-kpi-grid article::before {
    content: "";
    position: absolute;
    inset: 14px 20px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    pointer-events: none;
}
.tv-kpi-grid article::after {
    content: "";
    position: absolute;
    top: -24px;
    right: -4px;
    width: 38%;
    height: calc(100% + 48px);
    transform: skewX(-28deg);
    background: rgba(0, 0, 0, .12);
    pointer-events: none;
}
.tv-kpi-grid article:nth-child(1) { background: linear-gradient(135deg, #38d858, #139439); }
.tv-kpi-grid article:nth-child(2) { background: linear-gradient(135deg, #ffbd4c, #ea9800); }
.tv-kpi-grid article:nth-child(3) { background: linear-gradient(135deg, #5adb8a, #17a04b); }
.tv-kpi-grid article:nth-child(4) { background: linear-gradient(135deg, #ff916c, #ff461b); }
.tv-kpi-grid article:nth-child(5) { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.tv-kpi-grid article:nth-child(6) { background: linear-gradient(135deg, #8b5cf6, #4f46e5); }
.tv-kpi-grid i {
    position: relative;
    z-index: 1;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 35px;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .08), 0 10px 18px rgba(15, 23, 42, .12);
}
.tv-kpi-grid span,
.tv-kpi-grid strong {
    position: relative;
    z-index: 1;
    display: block;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(15, 23, 42, .08);
}
.tv-kpi-grid span {
    align-self: end;
    font-size: clamp(17px, 1.3vw, 22px);
    font-weight: 500;
    text-transform: none;
    opacity: .94;
}
.tv-kpi-grid strong {
    align-self: start;
    margin-top: 8px;
    font-size: clamp(32px, 3vw, 50px);
    font-weight: 500;
}
.tv-kpi-grid strong small { font-size: .46em; font-weight: 700; opacity: .9; }

.badge-filter-panel { display: grid; gap: 16px; padding: 18px; }
.badge-status-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.badge-status-tabs a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 56px;
    padding: 12px 16px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}
.badge-status-tabs a i { color: #0f9f8f; font-size: 20px; }
.badge-status-tabs a strong {
    min-width: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #0f172a;
    text-align: center;
}
.badge-status-tabs a.active {
    border-color: #0f9f8f;
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
    color: #047857;
}
.badge-status-tabs a.active strong {
    background: #0f9f8f;
    color: #fff;
}
.badge-archive-panel .section-heading { margin-bottom: 14px; }
.compact-table { overflow-x: auto; }
.compact-table table { width: 100%; border-collapse: collapse; }
.compact-table th, .compact-table td { padding: 12px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.compact-table th { color: #64748b; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 1400px) {
    .tv-kpi-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}

@media (max-width: 720px) {
    .tv-kpi-grid { grid-template-columns: 1fr; }
    .tv-kpi-grid article { min-height: 96px; grid-template-columns: 72px 1fr; padding: 16px 22px; }
    .tv-kpi-grid i { width: 64px; height: 64px; font-size: 28px; }
    .badge-status-tabs { grid-template-columns: 1fr; }
}

.brand-logo-image {
    width: 38px;
    height: 38px;
    object-fit: contain;
    padding: 3px;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.visual-settings-panel .settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.visual-settings-panel input[type="color"] {
    min-height: 48px;
    padding: 6px;
}

.qr-session-card {
    background-color: var(--badge-bg, #fff);
    background-image: var(--badge-bg-image, none);
    background-size: cover;
    background-position: center;
    border-color: color-mix(in srgb, var(--badge-accent, #f28c13) 35%, #d7e4d0);
}

.qr-session-card::before {
    background:
        repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--badge-pattern, #f7c8a8) 72%, transparent) 10px 14px, transparent 14px 24px),
        repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--badge-pattern, #f7c8a8) 46%, transparent) 10px 14px, transparent 14px 24px);
}

.qr-session-card::after {
    background:
        linear-gradient(135deg, transparent 0 14%, #111827 14% 19%, var(--badge-accent, #f28c13) 19% 24%, #ffffff 24% 27%, #111827 27% 32%, var(--badge-accent, #f28c13) 32% 37%, transparent 37%) top right / 70% 16px no-repeat,
        linear-gradient(135deg, transparent 0 52%, #111827 52% 57%, var(--badge-accent, #f28c13) 57% 62%, #ffffff 62% 65%, #111827 65% 70%, var(--badge-accent, #f28c13) 70% 75%, transparent 75%) bottom right / 72% 16px no-repeat,
        linear-gradient(90deg, var(--badge-accent, #f28c13), color-mix(in srgb, var(--badge-accent, #f28c13) 68%, #fff)) bottom left / 100% 5px no-repeat;
}

.preprinted-frame {
    background-color: var(--preprinted-bg, #fff7e8);
    background-image: var(--preprinted-bg-image, none);
    background-size: cover;
    background-position: center;
    border-color: var(--preprinted-accent, #f59e0b);
}

.preprinted-frame::before {
    background: linear-gradient(135deg, color-mix(in srgb, var(--preprinted-accent, #f59e0b) 18%, transparent), rgba(255, 255, 255, .08));
}

.preprinted-empty-zone {
    border-bottom-color: var(--preprinted-accent, #f59e0b);
}

.settings-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.settings-hub-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 14px;
    min-height: 104px;
    padding: 18px;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    text-align: left;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.settings-hub-card:hover,
.settings-hub-card:focus-visible {
    transform: translateY(-2px);
    border-color: #14b8a6;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
    outline: 0;
}

.settings-hub-card > i {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #e6fffb;
    color: #008f67;
    font-size: 23px;
}

.settings-hub-card strong,
.settings-hub-card small {
    display: block;
}

.settings-hub-card strong {
    font-size: 16px;
}

.settings-hub-card small {
    margin-top: 4px;
    color: #64748b;
    line-height: 1.35;
}

.settings-hub-card.danger-card > i {
    background: #fff1f2;
    color: #dc2626;
}

.settings-modal-wide {
    width: min(1120px, calc(100vw - 64px));
    max-height: 90vh;
    padding: clamp(22px, 2.8vw, 34px);
    overflow: auto;
    border-radius: 14px;
}

.settings-modal-wide > section {
    width: min(100%, 980px);
    margin: 0 auto;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    overflow: visible;
}

.settings-modal-wide .modal-title-row,
.settings-modal-wide .project-board-header,
.settings-modal-wide .operator-stats-head,
.settings-modal-wide .settings-grid,
.settings-modal-wide .visual-settings-grid,
.settings-modal-wide .form-grid,
.settings-modal-wide .odk-url-grid,
.settings-modal-wide .settings-layout,
.settings-modal-wide .permission-columns,
.settings-modal-wide .quota-summary-grid,
.settings-modal-wide .settings-mini-stat-grid,
.settings-modal-wide .settings-summary-grid,
.settings-modal-wide .project-table-wrap,
.settings-modal-wide .inline-actions:not(.settings-modal-close) {
    width: min(100%, 940px);
    margin-left: auto;
    margin-right: auto;
}

.settings-modal-wide .visual-settings-panel,
.settings-modal-wide .code-format-panel,
.settings-modal-wide .dictionary-settings-panel,
.settings-modal-wide .reset-camp-panel,
.settings-modal-wide .event-settings-panel,
.settings-modal-wide .quota-summary-panel,
.settings-modal-wide .audit-summary-panel,
.settings-modal-wide .operator-stats-panel,
.settings-modal-wide .odk-settings-panel,
.settings-modal-wide .permissions-panel,
.settings-modal-wide .ranks-settings-panel {
    padding: clamp(18px, 2vw, 24px);
}

.settings-modal-wide .project-board-header,
.settings-modal-wide .operator-stats-head {
    padding: 0 0 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #d8e0ec;
}

.settings-modal-wide .visual-settings-grid,
.settings-modal-wide .form-grid {
    gap: 18px;
}

.settings-modal-close {
    position: sticky;
    top: 16px;
    right: auto;
    z-index: 5;
    float: none;
    margin: 0 0 12px auto;
    width: auto;
    min-width: 112px;
    height: 46px;
    padding: 0 18px;
    border-color: #fecaca;
    background: #fee2e2;
    color: #b91c1c;
    box-shadow: 0 12px 26px rgba(220, 38, 38, .16);
}

.settings-modal-close:hover {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.settings-modal-wide .project-table-wrap {
    overflow-x: auto;
}

.settings-modal-wide .project-table {
    min-width: 760px;
}

@media (max-width: 900px) {
    .settings-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .settings-modal-wide {
        width: calc(100vw - 18px);
        max-height: 94vh;
        padding: 16px;
    }
    .settings-modal-wide .project-board-header,
    .settings-modal-wide .operator-stats-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }
    .settings-modal-wide .form-grid,
    .settings-modal-wide .visual-settings-grid,
    .settings-modal-wide .odk-url-grid,
    .settings-modal-wide .settings-layout,
    .settings-modal-wide .permission-columns,
    .settings-modal-wide .quota-summary-grid,
    .settings-modal-wide .settings-mini-stat-grid,
    .settings-modal-wide .settings-summary-grid {
        grid-template-columns: 1fr;
    }
    .settings-modal-wide .btn,
    .settings-modal-wide .operator-export-actions .btn,
    .settings-modal-wide .audit-summary-actions .btn,
    .settings-modal-wide .audit-summary-actions a {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    html {
        font-size: 14px;
    }
    .page,
    .app-content {
        padding: 10px;
    }
    .app-content-header,
    .page-header {
        gap: 10px;
        margin-bottom: 14px;
    }
    .app-content-header h1,
    .page-header h1 {
        font-size: 22px;
    }
    .settings-hub-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .settings-hub-card {
        grid-template-columns: 42px 1fr;
        min-height: 82px;
        padding: 14px;
        border-radius: 12px;
    }
    .settings-hub-card > i {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .settings-modal-wide {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        padding: 14px;
    }
    .settings-modal-close {
        top: 8px;
        margin-right: 8px;
    }
    .modal-title-row h2,
    .project-board-header h2,
    .operator-stats-title h2 {
        font-size: 19px;
        line-height: 1.2;
    }
    input,
    select,
    textarea,
    .btn {
        min-height: 42px;
        font-size: 14px;
    }
    .settings-modal-wide .project-table {
        min-width: 680px;
    }
    .quota-row-actions,
    .operator-export-actions,
    .audit-summary-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Professional cards and configurable login background. */
.worldcamp-login {
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 0;
    padding: clamp(18px, 4vw, 56px);
    background-color: var(--login-bg-color, #f3f6fb) !important;
    background-image: var(--login-bg-image, none) !important;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
.worldcamp-login::before,
.worldcamp-login::after {
    display: none;
}
.login-visual-panel { display: none; }
.login-visual-scene {
    position: relative;
    width: min(100%, 760px);
    aspect-ratio: 1.28;
    border-radius: 34px;
    background:
        radial-gradient(circle at 46% 76%, rgba(99, 102, 241, .24), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, .04));
}
.login-illustration {
    position: absolute;
    inset: 16% 6% 6%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 18px;
    color: #fff;
}
.login-illustration i {
    display: grid;
    place-items: center;
    min-height: clamp(140px, 18vw, 230px);
    border-radius: 42% 58% 46% 54%;
    background: linear-gradient(145deg, #6d5dfc, #22c55e);
    box-shadow: 0 28px 60px rgba(42, 64, 121, .20);
    font-size: clamp(54px, 8vw, 110px);
}
.login-illustration i:nth-child(2) {
    align-self: center;
    background: linear-gradient(145deg, #22c55e, #38bdf8);
}
.login-illustration i:nth-child(3) {
    background: linear-gradient(145deg, #f59e0b, #7c3aed);
}
.login-shape {
    position: absolute;
    display: block;
    border-radius: 24px;
    transform: rotate(-20deg);
    opacity: .85;
}
.shape-one { left: 12%; top: 8%; width: 96px; height: 96px; background: #bbf7d0; }
.shape-two { left: 43%; top: 2%; width: 74px; height: 74px; background: #f9a8d4; }
.shape-three { right: 14%; top: 16%; width: 18px; height: 18px; border-radius: 50%; background: #2563eb; }
.worldcamp-login-card {
    justify-self: center;
    width: min(100%, 426px);
    padding: 30px;
    border: 1px solid #3b82f6;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(37, 99, 235, .12);
}
.worldcamp-brand {
    justify-content: flex-start;
}
.worldcamp-brand img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
}
.worldcamp-brand strong {
    font-size: 22px;
    color: #2563eb;
}
.login-heading h1 {
    font-size: 30px;
    font-weight: 500;
}
.login-input-wrap input {
    min-height: 46px;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
}
.login-submit {
    min-height: 46px;
    border-radius: 8px;
    background: #3f73dc;
    box-shadow: none;
}
.login-submit:hover {
    background: #245ec8;
}
.secure-note {
    border: 1px solid #dbeafe;
}

.gt-kpi-card,
.settings-hub-card,
.project-summary-card,
.kpi-grid .kpi-card {
    position: relative;
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: center;
    gap: 20px;
    min-height: 132px;
    padding: 20px;
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.gt-kpi-card::after,
.settings-hub-card::after,
.project-summary-card::after,
.kpi-grid .kpi-card::after {
    content: "";
    position: absolute;
    right: -36px;
    top: -42px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--card-accent, #2563eb) 10%, transparent);
}
.gt-kpi-card .gt-kpi-icon,
.settings-hub-card > i,
.project-summary-card::before,
.kpi-grid .kpi-card::before {
    display: grid;
    place-items: center;
    width: 60px;
    height: 82px;
    border-radius: 8px;
    background: var(--card-accent, #2563eb) !important;
    color: #fff !important;
    font-size: 26px;
    box-shadow: none;
}
.project-summary-card::before,
.kpi-grid .kpi-card::before {
    content: "\F4D7";
    font-family: bootstrap-icons;
}
.gt-kpi-card.teal,
.settings-hub-card:nth-child(1),
.project-summary-card:nth-child(1),
.kpi-grid .kpi-card:nth-child(1) { --card-accent: #6d3ee8; }
.gt-kpi-card.blue,
.settings-hub-card:nth-child(2),
.project-summary-card:nth-child(2),
.kpi-grid .kpi-card:nth-child(2) { --card-accent: #2ecc71; }
.gt-kpi-card.amber,
.settings-hub-card:nth-child(3),
.project-summary-card:nth-child(3),
.kpi-grid .kpi-card:nth-child(3) { --card-accent: #ffca2c; }
.gt-kpi-card.green,
.settings-hub-card:nth-child(4),
.project-summary-card:nth-child(4) { --card-accent: #35bfd0; }
.gt-kpi-card.indigo { --card-accent: #4f46e5; }
.gt-kpi-card.red,
.settings-hub-card:nth-child(5) { --card-accent: #ef4444; }
.gt-kpi-card.purple,
.settings-hub-card:nth-child(6) { --card-accent: #7c3aed; }
.settings-hub-card:nth-child(7) { --card-accent: #0ea5e9; }
.settings-hub-card:nth-child(8) { --card-accent: #f97316; }
.settings-hub-card:nth-child(9) { --card-accent: #14b8a6; }
.settings-hub-card:nth-child(10) { --card-accent: #dc2626; }
.gt-kpi-card small,
.gt-kpi-card strong,
.gt-kpi-card em,
.settings-hub-card strong,
.settings-hub-card small,
.project-summary-card span,
.project-summary-card strong,
.kpi-grid .kpi-card span,
.kpi-grid .kpi-card strong {
    color: inherit;
}
.gt-kpi-card small,
.settings-hub-card small,
.project-summary-card span,
.kpi-grid .kpi-card span {
    color: #53627a;
    text-transform: none;
    letter-spacing: 0;
}
.gt-kpi-card strong,
.project-summary-card strong,
.kpi-grid .kpi-card strong {
    color: #172033;
    font-size: 28px;
    font-weight: 500;
}
.gt-kpi-card em {
    color: #53627a;
}
.gt-kpi-card .gt-spark,
.gt-kpi-card .gt-progress {
    display: none;
}
.quota-summary-grid > span,
.quota-summary-grid > div,
.settings-summary-grid span,
.user-summary-meta {
    border: 1px solid #d8e0ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

@media (max-width: 980px) {
    .worldcamp-login {
        grid-template-columns: 1fr;
    }
    .login-visual-panel {
        min-height: 260px;
    }
    .login-visual-scene {
        aspect-ratio: 2.5;
    }
}

@media (max-width: 640px) {
    .worldcamp-login {
        padding: 14px;
    }
    .login-visual-panel {
        display: none;
    }
    .worldcamp-login-card {
        padding: 22px;
    }
    .gt-kpi-card,
    .settings-hub-card,
    .project-summary-card,
    .kpi-grid .kpi-card {
        grid-template-columns: 54px 1fr;
        min-height: 104px;
        gap: 14px;
        padding: 16px;
    }
    .gt-kpi-card .gt-kpi-icon,
    .settings-hub-card > i,
    .project-summary-card::before,
    .kpi-grid .kpi-card::before {
        width: 52px;
        height: 58px;
        font-size: 22px;
    }
}

/* Keep dashboard stat cards in the previous vivid style. */
.gt-kpi-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 18px;
}
.gt-kpi-card {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 16px;
    min-height: 88px;
    padding: 16px 22px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 16px 28px rgba(15, 23, 42, .14);
}
.gt-kpi-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 138px;
    height: 138px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}
.gt-kpi-card.teal { background: linear-gradient(135deg, #0f9f8f, #23c5ad); }
.gt-kpi-card.blue { background: linear-gradient(135deg, #2563eb, #0ea5e9); }
.gt-kpi-card.amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.gt-kpi-card.green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.gt-kpi-card.indigo { background: linear-gradient(135deg, #4338ca, #6366f1); }
.gt-kpi-card.red { background: linear-gradient(135deg, #dc2626, #fb7185); }
.gt-kpi-card.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.gt-kpi-card .gt-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .18) !important;
    border: 1px solid rgba(255, 255, 255, .24);
    color: #fff !important;
    font-size: 18px;
}
.gt-kpi-card small,
.gt-kpi-card strong,
.gt-kpi-card em {
    color: #fff;
}
.gt-kpi-card small {
    opacity: .9;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}
.gt-kpi-card strong {
    font-size: 30px;
    font-weight: 800;
}
.gt-kpi-card em {
    opacity: .86;
}
.gt-kpi-card .gt-spark,
.gt-kpi-card .gt-progress {
    display: block;
}
.gt-kpi-card .gt-spark {
    display: grid;
}
.gt-kpi-card .gt-progress {
    width: 176px;
}
.gt-kpi-card .gt-progress b {
    background: rgba(255, 255, 255, .78);
}

@media (max-width: 1100px) {
    .gt-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .gt-kpi-grid { grid-template-columns: 1fr; }
    .gt-kpi-card { grid-template-columns: 42px 1fr; min-height: auto; }
    .gt-kpi-card .gt-spark,
    .gt-kpi-card .gt-progress {
        grid-column: 1 / -1;
        width: 100%;
    }
}

.table-filter-row th {
    padding: 8px 10px;
    background: #f8fafc;
}
.table-filter-input {
    width: 100%;
    min-width: 90px;
    height: 34px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
}
.dictionary-manager {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}
.dictionary-item-form,
.dictionary-filters,
.dictionary-history {
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}
.dictionary-item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dictionary-filters {
    display: grid;
    grid-template-columns: 1fr 220px 160px auto;
    align-items: end;
    gap: 12px;
}
.dictionary-table-wrap {
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    overflow: auto;
    background: #fff;
}
.dictionary-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}
.dictionary-table th,
.dictionary-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5edf6;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}
.dictionary-table th {
    background: #f8fafc;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .03em;
    font-size: 11px;
}
.dictionary-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
}
.dictionary-color-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: var(--dot-color);
    vertical-align: middle;
}
.dictionary-history summary {
    cursor: pointer;
    font-weight: 800;
}
.dictionary-history-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    max-height: 280px;
    overflow: auto;
}
.dictionary-history-list article {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .dictionary-item-grid,
    .dictionary-filters {
        grid-template-columns: 1fr;
    }
    .table-filter-input {
        min-width: 72px;
        font-size: 11px;
    }
}

/* Global responsive hardening for long tables, modals and help pages. */
img,
video,
canvas,
svg {
    max-width: 100%;
}

.container-fluid,
.app-main,
.app-content,
.panel,
.modal,
dialog {
    min-width: 0;
}

.project-table-wrap,
.tabulator-table-wrap,
.table-card,
.dictionary-table-wrap,
.report-table-wrap,
.responsive-table,
.orders-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.project-table,
.tabulator-table,
.orders-table,
.dictionary-table,
.audit-table {
    white-space: nowrap;
}

dialog.modal,
.modal {
    max-width: min(96vw, 1180px);
    max-height: 92dvh;
    overflow: auto;
}

.modal-title-row {
    gap: 14px;
}

.modal-title-row h2 {
    overflow-wrap: anywhere;
}

.settings-modal-wide {
    margin: auto;
}

.settings-modal-wide > section,
.settings-modal-wide .modal-title-row,
.settings-modal-wide .project-board-header,
.settings-modal-wide .operator-stats-head,
.settings-modal-wide .settings-grid,
.settings-modal-wide .visual-settings-grid,
.settings-modal-wide .form-grid,
.settings-modal-wide .odk-url-grid,
.settings-modal-wide .settings-layout,
.settings-modal-wide .permission-columns,
.settings-modal-wide .quota-summary-grid,
.settings-modal-wide .settings-mini-stat-grid,
.settings-modal-wide .settings-summary-grid,
.settings-modal-wide .project-table-wrap,
.settings-modal-wide .inline-actions:not(.settings-modal-close) {
    width: min(100%, 1040px);
}

.documentation-list details {
    overflow: hidden;
}

.documentation-list summary,
.documentation-list p {
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .app-sidebar.open::after {
        content: "";
        position: fixed;
        inset: 0;
        left: 250px;
        background: rgba(15, 23, 42, .32);
        pointer-events: none;
    }

    .help-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .help-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .page-header,
    .app-content-header {
        align-items: stretch;
    }

    .page-header .actions,
    .app-content-header .actions,
    .toolbar,
    .inline-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .page-header .actions .btn,
    .app-content-header .actions .btn,
    .toolbar .btn {
        flex: 1 1 150px;
        justify-content: center;
    }

    .help-grid {
        grid-template-columns: 1fr;
    }

    .help-card {
        min-height: auto;
    }

    .documentation-list {
        padding: 12px;
    }

    .documentation-list summary {
        padding: 12px;
        font-size: 14px;
    }

    .documentation-list p {
        padding: 0 12px 12px;
        font-size: 13px;
    }

    dialog.modal,
    .modal {
        width: calc(100vw - 12px);
        max-height: 94dvh;
    }

    .modal-title-row {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .project-table,
    .tabulator-table,
    .orders-table,
    .dictionary-table,
    .audit-table {
        font-size: 12px;
    }

    .project-table th,
    .project-table td,
    .tabulator-table th,
    .tabulator-table td,
    .orders-table th,
    .orders-table td,
    .dictionary-table th,
    .dictionary-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 520px) {
    .app-content {
        padding: .55rem;
    }

    .btn,
    input,
    select,
    textarea {
        font-size: 12px;
    }

    .settings-modal-wide {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        padding: 12px;
    }

    .settings-modal-close {
        top: 10px;
        right: 10px;
        min-width: 96px;
        height: 40px;
        padding: 0 12px;
    }
}

/* Final responsive pass: keep every module usable from TV screens to phones. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.app-wrapper,
.app-main,
.app-content,
.container-fluid,
.card,
.panel,
.table-card,
.gt-panel,
.settings-modal-wide,
.settings-modal-wide > section,
.modal,
dialog {
    min-width: 0;
}

.app-content {
    width: 100%;
}

.app-content-header,
.page-header,
.card-header,
.project-board-header,
.operator-stats-head,
.modal-title-row {
    min-width: 0;
}

.app-content-header > *,
.page-header > *,
.card-header > *,
.project-board-header > *,
.operator-stats-head > *,
.modal-title-row > * {
    min-width: 0;
}

.app-content-header h1,
.page-header h1,
.project-board-header h2,
.modal-title-row h2,
.card-title,
.brand-text,
.nav-sidebar .nav-link p,
.header-user strong,
.header-user small {
    overflow-wrap: anywhere;
}

.settings-modal-wide,
dialog.settings-modal-wide {
    width: min(1180px, calc(100vw - clamp(16px, 5vw, 96px))) !important;
    max-width: calc(100vw - clamp(16px, 5vw, 96px)) !important;
    max-height: calc(100dvh - clamp(16px, 5vw, 64px)) !important;
    margin: auto !important;
    padding: clamp(16px, 3vw, 44px) !important;
    overflow: auto;
}

.settings-modal-wide > section {
    width: min(100%, 1040px) !important;
    margin-inline: auto !important;
}

.settings-modal-wide .visual-settings-panel,
.settings-modal-wide .code-format-panel,
.settings-modal-wide .dictionary-settings-panel,
.settings-modal-wide .reset-camp-panel,
.settings-modal-wide .event-settings-panel,
.settings-modal-wide .quota-summary-panel,
.settings-modal-wide .audit-summary-panel,
.settings-modal-wide .operator-stats-panel,
.settings-modal-wide .odk-settings-panel,
.settings-modal-wide .permissions-panel,
.settings-modal-wide .ranks-settings-panel {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
}

.settings-modal-wide .settings-grid,
.settings-modal-wide .visual-settings-grid,
.settings-modal-wide .form-grid,
.settings-modal-wide .odk-url-grid,
.settings-modal-wide .settings-layout,
.settings-modal-wide .permission-columns,
.settings-modal-wide .quota-summary-grid,
.settings-modal-wide .settings-mini-stat-grid,
.settings-modal-wide .settings-summary-grid,
.settings-hub-grid,
.stats-grid,
.info-box-grid,
.gt-kpi-grid,
.kpi-card-grid,
.card-grid,
.menu-card-grid,
.meal-progress-grid,
.resto-stats,
.evaluation-report-grid,
.event-card-grid,
.project-summary-grid,
.users-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.settings-modal-wide .project-board-header,
.settings-modal-wide .operator-stats-head,
.settings-modal-wide .modal-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.settings-modal-wide .project-board-header .btn,
.settings-modal-wide .operator-stats-head .btn {
    flex: 0 1 auto;
}

.table-card,
.project-table-wrap,
.tabulator-table-wrap,
.dictionary-table-wrap,
.report-table-wrap,
.orders-table-wrap,
.responsive-table,
.gt-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.project-table,
.tabulator-table,
.dictionary-table,
.orders-table,
.audit-table,
.gt-table {
    width: max-content;
    min-width: 100%;
}

.project-table th,
.project-table td,
.tabulator-table th,
.tabulator-table td,
.dictionary-table th,
.dictionary-table td,
.orders-table th,
.orders-table td,
.audit-table th,
.audit-table td {
    vertical-align: middle;
}

@media (max-width: 1180px) {
    .gt-dashboard-grid,
    .gt-lower-grid,
    .content-grid,
    .recap-layout,
    .two-columns {
        grid-template-columns: 1fr;
    }

    .gt-kpi-card,
    .info-box,
    .school-stat-card {
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .app-header {
        gap: .5rem;
        padding-inline: .65rem;
    }

    .navbar-start,
    .navbar-end {
        min-width: 0;
        flex-wrap: wrap;
    }

    .navbar-start .nav-link:not(.sidebar-toggle),
    .header-user small {
        display: none;
    }

    .header-user {
        gap: .4rem;
        padding-left: 0;
    }

    .header-user strong {
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .settings-modal-wide,
    dialog.settings-modal-wide {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        padding: 16px !important;
    }

    .settings-modal-wide .project-board-header,
    .settings-modal-wide .operator-stats-head,
    .settings-modal-wide .modal-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-modal-wide .project-board-header .btn,
    .settings-modal-wide .operator-stats-head .btn,
    .settings-modal-wide .modal-actions .btn,
    .settings-modal-wide .actions .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .app-content,
    .page {
        padding: .65rem;
    }

    .inline-input-action {
        grid-template-columns: 1fr;
    }

    .staff-member-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }

    .app-content-header,
    .page-header,
    .card-header {
        align-items: stretch;
        flex-direction: column;
    }

    .actions,
    .toolbar,
    .inline-actions {
        width: 100%;
    }

    .actions .btn,
    .toolbar .btn,
    .inline-actions .btn,
    .inline-actions .icon-only-action {
        flex: 1 1 44px;
    }

    .settings-modal-wide,
    dialog.settings-modal-wide,
    dialog.modal,
    .modal {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        padding: 12px !important;
    }

    .settings-modal-close {
        position: sticky;
        top: 0;
        margin-left: auto;
        margin-right: 0;
    }

    .project-table,
    .tabulator-table,
    .dictionary-table,
    .orders-table,
    .audit-table,
    .gt-table {
        font-size: 12px;
    }

    .project-table th,
    .project-table td,
    .tabulator-table th,
    .tabulator-table td,
    .dictionary-table th,
    .dictionary-table td,
    .orders-table th,
    .orders-table td,
    .audit-table th,
    .audit-table td {
        padding: 7px 9px;
    }

.notification-dropdown {
        position: fixed;
        top: 62px;
        right: 8px;
        left: 8px;
        width: auto;
    }
}

.permission-rules-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 20px 0;
}

.permission-rule-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
    box-shadow: var(--shadow);
}

.permission-rule-card i {
    align-items: center;
    border-radius: 16px;
    color: #fff;
    display: inline-flex;
    font-size: 24px;
    height: 52px;
    justify-content: center;
    margin-bottom: 14px;
    width: 52px;
}

.permission-rule-card h3 {
    margin: 0 0 8px;
}

.permission-rule-card p {
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.permission-rule-card.success i {
    background: #059669;
}

.permission-rule-card.primary i {
    background: #2563eb;
}

.permission-rule-card.warning i {
    background: #f59e0b;
}

/* Mobile sidebar safety override: keep the hamburger visible and the menu usable on phones. */
.sidebar-backdrop {
    display: none;
}

@media (max-width: 1100px) {
    .app-wrapper {
        grid-template-columns: 1fr !important;
    }

    .app-header,
    .app-main {
        grid-column: 1 !important;
        min-width: 0;
    }

    .app-header {
        z-index: 60;
    }

    .navbar-start {
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .navbar-start .sidebar-toggle,
    .mobile-only.sidebar-toggle {
        display: inline-flex !important;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        font-size: 24px;
        color: var(--text);
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    }

    .desktop-only {
        display: none !important;
    }

    .app-sidebar {
        position: fixed !important;
        z-index: 80;
        inset: 0 auto 0 0;
        width: min(86vw, 292px) !important;
        max-width: 292px;
        transform: translateX(-105%) !important;
        transition: transform .22s ease;
    }

    .app-sidebar.open {
        transform: translateX(0) !important;
    }

    .app-sidebar.open::after {
        display: none !important;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 70;
        display: none;
        border: 0;
        padding: 0;
        background: rgba(15, 23, 42, .56);
        backdrop-filter: blur(2px);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
}

@media (min-width: 1101px) {
    .sidebar-backdrop,
    .mobile-only.sidebar-toggle {
        display: none !important;
    }
}

.classes-grid { display: grid; gap: 14px; padding: 18px 22px; }
.class-card { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; }
.class-card summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; list-style: none; }
.class-card summary::-webkit-details-marker { display: none; }
.class-card-title { display: flex; flex-direction: column; gap: 2px; }
.class-card-title strong { color: #172033; font-size: 15px; }
.class-card-title small { color: #708096; font-size: 12px; }
.class-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.class-card-body { padding: 0 18px 18px; border-top: 1px solid #edf1f6; }
.class-card-body .alert { margin: 14px 0 0; }
.class-members-table { margin-top: 12px; }

.permission-presets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #edf1f6; }
.permission-presets-label { color: #52627a; font-size: 12px; font-weight: 800; }
.permission-presets-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.permission-presets-buttons .btn { font-size: 12px; padding: 6px 12px; }

.alert.info { color: #075985; background: #e0f2fe; }
