/* Tuition Manager — vibrant ed-tech theme: violet gradients, warm orange actions, fresh green for money */
:root {
  --bg: #f6f3ff;
  --bg-2: #eef8f3;
  --card: #ffffff;
  --text: #1d1440;
  --muted: #6d6790;
  --line: #ebe6f7;
  --primary: #6d28d9;
  --primary-2: #8b5cf6;
  --primary-ink: #ffffff;
  --primary-soft: #f1ebff;
  --grad: linear-gradient(135deg, #4c1d95 0%, #6d28d9 45%, #9d4edd 100%);
  --orange: #ff6a3d;
  --grad-cta: linear-gradient(135deg, #ff5f3a 0%, #ff8a3d 100%);
  --green: #0e9f6e;
  --green-2: #22c55e;
  --green-soft: #e3f8ef;
  --red: #e0435c;
  --red-soft: #fdecef;
  --amber: #c26a00;
  --amber-soft: #fff3dc;
  --sky: #0b8fd6;
  --sky-soft: #e3f4fd;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(45, 18, 105, .04), 0 8px 24px rgba(76, 29, 149, .07);
  --shadow-lg: 0 18px 40px rgba(76, 29, 149, .22);
  --nav-h: 68px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14.5px/1.5 var(--font);
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 100% -10%, #efe7ff 0%, transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, var(--bg-2) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  padding-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom));
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 15.5px; font-weight: 600; }
h3 { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); min-width: 0; font-size: 15.5px; }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; background: #fff; }
.brand .mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; flex: none;
  display: grid; place-items: center; box-shadow: 0 6px 14px rgba(109, 40, 217, .35);
}
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.topnav { display: none; gap: 2px; background: var(--primary-soft); padding: 4px; border-radius: 999px; }
.topnav a { padding: 7px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; }
.topnav a:hover { color: var(--primary); }
.topnav a.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(76, 29, 149, .12); }
.icon-btn { background: none; border: 0; padding: 8px; color: var(--muted); cursor: pointer; border-radius: 12px; display: inline-flex; }
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 18px 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.cols > *, .grid > *, .filters > * { min-width: 0; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) {
  .cols { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px 12px; }
.card-head + .list, .card-head + .table-wrap, .card-head + .empty { border-top: 1px solid var(--line); }
.card-head a { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); }
.card-head a:hover { background: #e6dbff; }

/* section label pill (e.g. "Classes 8–10") */
.pill-label { display: inline-block; background: var(--grad); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; }

/* ---------- hero (dashboard) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--grad);
  border-radius: 26px; padding: 22px 20px 26px; box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 260px; height: 260px; right: -80px; top: -110px; background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 70%); }
.hero::after { width: 340px; height: 120px; left: -40px; bottom: -78px; background: rgba(255,255,255,.10); }
.hero > * { position: relative; z-index: 1; }
.hero .hello { font-size: 13.5px; opacity: .85; }
.hero .label { font-size: 13px; opacity: .85; margin-top: 14px; }
.hero .big { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hero .progress { height: 9px; background: rgba(255,255,255,.22); margin-top: 12px; max-width: 420px; }
.hero .progress > span { background: linear-gradient(90deg, #a7f3d0, #34d399); }
.hero .hint { font-size: 12.5px; opacity: .85; margin-top: 6px; }
.hero .btn-row { margin-top: 18px; }
.hero .chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero .glass { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 8px 12px; font-size: 12.5px; }
.hero .glass b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.floaters { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.floater {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 18px; box-shadow: 0 8px 18px rgba(0,0,0,.18);
  animation: bob 6s ease-in-out infinite;
}
.floater svg { width: 22px; height: 22px; }
.floater.o { background: linear-gradient(135deg, #ff7a3d, #ffb03d); }
.floater.g { background: linear-gradient(135deg, #10b981, #6ee7b7); }
.floater.y { background: linear-gradient(135deg, #f59e0b, #fde047); color: #5b3b00; }
.floater.p { background: linear-gradient(135deg, #f472b6, #c084fc); }
.floater.s { width: 34px; height: 34px; font-size: 14px; }
.floater.s svg { width: 16px; height: 16px; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .floater { animation: none; } }
.hero-art { display: none; }
@media (max-width: 859px) {
  .hero .floater:not(:first-child) { display: none; }
  .hero .floater:first-child { top: 18px !important; right: 16px !important; width: 40px; height: 40px; font-size: 16px; }
  .hero .hello { padding-right: 48px; }
  .hero .big { font-size: 32px; }
  .hero .chips-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hero .glass { padding: 7px 9px; font-size: 11px; }
  .hero .glass b { font-size: 13.5px; white-space: nowrap; }
  .hero .btn-row { display: grid; grid-template-columns: 1fr 1fr; }
  .hero .btn.big { min-height: 48px; font-size: 14.5px; padding: 10px 12px; }
}
@media (max-width: 639px) {
  .stat { flex-direction: column; gap: 10px; padding: 14px; }
  .stat .ico { width: 38px; height: 38px; border-radius: 12px; }
  .stat .ico svg { width: 19px; height: 19px; }
  .stat .value { font-size: 19px; }
}
@media (min-width: 860px) {
  .hero { padding: 30px 34px 34px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; }
  .hero .big { font-size: 42px; }
  .hero-art { display: block; justify-self: center; }
}

/* quick-action tiles */
.tile {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px;
  background: #faf8ff; border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.tile:hover { transform: translateY(-2px); background: #fff; box-shadow: var(--shadow); }
.tile .ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.tile .ico svg { width: 20px; height: 20px; }

/* ---------- stats ---------- */
.stat { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.stat .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.stat .ico svg { width: 22px; height: 22px; }
.ico.violet { background: var(--primary-soft); color: var(--primary); }
.ico.green { background: var(--green-soft); color: var(--green); }
.ico.red { background: var(--red-soft); color: var(--red); }
.ico.orange { background: #fff0e8; color: var(--orange); }
.ico.sky { background: var(--sky-soft); color: var(--sky); }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .value { font-size: 21px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .hint { color: var(--muted); font-size: 12px; margin-top: 1px; }
.stat.hero-sm { background: var(--grad); color: #fff; border: 0; }
.stat.hero-sm .label, .stat.hero-sm .hint { color: rgba(255,255,255,.82); }
.stat.hero-sm .ico { background: rgba(255,255,255,.18); color: #fff; }
.value.red { color: var(--red); }
.value.green { color: var(--green); }
a.stat { color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-2)); border-radius: 99px; }

/* bar chart */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding: 18px 18px 0; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 46px; background: linear-gradient(180deg, #e9defe, #f4eeff); border-radius: 12px 12px 6px 6px; min-height: 4px; }
.bars .bar.now i { background: linear-gradient(180deg, #8b5cf6, #6d28d9); box-shadow: 0 8px 16px rgba(109, 40, 217, .3); }
.bars .bar b { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.bars .bar.now b { color: var(--primary); }
.bar-labels { display: flex; gap: 12px; padding: 8px 18px 16px; }
.bar-labels span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); font-weight: 500; }

.hbar { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 9px 18px; font-size: 14px; }
.hbar .track { height: 10px; background: var(--primary-soft); border-radius: 99px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #6d28d9); border-radius: 99px; }
.hbar:nth-child(2) .track span { background: linear-gradient(90deg, #34d399, #0e9f6e); }
.hbar:nth-child(3) .track span { background: linear-gradient(90deg, #ffb03d, #ff6a3d); }
.hbar:nth-child(4) .track span { background: linear-gradient(90deg, #38bdf8, #0b8fd6); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; color: var(--text); }
a.row { transition: background .12s ease; }
a.row:hover { background: #faf8ff; }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { text-align: right; flex: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 14px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 700; flex: none; font-size: 14px;
}
.avatar.c1 { background: #e3f8ef; color: #0e8a60; }
.avatar.c2 { background: #fff0e8; color: #e0541f; }
.avatar.c3 { background: #e3f4fd; color: #0b7fbf; }
.avatar.c4 { background: #fdeaf5; color: #c0307a; }
.avatar.c5 { background: #fff6d6; color: #a06a00; }
.empty { padding: 30px 18px; text-align: center; color: var(--muted); }
.empty .em { font-size: 30px; display: block; margin-bottom: 4px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.grey { background: #f1eff7; color: var(--muted); }
.badge.blue { background: var(--primary-soft); color: var(--primary); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 18px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-top: 0; background: #faf8ff; }
td.r, th.r { text-align: right; }
tr.void td { color: var(--muted); text-decoration: line-through; }
tfoot td { font-weight: 700; background: #faf8ff; }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span, .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops phones zooming in on focus */
  color: var(--text); background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; min-height: 48px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(139, 92, 246, .16); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--primary); }
.form-grid { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; border: 1.5px solid var(--line); background: #fff; color: var(--text);
  padding: 10px 18px; border-radius: 999px; min-height: 44px; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--primary-soft); border-color: #dccdfb; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(109, 40, 217, .28); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.cta { background: var(--grad-cta); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(255, 106, 61, .32); }
.btn.cta:hover { filter: brightness(1.06); }
.btn.green { background: linear-gradient(135deg, #0e9f6e, #22c55e); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(14, 159, 110, .28); }
.btn.ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.45); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.24); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #f7c9d1; }
.btn.small { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.big { min-height: 54px; font-size: 16px; padding: 12px 22px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline { display: inline; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg input { display: none; }
.seg label { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 4px; text-align: center; font-weight: 600; cursor: pointer; background: #fff; transition: all .15s ease; }
.seg input:checked + label { border-color: var(--primary-2); background: var(--primary-soft); color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, .14); }

.amount-input { font-size: 32px; font-weight: 700; padding: 14px; text-align: center; font-variant-numeric: tabular-nums; color: var(--primary); background: #fbf9ff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { border: 1.5px solid #e3d8fb; background: #fff; border-radius: 99px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--primary); }
.chip:hover { background: var(--primary-soft); }

.search { position: relative; }
.search input { padding-left: 44px; border-radius: 999px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters > * { flex: 1 1 140px; }
.filters .btn { flex: 0 0 auto; }

.tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin-bottom: 18px; overflow-x: auto; box-shadow: var(--shadow); }
.tabs a { flex: 1; text-align: center; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; white-space: nowrap; font-size: 14px; }
.tabs a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 14px rgba(109, 40, 217, .25); }

/* ---------- flash ---------- */
.flash { padding: 13px 16px; border-radius: 16px; margin-bottom: 16px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.flash::before { font-size: 18px; }
.flash.success { background: var(--green-soft); color: #0a7a55; border: 1px solid #c4eedb; }
.flash.success::before { content: "✓"; font-weight: 700; }
.flash.error { background: var(--red-soft); color: var(--red); border: 1px solid #f7cdd5; }
.flash.error::before { content: "!"; font-weight: 800; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }

/* ---------- attendance ---------- */
.att-list label.row { cursor: pointer; user-select: none; }
.att-list input { display: none; }
.att-toggle { width: 96px; text-align: center; padding: 8px 0; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: var(--red-soft); color: var(--red); transition: all .15s ease; }
.att-toggle::after { content: "Absent"; }
.att-list input:checked ~ .att-toggle { background: var(--green-soft); color: var(--green); }
.att-list input:checked ~ .att-toggle::after { content: "Present"; }
.att-list input:not(:checked) ~ .avatar { background: var(--red-soft); color: var(--red); }
.sticky-save { position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); margin-top: 16px; z-index: 5; }
.counts { display: flex; gap: 8px; }
div.field { margin-bottom: 14px; }
/* gradient class badge (8-A, 9-B …); colour per grade */
.row > .cls { min-width: 46px; height: 46px; padding: 0 8px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; white-space: nowrap; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.row > .cls.g0 { background: linear-gradient(135deg, #0e9f6e, #34d399); }
.row > .cls.g1 { background: var(--grad); }
.row > .cls.g2 { background: var(--grad-cta); }

/* ---------- bottom nav (mobile) ---------- */
.bottomnav {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 10px 30px rgba(45, 18, 105, .16);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 6px 0; }
.bottomnav a svg { padding: 3px 12px; box-sizing: content-box; border-radius: 999px; }
.bottomnav a.on { color: var(--primary); }
.bottomnav a.on svg { background: var(--primary-soft); }
.bottomnav a.collect { position: relative; top: -18px; }
.bottomnav a.collect .fab {
  width: 60px; height: 60px; border-radius: 50%; background: var(--grad-cta); color: #fff;
  display: grid; place-items: center; font-size: 26px; font-weight: 700;
  box-shadow: 0 10px 20px rgba(255, 106, 61, .4); border: 5px solid #fff;
}
.bottomnav a.collect.on { color: var(--orange); }

@media (min-width: 860px) {
  body { padding-bottom: 28px; }
  .topnav { display: flex; }
  .bottomnav { display: none; }
  .sticky-save { bottom: 16px; }
  .fab-desktop { display: inline-flex !important; }
}
.fab-desktop { display: none !important; }

/* ---------- login ---------- */
.login-body { padding: 0; background: #fff; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.login-art {
  position: relative; overflow: hidden; background: var(--grad); color: #fff;
  padding: 34px 24px 70px; border-radius: 0 0 36px 36px;
}
.login-art h1 { font-size: 26px; line-height: 1.2; margin-top: 18px; }
.login-art p { opacity: .85; margin: 8px 0 0; max-width: 420px; }
.login-art .brand { color: #fff; }
.login-art .brand .mark { background: rgba(255,255,255,.18); box-shadow: none; }
.login-art .illus { display: none; }
.login-form { padding: 0 18px 30px; margin-top: -46px; position: relative; z-index: 2; }
.login-card { width: 100%; max-width: 420px; margin: 0 auto; padding: 26px 22px; }
.login-card h2 { font-size: 20px; margin-bottom: 4px; }
@media (min-width: 860px) {
  .login-wrap { grid-template-columns: 1.1fr 1fr; }
  .login-art { border-radius: 0 40px 40px 0; padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; }
  .login-art h1 { font-size: 38px; }
  .login-art .illus { display: block; margin-top: 30px; max-width: 420px; }
  .login-form { margin: 0; display: grid; place-items: center; padding: 40px; }
  .login-card { box-shadow: none; border: 0; }
}

/* ---------- receipt ---------- */
.receipt { max-width: 540px; margin: 0 auto; }
.receipt .card { overflow: hidden; }
.receipt .r-head { text-align: center; padding: 24px 18px 18px; background: var(--grad); color: #fff; position: relative; }
.receipt .r-head img { max-height: 56px; max-width: 160px; margin-bottom: 8px; background: #fff; border-radius: 12px; padding: 4px; }
.receipt .r-head .c-name { font-size: 20px; font-weight: 700; }
.receipt .r-head .c-meta { opacity: .85; font-size: 13px; }
.receipt .r-head .tag { display: inline-block; margin-top: 12px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); padding: 4px 14px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; }
.receipt .r-amount { text-align: center; padding: 22px 18px 14px; }
.receipt .r-amount .v { font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 4px 18px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.stamp { display: inline-block; border: 2px solid var(--red); color: var(--red); font-weight: 800; padding: 4px 12px; border-radius: 10px; transform: rotate(-6deg); }

/* settings logo etc */
details > summary::-webkit-details-marker { display: none; }

@media print {
  body { background: #fff; padding: 0; }
  .topbar, .bottomnav, .no-print, .flash { display: none !important; }
  main { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .receipt .r-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
