:root {
  --primary: #7b1a2e;
  --primary-dark: #5a0f1f;
  --primary-light: #a83250;
  --secondary: #64748b;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --series-actual: #7b1a2e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { color: inherit; }
button { font-family: inherit; }

/* ---------- ログイン画面 ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #3d0b17 0%, #7b1a2e 45%, #5a0f1f 100%);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
  padding: 36px 30px;
}
.login-card .logo-row { display: flex; justify-content: center; margin-bottom: 18px; }
.login-card .logo-row img { height: 48px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.login-card h1 {
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.10em;
  margin: 0 0 24px;
  color: var(--primary-dark);
}
.login-card .field { margin-bottom: 16px; }
.login-card label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.login-card .error-msg { color: var(--danger); font-size: 12.5px; margin: -8px 0 14px; min-height: 1em; }

/* ---------- フォーム部品 ---------- */
.form-control {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); background: #fff; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748b' d='M5.5 7.5l4.5 4.5 4.5-4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-sm);
  min-height: 40px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f8fafc; }
.btn-block { width: 100%; }

/* ---------- ヘッダー・ナビ ---------- */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 15px; }
.app-header .brand img { height: 28px; }
.app-header .user-menu { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.app-header .user-menu button { background: rgba(255,255,255,.15); color: #fff; border: none; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.app-header .user-menu button:hover { background: rgba(255,255,255,.28); }

.tab-nav {
  display: flex;
  gap: 4px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  overflow-x: auto;
}
.tab-nav a {
  display: block;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tab-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

main.container { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }

/* ---------- カード ---------- */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.card h2 { font-size: 15px; font-weight: 900; margin: 0 0 16px; }
.card-row { display: flex; gap: 20px; flex-wrap: wrap; }
.card-row > .card { flex: 1 1 320px; margin-bottom: 0; }

/* ---------- KPIタイル ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-tile { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi-tile .kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.kpi-tile .kpi-value { font-size: 24px; font-weight: 900; color: var(--text); line-height: 1.2; }
.kpi-tile .kpi-value small { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-left: 2px; }
.kpi-tile .kpi-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ---------- 検索フォーム ---------- */
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.filter-grid .field label { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.filter-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- テーブル ---------- */
.data-table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
table.data-table th { color: var(--text-muted); font-weight: 700; font-size: 12px; }
table.data-table tbody tr:hover { background: #f8fafc; }
table.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-muted { background: #e2e8f0; color: var(--text-muted); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13px; }

.empty-state { text-align: center; color: var(--text-muted); padding: 40px 10px; font-size: 13.5px; }
.loading-state { text-align: center; color: var(--text-muted); padding: 40px 10px; font-size: 13.5px; }
.error-banner { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }

/* ---------- チャート ---------- */
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -110%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .1s;
  z-index: 10;
}
.chart-tooltip.visible { opacity: 1; }
.chart-axis-label { font-size: 10.5px; fill: var(--text-muted); }
.chart-line { fill: none; stroke: var(--series-actual); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: var(--series-actual); }
.chart-bar { fill: var(--series-actual); }
.chart-bar-track { fill: #f1f5f9; }

@media (max-width: 640px) {
  main.container { padding: 16px 10px 60px; }
  .card { padding: 16px; }
  table.data-table th, table.data-table td { padding: 8px 6px; }
}

/* ===== AYG残業代チェック 追加スタイル ===== */
.login-note { text-align: center; font-size: 11.5px; color: var(--text-muted); margin: 14px 0 0; }
.tab-nav a i { margin-right: 4px; }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 12.5px; }
.btn-icon { min-height: 36px; width: 36px; padding: 0; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--text); }
.form-sm { padding: 6px 8px; font-size: 13px; border-width: 1px; }
select.form-sm { padding-right: 28px; }
.sub { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.hint { font-size: 12px; color: var(--text-muted); line-height: 1.7; margin: 4px 2px 16px; }

.selector-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.selector-bar .emp-select { width: auto; min-width: 200px; font-weight: 700; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-label { font-weight: 900; font-size: 15px; white-space: nowrap; min-width: 130px; text-align: center; }
.period-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.bar-spacer { flex: 1; }

.kpi-tile.kpi-danger { border-left: 4px solid var(--danger); }
.kpi-tile.kpi-danger .kpi-value { color: var(--danger); }
.kpi-tile.kpi-warning { border-left: 4px solid var(--warning); }

.badge i { margin-right: 2px; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
table.data-table td.diff { font-weight: 700; }
table.data-table td.diff.neg { color: var(--danger); }
table.data-table tr.row-short td { background: #fff7f7; }
table.data-table td.actions { display: flex; gap: 4px; }
table.data-table tr.total td { font-weight: 900; border-top: 2px solid var(--border); }
table.data-table.compact th, table.data-table.compact td { padding: 6px 8px; }
table.data-table tr.sun td.date-cell, table.data-table tr.sun td:first-child { color: var(--danger); }
table.data-table tr.sat td.date-cell, table.data-table tr.sat td:first-child { color: #2563eb; }
table.data-table tr.sun td, table.data-table tr.sat td { background: #fafbfc; }
.warn-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--warning); font-weight: 700; cursor: help; white-space: nowrap; }

.card-flush { padding: 6px 8px; }
.tc-table td { padding: 4px 6px; }
.tc-table input[type=time] { width: 110px; }
.tc-table .f-break { width: 76px; }
.tc-table .f-type { width: 150px; }
.tc-table .f-note { min-width: 140px; }
.tc-table td.c-ot { font-weight: 700; color: var(--primary); }

.summary-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: stretch; }
.mini-kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 14px; display: flex; flex-direction: column; min-width: 92px; }
.mini-kpi span { font-size: 11px; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
.mini-kpi b { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip-warn { flex-basis: 100%; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12.5px; }

.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.detail-head h1 { font-size: 20px; margin: 0; }
.warn-box { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; line-height: 1.8; }
.info-banner { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

.ps-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ps-layout .card { margin-bottom: 16px; }
.ps-table td { padding: 5px 6px; }
.ps-table .i-name { min-width: 160px; }
.ps-table .i-amount { width: 130px; }
.ps-table .i-kind { width: 150px; font-weight: 700; }
.num-input { text-align: right; font-variant-numeric: tabular-nums; }
.i-kind.kind-base { color: #166534; }
.i-kind.kind-excluded { color: var(--text-muted); }
.i-kind.kind-ot, .i-kind.kind-ot60, .i-kind.kind-night, .i-kind.kind-holiday, .i-kind.kind-fixed_ot { color: var(--primary); }
.add-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.stated-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.field-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.input-unit { display: flex; align-items: center; gap: 6px; }
.input-unit span { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.rule-card p { font-size: 12.5px; line-height: 1.7; margin: 0 0 8px; color: var(--text); }
.rule-card h2 { font-size: 13.5px; }

.add-emp { display: flex; gap: 10px; flex-wrap: wrap; }
.add-emp #new-emp { flex: 2 1 200px; }
.add-emp input { flex: 1 1 160px; }
.toggle-btn { border: 1px solid var(--border); background: #f8fafc; color: var(--text-muted); border-radius: 999px; padding: 5px 14px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.toggle-btn.on { background: #dcfce7; border-color: #86efac; color: #166534; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.settings-grid .card { margin-bottom: 0; }
.set-row { margin-bottom: 14px; }
.set-row > label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 4px; }
.set-row .input-unit input { width: 140px; }
.set-help { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.6; }
.calc-out { background: #f8fafc; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1e293b; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; opacity: 0; transition: all .25s; z-index: 100; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }
.toast.info { background: #1e40af; }

@media (max-width: 900px) {
  .ps-layout { grid-template-columns: 1fr; }
}
@media print {
  .no-print, .app-header, .tab-nav { display: none !important; }
  body { background: #fff; }
  main.container { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid var(--border); break-inside: avoid; }
}
.btn { text-decoration: none; white-space: nowrap; }
table.data-table th.num { text-align: right; }
.card-row { margin-bottom: 20px; }
.app-header .brand span, .app-header .user-menu span { white-space: nowrap; }
@media (max-width: 640px) {
  .app-header { padding: 0 12px; }
  .app-header .brand img, .app-header .user-menu span { display: none; }
  .selector-bar .emp-select { flex: 1 1 100%; }
}

/* ===== レビュー反映 ===== */
.badge { white-space: nowrap; }
.app-header .brand img { background: #fff; border-radius: 6px; padding: 2px 6px; height: 30px; }
.sticky-top, .selector-bar { position: sticky; top: 56px; z-index: 15; background: var(--bg); }
.selector-bar { padding: 8px 0; margin: -8px 0 8px; }
.sticky-top .selector-bar { position: static; margin-bottom: 8px; }
.sticky-top { padding-bottom: 6px; }
.sticky-top .summary-strip { margin-bottom: 4px; }
table.data-table .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; }
table.data-table tr.row-short td.sticky-col { background: #fff7f7; }
table.data-table tr.warn-row td { background: #fffbeb; color: #92400e; font-size: 12px; padding: 4px 10px 8px 24px; white-space: normal; line-height: 1.7; }
table.data-table tr.warn-row:hover td { background: #fffbeb; }
table.data-table tr.sat td { background: #f5f8ff; }
table.data-table tr.sun td { background: #fff5f5; }
table.data-table tr.row-suspect td { background: #fef9c3 !important; }
.tc-table td { padding: 2px 4px; }
.tc-table .form-sm { padding: 3px 6px; height: 30px; }
.tc-table input[type=time] { width: 96px; }
.tc-table .f-type { width: 128px; }
.tc-table td.c-ot { font-weight: 400; color: var(--text-muted); }
.tc-table td.c-ot.has { font-weight: 700; color: var(--primary); }
.mini-kpis.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.conclusion { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding: 12px; border-radius: var(--radius-sm); background: #f8fafc; }
.conclusion div { display: flex; flex-direction: column; }
.conclusion span { font-size: 11px; font-weight: 700; color: var(--text-muted); }
.conclusion b { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conclusion.st-short { background: #fef2f2; }
.conclusion.st-short div:last-child b { color: var(--danger); }
.conclusion.st-ok, .conclusion.st-ok_fixed { background: #f0fdf4; }
.ps-table .col-name { width: 100%; }
.ps-table td:last-child, .ps-table th:last-child, .ps-table .kind-note { width: 1%; }
.kind-note i { color: var(--warning); cursor: help; }
.rate-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px; background: #f8fafc; border-radius: var(--radius-sm); }
.rate-box .field-label { margin: 0; }
.rate-box input { width: 140px; }
.unit-row { margin-bottom: 10px; }
.unit-row input { width: 140px; }
table.fit-table { width: auto; }
.fit-table .e-dept { width: 140px; }
.h2-sub { font-size: 13.5px !important; margin: 20px 0 12px !important; }
@media (max-width: 640px) {
  .sticky-top, .selector-bar { top: 56px; }
  .tab-nav { padding: 0 6px; }
  .tab-nav a { padding: 10px 9px; font-size: 12.5px; }
  .tab-nav a i { display: none; }
  .ps-table .i-name { min-width: 110px; }
  .ps-table .i-amount { width: 100px; }
  .ps-table .i-kind { width: 120px; }
  .mini-kpis.grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-head { flex-wrap: wrap; }
  .detail-head .sub { display: block; white-space: nowrap; }
  .conclusion b { font-size: 16px; }
}
@media print {
  .sticky-top, .selector-bar { position: static; }
  table.data-table tr.warn-row td { background: #fff; }
}
.stated-grid input { min-width: 0; width: 100%; }
.stated-grid .input-unit { min-width: 0; }
.tc-table .f-type { width: 150px; }
@media (max-width: 900px) {
  .ps-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .selector-bar { position: static; }
  .ps-table .i-name { min-width: 90px; }
  .ps-table .i-amount { width: 90px; }
  .ps-table .i-kind { width: 112px; }
}
.time-set { width: 140px; }
.fit-table .e-pay { width: 92px; }

/* ===== 計算機画面 ===== */
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.calc-layout .card { margin-bottom: 0; }
.calc-field { margin-bottom: 14px; }
.calc-field > label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; white-space: nowrap; }
.calc-field .input-unit input { width: 100%; }
.calc-field.big input { font-size: 18px; font-weight: 700; border-color: var(--primary-light); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn { border: 1px solid var(--border); background: #f8fafc; color: var(--text-muted); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.seg-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.calc-layout hr { border: none; border-top: 1px solid var(--border); margin: 6px 0 16px; }
.result-col { position: sticky; top: 76px; }
.res-block { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.res-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.res-head h3 { font-size: 14px; margin: 0; white-space: nowrap; }
.res-total { font-size: 22px; font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-formula { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; }
.res-formula b { color: var(--text); }
.cmp { margin-top: 8px; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; white-space: nowrap; }
.cmp.short { background: #fef2f2; color: #991b1b; }
.cmp.over { background: #eff6ff; color: #1e40af; }
.cmp.ok { background: #f0fdf4; color: #166534; }
.grand { display: flex; justify-content: space-between; align-items: baseline; background: #f8fafc; border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 4px; }
.grand span { font-weight: 700; }
.grand b { font-size: 26px; font-variant-numeric: tabular-nums; }
.grand.sub-grand b { font-size: 18px; }
.grand b.neg { color: var(--danger); }
@media (max-width: 860px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .result-col { position: static; }
}
@media (max-width: 480px) {
  .pair { grid-template-columns: 1fr; }
}

/* ===== 展開用QRコード ===== */
.qr-card { display: flex; gap: 16px; align-items: center; margin-top: 4px; }
.qr-box img, .qr-box canvas { display: block; }
.qr-card .qr-box { flex: 0 0 auto; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.qr-info { min-width: 0; }
.qr-info h3 { font-size: 14px; margin: 0 0 4px; }
.qr-url { font-size: 12.5px; color: var(--text-muted); word-break: break-all; margin-bottom: 4px; }
.qr-login { font-size: 12.5px; margin-bottom: 8px; }
.qr-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.qr-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.qr-sheet { background: #fff; border-radius: 16px; padding: 28px 32px; text-align: center; max-width: 420px; width: 100%; }
.qr-sheet h2 { margin: 0 0 16px; font-size: 18px; color: var(--primary-dark); }
.qr-sheet .qr-box { display: inline-block; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.qr-sheet .qr-url { font-size: 13px; }
.qr-sheet .qr-login { font-size: 14px; margin-bottom: 16px; }
.qr-sheet .qr-actions { justify-content: center; }
@media print {
  body.qr-printing > *:not(.qr-modal) { display: none !important; }
  body.qr-printing .qr-modal { position: static; background: none; padding: 0; }
  body.qr-printing .qr-sheet { box-shadow: none; margin: 40px auto; }
}
@media (max-width: 480px) {
  .qr-card { flex-direction: column; text-align: center; }
  .qr-actions { justify-content: center; }
}
