
/* Login */
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 10% 10%,rgba(255,210,74,.22),transparent 32%),radial-gradient(circle at 90% 15%,rgba(47,117,214,.24),transparent 28%),linear-gradient(145deg,#0e2d52 0%,#173b6c 48%,#215da1 100%);position:relative;overflow:hidden}
.login-page:before,.login-page:after{content:"";position:absolute;border-radius:50%;filter:blur(1px);pointer-events:none}.login-page:before{width:280px;height:280px;right:-90px;bottom:-100px;background:rgba(255,210,74,.14)}.login-page:after{width:220px;height:220px;left:-90px;top:-90px;background:rgba(255,255,255,.07)}
.login-shell{width:min(460px,100%);position:relative;z-index:1}.login-brand{display:flex;align-items:center;gap:12px;color:#fff;margin:0 auto 16px;width:max-content}.login-logo{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#ffd24a;color:#173b6c;font-size:25px;box-shadow:0 10px 24px rgba(0,0,0,.16)}.login-kicker{font-size:10px;letter-spacing:.16em;font-weight:900;opacity:.7}.login-title-mini{font-size:16px;font-weight:950;letter-spacing:.04em}.login-card{background:rgba(255,255,255,.98);border:1px solid rgba(255,255,255,.65);border-radius:28px;padding:28px;box-shadow:0 30px 80px rgba(6,25,47,.34)}.login-badge{display:inline-flex;padding:7px 10px;border-radius:999px;background:#edf4fc;color:#2364ad;font-size:10px;font-weight:950;letter-spacing:.08em}.login-card h1{font-size:30px;line-height:1.05;margin:14px 0 8px;letter-spacing:-.04em;color:#173b6c}.login-lead{margin:0 0 22px;color:#6e7b8c;font-size:13px;line-height:1.5}.login-field{display:grid;gap:7px;margin-top:13px}.login-field label{font-size:10px;font-weight:950;letter-spacing:.08em;color:#6e7b8c}.login-input{display:flex;align-items:center;gap:9px;border:1px solid #dde5ef;border-radius:14px;padding:0 12px;background:#fff;transition:.18s}.login-input:focus-within{border-color:#2f75d6;box-shadow:0 0 0 4px rgba(47,117,214,.11)}.login-input span{font-size:14px;opacity:.8}.login-input input{border:0;outline:0;min-height:48px;width:100%;font:inherit;color:#182638;background:transparent}.login-submit{width:100%;margin-top:18px;min-height:50px;border-radius:14px;justify-content:space-between;padding:0 16px;font-size:12px}.login-submit:disabled{opacity:.65;cursor:wait}.login-error{margin-top:11px;padding:10px 12px;border-radius:12px;background:#fff0f0;color:#b13838;border:1px solid #f2cccc;font-size:11px;font-weight:750}.login-foot{display:flex;justify-content:space-between;gap:10px;margin-top:18px;color:#8491a1;font-size:10px}.login-quote{text-align:center;color:rgba(255,255,255,.8);font-size:12px;line-height:1.5;margin-top:18px}.login-quote strong{color:#ffd24a}
:root {
  --navy: #173b6c;
  --navy-2: #214f8e;
  --blue: #2f75d6;
  --blue-soft: #eaf2fd;
  --yellow: #ffd24a;
  --yellow-soft: #fff6cf;
  --green: #1f9d65;
  --green-soft: #e8f7ef;
  --red: #cf4b57;
  --red-soft: #fdebed;
  --ink: #17324f;
  --muted: #6b7a90;
  --line: #e5ebf3;
  --paper: #f6f8fb;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(25, 55, 95, .10);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }
.mobile-only { display: none; }

.mobile-menu-btn{display:none;border:0;background:var(--navy);color:#fff;width:44px;height:44px;border-radius:13px;align-items:center;justify-content:center;font-size:21px;line-height:1;box-shadow:0 8px 18px rgba(23,59,108,.18)}
.mobile-menu-backdrop{display:none}
.mobile-drawer{background:linear-gradient(180deg,var(--navy) 0%,#12325b 100%);color:#fff;width:min(320px,88vw);height:100%;padding:18px;display:flex;flex-direction:column;box-shadow:18px 0 40px rgba(8,28,54,.28)}
.mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-drawer-head .brand{padding:2px 0}.mobile-drawer-head .icon-btn{background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.15)}
.mobile-nav-list{display:grid;gap:8px}.mobile-nav-list .nav-item{font-size:14px;padding:13px 14px}.mobile-nav-list .nav-item.active{background:#fff;color:var(--navy)}
.mobile-drawer-footer{margin-top:auto;display:grid;gap:12px;padding-top:18px}.mobile-drawer-footer .ghost-btn{background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.14)}
body.menu-open{overflow:hidden}

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 270px;
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, var(--navy) 0%, #12325b 100%);
  color: white;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px; }
.brand-mark {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px;
  background: var(--yellow); color: var(--navy); font-size: 27px; box-shadow: 0 9px 20px rgba(0,0,0,.12);
}
.brand-title { font-size: 14px; letter-spacing: .12em; font-weight: 900; }
.brand-subtitle { font-size: 27px; letter-spacing: .06em; font-weight: 950; line-height: 1; }
.brand-tagline { margin: 18px 8px 12px; font-weight: 800; color: #ffe991; font-size: 11px; letter-spacing: .10em; }

.nav-list { display: grid; gap: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: transparent;
  color: rgba(255,255,255,.78); border-radius: 13px; text-align: left; transition: .15s ease;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: white; color: var(--navy); box-shadow: 0 8px 18px rgba(0,0,0,.12); font-weight: 800; }
.nav-icon { width: 24px; text-align: center; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; padding: 8px; }
.mini-quote { font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.72); }
.storage-status { font-size: 11px; color: #bfe6d3; }

.main-content { min-width: 0; flex: 1; }
.topbar {
  position: sticky; top: 0; z-index: 8; padding: 18px 28px;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  background: rgba(246,248,251,.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(229,235,243,.9);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 { margin: 3px 0 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -.03em; }
.eyebrow { font-size: 10px; letter-spacing: .14em; font-weight: 900; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.view { padding: 24px 28px 48px; max-width: 1480px; margin: 0 auto; }
.page-grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }
.card-title { display:flex; justify-content:space-between; align-items:center; gap: 12px; margin-bottom: 15px; }
.card-title h2, .card-title h3 { margin: 0; letter-spacing: -.02em; }
.card-title h2 { font-size: 18px; }
.card-title h3 { font-size: 15px; }
.card-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.hero {
  background: linear-gradient(135deg, #17457f 0%, #2364ad 68%, #2f75d6 100%);
  color: white; padding: 22px; border-radius: 22px; box-shadow: 0 18px 40px rgba(35,91,153,.24);
  position: relative; overflow: hidden;
}
.hero:after { content:""; position:absolute; width:220px; height:220px; border-radius:50%; background: rgba(255,210,74,.12); right:-58px; top:-74px; }
.hero h2 { font-size: 28px; margin: 0 0 8px; position: relative; z-index:1; }
.hero p { margin: 0; max-width: 720px; line-height: 1.5; color: rgba(255,255,255,.82); position: relative; z-index:1; }
.hero .hero-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top: 17px; position: relative; z-index:1; }

.kpi { padding: 17px; }
.kpi-label { color: var(--muted); font-size: 11px; font-weight: 800; }
.kpi-value { font-size: 29px; margin-top: 8px; font-weight: 950; letter-spacing: -.04em; }
.kpi-meta { margin-top: 5px; font-size: 12px; color: var(--muted); }
.kpi.accent-blue { border-top: 4px solid var(--blue); }
.kpi.accent-yellow { border-top: 4px solid var(--yellow); }
.kpi.accent-green { border-top: 4px solid var(--green); }
.kpi.accent-red { border-top: 4px solid var(--red); }

.btn, .primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .icon-btn {
  border: 0; border-radius: 12px; min-height: 42px; padding: 0 14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; font-weight: 800;
}
.primary-btn { background: var(--yellow); color: var(--navy); }
.secondary-btn { background: var(--navy); color: white; }
.ghost-btn { background: #eef3f9; color: var(--navy); }
.danger-btn { background: var(--red-soft); color: var(--red); }
.icon-btn { min-width: 42px; padding: 0 10px; background: #eef3f9; color: var(--navy); }
.icon-btn:hover, .ghost-btn:hover, .secondary-btn:hover, .primary-btn:hover { filter: brightness(.98); transform: translateY(-1px); }

.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #dce4ef; border-radius: 12px; background: white; color: var(--ink); min-height: 42px; padding: 10px 12px; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,117,214,.12); }
.select { appearance: auto; }
.field { display:grid; gap: 7px; }
.field label { font-size: 11px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.field-grid { display:grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.field-grid-3 { display:grid; gap: 12px; grid-template-columns: repeat(3, minmax(0,1fr)); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: #fafbfd; position: sticky; top: 0; z-index: 1; }
td { font-size: 13px; }
tbody tr:hover { background: #fbfcfe; }
.cell-strong { font-weight: 850; }
.money-positive { color: var(--green); font-weight: 900; }
.money-negative { color: var(--red); font-weight: 900; }
.muted { color: var(--muted); }

.badge { display:inline-flex; align-items:center; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.has-tooltip { cursor: help; position: relative; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-yellow { background: var(--yellow-soft); color: #966e00; }

.empty { padding: 36px; text-align: center; color: var(--muted); }
.empty strong { display:block; color: var(--ink); margin-bottom: 6px; }

.student-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.student-card { padding: 14px; }
.student-card-head { display:flex; gap: 10px; align-items:center; justify-content:space-between; }
.student-name { font-weight: 900; font-size: 13px; }
.student-class { font-size: 10px; color: var(--muted); margin-top: 3px; }
.student-balance { margin-top: 11px; font-size: 24px; font-weight: 950; }
.student-actions { display:flex; gap:6px; margin-top: 10px; }

.wallet-hero { display:flex; justify-content:space-between; gap: 18px; align-items: flex-end; flex-wrap:wrap; }
.balance-large { font-size: 42px; font-weight: 950; letter-spacing: -.05em; }
.wallet-meta { display:flex; gap: 12px; flex-wrap:wrap; }
.wallet-meta span { background: #f2f5f9; border-radius: 11px; padding: 9px 11px; font-size: 11px; }

.rule-row { display:flex; justify-content:space-between; gap: 15px; align-items:center; }
.rule-info { min-width: 0; }
.rule-name { font-weight: 850; }
.rule-desc { font-size: 11px; color: var(--muted); margin-top:3px; }
.rule-value { font-size: 14px; font-weight: 950; white-space:nowrap; }

.weight { font-weight: 900; }
.stars { letter-spacing: .09em; color: #e1a400; font-size: 11px; }

.modal-backdrop { position:fixed; inset:0; background:rgba(10,25,43,.58); backdrop-filter:blur(8px); display:grid; place-items:center; z-index:50; padding:18px; animation:modalFade .16s ease; }
.modal { width:min(720px,100%); max-height:min(90vh,880px); overflow:hidden; background:#fff; border:1px solid rgba(255,255,255,.7); border-radius:24px; box-shadow:0 34px 90px rgba(7,23,42,.30); animation:modalUp .18s ease; }
.modal-header { padding:20px 22px 16px; display:flex; justify-content:space-between; align-items:center; gap:16px; background:linear-gradient(180deg,#ffffff 0%,#f9fbfe 100%); border-bottom:1px solid var(--line); position:relative; }
.modal-header:after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:3px; background:linear-gradient(90deg,var(--yellow),var(--blue)); }
.modal-header > div:first-child { min-width:0; }
.modal-header .eyebrow { color:var(--blue); }
.modal-header h2 { margin:5px 0 0; font-size:24px; line-height:1.08; color:var(--navy); letter-spacing:-.035em; }
.modal-header .icon-btn { flex:0 0 auto; width:40px; height:40px; border:1px solid var(--line); background:#f4f7fb; border-radius:12px; }
.modal-body { padding:22px; overflow:auto; max-height:calc(min(90vh,880px) - 96px); }
.modal-body form { display:grid; gap:14px; }
.modal-body .field, .modal-body > .form-grid > label { display:grid; gap:7px; }
.modal-body .field label, .modal-body > .form-grid > label { font-size:10px; font-weight:950; letter-spacing:.08em; color:var(--muted); }
.modal-body .input, .modal-body .select, .modal-body .textarea, .modal-body input, .modal-body select, .modal-body textarea { min-height:46px; border:1px solid #d9e2ed; border-radius:14px; background:#fff; padding:11px 13px; color:var(--ink); outline:none; box-shadow:0 2px 0 rgba(23,59,108,.02); transition:.16s ease; }
.modal-body .input:focus, .modal-body .select:focus, .modal-body .textarea:focus, .modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus { border-color:var(--blue); box-shadow:0 0 0 4px rgba(47,117,214,.10); }
.modal-body textarea, .modal-body .textarea { min-height:96px; resize:vertical; }
.modal-body .muted { font-size:12px; line-height:1.45; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; align-items:center; margin-top:4px; padding-top:16px; border-top:1px solid var(--line); }
.modal-actions .ghost-btn, .modal-actions .secondary-btn, .modal-actions .primary-btn, .modal-actions .danger-btn { min-height:44px; padding:0 16px; border-radius:12px; }
.modal-body .field-grid, .modal-body .field-grid-3 { margin-top:0 !important; }
@keyframes modalFade { from { opacity:0 } to { opacity:1 } }
@keyframes modalUp { from { opacity:0; transform:translateY(10px) scale(.985) } to { opacity:1; transform:translateY(0) scale(1) } }

.toast { position: fixed; left:50%; top:16px; transform: translate(-50%, -140%); z-index:100; background: #173b6c; color:white; padding: 11px 16px; border-radius: 999px; box-shadow: var(--shadow); transition: .2s ease; font-size:12px; font-weight:800; }
.toast.show { transform: translate(-50%, 0); }

.overlay-menu { position: fixed; inset:0; background: rgba(0,0,0,.35); z-index: 20; display:none; }

.bottom-nav { display:none; }

.split-list { display:grid; gap: 8px; }
.list-item { padding: 12px; border:1px solid var(--line); border-radius: 13px; background:white; }
.list-item-row { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.progress { height: 9px; border-radius:999px; background:#edf1f6; overflow:hidden; }
.progress > div { height:100%; background: var(--blue); border-radius:inherit; }

.callout { padding: 13px 15px; border-radius: 14px; background: var(--yellow-soft); color: #7c5b00; border:1px solid #f4df91; font-size:12px; line-height:1.45; }

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

@media (max-width: 820px) {
  .sidebar { display:none; }
  .main-content { width:100%; }
  .mobile-only { display:inline-flex; }
  .mobile-menu-btn { display:inline-flex; flex:0 0 44px; }
  .topbar { padding: 12px 14px; }
  .view { padding: 16px 14px 86px; }
  .topbar-actions .secondary-btn { display:none; }
  .mobile-menu-backdrop { position:fixed; inset:0; z-index:60; background:rgba(8,24,44,.46); backdrop-filter:blur(2px); display:flex; }
  .mobile-menu-backdrop[hidden] { display:none; }
  .mobile-drawer { animation:drawerIn .18s ease-out; overflow-y:auto; }
  .grid-2, .grid-3, .grid-4, .field-grid, .field-grid-3 { grid-template-columns: 1fr; }
  .student-grid { grid-template-columns: 1fr; }
  .bottom-nav { position:fixed; z-index:30; left:10px; right:10px; bottom:10px; display:grid; grid-template-columns: repeat(4,1fr); gap:5px; padding:7px; background:rgba(23,59,108,.97); border-radius:17px; box-shadow: 0 16px 32px rgba(18,50,91,.28); }
  .bottom-nav .nav-item { color: rgba(255,255,255,.78); justify-content:center; flex-direction:column; gap: 2px; padding: 8px 5px; min-height:52px; font-size:9px; }
  .bottom-nav .nav-item.active { color: var(--navy); background: var(--yellow); box-shadow:none; }
  .bottom-nav .nav-icon { font-size: 18px; }
}

@media (max-width: 430px) {
  .topbar h1 { font-size: 22px; }
  .topbar-left { gap: 8px; }
  .hero h2 { font-size: 24px; }
  .balance-large { font-size: 36px; }
  .kpi-value { font-size: 25px; }
  .card-pad { padding: 15px; }
}
@keyframes drawerIn{from{transform:translateX(-100%)}to{transform:translateX(0)}}
.sale-ok { background: var(--green-soft); color: #126b45; border-color: #bfe4d0; }
.sale-warning { background: var(--red-soft); color: #a83232; border-color: #f0c7c7; }


/* UI foundation for the current app */
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  right: -26px;
  bottom: -28px;
  background: var(--yellow-soft);
  pointer-events: none;
}
.stat-card > div { position: relative; z-index: 1; font-size: 10px; font-weight: 900; letter-spacing: .09em; color: var(--muted); }
.stat-card > strong { position: relative; z-index: 1; display:block; margin-top: 10px; font-size: 30px; line-height: 1; letter-spacing: -.04em; color: var(--navy); }
.stat-card:nth-child(2) { border-top: 4px solid var(--green); }
.stat-card:nth-child(2)::after { background: var(--green-soft); }
.stat-card:nth-child(3) { border-top: 4px solid var(--blue); }
.stat-card:nth-child(3)::after { background: var(--blue-soft); }
.stat-card:nth-child(4) { border-top: 4px solid var(--yellow); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.form-grid > label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.form-grid > label > input,
.form-grid > label > select,
.form-grid > label > textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9e2ed;
  border-radius: 13px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 11px 13px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.form-grid > label > input:focus,
.form-grid > label > select:focus,
.form-grid > label > textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47,117,214,.10);
}
.form-grid > .primary-btn,
.form-grid > .secondary-btn,
.form-grid > .ghost-btn,
.form-grid > .danger-btn {
  align-self: end;
  min-height: 46px;
}
.file-label { cursor:pointer; }

/* Better controls inside search rows */
.search-row > .input { flex: 1 1 260px; width: auto; }
.search-row > .primary-btn,
.search-row > .secondary-btn,
.search-row > .ghost-btn { flex: 0 0 auto; }

/* Cleaner mobile tables */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > button,
  .form-grid > .primary-btn,
  .form-grid > .secondary-btn { width: 100%; }
  .topbar { align-items: flex-start; }
  .topbar #quick { display: none; }
  table { min-width: 620px; }
  .stat-card { min-height: 104px; }
}
@media (max-width: 520px) {
  .stat-card > strong { font-size: 27px; }
  .card-title { align-items: flex-start; }
  .card-title .primary-btn, .card-title .secondary-btn { width: 100%; }
  .search-row > .input { flex-basis: 100%; width: 100%; }
}

@media (max-width: 600px) { .modal-backdrop{padding:10px;align-items:end} .modal{width:100%;max-height:92vh;border-radius:22px 22px 16px 16px} .modal-header{padding:17px 16px 14px} .modal-header h2{font-size:21px} .modal-body{padding:16px;max-height:calc(92vh - 86px)} .modal-actions{flex-direction:column-reverse} .modal-actions > *{width:100%} }

/* v7 usability refinements */
.input, select, textarea, input[type="number"], input[type="text"]{font-size:16px;line-height:1.35;min-height:46px;padding:12px 14px;border:1px solid var(--border,#d8dce3);border-radius:12px;background:#fff;color:#17202f;box-sizing:border-box;width:100%;font-family:inherit}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#667085 50%),linear-gradient(135deg,#667085 50%,transparent 50%);background-position:calc(100% - 18px) 20px,calc(100% - 12px) 20px;background-size:6px 6px,6px 6px;background-repeat:no-repeat;padding-right:40px}
.input:focus, select:focus, textarea:focus, input[type="number"]:focus, input[type="text"]:focus{outline:none;border-color:#246bfd;box-shadow:0 0 0 3px rgba(36,107,253,.12)}
.form-grid{align-items:end}
.form-grid label,.modal-form label{display:flex;flex-direction:column;gap:7px;font-weight:800;font-size:12px;letter-spacing:.04em;color:#4b5565}
.readonly-input{background:#f4f6f8!important;font-weight:800}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid rgba(18,25,38,.08)}
.modal-actions button{min-height:44px;padding:10px 18px;border-radius:11px;font-weight:800}
.danger-btn{background:#fff0f0;color:#b42318;border:1px solid #f1b8b4;border-radius:10px;padding:9px 13px;font-weight:800;cursor:pointer}
.danger-btn:hover{background:#ffe2e0}
.compact{padding:7px 10px;font-size:12px}
.badge-blue{background:#e8f2ff;color:#1455a3}.badge-purple{background:#f0eaff;color:#5d33ad}
.row-muted{opacity:.58}.status-note{display:inline-block;margin-left:7px;font-size:10px;font-weight:900;color:#667085}
.confirm-box{padding:18px;border-radius:14px;background:#f7f8fa;border:1px solid #e5e7eb}.confirm-box strong{font-size:18px}.confirm-box p{margin:8px 0 0;color:#5d6675;line-height:1.5}
@media(max-width:760px){.modal{width:calc(100vw - 20px)!important;max-height:calc(100vh - 20px);overflow:auto}.modal-actions{flex-direction:column-reverse}.modal-actions button{width:100%}.table-wrap{overflow-x:auto}.table-wrap table{min-width:780px}.topbar{gap:12px;align-items:flex-start}.topbar .secondary-btn{white-space:nowrap}.stats-grid{grid-template-columns:1fr 1fr}}

/* Wallet modal + student deletion */
.modal-header h2{letter-spacing:-.03em}
.wallet-header-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px;border:1px solid var(--border,#e5e7eb);border-radius:18px;background:linear-gradient(135deg,#f8fbff,#fff)}
.wallet-student-info{min-width:0}
.modal-student-name{font-size:1.35rem;font-weight:900;line-height:1.2;word-break:break-word}
.wallet-balance-block{text-align:right;flex:0 0 auto}
.wallet-balance-label{font-size:.72rem;font-weight:900;letter-spacing:.08em;color:var(--muted,#6b7280);margin-bottom:4px}
.wallet-section-title{display:flex;justify-content:space-between;align-items:end;margin:22px 0 12px}
.wallet-section-title h3{margin:0;font-size:1rem}.wallet-section-title p{margin:4px 0 0;color:var(--muted,#6b7280);font-size:.88rem}
.danger-icon{color:#b42318;border-color:#fecaca;background:#fff5f5}
.student-card-head .danger-icon{opacity:.8}.student-card-head .danger-icon:hover{opacity:1}
@media(max-width:700px){.wallet-header-card{flex-direction:column;align-items:flex-start}.wallet-balance-block{text-align:left}.modal-student-name{font-size:1.15rem}}


.wallet-header-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px;border:1px solid var(--border,#e5e7eb);border-radius:18px;background:linear-gradient(135deg,#f8fbff,#fff)}
.wallet-student-info{min-width:0}.wallet-kicker{font-size:.7rem;font-weight:900;letter-spacing:.09em;color:var(--muted,#6b7280);margin-bottom:5px}.modal-student-name{font-size:1.35rem;font-weight:900;line-height:1.2;word-break:break-word}.wallet-balance-block{text-align:right;flex:0 0 auto}.wallet-balance-label{font-size:.72rem;font-weight:900;letter-spacing:.08em;color:var(--muted,#6b7280);margin-bottom:4px}.wallet-section-title{display:flex;justify-content:space-between;align-items:end;margin:22px 0 12px}.wallet-section-title h3{margin:0;font-size:1rem}.wallet-section-title p{margin:4px 0 0;color:var(--muted,#6b7280);font-size:.88rem}.danger-icon{color:#b42318;border-color:#fecaca;background:#fff5f5}.student-card-head .danger-icon{opacity:.8}.student-card-head .danger-icon:hover{opacity:1}@media(max-width:700px){.wallet-header-card{flex-direction:column;align-items:flex-start}.wallet-balance-block{text-align:left}.modal-student-name{font-size:1.15rem}}
