:root {
  --bg: #f7f2ee;
  --ink: #2e2836;
  --muted: #8c8394;
  --line: #eee5df;
  --card: #ffffff;
  --pink: #d86686;
  --pink-dark: #c34e71;
  --pink-soft: #fbeaf0;
  --lav: #8a6cf0;
  --green: #2fae83;
  --green-soft: #e9f8f1;
  --amber: #c88622;
  --amber-soft: #fbf2df;
  --blue: #5f86e8;
  --blue-soft: #edf1ff;
  --shadow: 0 14px 40px rgba(83, 51, 70, 0.08);
  --shadow-soft: 0 6px 18px rgba(83, 51, 70, 0.05);
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 560px at 8% -6%, #fbe3e9 0%, rgba(251, 227, 233, 0) 60%),
    radial-gradient(900px 600px at 102% 0%, #ece4fb 0%, rgba(236, 228, 251, 0) 55%),
    linear-gradient(135deg, #faf6f2 0%, #f6efec 50%, #f8f3f7 100%);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

::selection { background: rgba(216, 102, 134, 0.18); }

/* ---------- login ---------- */

.login-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 26px 18px;
}
.login-card {
  width: min(390px, 100%);
  padding: 28px 26px 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 60px rgba(83, 51, 70, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dd7b94, #b96de0);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(216, 102, 134, 0.28);
}
.login-brand strong { display: block; font-size: 17px; letter-spacing: 0.01em; }
.login-brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11.5px;
}
.field input,
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fdfbfa;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field input:focus,
.field select:focus {
  border-color: rgba(216, 102, 134, 0.55);
  box-shadow: 0 0 0 3px rgba(216, 102, 134, 0.09);
}
.field input[readonly] { color: var(--muted); background: #f7f3f1; }

.remember-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.remember-row input { width: 15px; height: 15px; accent-color: var(--pink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #d86686, #c34e71);
  box-shadow: 0 7px 16px rgba(195, 78, 113, 0.24);
}
.btn.primary:hover { box-shadow: 0 9px 20px rgba(195, 78, 113, 0.3); }
.btn.primary:disabled { opacity: 0.5; box-shadow: none; cursor: default; }
.btn.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}
.btn.ghost:hover { border-color: rgba(216, 102, 134, 0.4); color: var(--pink-dark); background: #fff; }
.btn.full { width: 100%; }
.login-btn { width: 100%; height: 44px; font-size: 14px; }
.login-hint {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.login-hint.is-error { color: #c34e71; }
.login-foot { margin-top: 18px; color: rgba(70, 55, 70, 0.4); font-size: 10.5px; letter-spacing: 0.08em; }

/* ---------- app ---------- */

.app-view {
  max-width: 1060px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 20px 40px;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 16px;
}
.header-brand { display: flex; align-items: center; gap: 11px; }
.header-brand strong { display: block; font-size: 18px; }
.header-brand span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.header-user { display: flex; align-items: center; gap: 10px; }
.user-pill {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  font-size: 11px;
}
.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.text-btn:hover { color: var(--pink-dark); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.toolbar .btn { min-height: 36px; }

.summary {
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.summary-label { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.summary-date { margin-top: 4px; font-size: 17px; font-weight: 700; }
.summary-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }
.summary-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}
.summary-status.live { color: var(--green); background: var(--green-soft); }
.summary-status.idle { color: var(--muted); background: #f4f0ee; }

.summary-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.count-card {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}
.count-value { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; }
.count-label { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.count-card.arrived .count-value { color: var(--green); }
.count-card.late .count-value { color: var(--amber); }
.count-card.leave .count-value { color: var(--blue); }
.count-card.unmarked .count-value { color: var(--muted); }

.summary-progress { margin-top: 14px; }
.progress-track { height: 7px; border-radius: 999px; background: #f1e9e5; overflow: hidden; }
.progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d86686, #b96de0);
  transition: width 0.25s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.mode-switch {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}
.mode-btn {
  min-width: 92px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.mode-btn.is-active {
  background: #fff;
  color: var(--pink-dark);
  box-shadow: 0 3px 10px rgba(83, 51, 70, 0.08);
}

.single-view { margin-bottom: 16px; }
.single-card {
  position: relative;
  padding: 26px 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  overflow: hidden;
}
.single-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #d86686, #b96de0);
}
.single-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
}
.single-counter { font-variant-numeric: tabular-nums; }
.single-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-dark);
  font-size: 10px;
}
.single-name {
  margin: 4px 0 6px;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.single-sub { color: var(--muted); font-size: 12px; }
.single-status-line { margin-top: 6px; min-height: 20px; font-size: 12px; color: var(--muted); }
.single-status-line b { font-weight: 600; }
.single-status-line .arrived { color: var(--green); }
.single-status-line .late { color: var(--amber); }
.single-status-line .leave { color: var(--blue); }

.single-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 560px;
  margin: 22px auto 0;
}
.single-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdfbfa;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.1s ease, box-shadow 0.16s ease;
}
.single-action:active { transform: translateY(1px); }
.single-action small { color: var(--muted); font-size: 10px; font-weight: 400; }
.single-action:hover { border-color: var(--pink); }
.single-action[data-status="arrived"]:hover,
.single-action[data-status="arrived"].is-active { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(47, 174, 131, 0.22); }
.single-action[data-status="arrived"]:hover small,
.single-action[data-status="arrived"].is-active small { color: rgba(255, 255, 255, 0.75); }
.single-action[data-status="late"]:hover,
.single-action[data-status="late"].is-active { background: var(--amber); border-color: var(--amber); color: #fff; box-shadow: 0 6px 16px rgba(200, 134, 34, 0.22); }
.single-action[data-status="late"]:hover small,
.single-action[data-status="late"].is-active small { color: rgba(255, 255, 255, 0.75); }
.single-action[data-status="leave"]:hover,
.single-action[data-status="leave"].is-active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(95, 134, 232, 0.22); }
.single-action[data-status="leave"]:hover small,
.single-action[data-status="leave"].is-active small { color: rgba(255, 255, 255, 0.75); }

.single-nav { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.single-nav .btn { min-width: 92px; }

.single-progress { max-width: 560px; margin: 18px auto 0; }
.single-progress .progress-meta { margin-top: 6px; }

.single-done { padding: 14px 10px 8px; }
.done-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 26px;
  font-weight: 800;
}
.single-done h3 { margin: 0 0 6px; font-size: 22px; }
.single-done p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.single-done .done-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.single-hint { margin-top: 14px; color: var(--muted); font-size: 10.5px; line-height: 1.7; }

.roster-card {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.roster-head strong { font-size: 14px; }
.roster-head span { color: var(--muted); font-size: 11px; }
.roster-head #rosterMeta { margin-left: 8px; }
.legend { color: var(--muted); font-size: 10.5px; text-align: right; }

.roster-list { display: flex; flex-direction: column; }
.student-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f5efeb;
  transition: background 0.15s ease;
}
.student-row:last-child { border-bottom: 0; }
.student-row:hover { background: rgba(251, 234, 240, 0.28); }
.student-row.is-arrived { background: rgba(47, 174, 131, 0.045); }
.student-row.is-late { background: rgba(200, 134, 34, 0.05); }
.student-row.is-leave { background: rgba(95, 134, 232, 0.045); }

.student-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #f7f1ee;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.student-row.is-arrived .student-index { background: var(--green-soft); color: var(--green); }
.student-row.is-late .student-index { background: var(--amber-soft); color: var(--amber); }
.student-row.is-leave .student-index { background: var(--blue-soft); color: var(--blue); }

.student-name {
  min-width: 0;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.student-note { margin-top: 2px; color: var(--muted); font-size: 10.5px; }

.status-group {
  display: inline-flex;
  gap: 5px;
  padding: 3px;
  border-radius: 10px;
  background: #f8f3f0;
}
.status-btn {
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.status-btn:hover { background: rgba(255, 255, 255, 0.8); color: var(--ink); }
.status-btn.is-active[data-status="arrived"] { background: var(--green); color: #fff; box-shadow: 0 3px 9px rgba(47, 174, 131, 0.25); }
.status-btn.is-active[data-status="late"] { background: var(--amber); color: #fff; box-shadow: 0 3px 9px rgba(200, 134, 34, 0.25); }
.status-btn.is-active[data-status="leave"] { background: var(--blue); color: #fff; box-shadow: 0 3px 9px rgba(95, 134, 232, 0.25); }
.status-btn:disabled { opacity: 0.45; cursor: default; }

/* ---------- history ---------- */

.history-list { display: grid; gap: 10px; }
.history-card {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
}
.history-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.history-date { font-size: 14px; font-weight: 700; }
.history-sub { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.history-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
}
.history-badge.live { color: var(--green); background: var(--green-soft); }
.history-badge.done { color: var(--muted); background: #f4f0ee; }
.history-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.history-chip {
  padding: 4px 8px;
  border-radius: 7px;
  background: #f8f3f0;
  color: var(--muted);
  font-size: 10.5px;
}
.history-chip.arrived { color: var(--green); background: var(--green-soft); }
.history-chip.late { color: var(--amber); background: var(--amber-soft); }
.history-chip.leave { color: var(--blue); background: var(--blue-soft); }
.history-actions { display: flex; justify-content: flex-end; }

/* ---------- empty ---------- */

.empty-state {
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
}
.empty-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 15px;
  background: var(--pink-soft);
  color: var(--pink);
  font-size: 20px;
  font-weight: 700;
}
.empty-state strong { display: block; color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 320px; margin: 6px auto 14px; font-size: 11.5px; line-height: 1.8; }

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(48, 34, 48, 0.38);
  backdrop-filter: blur(4px);
}
.modal-card {
  width: min(640px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(48, 34, 48, 0.28);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 12px;
}
.modal-head h2 { margin: 0; font-size: 19px; }
.eyebrow { margin-bottom: 4px; color: var(--pink); font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}
.icon-btn:hover { background: #f8f3f0; color: var(--ink); }
.modal-body { padding: 0 22px 22px; overflow-y: auto; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.7; }

.detail-meta { margin-bottom: 12px; color: var(--muted); font-size: 11.5px; }
.detail-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.detail-list { display: grid; gap: 6px; }
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfbfa;
}
.detail-name { font-size: 13px; }
.detail-name small { margin-left: 7px; color: var(--muted); font-size: 10px; }
.detail-status {
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 10.5px;
}
.detail-status.arrived { color: var(--green); background: var(--green-soft); }
.detail-status.late { color: var(--amber); background: var(--amber-soft); }
.detail-status.leave { color: var(--blue); background: var(--blue-soft); }
.detail-status.unmarked { color: var(--muted); background: #f4f0ee; }

/* ---------- import ---------- */

.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 12px 0;
  padding: 18px;
  border: 1.5px dashed #e3cfd6;
  border-radius: 13px;
  background: #fdf8fa;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.file-drop:hover { border-color: var(--pink); background: var(--pink-soft); }
.file-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--pink-soft);
  color: var(--pink);
  font-size: 15px;
}
.import-options { display: grid; gap: 10px; }
.field.compact { margin-bottom: 0; }
.field.compact select { height: 38px; }
.check-row { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; }
.check-row input { accent-color: var(--pink); }
.import-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
}
.import-preview {
  max-height: 180px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfbfa;
  overflow-y: auto;
}
.import-preview ol { margin: 0; padding-left: 22px; }
.import-preview li { padding: 2px 0; font-size: 11.5px; color: var(--ink); }
.import-preview li span { color: var(--muted); }
#importError { min-height: 16px; color: #c34e71; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(44, 32, 44, 0.92);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 12px 30px rgba(44, 32, 44, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .app-view { padding: 0 14px 30px; }
  .app-header { padding: 14px 0 12px; }
  .header-brand strong { font-size: 16px; }
  .user-pill { display: none; }
  .toolbar { gap: 6px; }
  .toolbar .btn { flex: 1 1 calc(50% - 6px); min-height: 38px; font-size: 12px; }
  .summary { padding: 16px 16px; }
  .summary-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .count-card { padding: 9px 8px; }
  .count-value { font-size: 19px; }
  .count-label { font-size: 9.5px; }
  .roster-head { padding: 13px 14px 10px; }
  .legend { display: none; }
  .student-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    padding: 11px 14px;
  }
  .status-group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin-top: 2px;
  }
  .status-btn { width: 100%; min-width: 0; height: 32px; }
  .history-card { padding: 14px; }
  .modal { padding: 10px; }
  .modal-card { max-height: 92vh; border-radius: 17px; }
  .modal-head { padding: 16px 16px 10px; }
  .modal-body { padding: 0 16px 16px; }
  .login-card { padding: 24px 20px 18px; }
  .mode-switch { display: flex; width: 100%; }
  .mode-btn { flex: 1; min-width: 0; }
  .single-card { padding: 22px 16px 18px; }
  .single-name { font-size: 38px; }
  .single-actions { gap: 7px; }
  .single-action { min-height: 70px; font-size: 13px; }
  .single-nav .btn { flex: 1; min-width: 0; }
}

@media (max-width: 380px) {
  .summary-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .btn { flex: 1 1 100%; }
  .single-name { font-size: 32px; }
  .single-action { min-height: 64px; font-size: 12px; }
}
