body.app { background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
.center { text-align: center; }
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; background: #fff; z-index: 50; }

/* auth */
.auth { display: grid; grid-template-columns: 1fr 1.1fr; min-height: 100vh; }
.auth-side { background: radial-gradient(800px 400px at 0% 100%, rgba(245,185,66,.18), transparent 60%), linear-gradient(160deg, #0F3D33, #17594A 70%, #1F6B57); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.auth-side h1 { font-size: 2.2rem; max-width: 460px; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #D7EAE3; }
.auth-side li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 10px; }
.brand.light { color: #fff; }
.brand.light small { color: #BFDCD2; }
.auth-main { padding: 40px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 480px; padding: 28px; }
.only-sm { display: none; margin-bottom: 16px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .only-sm { display: flex; }
  .auth-main { padding: 20px 14px; justify-content: flex-start; }
  .auth-card { padding: 20px; }
}

/* app shell */
.app-body { padding-top: 22px; padding-bottom: 96px; }
.desk-tabs a.on { background: var(--brand-50); color: var(--brand); }
.tabbar { display: none; }
@media (max-width: 720px) {
  .desk-tabs { display: none; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .74rem; font-weight: 650; color: var(--ink-3); text-decoration: none; padding: 6px 0; border-radius: 10px; position: relative; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--brand); }
  .tabbar .dotn { position: absolute; top: 2px; right: calc(50% - 20px); background: var(--bad); color: #fff; font-size: .65rem; border-radius: 999px; padding: 0 5px; }
}
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head p { margin: 2px 0 0; }

.searchbar { display: grid; grid-template-columns: 1fr 190px auto; gap: 10px; margin-bottom: 14px; }
@media (max-width: 720px) { .searchbar { grid-template-columns: 1fr 1fr; } .searchbar .btn { grid-column: span 2; } }

.tutor { display: flex; flex-direction: column; gap: 10px; }
.tutor .top { display: flex; gap: 12px; align-items: flex-start; }
.avatar { width: 48px; height: 48px; border-radius: 13px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 1.05rem; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; border-radius: 11px; font-size: .9rem; }
.avatar.lg { width: 64px; height: 64px; border-radius: 16px; font-size: 1.3rem; }
.avatar.xl { width: 96px; height: 96px; border-radius: 22px; font-size: 1.8rem; }
.tutor { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tutor:hover { border-color: var(--brand-100); box-shadow: 0 8px 28px rgba(16,40,32,.1); }
.tutor .fee { font-weight: 800; font-size: 1.2rem; text-align: right; color: var(--brand-dark); white-space: nowrap; }
.tutor .fee small { display: block; font-weight: 500; color: var(--ink-3); font-size: .75rem; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--ink-2); }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.facts svg { width: 15px; height: 15px; color: var(--brand); }
.stars { color: #D8DEDB; letter-spacing: 1px; font-size: 1rem; }
.stars.sm { font-size: .85rem; }
.stars i { font-style: normal; }
.stars i.f { color: #F2A516; }
.stars i.h { background: linear-gradient(90deg, #F2A516 50%, #D8DEDB 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
.searchpanel { padding: 16px; }
.searchpanel .searchbar { margin: 12px 0 0; }
.mode-seg { max-width: 360px; }
.mode-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.mode-seg svg { width: 16px; height: 16px; }
.chipbtn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 650; font-size: .88rem; cursor: pointer; color: var(--ink-2); }
.chipbtn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.modal-card.wide { max-width: 640px; }
.modal-card { position: relative; }
.modal-x { position: absolute; right: 12px; top: 10px; border: 0; background: #F1F4F3; width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--ink-2); }
.profile-hero { display: flex; gap: 16px; align-items: center; padding-right: 30px; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.statgrid div { background: var(--brand-50); border-radius: 12px; padding: 10px; text-align: center; }
.statgrid b { display: block; font-size: 1.1rem; color: var(--brand-dark); }
.statgrid span { font-size: .74rem; color: var(--ink-3); }
@media (max-width: 520px) { .statgrid { grid-template-columns: repeat(2, 1fr); } }
.review { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.pre { white-space: pre-line; }
.sticky-actions { position: sticky; bottom: -20px; background: #fff; padding: 14px 0 4px; margin-top: 12px; }
.form-section { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 750; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.locpick { border: 1px dashed var(--brand-100); background: var(--brand-50); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.locpick .ic { width: 36px; height: 36px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--brand); }
.locpick .ic svg { width: 20px; height: 20px; }
.photo-edit { display: flex; gap: 16px; align-items: center; }
.progress { height: 8px; background: #EEF1F0; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.quote { margin: 0; background: #F6F8F7; padding: 10px; border-radius: 10px; }
.strong-link { font-weight: 700; color: var(--ink); text-decoration: none; }
.starpick { display: flex; gap: 6px; margin-bottom: 14px; }
.starpick button { border: 0; background: none; font-size: 2.2rem; color: #D8DEDB; cursor: pointer; padding: 0 2px; line-height: 1; }
.starpick button.on { color: #F2A516; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .92rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin: 22px 0 10px; }

.req { display: flex; flex-direction: column; gap: 8px; }
.req .contact { display: flex; align-items: center; gap: 10px; background: var(--ok-bg); border: 1px solid #BFE3CE; border-radius: 11px; padding: 10px 12px; }
.req .contact a { font-weight: 800; font-size: 1.1rem; color: var(--ok); text-decoration: none; }

.statusbox { display: flex; gap: 14px; align-items: center; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; border: 1px solid; }
.statusbox.warn { background: var(--warn-bg); border-color: #F3DDA6; color: #5E3D00; }
.statusbox.ok { background: var(--ok-bg); border-color: #BFE3CE; color: #0F4D2E; }
.statusbox.bad { background: var(--bad-bg); border-color: #F4C7C2; color: #7A1A14; }
.statusbox .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.7); font-size: 1.3rem; flex: none; }

.modal { position: fixed; inset: 0; background: rgba(15, 30, 25, .45); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.modal-card { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
@media (max-width: 720px) { .modal { align-items: flex-end; padding: 0; } .modal-card { border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); } }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.menu-list a:last-child, .menu-list button:last-child { border-bottom: 0; }
.menu-list .chev { margin-left: auto; color: var(--ink-3); }
.split { grid-template-columns: minmax(0,1.6fr) minmax(260px,1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .profile-hero { flex-direction: column; align-items: flex-start; } }
/* tutor cards (photo-first) */
.tcard { padding: 0; overflow: hidden; cursor: pointer; position: relative; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.tcard:hover { box-shadow: 0 10px 30px rgba(16,40,32,.12); transform: translateY(-1px); }
.tcard.featured { border: 2px solid var(--accent); }
.tphoto { position: relative; height: 210px; background: var(--brand-50); }
.tphoto img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }
.tphoto .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; font-weight: 800; color: var(--brand); }
.tphoto .dist { position: absolute; left: 10px; bottom: 10px; background: rgba(15,61,51,.88); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.tphoto .dist svg { width: 13px; height: 13px; }
.tphoto .pbadge { position: absolute; right: 10px; bottom: 10px; background: var(--accent); color: #2B1D00; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.ribbon { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--accent); color: #2B1D00; font-size: .74rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.tbody { padding: 14px 16px 16px; }
.tname { font-weight: 800; font-size: 1.12rem; display: flex; align-items: center; gap: 6px; }
.tfee { font-weight: 800; font-size: 1.2rem; color: var(--brand-dark); }
.tfee small { font-weight: 500; font-size: .8rem; color: var(--ink-3); }
.tarea { font-size: .88rem; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.tarea svg { width: 14px; height: 14px; color: var(--brand); flex: none; }
.vtick { display: inline-flex; width: 20px; height: 20px; color: #1D8CF0; }
.vtick svg { width: 20px; height: 20px; }
.statusbox.info { background: var(--info-bg); border-color: #C6DAF3; color: #123E6E; }
.statusbox .ic svg { width: 24px; height: 24px; color: var(--ok); }
.mgr { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.lockbox { background: #FAFBFB; border: 1px dashed #CBD6D1; border-radius: 10px; padding: 9px 12px; font-size: .88rem; color: var(--ink-2); }
.plan { position: relative; }
.plan h3 { margin: 0 0 4px; }
.plan .price { font-size: 1.7rem; font-weight: 800; color: var(--brand-dark); }
.plan .price small { font-size: .85rem; font-weight: 500; color: var(--ink-3); }
.plan ul { padding-left: 18px; color: var(--ink-2); font-size: .92rem; min-height: 70px; }
.plan.hot { border: 2px solid var(--brand); }
.plan.current { box-shadow: 0 0 0 3px var(--brand-100); }
.plan .ribbon { left: auto; right: 12px; top: 12px; }
.refcard { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 18px; background: linear-gradient(135deg, #FFF8E8, #fff); border-color: #F3DDA6; }
.refcode { display: flex; gap: 10px; align-items: center; }
.refcode span { font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 1.15rem; letter-spacing: .08em; background: #fff; border: 1px dashed var(--accent-dark); padding: 6px 12px; border-radius: 10px; }
.qrbox { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.qrbox img { width: 150px; height: 150px; object-fit: contain; border-radius: 8px; background: #fff; }
.qrbox .upi { font-size: 1.05rem; margin-right: 8px; }
.or { text-align: center; margin: 14px 0; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--line); line-height: 0; }
.or span { background: #fff; padding: 0 10px; }
@media (max-width: 520px) { .qrbox { flex-direction: column; align-items: flex-start; } }

.notif { margin-bottom: 10px; }
.notif.unread { border-left: 4px solid var(--accent); }

/* filters */
.searchbar .filterrow { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .searchbar .filterrow { grid-template-columns: 1fr 1fr; } .searchbar .filterrow select:last-child { grid-column: span 2; } }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks .check { font-weight: 500; }
/* header bell */
.bell { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); margin-left: 6px; flex: none; }
.bell:hover { background: var(--brand-50); color: var(--brand); }
.bell svg { width: 22px; height: 22px; }
.bell .dotn { position: absolute; top: 2px; right: 2px; background: var(--bad); color: #fff; font-size: .65rem; border-radius: 999px; padding: 0 5px; }
@media (max-width: 720px) { .bell { margin-left: auto; } }
/* demo */
.demo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #F6F8F7; border-radius: 10px; padding: 8px 10px; }
/* chat */
.chatlog { height: min(52vh, 420px); overflow-y: auto; background: #F3F6F5; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 78%; align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: .95rem; white-space: pre-line; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 14px 14px 4px 14px; }
.msg span { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; text-align: right; }
.chatbar { display: flex; gap: 8px; margin-top: 10px; }
.chatbar input { flex: 1; }
/* class book */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bars .bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: .72rem; color: var(--ink-3); }
.bars .bar i { width: 70%; background: var(--brand); border-radius: 6px 6px 0 0; min-height: 3px; }
.bars .bar b { color: var(--ink-2); font-weight: 650; }
.pupil { margin-bottom: 10px; }
.pupil.inactive { opacity: .6; }
.cal summary { cursor: pointer; color: var(--brand); margin-top: 8px; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 8px 0; max-width: 380px; }
.calgrid .day { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 0; font: inherit; font-size: .8rem; cursor: pointer; position: relative; }
.calgrid .day i { display: block; font-style: normal; font-weight: 800; font-size: .7rem; }
.calgrid .day.ok { background: var(--ok-bg); border-color: #BFE3CE; color: var(--ok); }
.calgrid .day.bad { background: var(--bad-bg); border-color: #F4C7C2; color: var(--bad); }
.calgrid .day.warn { background: var(--warn-bg); border-color: #F3DDA6; color: var(--warn); }
