@import url("../../../.design/tatc-payment-confirmation/DESIGN_TOKENS.css");

:root {
  --tatc-navy: #0b3459;
  --tatc-navy-deep: #072744;
  --tatc-blue: #1a5c96;
  --tatc-amber: #f2a51a;
  --tatc-green: #16845e;
  --tatc-green-soft: #e5f4eb;
  --tatc-sky: #eaf5fb;
  --tatc-ink: #102b4c;
  --tatc-line: #c7d3da;
  --tatc-paper: #fffefa;
  --type-caption: 0.75rem;
  --type-meta: 0.8125rem;
  --type-label: 0.875rem;
  --type-body: 0.9375rem;
  --type-control: 1rem;
  --type-title: 1.5rem;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #edf6fa; }
body { margin: 0; color: var(--tatc-ink); font-family: "Google Sans", sans-serif; font-size: var(--type-body); line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible, label[for]:focus-visible { outline: 3px solid rgb(26 92 150 / 32%); outline-offset: 3px; }
.ui-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1em; height: 1em; line-height: 1; vertical-align: -.125em; }
.ui-icon--xs { font-size: 14px; }
.ui-icon--sm { font-size: 16px; }
.ui-icon--md { font-size: 20px; }
.ui-icon--lg { font-size: 24px; }
.d-none { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Student mobile */
.user-body {
  min-height: 100vh;
  background: #f3f7f9;
}

.user-stage { min-height: 100vh; }
.user-app { width: min(100%, 1180px); min-height: 100vh; margin: 0 auto; padding: 30px 22px 24px; background: #fff; }
.user-header { display: flex; align-items: center; gap: 16px; padding: 0 6px 20px; }
.brand-logo { display: block; flex: 0 0 auto; text-decoration: none; }
.brand-logo img { display: block; width: 100%; height: auto; }
.brand-logo--user { width: 106px; }
.brand-caption { margin: 0 0 3px; color: #687985; font-size: var(--type-caption); font-weight: 700; letter-spacing: .08em; }
.user-header h1 { margin: 0; font-size: var(--type-title); line-height: 1.25; letter-spacing: -.015em; }

.payment-steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 2px 18px; padding: 0; list-style: none; }
.payment-steps li { position: relative; display: grid; place-items: center; gap: 6px; color: #5c6c77; font-size: var(--type-meta); }
.payment-steps li:not(:last-child)::after { content: ""; position: absolute; top: 12px; left: calc(50% + 17px); width: calc(100% - 34px); height: 1px; background: #aebac2; }
.payment-steps span { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; background: white; border: 1px solid #aebac2; border-radius: 50%; font-size: var(--type-meta); font-weight: 700; }
.payment-steps .is-done span { color: white; background: var(--tatc-navy); border-color: var(--tatc-navy); }
.payment-steps .is-current span { color: white; background: var(--tatc-amber); border-color: var(--tatc-amber); }
.payment-steps small { font-size: var(--type-caption); font-weight: 550; }

.payment-form-layout { display: grid; min-width: 0; }
.payment-form-column { min-width: 0; }

.field-block { margin: 0 0 13px; }
.field-block > label { display: block; margin-bottom: 7px; font-size: var(--type-label); font-weight: 650; line-height: 1.4; }
.student-search-control, .money-input { display: flex; align-items: center; height: 48px; background: white; border: 1px solid #aebbc4; border-radius: 8px; box-shadow: inset 0 1px 2px rgb(11 52 89 / 3%); }
.student-search-control:focus-within, .money-input:focus-within { border-color: var(--tatc-blue); box-shadow: 0 0 0 3px rgb(26 92 150 / 15%); }
.student-search-control input, .money-input input { min-width: 0; flex: 1; height: 100%; padding: 0 13px; color: #172a3a; background: transparent; border: 0; outline: 0; font-size: var(--type-control); }
.student-lookup-status { display: grid; flex: 0 0 44px; place-items: center; height: 42px; color: var(--tatc-green); }
.student-lookup-status.is-loading { color: var(--tatc-blue); }
.student-lookup-status.is-error { color: #a23d31; }
.inline-error { margin: 6px 3px 0; color: #a23d31; font-size: var(--type-meta); line-height: 1.4; }

.receipt-card { position: relative; background: var(--tatc-paper); border: 1px solid #c9c6b8; border-radius: 3px 9px 9px 3px; box-shadow: 0 3px 8px rgb(15 39 63 / 12%); }
.receipt-perforation { position: absolute; inset: -1px auto -1px -1px; width: 10px; overflow: hidden; }
.receipt-perforation::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0 7px, #fff 0 4px, transparent 4.5px) 0 0 / 10px 14px repeat-y; }
.student-summary { margin-bottom: 13px; padding: 15px 15px 13px 21px; transition: opacity .2s; animation: receipt-arrive .42s cubic-bezier(.16, 1, .3, 1) both; }
.student-summary.is-loading { opacity: .5; }
.card-label { margin: 0 0 12px; font-size: var(--type-label); font-weight: 700; }
.student-line { display: grid; grid-template-columns: 48px 1fr; gap: 13px; align-items: center; }
.avatar-circle { display: grid; place-items: center; width: 48px; height: 48px; color: white; background: var(--tatc-navy); border-radius: 50%; }
.avatar-circle .ui-icon { font-size: 30px; }
.student-line dl { display: grid; gap: 5px; margin: 0; }
.student-line dl div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: baseline; }
.student-line dt { color: #657681; font-size: var(--type-caption); font-weight: 450; }
.student-line dd { margin: 0; font-size: var(--type-label); font-weight: 550; line-height: 1.4; }
.summary-balance { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed #b9c2c6; }
.summary-balance span { color: #566976; font-size: var(--type-meta); }
.summary-balance .summary-balance__labels { display: grid; gap: 3px; }
.summary-balance__labels b { color: var(--tatc-navy-deep); font-size: var(--type-control); font-weight: 700; line-height: 1.3; }
.summary-balance__labels > span { display: block; font-size: var(--type-label); font-weight: 500; line-height: 1.4; }
.summary-balance strong { color: #c86f00; font-size: 1.25rem; }

.upload-section { margin-top: 3px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; min-height: 132px; overflow: hidden; border: 1px dashed #6eb4e7; border-radius: 8px; }
.slip-miniature { display: flex; flex-direction: column; justify-content: center; margin: 9px; padding: 10px; background-color: white; background-position: center; background-size: cover; border: 1px solid #c5d0d6; border-radius: 5px; box-shadow: 0 2px 5px rgb(10 47 79 / 12%); font-size: 8px; }
.slip-miniature.has-image > * { visibility: hidden; }
.slip-bank { display: grid; grid-template-columns: 21px 1fr 14px; align-items: center; gap: 4px; }
.bank-icon { display: grid; place-items: center; width: 20px; height: 20px; color: #1672b8; font-size: 19px; }
.slip-bank b { display: grid; place-items: center; width: 13px; height: 13px; color: white; background: var(--tatc-green); border-radius: 50%; font-size: 8px; }
.slip-rule { height: 1px; margin: 6px 0; background: #d2d9dd; }
.slip-miniature > small { margin-left: 25px; color: #53636e; font-size: 7px; }
.slip-amount { display: grid; margin-top: 6px; padding-top: 5px; border-top: 1px solid #d2d9dd; }
.slip-amount small { color: #73818a; font-size: 7px; }
.slip-amount strong { color: #174875; font-size: 10px; }
.upload-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; color: var(--tatc-navy); text-align: center; cursor: pointer; border-left: 1px dashed #6eb4e7; }
.upload-dropzone .ui-icon { margin-bottom: 7px; color: var(--tatc-blue); }
.upload-dropzone strong { font-size: var(--type-label); }
.upload-dropzone small { color: #5f7280; font-size: 0.6875rem; line-height: 1.45; }
.upload-dropzone span { max-width: 130px; margin-top: 6px; overflow: hidden; color: #71818b; font-size: 0.6875rem; text-overflow: ellipsis; white-space: nowrap; }

.money-input input { text-align: left; }
.money-input span { padding: 0 13px; color: #50636f; font-size: var(--type-label); }
.submit-payment { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; color: white; background: var(--tatc-navy); border: 0; border-radius: 7px; font-size: var(--type-control); font-weight: 650; box-shadow: 0 4px 8px rgb(11 52 89 / 17%); transition: transform .15s, background .15s, box-shadow .15s; }
.submit-payment:hover { background: #124775; }
.submit-payment:active { transform: translateY(1px); }
.submit-payment:disabled { cursor: wait; opacity: .78; transform: none; }
.submit-payment.is-complete { color: #fff; background: var(--tatc-green); cursor: default; opacity: 1; box-shadow: 0 3px 8px rgb(22 132 94 / 18%); }
.submit-payment .ui-icon { margin-right: 2px; }
.success-receipt { display: grid; grid-template-columns: 45px 1fr; gap: 12px; align-items: center; margin-top: 14px; padding: 14px 15px 14px 21px; background: #eef9f1; border-color: #b9d6bf; transition: box-shadow .2s, transform .2s; }
.success-receipt.is-highlighted { box-shadow: 0 0 0 4px rgb(22 132 94 / 15%); transform: translateY(-2px); }
.success-check { display: grid; place-items: center; width: 42px; height: 42px; color: white; background: var(--tatc-green); border-radius: 50%; font-size: 25px; }
.success-receipt strong { color: #1f6748; font-size: var(--type-control); line-height: 1.35; }
.success-receipt p { margin: 3px 0 0; color: #466f5c; font-size: var(--type-caption); line-height: 1.45; }
/* Admin desktop */
.admin-body { min-width: 900px; min-height: 100vh; background: #eaf4f8; }
.admin-app { display: grid; grid-template-columns: 230px minmax(660px, 1fr); min-height: 100vh; background: white; }
.admin-sidebar { display: flex; flex-direction: column; padding: 39px 18px 22px; color: white; background: linear-gradient(180deg, #103e67 0%, #082f51 100%); }
.admin-brand { margin: 0 18px 36px; font-size: 1.75rem; font-weight: 700; line-height: 1.05; }
.admin-brand b { color: var(--tatc-amber); }
.admin-brand small { display: block; margin-top: 5px; color: white; font-size: 1.0625rem; font-weight: 450; }
.brand-logo--admin { width: calc(100% - 20px); margin: 0 10px 34px; padding: 9px; background: #fff; border-radius: 9px; box-shadow: 0 7px 18px rgb(0 0 0 / 12%); }
.admin-nav { display: grid; gap: 6px; }
.admin-nav a { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 15px; color: rgb(255 255 255 / 92%); border-radius: 7px; font-size: var(--type-body); text-decoration: none; }
.admin-nav a:hover { color: white; background: rgb(255 255 255 / 9%); }
.admin-nav a.is-active { background: #255c8b; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 7%); }
.admin-nav .ui-icon { width: 22px; color: rgb(255 255 255 / 88%); }
.drive-meter { margin: auto 10px 0; padding-top: 19px; border-top: 1px solid rgb(255 255 255 / 23%); }
.drive-meter p { margin: 0 0 10px; font-size: var(--type-meta); line-height: 1.5; }
.drive-icon { display: grid; place-items: center; width: 46px; height: 50px; margin-bottom: 12px; color: #187a50; background: white; border-radius: 5px; font-size: 27px; }
.drive-bar { height: 7px; overflow: hidden; background: rgb(255 255 255 / 25%); border-radius: 99px; }
.drive-bar span { display: block; width: 22%; height: 100%; background: #5dd070; }
.drive-meter small { display: block; margin-top: 7px; color: rgb(255 255 255 / 78%); font-size: var(--type-caption); }
.drive-meter button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 40px; margin-top: 12px; padding: 8px 9px; color: white; background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 35%); border-radius: 6px; font-size: var(--type-caption); }
.drive-meter button:hover { background: rgb(255 255 255 / 17%); }
.drive-meter button { transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.drive-meter button:disabled { opacity: 1; cursor: wait; }
.drive-meter button.is-syncing { color: #dceeff; background: rgb(82 163 221 / 18%); border-color: rgb(156 211 247 / 52%); }
.drive-meter button.is-synced { color: #e9fff3; background: rgb(38 166 110 / 25%); border-color: rgb(140 232 190 / 60%); cursor: default; }
.drive-sync-status { display: grid; gap: 5px; margin-top: 10px; color: #61727e; font-size: .9rem; line-height: 1.5; }
.drive-sync-status strong { color: var(--tatc-navy-deep); font-size: .98rem; }
.drive-sync-result { color: #4e625f; font-size: .93rem; line-height: 1.65; }
.drive-sync-result.is-error { color: #8f3029; }
.drive-sync-popup .swal2-loader { width: 2.5em; height: 2.5em; margin: 1.1em auto .25em; border-width: .22em; border-color: #1f8b68 transparent #1f8b68 transparent; }
.drive-sync-enter { animation: drive-sync-popup-in .24s cubic-bezier(.16,1,.3,1) both; }
.drive-sync-exit { animation: drive-sync-popup-out .16s ease both; }
@keyframes drive-sync-popup-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes drive-sync-popup-out { to { opacity: 0; transform: translateY(5px) scale(.99); } }

/* Unified lightweight motion for confirmations and success feedback. */
.swal2-popup { will-change: opacity, transform; }
.swal2-container.tatc-confirm-container {
  padding: 24px;
  background: rgb(4 24 43 / 68%) !important;
}
.swal2-popup.tatc-confirm-popup {
  color: var(--tatc-ink);
  background: #fffefb;
  border-radius: 14px;
  box-shadow: 0 28px 72px rgb(3 22 39 / 42%);
}
.tatc-confirm-popup .swal2-title { color: var(--tatc-navy-deep); }
.tatc-confirm-popup .swal2-html-container { color: #435967; }
.tatc-confirm-popup .swal2-actions { margin-top: 1.65rem; }
.tatc-backdrop-in { animation: tatc-backdrop-in .14s ease-out both; }
.tatc-backdrop-out { animation: tatc-backdrop-out .1s ease-in both; }
.tatc-modal-in { animation: tatc-modal-in .18s cubic-bezier(.2,.8,.2,1) both; }
.tatc-modal-out { animation: tatc-modal-out .12s ease-in both; }
.tatc-toast-in { animation: tatc-toast-in .2s cubic-bezier(.2,.8,.2,1) both; }
.tatc-toast-out { animation: tatc-toast-out .14s ease-in both; }
@keyframes tatc-backdrop-in { from { background-color: rgb(4 24 43 / 0%); } to { background-color: rgb(4 24 43 / 68%); } }
@keyframes tatc-backdrop-out { from { background-color: rgb(4 24 43 / 68%); } to { background-color: rgb(4 24 43 / 0%); } }
@keyframes tatc-modal-in { from { opacity: 0; transform: translateY(8px) scale(.992); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes tatc-modal-out { to { opacity: 0; transform: translateY(4px) scale(.995); } }
@keyframes tatc-toast-in { from { opacity: 0; transform: translate3d(12px,-4px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
@keyframes tatc-toast-out { to { opacity: 0; transform: translate3d(8px,-2px,0); } }

.admin-main { min-width: 0; padding: 27px 22px 24px; border-right: 1px solid #d3dce1; transition: opacity .13s ease, transform .13s ease; }
.is-page-transitioning .admin-main { opacity: .72; pointer-events: none; transform: translateY(2px); }
.admin-main [hidden], .review-panel[hidden] { display: none !important; }
.admin-app.is-students-view { grid-template-columns: 230px minmax(0, 1fr); }
.admin-app.is-students-view .admin-main { border-right: 0; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-topbar h1 { margin: 0; font-size: 1.75rem; line-height: 1.25; letter-spacing: -.015em; }
.account-chip { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 11px 6px 7px; background: white; border: 1px solid #c6d1d8; border-radius: 10px; font-size: var(--type-meta); }
.admin-avatar { display: grid; place-items: center; width: 30px; height: 30px; color: white; background: var(--tatc-blue); border-radius: 50%; font-size: 15px; }
.header-actions { display: flex; align-items: center; gap: 11px; }
.excel-button { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px; color: var(--tatc-navy); background: white; border: 1px solid var(--tatc-navy); border-radius: 6px; font-weight: 600; }
.excel-button .ui-icon { color: #128255; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 25px 0 25px; }
.stat-ticket {
  --stat-accent: #d98a00;
  --stat-soft: #fff5dc;
  --stat-wave: rgb(242 165 26 / 12%);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 112px;
  padding: 19px 20px 18px 22px;
  overflow: hidden;
  background: linear-gradient(112deg, #fff 0 72%, var(--stat-soft) 100%);
  border: 1px solid #dce6eb;
  border-radius: 11px;
  box-shadow: 0 6px 18px rgb(11 52 89 / 7%);
}
.stat-ticket:nth-child(2) { --stat-accent: #16845e; --stat-soft: #eaf8f1; --stat-wave: rgb(22 132 94 / 11%); }
.stat-ticket:nth-child(3) { --stat-accent: #a64b3d; --stat-soft: #fdf0ed; --stat-wave: rgb(166 75 61 / 10%); }
.stat-ticket::before {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -72px;
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 31px, var(--stat-wave) 32px 47px, transparent 48px 58px, var(--stat-wave) 59px 75px, transparent 76px);
  pointer-events: none;
}
.stat-ticket > div { position: relative; z-index: 1; grid-column: 1; grid-row: 1; min-width: 0; }
.stat-icon { position: relative; z-index: 1; display: grid; grid-column: 2; grid-row: 1; place-items: center; width: 42px; height: 42px; color: var(--stat-accent); background: rgb(255 255 255 / 78%); border: 1.5px dashed var(--stat-accent); border-radius: 9px; }
.stat-ticket p { margin: 0 0 5px; color: #718392; font-size: var(--type-caption); font-weight: 650; letter-spacing: .025em; }
.stat-ticket strong { display: block; color: var(--tatc-navy-deep); font-size: 1.75rem; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.stat-ticket small { display: block; margin-top: 5px; color: #617583; font-size: var(--type-caption); }
.transaction-summary { margin: 0 0 26px; }
.transaction-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.transaction-heading h2 { margin: 0; font-size: 1.125rem; line-height: 1.3; }
.transaction-heading > span { color: #6d808c; font-size: var(--type-caption); }
.transaction-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.transaction-card { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; min-height: 104px; padding: 17px 20px 16px 22px; background: #fff; border: 1px solid #dce6eb; border-radius: 10px; box-shadow: 0 5px 15px rgb(11 52 89 / 5%); }
.transaction-card > div { min-width: 0; }
.transaction-card p { margin: 0 0 4px; color: #788c9a; font-size: var(--type-caption); font-weight: 650; letter-spacing: .035em; }
.transaction-card strong { display: block; overflow: hidden; color: var(--tatc-navy-deep); font-size: 1.5rem; line-height: 1.1; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.transaction-card small { display: block; margin-top: 5px; color: #71838e; font-size: var(--type-caption); }
.transaction-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--tatc-blue); background: #f3f8fb; border: 1px solid #c9dae4; border-radius: 9px; font-size: 19px; }
.transaction-card:nth-child(2) .transaction-icon { color: var(--tatc-green); background: #eff8f3; border-color: #cce3d7; }
.transaction-card:nth-child(3) .transaction-icon { color: #bc7500; background: #fff8ea; border-color: #efdcb5; }
.monthly-chart-card { margin: 0 0 26px; padding: 21px 22px 18px; background: #fff; border: 1px solid #d7e3e9; border-radius: 12px; box-shadow: 0 6px 20px rgb(11 52 89 / 6%); }
.monthly-chart-header { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 18px; }
.monthly-chart-header h2 { margin: 1px 0 3px; color: var(--tatc-navy-deep); font-size: 1.125rem; line-height: 1.3; }
.monthly-chart-header > div:first-child > span { color: #6d808c; font-size: var(--type-caption); }
.monthly-chart-visual { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; min-height: 239px; }
.monthly-chart-scale { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0 42px; color: #7a8c98; font-size: 11px; text-align: right; }
.monthly-bars { position: relative; display: grid; grid-template-columns: repeat(12, minmax(24px, 1fr)); align-items: stretch; gap: clamp(5px, 1vw, 14px); height: 239px; padding: 0 9px; background: repeating-linear-gradient(to bottom, #dfe8ed 0 1px, transparent 1px 55px); }
.monthly-bar-item { display: grid; grid-template-rows: 1fr 40px; min-width: 0; }
.monthly-bar-track { display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.monthly-bar { position: relative; width: min(72%, 38px); height: var(--bar-size); min-height: 0; background: linear-gradient(180deg, #2e7db8 0%, #0f4f83 100%); border-radius: 7px 7px 2px 2px; box-shadow: 0 4px 10px rgb(17 83 133 / 15%); transition: filter .18s ease, transform .18s ease; }
.monthly-bar > span { position: absolute; z-index: 2; left: 50%; bottom: calc(100% + 7px); padding: 4px 7px; color: #fff; background: var(--tatc-navy-deep); border-radius: 5px; font-size: 10px; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%,4px); transition: opacity .15s ease, transform .15s ease; }
.monthly-bar-item:hover .monthly-bar { filter: brightness(1.08); transform: translateY(-2px); }
.monthly-bar-item:hover .monthly-bar > span { opacity: 1; transform: translate(-50%,0); }
.monthly-bar-item > small { display: grid; align-self: end; place-items: center; min-height: 36px; padding: 3px 2px 2px; overflow: hidden; color: #315a78; background: #edf5f9; border-radius: 7px; box-shadow: inset 0 0 0 1px #cedee7; font-size: 12px; font-weight: 650; line-height: 1.05; text-align: center; white-space: nowrap; }
.monthly-bar-item > small b { color: #8a9aa4; font-size: 10px; font-weight: 600; }
.monthly-bar-item.is-current .monthly-bar { background: linear-gradient(180deg, #f2a51a 0%, #cf7b00 100%); box-shadow: 0 4px 11px rgb(207 123 0 / 19%); }
.monthly-bar-item.is-current > small { color: #9c5a00; background: #fff4dd; font-weight: 700; box-shadow: inset 0 0 0 1px #efd39e; }
.monthly-bar-item.is-current > small b { color: #a96200; font-weight: 700; }
.list-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.list-heading h2 { margin: 0; font-size: 1.125rem; }
.list-heading span { color: #5c6f7c; font-size: var(--type-caption); }
.term-edit-button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 11px; color: #35576e; background: #f4f9fb; border: 1px solid #c7d8e1; border-radius: 8px; font-size: var(--type-caption); font-weight: 650; }
.term-edit-button:hover { color: var(--tatc-navy); background: #eaf4f8; border-color: #91afbf; }
.term-edit-button:focus-visible { outline: 3px solid rgb(26 92 150 / 18%); outline-offset: 2px; }
.term-edit-button .bi-pencil-square { color: var(--tatc-blue); }
.term-edit-button span { color: inherit; font-size: inherit; }
.filter-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 0 0 12px; padding: 11px; background: #f4f9fb; border: 1px solid #d5e2e8; border-radius: 9px; }
.filter-search { position: relative; flex: 1 1 320px; min-width: 220px; }
.filter-search .bi { position: absolute; top: 50%; left: 13px; color: #637987; font-size: 15px; transform: translateY(-50%); pointer-events: none; }
.filter-search input, .filter-select select, .filter-date input { height: 42px; color: var(--tatc-ink); background: white; border: 1px solid #b9c9d2; border-radius: 7px; outline: 0; }
.filter-search input { width: 100%; padding: 0 36px 0 38px; }
.filter-select select { min-width: 150px; padding: 0 34px 0 12px; }
.filter-date { position: relative; display: block; min-width: 166px; }
.filter-date > .bi { position: absolute; z-index: 2; top: 50%; left: 13px; color: var(--tatc-blue); font-size: 15px; pointer-events: none; transform: translateY(-50%); }
.filter-date input { width: 166px; min-width: 166px; padding: 0 11px 0 39px; font-variant-numeric: tabular-nums; letter-spacing: .015em; }
.filter-search input:focus, .filter-select select:focus, .filter-date input:focus { border-color: var(--tatc-blue); box-shadow: 0 0 0 3px rgb(26 92 150 / 13%); }
.filter-submit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 17px; color: white; background: var(--tatc-navy); border: 1px solid var(--tatc-navy); border-radius: 7px; font-weight: 650; }
.filter-submit:hover { background: #124775; }
.filter-auto-status { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px; color: #176f52; background: #edf8f3; border: 1px solid #c6e4d6; border-radius: 7px; font-size: var(--type-caption); font-weight: 650; white-space: nowrap; }
.filter-toolbar.is-filtering .filter-search, .filter-toolbar.is-filtering .filter-select, .filter-toolbar.is-filtering .filter-date { opacity: .68; }
.filter-toolbar.is-filtering { pointer-events: none; }
.filter-toolbar .filter-search, .filter-toolbar .filter-select, .filter-toolbar .filter-date { transition: opacity .16s ease; }
.filter-clear { display: inline-flex; align-items: center; min-height: 42px; padding: 0 9px; color: var(--tatc-blue); font-size: var(--type-meta); font-weight: 600; text-decoration: none; }
.filter-clear:hover { text-decoration: underline; }
.filter-count { margin-left: auto; color: #607481; font-size: var(--type-meta); white-space: nowrap; }
.flatpickr-calendar { width: 318px; padding: 8px; overflow: hidden; font-family: "Google Sans", sans-serif; background: #fff; border: 1px solid #c9d8e0; border-radius: 14px; box-shadow: 0 18px 48px rgb(5 37 63 / 22%); }
.flatpickr-calendar::before, .flatpickr-calendar::after { display: none; }
.flatpickr-months { align-items: center; min-height: 52px; margin: -8px -8px 5px; padding: 7px 8px; color: #fff; background: linear-gradient(135deg, var(--tatc-navy) 0%, #16598f 100%); }
.flatpickr-months .flatpickr-month { height: 38px; color: #fff; }
.flatpickr-current-month { display: flex; align-items: center; justify-content: center; gap: 5px; height: 38px; padding: 5px 0 0; font-size: 1rem; }
.flatpickr-current-month .flatpickr-monthDropdown-months, .flatpickr-current-month input.cur-year { color: #fff; font-family: "Google Sans", sans-serif; font-size: .9375rem; font-weight: 650; }
.flatpickr-current-month .flatpickr-monthDropdown-months { width: auto; padding: 0 22px 0 8px; background-color: transparent; }
.flatpickr-current-month .flatpickr-monthDropdown-months:hover, .flatpickr-current-month input.cur-year:hover { background: rgb(255 255 255 / 10%); }
.flatpickr-current-month .numInputWrapper { width: 72px; }
.flatpickr-current-month .numInputWrapper span { border-color: rgb(255 255 255 / 16%); }
.flatpickr-current-month .numInputWrapper span::after { border-bottom-color: #fff; border-top-color: #fff; }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { display: grid; top: 8px; place-items: center; width: 38px; height: 38px; padding: 0; color: #fff; border-radius: 8px; }
.flatpickr-months .flatpickr-prev-month:hover, .flatpickr-months .flatpickr-next-month:hover { color: #fff; background: rgb(255 255 255 / 13%); }
.flatpickr-weekdays { height: 34px; margin: 0; background: #f1f7fa; border-radius: 8px; }
span.flatpickr-weekday { color: #496274; font-size: .75rem; font-weight: 700; }
.flatpickr-days { width: 300px; }
.dayContainer { width: 300px; min-width: 300px; max-width: 300px; padding: 3px 0 1px; }
.flatpickr-day { max-width: 42px; height: 39px; color: #233d52; border-radius: 9px; font-size: .8125rem; line-height: 39px; }
.flatpickr-day:hover, .flatpickr-day:focus { background: #edf5f9; border-color: #d7e7ef; }
.flatpickr-day.today { color: #a96200; background: #fff7e8; border-color: #e8a32b; font-weight: 700; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.selected:focus { color: #fff; background: var(--tatc-blue); border-color: var(--tatc-blue); box-shadow: 0 4px 10px rgb(26 92 150 / 24%); font-weight: 700; }
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: #9babb5; }
.flatpickr-calendar .flatpickr-time { border-top-color: #d7e2e7; }
.payment-table-wrap { overflow: hidden; border: 1px solid #cbd7de; border-radius: 9px; }
.payment-table { width: 100%; border-collapse: collapse; font-size: var(--type-meta); line-height: 1.45; }
.payment-table th { height: 48px; padding: 0 10px; color: #24425d; background: #e8f4fa; font-size: var(--type-meta); font-weight: 650; text-align: left; }
.payment-table td { height: 76px; padding: 10px; border-top: 1px solid #dce3e7; vertical-align: middle; }
.payment-table tbody tr { cursor: pointer; transition: background .15s; }
.payment-table tbody tr:hover { background: #f6fafc; }
.payment-table tbody tr.is-selected { background: #fff7e8; }
.check-cell { width: 26px; }
.row-check { display: grid; place-items: center; width: 18px; height: 18px; color: white; border: 1px solid #bcc8cf; border-radius: 4px; font-size: 12px; }
.is-selected .row-check { background: var(--tatc-blue); border-color: var(--tatc-blue); }
.slip-thumb { width: 43px; height: 50px; padding: 3px; background: white; border: 1px solid #bbc8ce; box-shadow: 0 1px 2px rgb(0 0 0 / 10%); font-size: 4px; text-align: center; }
.slip-thumb::before { content: "โอนสำเร็จ"; display: block; color: var(--tatc-green); margin-bottom: 3px; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 80px; min-height: 30px; padding: 0 10px; border-radius: 6px; font-size: var(--type-caption); font-weight: 550; white-space: nowrap; }
.status-pill.is-pending { color: #c97200; background: #fff0cc; border: 1px solid #f5d27e; }
.status-pill.is-confirmed { color: #217551; background: #e5f4eb; border: 1px solid #c5e3d1; }
.arrow-cell { color: var(--tatc-navy); text-align: center; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px; color: #536875; font-size: var(--type-caption); border-top: 1px solid #dce3e7; }
.pagination { display: flex; gap: 5px; margin: 0; }
.pagination a { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; color: #425667; background: white; border: 1px solid #cbd6dc; border-radius: 6px; text-decoration: none; }
.pagination a:hover { color: var(--tatc-navy); background: #f1f7fa; border-color: #9eb3bf; }
.pagination a.is-active { color: white; background: var(--tatc-navy); border-color: var(--tatc-navy); }
.pagination a.is-disabled { pointer-events: none; opacity: .45; }

.review-panel { position: fixed; z-index: 1000; inset: 0; display: none; place-items: center; padding: 28px; overflow-y: auto; background: rgb(4 24 43 / 62%); }
.admin-body.has-review-popup { overflow: hidden; }
.review-panel.is-open { display: grid; animation: review-backdrop-in .18s ease-out both; }
.review-panel.is-open.is-closing { animation: tatc-backdrop-out .12s ease-in both; }
.review-dialog { position: relative; width: min(100%, 580px); max-height: calc(100vh - 56px); padding: 25px 28px 29px; overflow-y: auto; color: var(--tatc-ink); background: #fffefb; border-radius: 14px; box-shadow: 0 28px 70px rgb(3 22 39 / 38%); animation: review-dialog-in .24s cubic-bezier(.16,1,.3,1) both; }
.review-panel.is-closing .review-dialog { animation: tatc-modal-out .12s ease-in both; }
.review-dialog::before { content: ""; position: absolute; inset: 4px auto 0 -1px; width: 10px; background: radial-gradient(circle at 0 7px, white 0 4px, transparent 4.5px) 0 0 / 10px 14px repeat-y; }
.review-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.review-heading h2 { margin: 0; font-size: 1.4rem; line-height: 1.3; }
.close-review { display: grid; place-items: center; width: 44px; height: 44px; color: var(--tatc-navy); background: transparent; border: 0; border-radius: 50%; }
.close-review:hover { background: #eef4f7; }
.large-slip { padding: 14px; background: white; border: 1px solid #cbd2d2; border-radius: 5px; box-shadow: 0 2px 5px rgb(0 0 0 / 10%); }
.large-slip__top { display: flex; align-items: center; gap: 10px; color: var(--tatc-navy); font-size: var(--type-label); font-weight: 650; }
.large-slip__top .bank-building { font-size: 27px; }
.large-slip__top b { margin-left: auto; color: white; background: var(--tatc-green); border-radius: 50%; padding: 1px 5px; }
.large-slip hr { border: 0; border-top: 1px solid #ccd4d8; }
.large-slip p { margin: 5px 0; color: #4d6270; font-size: var(--type-caption); }
.large-slip strong { display: block; margin-top: 12px; color: var(--tatc-navy); font-size: 1.25rem; }
.detail-list { display: grid; gap: 10px; margin: 18px 0 21px; }
.detail-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 11px; font-size: .875rem; line-height: 1.5; }
.detail-list dt { color: #607582; font-weight: 500; }
.detail-list dd { margin: 0; color: var(--tatc-navy-deep); font-weight: 600; }
.review-amount-row { align-items: start; }
.review-amount-row dd { display: grid; gap: 6px; }
.review-amount-editor { display: flex; align-items: center; width: min(100%, 270px); min-height: 46px; overflow: hidden; background: #fff; border: 1px solid #9fb5c3; border-radius: 7px; box-shadow: inset 0 1px 2px rgb(11 52 89 / 4%); transition: border-color .16s ease, box-shadow .16s ease; }
.review-amount-editor:focus-within { border-color: var(--tatc-blue); box-shadow: 0 0 0 3px rgb(26 92 150 / 13%); }
.review-amount-editor input { min-width: 0; flex: 1; height: 44px; padding: 0 12px; color: var(--tatc-navy-deep); background: transparent; border: 0; outline: 0; font: inherit; font-size: 1.05rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.review-amount-editor input[readonly] { color: #526a79; background: #f2f6f8; cursor: not-allowed; }
.review-amount-editor b { display: inline-flex; align-items: center; align-self: stretch; padding: 0 12px; color: #536b79; background: #edf4f7; border-left: 1px solid #cbd9e0; font-size: .8125rem; font-weight: 650; }
.review-amount-help, .review-amount-error { display: block; margin: 0; font-size: .75rem; line-height: 1.4; }
.review-amount-help { color: #667b88; }
.review-amount-error { color: #a23d31; }
.payment-date-cell { color: var(--tatc-navy-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-payment-date-row { align-items: start; }
.review-payment-date-row dd { display: grid; gap: 6px; }
.review-date-editor { display: flex; align-items: center; width: min(100%, 270px); min-height: 46px; overflow: hidden; background: linear-gradient(180deg, #fff 0%, #fbfdfe 100%); border: 1px solid #afc3d0; border-radius: 9px; box-shadow: 0 2px 6px rgb(8 48 82 / 5%); transition: border-color .16s ease, box-shadow .16s ease; }
.review-date-editor:focus-within { border-color: var(--tatc-blue); box-shadow: 0 0 0 3px rgb(26 92 150 / 13%), 0 3px 8px rgb(8 48 82 / 7%); }
.review-date-editor > .bi { margin-left: 12px; color: var(--tatc-blue); font-size: 16px; pointer-events: none; }
.review-date-editor input.flatpickr-input { display: none; }
.review-date-editor input:not(.flatpickr-input) { min-width: 0; flex: 1; height: 44px; padding: 0 12px 0 9px; color: var(--tatc-navy-deep); background: transparent; border: 0; outline: 0; font: inherit; font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: .015em; }
.review-date-editor input:not(.flatpickr-input)[readonly] { color: #526a79; background: #f2f6f8; cursor: not-allowed; }
.review-date-help, .review-date-error { display: block; margin: 0; font-size: .75rem; line-height: 1.4; }
.review-date-help { color: #667b88; }
.review-date-error { color: #a23d31; }
.review-action { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 54px; border-radius: 7px; font-size: 1rem; font-weight: 650; }
.review-action.confirm { color: white; background: var(--tatc-green); border: 0; }
.review-action.confirm:disabled { color: #4f6876; background: #e8eff2; cursor: not-allowed; }
.review-action.delete { min-height: 46px; margin-top: 10px; color: #a23d31; background: #fff8f6; border: 1px solid #e0aaa5; }
.review-action.delete:hover { color: #8f241d; background: #fff0ed; border-color: #ca746c; }

@keyframes review-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes review-dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@keyframes receipt-arrive {
  from { opacity: 0; transform: translateY(8px); clip-path: inset(0 0 12% 0); }
  to { opacity: 1; transform: translateY(0); clip-path: inset(0); }
}

@media (max-width: 1200px) {
  .admin-app { grid-template-columns: 205px minmax(0, 1fr); }
  .admin-sidebar { padding-inline: 13px; }
  .admin-main { padding-inline: 18px; }
  .payment-table th, .payment-table td { padding-inline: 8px; }
}

@media (min-width: 900px) {
  .user-app {
    padding: 34px 48px 40px;
    border-inline: 1px solid #dce5e9;
  }
  .user-header { gap: 22px; padding: 0 4px 25px; border-bottom: 1px solid #dce5e9; }
  .brand-logo--user { width: 150px; }
  .brand-caption { margin-bottom: 5px; font-size: .8125rem; }
  .user-header h1 { font-size: 2rem; }
  .payment-steps { width: min(100%, 620px); margin: 22px auto 29px; }
  .payment-steps li { font-size: .875rem; }
  .payment-steps small { font-size: .8125rem; }
  .payment-form-layout { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 32px; align-items: start; }
  .submission-column { padding-left: 32px; border-left: 1px solid #dce5e9; }
  .field-block { margin-bottom: 17px; }
  .field-block > label { margin-bottom: 8px; font-size: .9375rem; }
  .student-summary { min-height: 196px; margin-bottom: 0; padding: 20px 20px 17px 26px; }
  .card-label { margin-bottom: 17px; font-size: .9375rem; }
  .student-line { grid-template-columns: 56px 1fr; gap: 16px; }
  .avatar-circle { width: 56px; height: 56px; }
  .student-line dl { gap: 8px; }
  .student-line dl div { grid-template-columns: 78px 1fr; }
  .student-line dt { font-size: .8125rem; }
  .student-line dd { font-size: .9375rem; }
  .summary-balance { margin-top: 17px; padding-top: 13px; }
  .summary-balance__labels b { font-size: 1.0625rem; }
  .summary-balance__labels > span { font-size: .9375rem; }
  .upload-section { margin-top: 0; }
  .upload-grid { min-height: 184px; }
  .slip-miniature { min-height: 162px; margin: 10px; padding: 14px; }
  .upload-dropzone { padding: 16px; }
  .upload-dropzone strong { font-size: .9375rem; }
  .upload-dropzone small, .upload-dropzone span { font-size: .75rem; }
  .submit-payment { min-height: 52px; }
  .success-receipt { grid-template-columns: 50px 1fr; margin-top: 26px; padding: 17px 20px 17px 26px; }
  .success-check { width: 46px; height: 46px; }
  .success-receipt p { font-size: .8125rem; }
}

@media (max-width: 520px) {
  .user-app { width: 100%; min-height: 100vh; padding: 22px 17px 16px; }
}

@media (max-width: 360px) {
  .user-app { padding-inline: 14px; }
  .user-header { gap: 12px; padding-inline: 2px; }
  .brand-logo--user { width: 92px; }
  .user-header h1 { font-size: 1.3125rem; }
  .upload-grid { grid-template-columns: 1fr; }
  .upload-dropzone { min-height: 112px; border-top: 1px dashed #6eb4e7; border-left: 0; }
  .slip-miniature { min-height: 126px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* Production admin and authentication */
.admin-kicker { margin: 0 0 3px; color: #667b89; font-size: var(--type-caption); font-weight: 700; letter-spacing: .08em; }
.account-chip { color: var(--tatc-navy); text-decoration: none; }
.account-chip img { width: 30px; height: 30px; object-fit: cover; border-radius: 50%; }
.payment-table td strong { display: block; font-weight: 650; }
.payment-table td small { display: block; margin-top: 2px; color: #6a7c87; font-size: .72rem; }
.slip-thumb-img { display: block; width: 44px; height: 54px; object-fit: cover; background: #fff; border: 1px solid #bbc8ce; border-radius: 3px; box-shadow: 0 1px 3px rgb(0 0 0 / 12%); }
.storage-warning { color: #a86100 !important; }
.table-empty { padding: 28px; color: #657984; text-align: center; }
.table-empty strong, .table-empty span { display: block; }
.table-empty strong { color: var(--tatc-ink); font-size: var(--type-body); }
.table-empty span { margin-top: 4px; font-size: var(--type-meta); }
.review-panel.is-empty .review-content { display: none; }
.review-panel:not(.is-empty) .review-empty { display: none; }
.review-empty { margin-top: 50px; padding: 35px 20px; color: #71838d; background: #f5f8f9; border: 1px dashed #bccbd2; border-radius: 10px; text-align: center; }
.large-slip-image { display: block; width: 100%; max-height: 350px; object-fit: contain; background: #f1f5f7; border: 1px solid #cbd2d2; border-radius: 6px; box-shadow: 0 3px 10px rgb(0 0 0 / 10%); }
.review-slip-frame { position: relative; user-select: none; }
.slip-expand-trigger { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; background: transparent; border: 0; border-radius: 7px; cursor: zoom-in; }
.slip-expand-trigger::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; border-radius: 7px; pointer-events: none; transition: border-color .16s ease, box-shadow .16s ease; }
.slip-expand-trigger:hover::after { border-color: rgb(26 92 150 / 58%); box-shadow: inset 0 0 0 3px rgb(255 255 255 / 45%); }
.slip-expand-trigger:focus-visible { outline: 3px solid rgb(26 92 150 / 24%); outline-offset: 3px; }
.slip-expand-hint { position: absolute; right: 11px; bottom: 11px; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; color: #fff; background: rgb(7 42 72 / 88%); border: 1px solid rgb(255 255 255 / 35%); border-radius: 7px; box-shadow: 0 4px 12px rgb(0 0 0 / 20%); font-size: var(--type-caption); font-weight: 650; backdrop-filter: blur(5px); transition: background .16s ease, transform .16s ease; }
.slip-expand-trigger:hover .slip-expand-hint { background: var(--tatc-blue); transform: translateY(-2px); }
.slip-lightbox { position: fixed; z-index: 1200; inset: 0; display: none; place-items: center; padding: 22px; background: rgb(3 17 30 / 88%); }
.slip-lightbox.is-open { display: grid; animation: review-backdrop-in .18s ease-out both; }
.slip-lightbox.is-open.is-closing { animation: tatc-backdrop-out .12s ease-in both; }
.slip-lightbox-dialog { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(1120px, 96vw); height: min(91vh, 860px); overflow: hidden; background: #f8fbfc; border-radius: 14px; box-shadow: 0 32px 90px rgb(0 0 0 / 52%); animation: review-dialog-in .22s cubic-bezier(.16,1,.3,1) both; }
.slip-lightbox.is-closing .slip-lightbox-dialog { animation: tatc-modal-out .12s ease-in both; }
.slip-lightbox-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 18px 15px 22px; background: #fff; border-bottom: 1px solid #d4e0e6; }
.slip-lightbox-header h2 { margin: 0 0 2px; color: var(--tatc-navy-deep); font-size: 1.2rem; line-height: 1.3; }
.slip-lightbox-header > div:first-child > span { color: #687c89; font-size: var(--type-caption); }
.slip-lightbox-tools { display: flex; align-items: center; gap: 6px; }
.slip-lightbox-tools button { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; color: var(--tatc-navy); background: #f4f8fa; border: 1px solid #c8d7df; border-radius: 7px; font-size: 14px; font-weight: 650; }
.slip-lightbox-tools button:hover { color: #fff; background: var(--tatc-blue); border-color: var(--tatc-blue); }
.slip-lightbox-tools button:disabled { cursor: not-allowed; opacity: .42; }
.slip-lightbox-tools output { min-width: 48px; color: var(--tatc-navy-deep); font-size: var(--type-meta); font-weight: 700; text-align: center; }
.slip-lightbox-tools .slip-zoom-reset { gap: 6px; min-width: 94px; }
.slip-lightbox-tools .close-slip-lightbox { margin-left: 5px; color: #fff; background: var(--tatc-navy); border-color: var(--tatc-navy); }
.slip-lightbox-viewport { position: relative; overflow: auto; padding: 28px; background-color: #dfe8ed; background-image: linear-gradient(45deg, rgb(255 255 255 / 28%) 25%, transparent 25%), linear-gradient(-45deg, rgb(255 255 255 / 28%) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgb(255 255 255 / 28%) 75%), linear-gradient(-45deg, transparent 75%, rgb(255 255 255 / 28%) 75%); background-position: 0 0, 0 10px, 10px -10px, -10px 0; background-size: 20px 20px; }
.slip-lightbox-viewport img { display: block; width: auto; max-width: none; height: auto; margin: 0 auto; background: #fff; box-shadow: 0 10px 35px rgb(5 31 52 / 24%); }
.student-section { margin-top: 34px; scroll-margin-top: 20px; }
.student-section .list-heading { margin-bottom: 12px; }
.student-section .list-heading h2 { font-size: 1.2rem; }
.student-heading-actions { display: flex; align-items: center; gap: 9px; }
.import-student-button .ui-icon { color: #128255; }
.student-admin-table { overflow-x: auto; background: white; border: 1px solid #cbd7de; border-radius: 9px; }
.student-admin-table table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: var(--type-meta); }
.student-admin-table th { padding: 13px 12px; color: #24425d; background: #e8f4fa; text-align: left; white-space: nowrap; }
.sortable-th { padding: 0 !important; }
.sortable-th a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 10px 12px; color: #24425d; text-decoration: none; }
.sortable-th a:hover { color: var(--tatc-blue); background: #dcedf6; }
.sortable-th[aria-sort] a { color: var(--tatc-navy-deep); background: #d9edf7; font-weight: 700; }
.sortable-th i { color: #7893a4; font-size: .78rem; }
.sortable-th[aria-sort] i { color: var(--tatc-blue); }
.student-admin-table tbody { transition: opacity .16s ease; }
.student-admin-table.is-sorting tbody { opacity: .48; }
.student-admin-table td { padding: 13px 12px; border-top: 1px solid #dce3e7; }
.student-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.edit-student, .delete-student { min-height: 34px; padding: 0 12px; background: #fff; border: 1px solid #a9bfce; border-radius: 6px; font-weight: 600; }
.edit-student { color: var(--tatc-blue); }
.delete-student { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: #b33b32; border-color: #e0aaa5; }
.delete-student:hover { color: #8f241d; background: #fff4f2; border-color: #ca746c; }
.admin-access-section { margin-top: 28px; }
.admin-access-heading { align-items: flex-end; }
.admin-access-heading > div > span { display: block; margin-top: 4px; color: #647784; font-size: var(--type-meta); }
.admin-access-alert { display: flex; align-items: flex-start; gap: 13px; padding: 18px; color: #7e321f; background: #fff4ef; border: 1px solid #efc4b7; border-radius: 10px; }
.admin-access-alert > i { font-size: 1.35rem; }
.admin-access-alert div { display: grid; gap: 3px; }
.admin-access-summary { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; padding: 15px 17px; background: #edf7f3; border: 1px solid #c7e5d8; border-radius: 10px; }
.admin-access-summary__icon { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: #16845e; border-radius: 10px; font-size: 1.25rem; }
.admin-access-summary div { display: grid; gap: 2px; }
.admin-access-summary strong { color: var(--tatc-navy-deep); font-size: 1.05rem; }
.admin-access-summary span { color: #5c7069; font-size: var(--type-meta); }
.admin-access-list { display: grid; gap: 10px; }
.admin-access-card { display: grid; grid-template-columns: 46px minmax(220px, 1fr) auto auto; align-items: center; gap: 13px; padding: 14px 16px; background: #fff; border: 1px solid #d2dee5; border-radius: 10px; box-shadow: 0 3px 12px rgb(15 55 82 / 4%); }
.admin-access-avatar { display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; color: #fff; background: var(--tatc-blue); border-radius: 50%; font-size: 1.1rem; }
.admin-access-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-access-identity { display: grid; gap: 2px; min-width: 0; }
.admin-access-identity strong { color: var(--tatc-navy-deep); }
.admin-access-identity span { overflow: hidden; color: #48606f; font-size: var(--type-meta); text-overflow: ellipsis; }
.admin-access-identity small { color: #7b8b95; font-size: var(--type-caption); }
.admin-access-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.admin-role-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: #235578; background: #edf6fb; border: 1px solid #cbe0ec; border-radius: 99px; font-size: .72rem; font-weight: 650; white-space: nowrap; }
.admin-role-badge.is-owner { color: #176743; background: #edf8f2; border-color: #c3e4d3; }
.remove-allowed-admin { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 11px; color: #a9362f; background: #fff; border: 1px solid #dfa7a2; border-radius: 6px; font-weight: 600; }
.remove-allowed-admin:hover:not(:disabled) { background: #fff3f2; border-color: #c96d65; }
.remove-allowed-admin:disabled { color: #87949d; background: #f3f6f7; border-color: #d4dde1; cursor: not-allowed; }
.admin-email-field { display: grid; gap: 7px; color: var(--tatc-navy-deep); font-size: .9rem; font-weight: 650; text-align: left; }
.admin-email-field .swal2-input { width: 100%; margin: 0; }
.swal-help { color: #5c6b76; font-size: 14px; line-height: 1.55; text-align: left; }
.excel-file-picker {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 18px 0 4px;
  padding: 13px 14px;
  color: var(--tatc-ink);
  background: #f7fbfd;
  border: 1px dashed #91afbf;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.excel-file-picker:hover {
  background: #eef7fb;
  border-color: var(--tatc-blue);
}
.excel-file-picker:focus-within {
  border-color: var(--tatc-blue);
  box-shadow: 0 0 0 3px rgb(26 92 150 / 13%);
}
.excel-file-picker.has-file {
  background: #eff8f3;
  border-color: #7fb79d;
}
.excel-file-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: #16845e;
  border-radius: 9px;
  font-size: 23px;
}
.excel-file-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.excel-file-copy strong {
  color: var(--tatc-ink);
  font-size: 15px;
  font-weight: 700;
}
.excel-file-copy small {
  overflow: hidden;
  color: #687986;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.excel-file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  color: #fff;
  background: var(--tatc-navy);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .18s ease;
}
.excel-file-picker:hover .excel-file-action { background: #124775; }
.excel-file-picker.has-file .excel-file-action { background: var(--tatc-green); }
.student-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.term-form-help { margin: 0 0 18px; text-align: center; }
.term-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.term-form-grid label { color: #536875; font-size: 13px; font-weight: 650; }
.term-form-grid .swal2-select, .term-form-grid .swal2-input { width: 100%; height: 46px; margin: 6px 0 0; padding: 0 12px; color: var(--tatc-ink); background: #fff; border: 1px solid #afc3d0; border-radius: 8px; font-size: 15px; }
.term-form-grid .swal2-select:focus, .term-form-grid .swal2-input:focus { border-color: var(--tatc-blue); box-shadow: 0 0 0 3px rgb(26 92 150 / 13%); outline: 0; }
.student-form-grid label { color: #536875; font-size: 13px; font-weight: 600; }
.student-form-grid .swal2-input { width: 100%; height: 44px; margin: 6px 0 0; padding: 0 11px; font-size: 15px; }
.student-date-field { position: relative; }
.student-date-field > .bi { position: absolute; z-index: 2; top: 28px; right: 13px; color: var(--tatc-blue); font-size: 16px; pointer-events: none; transform: translateY(-50%); }
.student-date-field .swal2-input { padding-right: 42px; color: var(--tatc-ink); background: linear-gradient(180deg, #fff 0%, #fbfdfe 100%); border: 1px solid #afc3d0; border-radius: 9px; box-shadow: 0 2px 6px rgb(8 48 82 / 5%); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.student-date-field .swal2-input:hover { border-color: #769ab1; }
.student-date-field .swal2-input:focus { border-color: var(--tatc-blue); box-shadow: 0 0 0 3px rgb(26 92 150 / 13%), 0 3px 8px rgb(8 48 82 / 7%); }
.swal2-container ~ .flatpickr-calendar, .flatpickr-calendar { z-index: 11000; }
.student-form-balance { grid-column: 1 / -1; display: flex; justify-content: space-between; padding: 12px 14px; color: #526876; background: #f0f7fa; border-radius: 7px; }
.student-form-balance strong { color: var(--tatc-navy); }
.student-summary.is-verified { border-color: #82b99d; box-shadow: 0 0 0 3px rgb(22 132 94 / 9%), 0 3px 8px rgb(15 39 63 / 12%); }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(circle at 20% 10%, #fff 0, transparent 35%), linear-gradient(145deg, #e9f4f9, #dcecf4); }
.login-card { width: min(100%, 440px); padding: 40px; background: rgb(255 255 255 / 94%); border: 1px solid #c9d8e0; border-radius: 18px; box-shadow: 0 24px 60px rgb(7 39 68 / 15%); }
.brand-logo--login { width: min(100%, 260px); margin: 0 0 30px; }
.login-eyebrow { margin: 0 0 4px; color: #657985; font-size: var(--type-caption); font-weight: 700; letter-spacing: .1em; }
.login-card h1 { margin: 0 0 8px; font-size: 1.75rem; }
.login-card > p:not(.login-eyebrow) { margin: 0 0 24px; color: #5d707d; }
.google-login { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; color: #243b53; background: white; border: 1px solid #b9c8d1; border-radius: 8px; font-size: var(--type-control); font-weight: 650; text-decoration: none; box-shadow: 0 2px 5px rgb(10 47 77 / 7%); }
.google-login .ui-icon { color: #4285f4; }
.google-login:hover { border-color: #7e9db1; background: #f8fbfd; }
.google-login.dev-login { margin-top: 10px; color: #fff; background: var(--tatc-navy); border-color: var(--tatc-navy); }
.google-login.dev-login .ui-icon { color: var(--tatc-amber); }
.spin-icon { animation: icon-spin .8s linear infinite; }
@keyframes icon-spin { to { transform: rotate(360deg); } }
.login-alert { margin-bottom: 18px; padding: 12px 14px; color: #8b4437; background: #fff2ef; border: 1px solid #efc9c1; border-radius: 7px; font-size: var(--type-meta); }
.login-back { display: block; margin-top: 22px; color: var(--tatc-blue); font-size: var(--type-meta); text-align: center; text-decoration: none; }

@media (max-width: 600px) {
  .login-card { padding: 30px 24px; }
  .student-form-grid, .term-form-grid { grid-template-columns: 1fr; }
  .student-form-balance { grid-column: 1; }
}

/* Responsive admin: tables become labelled cards */
@media (max-width: 899px) {
  .admin-body { min-width: 0; background: #f2f7f9; }
  .admin-app, .admin-app.is-students-view { display: block; min-height: 100vh; }
  .admin-sidebar {
    position: sticky;
    z-index: 900;
    top: 0;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(105deg, #103e67 0%, #082f51 100%);
    box-shadow: 0 4px 18px rgb(5 32 55 / 18%);
  }
  .brand-logo--admin { width: 96px; margin: 0; padding: 5px; border-radius: 7px; box-shadow: none; }
  .admin-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .admin-nav a { justify-content: center; gap: 7px; min-height: 46px; padding: 0 7px; font-size: .78rem; white-space: nowrap; }
  .admin-nav .ui-icon { width: auto; font-size: 17px; }
  .drive-meter { display: none; }
  .admin-main { padding: 18px 14px 30px; border-right: 0; }
  .admin-topbar { align-items: flex-start; }
  .admin-topbar h1 { font-size: 1.5rem; }
  .account-chip { min-width: 44px; min-height: 44px; padding: 6px; }
  .account-chip > span:not(.admin-avatar):not(.visually-hidden) { display: none; }
  .account-chip > .bi-box-arrow-right { display: none; }
  .stat-grid, .transaction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-grid .transaction-card:last-child { grid-column: 1 / -1; }
  .monthly-chart-card { overflow-x: auto; }
  .monthly-chart-card > * { min-width: 610px; }
  .list-heading { align-items: flex-start; gap: 10px; }
  .filter-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .filter-search { grid-column: 1 / -1; min-width: 0; }
  .filter-select, .filter-select select, .filter-date, .filter-date input { width: 100%; min-width: 0; }
  .filter-submit { width: 100%; min-height: 44px; }
  .filter-clear { justify-content: center; min-height: 44px; }
  .filter-count { align-self: center; margin-left: 0; text-align: right; }

  .payment-table-wrap { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  .payment-table, .payment-table tbody { display: block; width: 100%; }
  .payment-table thead { display: none; }
  .payment-table tbody { display: grid; gap: 12px; }
  .payment-table tbody tr.payment-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    padding: 15px 15px 14px;
    background: #fff;
    border: 1px solid #cfdae1;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgb(11 52 89 / 6%);
  }
  .payment-table tbody tr.payment-row:hover { background: #f8fbfc; border-color: #adc3d0; }
  .payment-table tbody tr.payment-row.is-selected { background: #fff9ed; border-color: #e6c47e; box-shadow: 0 6px 18px rgb(185 117 0 / 10%); }
  .payment-table td {
    display: grid;
    align-content: start;
    gap: 4px;
    height: auto;
    min-height: 0;
    padding: 9px 0;
    border-top: 0;
  }
  .payment-table td::before { content: attr(data-label); color: #71838f; font-size: .7rem; font-weight: 650; line-height: 1.2; }
  .payment-table td:nth-child(2) { grid-column: 1 / -1; padding: 0 42px 12px 0; border-bottom: 1px solid #e1e8ec; }
  .payment-table td:nth-child(2)::before { display: none; }
  .payment-table td:nth-child(2) strong { color: var(--tatc-navy-deep); font-size: 1rem; }
  .payment-table td:nth-child(2) small { font-size: .78rem; }
  .payment-table td.check-cell { position: absolute; top: 15px; right: 15px; display: block; width: 24px; padding: 0; }
  .payment-table td.check-cell::before, .payment-table td.arrow-cell { display: none; }
  .payment-table .row-check { width: 22px; height: 22px; }
  .payment-table .slip-thumb-img { width: 58px; height: 70px; margin-top: 2px; }
  .payment-table .status-pill { width: fit-content; min-height: 32px; }
  .payment-table .storage-warning { margin-top: 5px; }
  .payment-table .empty-table-row { display: block; background: #fff; border: 1px dashed #bfd0d9; border-radius: 12px; }
  .payment-table .empty-table-row td { display: block; padding: 0; }
  .payment-table .empty-table-row td::before { display: none; }
  .table-footer { flex-wrap: wrap; gap: 10px; margin-top: 10px; padding: 12px 14px; background: #fff; border: 1px solid #cfdae1; border-radius: 10px; }
  .pagination { flex-wrap: wrap; }
  .pagination a { min-width: 36px; height: 36px; }

  .student-section .list-heading { display: grid; gap: 12px; }
  .student-heading-actions { width: 100%; }
  .student-heading-actions .excel-button { flex: 1; justify-content: center; min-height: 44px; padding-inline: 10px; }
  .student-admin-table { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  .student-admin-table table, .student-admin-table tbody { display: block; width: 100%; min-width: 0; }
  .student-admin-table thead { display: none; }
  .student-admin-table tbody { display: grid; gap: 12px; }
  .student-admin-table tbody tr:not(.empty-table-row) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    padding: 15px;
    background: #fff;
    border: 1px solid #cfdae1;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgb(11 52 89 / 6%);
  }
  .student-admin-table td { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 9px 0; border-top: 0; overflow-wrap: anywhere; }
  .student-admin-table td::before { content: attr(data-label); color: #71838f; font-size: .7rem; font-weight: 650; line-height: 1.2; }
  .student-admin-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; padding-top: 0; color: var(--tatc-navy-deep); font-size: 1rem; font-weight: 700; border-bottom: 1px solid #e1e8ec; }
  .student-admin-table td:nth-child(2)::before { display: none; }
  .student-admin-table td:nth-child(7) strong { color: #a86100; font-size: .95rem; }
  .student-admin-table td.student-card-action { grid-column: 1 / -1; padding: 8px 0 0; }
  .student-admin-table td.student-card-action::before { display: none; }
  .student-row-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .edit-student, .delete-student { min-height: 44px; }
  .student-admin-table .empty-table-row { display: block; background: #fff; border: 1px dashed #bfd0d9; border-radius: 12px; }
  .student-admin-table .empty-table-row td { display: block; padding: 0; }
  .student-admin-table .empty-table-row td::before { display: none; }
  .admin-access-card { grid-template-columns: 44px minmax(0, 1fr); }
  .admin-access-badges { grid-column: 1 / -1; justify-content: flex-start; }
  .remove-allowed-admin { grid-column: 1 / -1; width: 100%; min-height: 42px; }

  .review-panel { padding: 14px; }
  .review-dialog { width: min(100%, 560px); max-height: calc(100vh - 28px); padding: 20px 18px 22px; }
  .slip-lightbox { padding: 10px; }
  .slip-lightbox-dialog { width: 100%; height: calc(100vh - 20px); }
  .slip-lightbox-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .slip-lightbox-tools { width: 100%; flex-wrap: wrap; }
  .slip-lightbox-tools .close-slip-lightbox { margin-left: auto; }
}

@media (max-width: 560px) {
  .admin-sidebar { grid-template-columns: 82px minmax(0, 1fr); padding-inline: 9px; }
  .brand-logo--admin { width: 82px; }
  .admin-nav a { flex-direction: column; gap: 2px; min-height: 54px; padding-inline: 3px; font-size: .68rem; }
  .admin-main { padding-inline: 11px; }
  .admin-topbar h1 { font-size: 1.3rem; }
  .admin-topbar .admin-kicker { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .stat-grid, .transaction-grid { grid-template-columns: 1fr; }
  .transaction-grid .transaction-card:last-child { grid-column: auto; }
  .payments-heading { align-items: flex-start; flex-direction: column; }
  .filter-toolbar { grid-template-columns: 1fr; }
  .filter-search { grid-column: auto; }
  .filter-count { text-align: left; }
  .payment-table tbody tr.payment-row, .student-admin-table tbody tr:not(.empty-table-row) { column-gap: 12px; padding: 14px; }
  .student-admin-table tbody tr:not(.empty-table-row) { grid-template-columns: 1fr; }
  .student-admin-table td:nth-child(2), .student-admin-table td.student-card-action { grid-column: 1; }
  .admin-access-heading { display: grid; gap: 12px; }
  .add-admin-button { width: 100%; justify-content: center; }
  .student-heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .table-footer { align-items: flex-start; flex-direction: column; }
}
