/* BGA Academy portals — styles from the Mobile-UI academy prototype, as normal scrolling pages. */
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;background:#ECEAE3;color:#1F1E1B;-webkit-tap-highlight-color:transparent}
a{color:#1F5C3C;text-decoration:none}a:hover{color:#163F29}
button{font-family:inherit;cursor:pointer}
[x-cloak]{display:none !important}

.app{max-width:480px;min-height:100vh;margin:0 auto;background:#F7F6F2;position:relative;display:flex;flex-direction:column}
@media (min-width:520px){.app{box-shadow:0 0 0 1px #E7E4DB}}

.bar{position:sticky;top:0;z-index:10;min-height:60px;flex-shrink:0;display:flex;align-items:center;gap:6px;padding:0 12px;padding-top:env(safe-area-inset-top,0px);background:#fff;border-bottom:1px solid #E7E4DB}
.bar-title{font-size:17px;font-weight:700;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-sub{font-size:12px;color:#6B6A64;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.icon-btn{width:44px;height:44px;border:none;background:transparent;border-radius:999px;display:flex;align-items:center;justify-content:center;color:#1F1E1B;flex-shrink:0}
.icon-btn:hover{background:#F0EEE7}
.page{flex:1;padding:16px 16px calc(32px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:16px}
.card{background:#fff;border:1px solid #E7E4DB;border-radius:14px;padding:16px}
.h2{font-size:17px;font-weight:700;margin:0}
.muted{font-size:13px;color:#6B6A64}
.label{font-size:11px;font-weight:700;letter-spacing:0.5px;text-transform:uppercase;color:#6B6A64}
.section-head{display:flex;justify-content:space-between;align-items:baseline;margin-top:4px}

.btn{min-height:44px;padding:0 16px;border-radius:10px;font-size:15px;font-weight:600;border:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn-primary{background:#1F5C3C;color:#fff}
.btn-primary:hover{background:#163F29;color:#fff}
.btn-primary:disabled{background:#B9C9BF;cursor:not-allowed}
.btn-secondary{background:#fff;color:#1F1E1B;border:1px solid #DAD7CC}
.btn-secondary:hover{background:#F0EEE7}
.btn-danger{background:#B42318;color:#fff}
.btn-danger:disabled{opacity:.6;cursor:not-allowed}
.btn-small{min-height:36px;padding:0 12px;font-size:13px;border-radius:8px}
.btn-block{width:100%}
.btn-text{background:transparent;border:none;color:#1F5C3C;font-weight:700;font-size:13px;min-height:44px;padding:0 8px}

.badge{font-size:11px;font-weight:700;letter-spacing:0.3px;padding:4px 8px;border-radius:999px;text-transform:uppercase;white-space:nowrap}
.paid{background:#E2F0E6;color:#1A5234}
.unpaid{background:#FCE7D9;color:#8A3410}
.badge-next{background:#E6EEF8;color:#1D4A7A;margin-left:6px}
.badge-muted{background:#F0EEE7;color:#44423C}

.row-btn{width:100%;text-align:left;background:#fff;border:1px solid #E7E4DB;border-radius:14px;padding:14px;display:flex;align-items:center;gap:12px;color:#1F1E1B}
.row-btn:hover{border-color:#C9C5B8;color:#1F1E1B}
.avatar{width:42px;height:42px;border-radius:999px;background:#E2F0E6;color:#1A5234;font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.avatar-coach{background:#FBEFD9;color:#7A4212}
.track{height:6px;background:#ECE9E1;border-radius:999px;overflow:hidden}
.fill{height:6px;background:#1F5C3C;border-radius:999px}
.hero{background:#1F5C3C;border-color:#1F5C3C;color:#fff}
.hero .track{background:rgba(255,255,255,0.25)}
.hero .fill{background:#fff}

.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:13px;font-weight:600;color:#44423C}
input,textarea,select{font-family:inherit;font-size:16px;border:1px solid #DAD7CC;border-radius:10px;padding:11px 12px;color:#1F1E1B;background:#fff;width:100%;min-height:44px}
input:focus,textarea:focus,select:focus{outline:2px solid #1F5C3C;outline-offset:-1px;border-color:#1F5C3C}
input[aria-invalid="true"],textarea[aria-invalid="true"],select[aria-invalid="true"]{border-color:#B42318}
.chip{min-height:36px;padding:0 12px;border-radius:999px;border:1px solid #DAD7CC;background:#fff;font-size:13px;font-weight:600;color:#44423C}
.chip:hover{background:#F0EEE7}
.pill{min-height:36px;padding:0 14px;border-radius:999px;border:1px solid #DAD7CC;background:#fff;font-size:13px;font-weight:600;color:#44423C}
.pill.on{background:#1F1E1B;color:#fff;border-color:#1F1E1B}
.tabs{position:sticky;top:60px;z-index:9;display:flex;background:#fff;border-bottom:1px solid #E7E4DB;flex-shrink:0}
.tab{flex:1;min-height:48px;border:none;background:transparent;font-size:12px;font-weight:700;letter-spacing:0.6px;color:#6B6A64;border-bottom:2px solid transparent;display:flex;align-items:center;justify-content:center}
.tab.on{color:#1F5C3C;border-bottom-color:#1F5C3C}
.sess{display:flex;gap:10px;align-items:flex-start;padding:12px 0;border-top:1px solid #F0EEE7}
.dot-done{width:24px;height:24px;border-radius:999px;background:#1F5C3C;color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.dot-open{width:24px;height:24px;border-radius:999px;border:2px solid #C9C5B8;flex-shrink:0}
.note{font-size:13px;color:#44423C;background:#F7F6F2;border-radius:8px;padding:8px 10px;margin-top:6px;line-height:1.4;white-space:pre-line}
.sum-row{display:flex;justify-content:space-between;gap:12px;font-size:14px;padding:4px 0}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.stat{padding:12px;text-align:left;font-family:inherit;color:#1F1E1B}
.stat-num{font-size:22px;font-weight:700}
.stat-link{display:flex;align-items:center;gap:2px;font-size:13px;color:#1F5C3C;font-weight:700}
.act-chip{font-size:12px;font-weight:600;background:#F3F1EA;border-radius:8px;padding:6px 10px;color:#44423C}
.builder-row{border:1px solid #E7E4DB;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px;background:#FCFBF8}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.notice{background:#FFF8EC;border-color:#F0DDB8;font-size:13px;color:#5C3A0E;padding:12px 14px}
.error-card{background:#FDECEA;border-color:#F5C2BD;color:#8A1C12;font-size:14px}
.empty{text-align:center}
.center{text-align:center}
.spinner{width:28px;height:28px;border-radius:999px;border:3px solid #DAD7CC;border-top-color:#1F5C3C;animation:spin .8s linear infinite;margin:32px auto}
@keyframes spin{to{transform:rotate(360deg)}}

.scrim{position:fixed;inset:0;background:rgba(20,20,19,0.45);z-index:30}
.sheet{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:480px;background:#fff;border-radius:20px 20px 0 0;padding:12px 16px calc(24px + env(safe-area-inset-bottom,0px));z-index:31;display:flex;flex-direction:column;gap:14px;max-height:90vh;overflow-y:auto}
.sheet-grip{width:40px;height:4px;border-radius:999px;background:#DAD7CC;align-self:center}
.toast{position:fixed;left:50%;transform:translateX(-50%);top:calc(70px + env(safe-area-inset-top,0px));width:calc(100% - 32px);max-width:448px;background:#1F1E1B;color:#fff;font-size:14px;font-weight:600;padding:12px 14px;border-radius:12px;z-index:40;box-shadow:0 6px 18px rgba(0,0,0,0.2)}

.login-wrap{flex:1;display:flex;flex-direction:column;justify-content:center;padding:32px 20px;gap:20px}
.login-brand{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.login-logo{width:64px;height:64px;border-radius:999px;background:#2F9E44;color:#fff;font-weight:800;font-size:17px;letter-spacing:0.5px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,0.15)}
.field-error{font-size:13px;color:#B42318}

/* Public demo booking */
.step-head{display:flex;align-items:center;gap:10px}
.step-no{width:26px;height:26px;border-radius:999px;background:#1F5C3C;color:#fff;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.date-strip{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:thin}
.date-chip{flex:0 0 auto;width:64px;min-height:64px;border:1px solid #DAD7CC;border-radius:12px;background:#fff;color:#1F1E1B;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-weight:600}
.date-chip small{font-size:11px;color:#6B6A64;font-weight:700;text-transform:uppercase;letter-spacing:0.4px}
.date-chip span{font-size:18px;font-weight:700}
.date-chip.on{background:#1F5C3C;border-color:#1F5C3C;color:#fff}
.date-chip.on small{color:#D9E8DE}
.slot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.slot{min-height:44px;border:1px solid #DAD7CC;border-radius:10px;background:#fff;font-size:14px;font-weight:600;color:#1F1E1B}
.slot:hover:not(:disabled){border-color:#1F5C3C}
.slot.on{background:#1F5C3C;border-color:#1F5C3C;color:#fff}
.slot:disabled{background:#F3F1EA;color:#A8A69E;text-decoration:line-through;cursor:not-allowed}
.map-box{height:240px;border-radius:12px;border:1px solid #DAD7CC;overflow:hidden;z-index:0}
.otp-input{letter-spacing:8px;text-align:center;font-size:22px;font-weight:700}
.seg{display:grid;grid-template-columns:1fr 1fr;background:#ECE9E1;border-radius:10px;padding:3px;gap:3px}
.seg button{min-height:38px;border:none;border-radius:8px;background:transparent;font-size:14px;font-weight:600;color:#44423C}
.seg button.on{background:#fff;color:#1F1E1B;box-shadow:0 1px 2px rgba(0,0,0,0.08)}
.done-icon{width:56px;height:56px;border-radius:999px;background:#E2F0E6;color:#1A5234;display:flex;align-items:center;justify-content:center;margin:0 auto}
.flash-ok{background:#E2F0E6;border-color:#C5E0CD;color:#1A5234;font-size:14px}
