:root{
  --bg:#f4f7fb;
  --panel:#ffffff;
  --card:#ffffff;
  --card2:#f8fafc;
  --text:#0f172a;
  --muted:#5b6b86;
  --line:#e3e8f0;
  --brand:#2563eb;
  --ok:#16a34a;
  --bad:#dc2626;
  --warn:#ca8a04;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
  --radius:16px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:linear-gradient(180deg,#f4f7fb,#eef2f7);
  color:var(--text)
}
a{color:inherit;text-decoration:none}

.container{
  max-width:1380px;
  margin:0 auto;
  padding:24px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background:#fff;
  border-bottom:1px solid var(--line)
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 24px;
  max-width:1380px;
  margin:0 auto
}

.brand{display:flex;gap:14px;align-items:center}
.brand .logoimg{
  width:48px;height:48px;border-radius:12px;object-fit:contain;
  background:#fff;border:1px solid #d0d7e2;
  box-shadow:0 4px 14px rgba(0,0,0,.12);padding:6px
}
.brand .title{display:flex;flex-direction:column;line-height:1.2}
.brand .title b{font-size:18px;font-weight:800}
.brand .title span{font-size:13px;color:#4a5a73;font-weight:600}

.menu{display:flex;gap:10px;flex-wrap:wrap}
.pill{
  padding:10px 14px;border:1px solid var(--line);
  border-radius:999px;color:var(--muted);background:#fff;font-weight:600
}
.pill.active{color:#fff;background:var(--brand);border-color:var(--brand)}

.h1{font-size:32px;margin:14px 0 8px}
.sub{color:var(--muted);margin:0 0 20px;font-size:15px}

.grid{display:grid;gap:18px}
.grid.two{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:18px;
  align-items:start;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px
}
.card.scan{border:2px solid var(--brand);background:#f8fafc}
.card h3{margin:0 0 12px;font-size:15px;color:#334155;font-weight:700}

.hr{height:1px;background:var(--line);margin:16px 0}

.input{
  width:100%;padding:18px 16px;border-radius:14px;
  border:2px solid #c7d2fe;background:#fff;color:var(--text);
  outline:none;font-size:20px;font-weight:600
}
.input:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(37,99,235,.18)}

.label{font-size:13px;color:var(--muted);margin:12px 0 6px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.btn{
  padding:12px 16px;border-radius:14px;border:1px solid var(--brand);
  background:var(--brand);color:#fff;cursor:pointer;font-weight:700
}
.btn:hover{opacity:.92}
.btn.secondary{background:#fff;color:var(--brand);border-color:var(--line)}
.btn.secondary:hover{background:#f1f5f9}
.btn.bad{background:#dc2626;border-color:#dc2626}

.kpi{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.kpi .tile{padding:16px;border-radius:16px;border:1px solid var(--line);background:#fff}
.kpi .num{font-size:26px;font-weight:900}
.kpi .cap{color:var(--muted);font-size:13px}

.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;
  border:1px solid var(--line);background:#fff;
  color:var(--muted);font-weight:700
}
.dot{width:8px;height:8px;border-radius:99px;background:var(--muted)}
.badge.ok{color:var(--ok);border-color:#bbf7d0;background:#ecfdf5}
.badge.ok .dot{background:var(--ok)}
.badge.bad{color:var(--bad);border-color:#fecaca;background:#fef2f2}
.badge.bad .dot{background:var(--bad)}
.badge.warn{color:var(--warn);border-color:#fde68a;background:#fffbeb}
.badge.warn .dot{background:var(--warn)}

.tableWrap{
  width:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

.table{
  width:100%;
  min-width:760px;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff
}
.table th,.table td{padding:12px 10px;border-bottom:1px solid var(--line)}
.table th{
  color:var(--muted);font-size:12px;text-transform:uppercase;
  letter-spacing:.1em;text-align:left;background:#f8fafc
}
.table tr:last-child td{border-bottom:none}

/* ===== Desktop room schedule grid ===== */
#grid{
  table-layout:fixed;
  min-width:900px;
}
#grid th:first-child,
#grid td:first-child{
  width:112px;
}
#grid th:not(:first-child),
#grid td:not(:first-child){
  width:calc((100% - 112px) / 5);
}
#grid tbody td{
  vertical-align:middle;
}
#grid tbody td:first-child{
  font-size:14px;
  line-height:1.35;
  white-space:normal;
}
#grid tbody td:not(:first-child){
  padding:12px 10px;
}
#grid tbody td:not(:first-child) > .btn,
#grid tbody td:not(:first-child) > .card,
#grid tbody td:not(:first-child) > .room-booked-card{
  width:100%;
  min-height:98px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
}
#grid tbody td:not(:first-child) > .room-booked-card{
  align-items:flex-start;
  justify-content:flex-start;
}
#grid .badge{
  max-width:100%;
  justify-content:center;
  white-space:normal;
  text-align:center;
}
#grid .small{
  line-height:1.35;
  overflow-wrap:anywhere;
}

.mono{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace
}

.toast{
  margin-top:14px;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff
}
.bridge-status{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.bridge-status.online{
  border-color:#bbf7d0;
  background:#ecfdf5;
  color:#16a34a;
}
.bridge-status.offline{
  border-color:#fde68a;
  background:#fffbeb;
  color:#92400e;
}
.bridge-status.online .dot{background:#16a34a}
.bridge-status.offline .dot{background:#ca8a04}
.small{color:var(--muted);font-size:12px}
.footer{color:var(--muted);font-size:12px;margin-top:18px}
.shift-test-row{
  margin-top:10px;
  grid-template-columns:auto 1fr;
  align-items:center;
}
.shift-test-row .btn{
  white-space:nowrap;
}
.shift-test-note{
  line-height:1.45;
}

.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999;
  overflow-y: auto;
}
.modal.hidden{display:none}

.modal-card{
  width:min(720px,100%);
  max-height:90vh;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  box-shadow:0 18px 50px rgba(0,0,0,.20);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:16px 16px 10px;
  border-bottom:1px solid rgba(0,0,0,.08);
  flex:0 0 auto;
}
.modal-title{font-weight:900;font-size:16px}
.modal-sub{color:#64748b;font-size:12px;margin-top:2px}

.modal-body{
  padding:14px 16px 0;
  overflow-y:auto;
  flex:1 1 auto;
  min-height:0;
}

.modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding:14px 16px 16px;
  border-top:1px solid rgba(0,0,0,.08);
  background:#fff;
  flex:0 0 auto;
}

.icon-btn{
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}
.icon-btn:hover{background:rgba(0,0,0,.03)}

.approval-card{
  width:min(560px,100%);
}
.approval-reader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8fafc;
  padding:14px;
}
.approval-code{
  margin-top:4px;
  font-size:30px;
  line-height:1;
  font-weight:900;
  color:#0f172a;
}
.approval-name{
  margin-top:12px;
  font-size:18px;
  font-weight:900;
  color:#0f172a;
}
.temp-usage-card{
  margin-top:12px;
  border:2px solid #f59e0b;
  border-radius:14px;
  background:#fffbeb;
  padding:14px;
  color:#78350f;
}
.temp-usage-card.ok{
  border-color:#22c55e;
  background:#ecfdf5;
  color:#14532d;
}
.temp-usage-card.warn{
  border-color:#f59e0b;
  background:#fffbeb;
  color:#78350f;
}
.temp-usage-card.danger{
  border-color:#dc2626;
  background:#fef2f2;
  color:#7f1d1d;
}
.temp-usage-label{
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  color:currentColor;
}
.temp-usage-main{
  margin-top:4px;
  display:flex;
  align-items:flex-end;
  gap:8px;
  color:#0f172a;
}
.temp-usage-number{
  font-size:42px;
  line-height:1;
  font-weight:900;
}
.temp-usage-unit{
  padding-bottom:5px;
  font-size:15px;
  font-weight:900;
}
.temp-usage-next{
  margin-top:8px;
  font-size:13px;
  font-weight:800;
  color:currentColor;
}
.temp-usage-alert{
  margin-top:10px;
  display:inline-flex;
  border-radius:999px;
  padding:7px 10px;
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  font-size:12px;
  font-weight:900;
  color:#0f172a;
}
.issue-card-btn{
  margin-top:12px;
  width:100%;
}
.issued-card-card{
  margin-top:12px;
  border:2px solid #22c55e;
  border-radius:14px;
  background:#ecfdf5;
  padding:14px;
  color:#14532d;
}
.issued-card-label{
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.issued-card-code{
  margin-top:6px;
  font-size:24px;
  font-weight:900;
  color:#0f172a;
  overflow-wrap:anywhere;
}
.issued-card-note{
  margin-top:8px;
  font-size:12px;
  font-weight:800;
}
.temp-usage-note{
  margin-top:10px;
  color:#5b6b86;
  font-size:12px;
  line-height:1.45;
}
.approval-card .modal-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
}

.input.err{
  border: 2px solid #dc2626 !important;
  background: #fff5f5;
}
.input.ok{
  border: 2px solid #16a34a !important;
}
.btn[disabled]{
  opacity: .55;
  cursor: not-allowed;
}

/* ===== Mobile cards for rooms ===== */
.rooms-mobile{
  display:none;
  margin-top:14px;
}
.room-slot-card{
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:14px;
  margin-bottom:12px;
}
.room-slot-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.room-slot-title{
  font-weight:800;
  font-size:15px;
}
.room-slot-sub{
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}
.room-slot-grid{
  display:grid;
  gap:10px;
}
.room-mobile-item{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:#fff;
}
.room-mobile-item .room-name{
  font-weight:800;
  margin-bottom:8px;
}
.room-mobile-item .meta{
  font-size:12px;
  color:var(--muted);
  line-height:1.5;
}
.room-mobile-actions{
  margin-top:10px;
}
.room-booked-card-mobile{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  cursor:pointer;
}
.room-booked-card-mobile:hover{
  background:#f8fafc;
}
.room-admin-only{
  width:100%;
  min-height:96px;
  text-align:left;
  border:1px solid #cbd5e1;
  border-radius:14px;
  padding:12px;
  background:#f1f5f9;
  color:#64748b;
}
.room-admin-only .badge{
  background:#f8fafc;
  color:#64748b;
  border-color:#cbd5e1;
}
.room-closed-cell,
.room-closed-item{
  opacity:.48;
  filter:grayscale(.35);
  background:#f1f5f9!important;
  cursor:not-allowed;
}
.room-closed-cell .badge,
.room-closed-item .badge{
  opacity:.9;
}
.room-admin-only .dot{
  background:#64748b;
}
.student-room-back-wrap{
  display:flex;
  justify-content:flex-start;
  margin:0 0 12px;
}
.student-room-back{
  width:auto;
  min-width:0;
  padding:10px 14px;
}

/* ===== Student mobile app ===== */
.auth-page,
.student-page{
  min-height:100vh;
  background:#ecfdf5;
}
.student-page{
  background:
    linear-gradient(90deg, #3561b7 0 8px, transparent 8px calc(100% - 8px), #3561b7 calc(100% - 8px) 100%),
    #079f9b;
}
.auth-page{
  height:100vh;
  overflow:hidden;
  background:
    linear-gradient(90deg, #3561b7 0 8px, transparent 8px calc(100% - 8px), #3561b7 calc(100% - 8px) 100%),
    #0d9aa2;
}
.mobile-shell{
  width:min(100%, 520px);
  margin:0 auto;
  padding:18px 14px 28px;
}
.login-shell{
  width:min(100%, 370px);
  height:100vh;
  min-height:0;
  padding:2px 8px 90px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
}
.login-panel,
.mobile-card,
.quick-action{
  background:#fff;
  border:1px solid rgba(15,118,110,.16);
  border-radius:18px;
  box-shadow:0 14px 34px rgba(15,23,42,.10);
}
.login-panel{
  min-height:430px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  padding:28px 28px 18px;
}
.auth-page .login-panel{
  border:0;
  border-radius:0 0 72px 72px;
  box-shadow:none;
}
.login-brand{
  display:grid;
  place-items:center;
  margin-bottom:10px;
}
.login-logo{
  width:188px;
  height:128px;
  object-fit:contain;
  object-position:center;
  border:0;
  border-radius:0;
  padding:0;
  background:transparent;
  margin:0;
  box-shadow:none;
}
.login-panel h1,
.student-hero h1,
.mobile-card h2{
  margin:4px 0 6px;
  letter-spacing:0;
}
.login-panel h1{
  font-size:30px;
  line-height:1.1;
}
.auth-page .login-panel .label{
  margin-top:12px;
  margin-bottom:6px;
  color:#64748b;
  font-size:12px;
  font-weight:900;
}
.auth-page .login-panel .input{
  height:38px;
  border:1.5px solid #079fa2;
  border-radius:9px;
  background:#fff;
  font-size:14px;
  font-weight:800;
}
.auth-page .login-panel .input:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.login-help{
  margin-top:5px;
  color:#64748b;
  font-size:10px;
  font-weight:700;
  line-height:1.35;
}
.login-panel p,
.student-hero p{
  margin:0 0 18px;
  color:#475569;
}
.eyebrow{
  color:#0f766e;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}
.mobile-primary{
  width:100%;
  min-height:34px;
  margin-top:10px;
  border:0;
  border-radius:6px;
  background:linear-gradient(90deg, #3e7fc3, #02a997);
  font-size:14px;
  font-weight:900;
  text-transform:uppercase;
}
.remember-login{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  color:#334155;
  font-size:10px;
  font-weight:800;
  font-style:italic;
}
.login-account-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-top:7px;
}
.remember-login input{
  width:14px;
  height:14px;
  accent-color:#0f766e;
}
.login-forgot-button{
  display:block;
  padding:4px 0;
  border:0;
  background:transparent;
  color:#0f766e;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.auth-page .toast{
  margin-top:8px;
  padding:8px 10px;
  font-size:11px;
}
.login-links{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:16px;
  color:#0f766e;
  font-size:13px;
  font-weight:700;
}
.login-welcome{
  position:relative;
  z-index:6;
  margin:0 18px 12px;
  display:grid;
  gap:4px;
  text-align:center;
  color:#fff;
  font-size:11px;
  font-weight:900;
  line-height:1.25;
  letter-spacing:.3px;
}
.login-pattern{
  position:fixed;
  left:50%;
  bottom:0;
  z-index:5;
  width:min(calc(100% - 16px), 354px);
  height:auto;
  aspect-ratio:3017 / 344;
  margin:0;
  border-radius:5px 5px 0 0;
  display:block;
  object-fit:contain;
  object-position:center bottom;
  flex:0 0 auto;
  transform:translateX(-50%);
}
.student-hero{
  min-height:168px;
  color:#fff;
  border-radius:0 0 28px 28px;
  background:#0f766e;
  margin:-18px -14px 16px;
  padding:calc(env(safe-area-inset-top) + 26px) 18px 22px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.student-shell{
  width:min(100%, 360px);
  min-height:100vh;
  padding:0 8px 50px;
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.student-page .student-hero{
  min-height:110px;
  margin:0 0 0;
  padding:16px 8px 8px 18px;
  border-radius:0;
  background:transparent;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  position:relative;
  z-index:3;
}
.student-avatar{
  width:58px;
  height:58px;
  flex:0 0 58px;
  border:2px solid rgba(255,255,255,.78);
  border-radius:50%;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:rgba(255,255,255,.18);
  color:#fff;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}

/* ===== Emotion kiosk ===== */
.emotion-page{
  min-height:100vh;
  margin:0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.62), transparent 26%),
    linear-gradient(135deg, #f8f3e7 0%, #d7f4ec 46%, #f7d9b1 100%);
  color:#0f172a;
  overflow:hidden;
  font-family:"Segoe UI Variable Text", "Segoe UI", Tahoma, Arial, sans-serif;
}
.emotion-kiosk{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px;
}
.emotion-card{
  --emotion-item:clamp(122px, 12.5vw, 168px);
  --emotion-gap:clamp(12px, 2vw, 24px);
  width:min(1040px, calc(100vw - 64px));
  min-height:min(720px, calc(100vh - 64px));
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:22px;
  border:1px solid rgba(120,73,30,.14);
  border-radius:32px;
  background:rgba(255,252,245,.92);
  box-shadow:0 34px 90px rgba(82,53,22,.18);
  text-align:center;
}
.emotion-logo{
  width:min(364px, 40.6vw);
  max-height:105px;
  object-fit:contain;
}
.emotion-card h1{
  margin:0;
  width:100%;
  max-width:100%;
  font-size:clamp(30px, 3vw, 50px);
  line-height:1.18;
  font-weight:750;
  color:#07514b;
  white-space:nowrap;
  text-align:center;
}
.emotion-actions{
  display:grid;
  grid-template-columns:repeat(3, var(--emotion-item));
  justify-content:center;
  gap:var(--emotion-gap);
}
.emotion-btn{
  width:var(--emotion-item);
  aspect-ratio:1;
  border:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  align-content:center;
  background:rgba(255,255,255,.72);
  cursor:pointer;
  box-shadow:0 18px 40px rgba(82,53,22,.10);
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease, background .16s ease;
  overflow:hidden;
  padding:3%;
}
.emotion-btn:hover,
.emotion-btn:focus-visible{
  transform:translateY(-5px) scale(1.03);
  background:rgba(255,255,255,.86);
  box-shadow:0 28px 52px rgba(82,53,22,.16);
  outline:5px solid rgba(13,148,136,.14);
}
.emotion-btn:disabled{
  cursor:wait;
  opacity:.68;
  transform:none;
}
.emotion-btn.great{ color:#0f8f72; }
.emotion-btn.normal{ color:#3b82a0; }
.emotion-btn.bad{ color:#b45309; }
.emotion-icon{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}
.emotion-btn.normal .emotion-icon,
.emotion-btn.bad .emotion-icon{
  transform:none;
}
.emotion-face{
  width:82%;
  height:82%;
  fill:none;
  stroke:currentColor;
  stroke-width:3.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.emotion-face circle:not(:first-child){
  fill:currentColor;
  stroke:none;
}
.emotion-note{
  min-height:28px;
  color:#0f766e;
  font-size:22px;
  font-weight:800;
}
.emotion-thanks p{
  margin:0;
  color:#475569;
  font-size:clamp(22px, 2.5vw, 34px);
  font-weight:700;
}
.thanks-mark{
  width:150px;
  height:150px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg, #22c55e, #0d9488);
  color:#fff;
  font-size:90px;
  font-weight:900;
  box-shadow:0 22px 46px rgba(13,148,136,.28);
}
.emotion-countdown{
  color:#64748b;
  font-size:24px;
  font-weight:800;
}
.emotion-countdown b{
  color:#0f766e;
  font-size:34px;
}
@media (max-width:760px){
  .emotion-kiosk{ padding:16px; }
  .emotion-card{
    width:calc(100vw - 32px);
    min-height:calc(100vh - 32px);
    gap:24px;
    border-radius:22px;
  }
  .emotion-actions{
    gap:14px;
  }
  .emotion-card{
    --emotion-item:min(27vw, 126px);
    --emotion-gap:8px;
  }
  .emotion-card h1{
    white-space:normal;
  }
}

/* ===== Emotion stats ===== */
.emotion-stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:16px;
  margin:18px 0;
}
.emotion-total-card,
.emotion-stat-card{
  min-height:150px;
}
.emotion-total{
  margin:10px 0;
  font-size:44px;
  font-weight:900;
  color:#0f766e;
}
.emotion-stat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:18px;
  font-weight:900;
}
.emotion-stat-head b{
  color:var(--emotion-color, #0f766e);
}
.emotion-stat-count{
  margin:14px 0;
  color:#64748b;
  font-weight:800;
}
.emotion-stat-track{
  height:14px;
  overflow:hidden;
  border-radius:999px;
  background:#e2e8f0;
}
.emotion-stat-track span{
  display:block;
  height:100%;
  min-width:4px;
  border-radius:999px;
}
.emotion-stat-card .emotion-stat-track span{ background:var(--emotion-color, #0f766e); }
.emotion-daily-chart{
  min-height:230px;
  display:flex;
  align-items:end;
  gap:14px;
  overflow:auto;
  padding:18px 2px 4px;
}
.emotion-day{
  min-width:70px;
  display:grid;
  justify-items:center;
  gap:8px;
}
.emotion-day-stack{
  width:42px;
  min-height:8px;
  display:flex;
  flex-direction:column-reverse;
  overflow:hidden;
  border-radius:12px 12px 4px 4px;
  background:#e2e8f0;
}
.emotion-day-stack span{
  min-height:0;
}
.emotion-day b{
  color:#0f172a;
  font-size:14px;
}
.emotion-day small{
  color:#64748b;
  font-weight:800;
}
@media (max-width:980px){
  .emotion-stats-grid{
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width:640px){
  .emotion-stats-grid{
    grid-template-columns:1fr;
  }
}
.student-page .student-avatar{
  width:88px;
  height:88px;
  flex-basis:88px;
  border:4px solid #fff;
  background:#0a7f75;
  color:#fff;
  font-size:24px;
  box-shadow:none;
  position:relative;
  z-index:4;
}
.student-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.student-avatar img.default-avatar-img{
  background:#fff;
  object-fit:cover;
}
.student-avatar:focus-visible{
  outline:3px solid rgba(255,255,255,.55);
  outline-offset:3px;
}
.avatar-thumb{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  display:inline-grid;
  place-items:center;
  background:#e0f2fe;
  color:#0369a1;
  font-size:12px;
  font-weight:900;
  vertical-align:middle;
}
.avatar-thumb.empty{
  border:1px solid #bae6fd;
}
.student-hero > div:nth-child(2){
  flex:1;
  min-width:0;
}
.student-page .student-name-block{
  align-self:center;
  position:relative;
  max-width:130px;
  min-width:0;
  cursor:pointer;
  border-radius:8px;
}
.student-page .student-name-block:focus-visible{
  outline:3px solid rgba(255,255,255,.32);
  outline-offset:3px;
}
.student-hero .eyebrow,
.student-hero p{
  color:rgba(255,255,255,.82);
}
.student-hero h1{
  font-size:28px;
  line-height:1.1;
}
.student-page .student-hero h1{
  margin:0;
  color:#fff;
  font-size:14px;
  font-weight:900;
  text-transform:uppercase;
  line-height:1.12;
  display:block;
  max-height:2.24em;
  overflow:hidden;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.student-page .student-hero h1.compact{
  font-size:13px;
  line-height:1.12;
}
.student-page .student-hero p{
  display:none;
}
.student-mini-brand{
  position:relative;
  top:auto;
  right:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  width:160px;
  flex:0 0 160px;
  min-height:76px;
  margin-left:auto;
  margin-right:-8px;
  padding:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  transform:translateY(-18px);
}
.student-mini-brand img{
  width:160px;
  height:76px;
  border-radius:0;
  object-fit:contain;
  object-position:center;
}
.student-page .student-hero > .student-mini-brand{
  flex:0 0 160px;
  width:160px;
  margin-left:auto;
  margin-right:-8px;
}
.student-page .student-hero > .icon-pill{
  position:absolute;
  top:56px;
  right:20px;
  min-height:28px;
  padding:5px 9px;
  border-color:rgba(255,255,255,.42);
  font-size:11px;
}
.student-logout-popover{
  position:absolute;
  left:0;
  top:calc(100% + 8px);
  z-index:20;
  min-width:126px;
  padding:5px;
  border-radius:8px;
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.18);
}
.student-logout-popover button{
  width:100%;
  min-height:30px;
  border:0;
  border-radius:6px;
  background:#f8fafc;
  color:#0f766e;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.student-logout-popover button + button{
  margin-top:4px;
}
.student-logout-popover button:active{
  transform:translateY(1px);
}
.password-modal-card{
  width:min(380px,100%);
}
.student-violation-card{
  display:grid;
  gap:6px;
  margin-top:10px;
  padding:12px;
  color:#0f766e;
}
.violation-student-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
  font-weight:900;
}
.violation-student-badge{
  max-width:170px;
  padding:4px 8px;
  border:1px solid #f2c66d;
  border-radius:999px;
  background:#fff9e8;
  color:#9a6700;
  font-size:10px;
  line-height:1;
  text-align:center;
}
.student-violation-card.reminder-1 .violation-student-badge{border-color:#2563eb;background:#2563eb;color:#fff}
.student-violation-card.reminder-2 .violation-student-badge{border-color:#b7791f;background:#b7791f;color:#fff}
.student-violation-card.reminder-3 .violation-student-badge{border-color:#c2410c;background:#c2410c;color:#fff}
.student-violation-card.reminder-4 .violation-student-badge{border-color:#b91c1c;background:#b91c1c;color:#fff}
.violation-student-badge.reminder-badge-1{border-color:#2563eb!important;background:#2563eb!important;color:#fff!important}
.violation-student-badge.reminder-badge-2{border-color:#b7791f!important;background:#b7791f!important;color:#fff!important}
.violation-student-badge.reminder-badge-3{border-color:#c2410c!important;background:#c2410c!important;color:#fff!important}
.violation-student-badge.reminder-badge-4{border-color:#b91c1c!important;background:#b91c1c!important;color:#fff!important}
.violation-reminder-progress{
  height:24px;
  padding:3px;
  border:1.5px solid #cbd5e1;
  border-radius:5px;
  background:#fff;
  overflow:hidden;
}
.violation-reminder-progress i{
  display:block;
  min-width:64px;
  max-width:100%;
  height:100%;
  border-radius:3px;
  color:#fff;
  font-size:12px;
  font-weight:900;
  font-style:normal;
  line-height:16px;
  text-align:center;
  white-space:nowrap;
}
.violation-reminder-progress i span{display:block;padding:0 6px}
.violation-reminder-progress.reminder-1{border-color:#2563eb}
.violation-reminder-progress.reminder-1 i{background:#2563eb}
.violation-reminder-progress.reminder-2{border-color:#b7791f}
.violation-reminder-progress.reminder-2 i{background:#b7791f}
.violation-reminder-progress.reminder-3{border-color:#c2410c}
.violation-reminder-progress.reminder-3 i{background:#c2410c}
.violation-reminder-progress.reminder-4{border-color:#b91c1c}
.violation-reminder-progress.reminder-4 i{background:#b91c1c}
.violation-detail-modal-card{width:min(520px,100%)}
.violation-current-action{display:flex;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e2e8f0;border-radius:8px}
.violation-current-action span{text-align:right;font-size:12px}
.violation-current-action.reminder-1{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.violation-current-action.reminder-2{border-color:#eab308;background:#fef08a;color:#713f12}
.violation-current-action.reminder-3{border-color:#fdba74;background:#fff7ed;color:#c2410c}
.violation-current-action.reminder-4{border-color:#f3b4b4;background:#fff1f1;color:#a61b1b}
.violation-detail-list{display:grid;gap:8px;margin-bottom:18px}
.violation-detail-item{display:grid;gap:4px;padding:11px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc}
.violation-detail-item div{display:flex;justify-content:space-between;gap:12px;color:#0f766e}
.violation-detail-item span,.violation-detail-item p{margin:0;color:#64748b;font-size:12px}
.violation-next-action{padding:12px;border:1px solid #dbe4ee;border-left-width:4px;border-radius:8px;background:#f8fafc;color:#334155;font-size:12px;line-height:1.5}
.violation-next-action.reminder-2{border-left-color:#eab308}
.violation-next-action.reminder-3{border-left-color:#f97316}
.violation-next-action.reminder-4{border-left-color:#ef4444}
.violation-policy-list{display:grid;gap:8px;padding-bottom:4px}
.violation-policy-list div{display:grid;grid-template-columns:62px 1fr;gap:10px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px}
.violation-policy-list .reminder-1 b{color:#1d4ed8}
.violation-policy-list .reminder-2{border-color:#eab308;background:#fffdeb}
.violation-policy-list .reminder-2 b{color:#854d0e}
.violation-policy-list .reminder-3 b{color:#c2410c}
.violation-policy-list .reminder-4 b{color:#a61b1b}
.violation-policy-list span{font-size:12px;line-height:1.45;color:#475569}
.violation-note{resize:vertical;min-height:82px}
.room-rule-warning{
  margin-top:12px;
  padding:10px 12px;
  border-left:3px solid #d99a16;
  border-radius:0 6px 6px 0;
  background:#fff8e6;
  color:#7a4b00;
  line-height:1.5;
}
.violation-rule-list{display:grid;gap:8px;margin:12px 0}
.violation-rule-list div{display:grid;grid-template-columns:72px 1fr;gap:10px;padding:10px 12px;border:1px solid #dbe4ee;border-radius:8px;background:#f8fafc}
.violation-rule-list b{color:#087f72}
.violation-rule-list .reminder-1 b{color:#1d4ed8}
.badge.violation-level-1{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.violation-rule-list .reminder-2,.badge.violation-level-2{border-color:#eab308;background:#fef08a;color:#713f12}
.violation-rule-list .reminder-2 b{color:#713f12}
.violation-rule-list .reminder-3 b{color:#c2410c}
.badge.violation-level-3{border-color:#fdba74;background:#fff7ed;color:#c2410c}
.violation-rule-list .reminder-4 b{color:#a61b1b}
.badge.violation-level-4{border-color:#f3b4b4;background:#fff1f1;color:#a61b1b}
.violation-status-card{display:grid;grid-template-columns:1fr auto;gap:7px 12px;margin-top:16px;padding:14px;border:1px solid #bfe4dc;border-radius:8px;background:#f1fbf8}
.violation-status-card.is-locked{border-color:#f2aaaa;background:#fff3f3;color:#991b1b}
.violation-status-card span{grid-column:1/-1}
.violation-history-card{margin-top:18px}
.violation-search-row{display:flex;gap:8px;max-width:520px}
.violation-search-row .input{min-width:280px}
.table-scroll{overflow-x:auto}
.violation-revoked{opacity:.58}
.revoke-btn{padding:7px 10px;white-space:nowrap}
.forgot-help-list{
  margin:0 0 14px;
  padding:12px 14px 12px 30px;
  border:1px solid #dbe7e5;
  border-radius:8px;
  background:#f5fbfa;
  color:#475569;
  font-size:13px;
  line-height:1.5;
}
.forgot-help-list li + li{
  margin-top:6px;
}
.password-modal-card .label{
  display:block;
  margin:12px 0 5px;
}
.password-modal-card .input{
  width:100%;
}
.icon-pill{
  border:1px solid rgba(255,255,255,.36);
  background:rgba(255,255,255,.12);
  color:#fff;
  border-radius:999px;
  padding:9px 12px;
  font-weight:800;
  cursor:pointer;
}
.icon-pill.light{
  border-color:var(--line);
  background:#fff;
  color:#0f766e;
}
.mobile-card{
  padding:16px;
  margin-bottom:14px;
}
.student-page .mobile-card,
.student-page .quick-action{
  border:0;
  border-radius:10px;
  box-shadow:none;
}
.gate-card{
  margin-top:-44px;
  position:relative;
}
.student-page .gate-card{
  margin-top:-32px;
  padding:22px 12px 18px;
  position:relative;
  z-index:1;
}
.student-page .gate-card .section-head{
  justify-content:center;
  margin-bottom:10px;
  text-align:center;
}
.student-page .gate-card .student-name-block{
  width:100%;
  max-width:260px;
  margin:0 auto;
  padding:0 8px;
  text-align:center;
}
.student-page .gate-card .student-name-block p{
  display:none;
}
.student-page .gate-card h1{
  margin:0;
  color:#078878;
  font-size:18px;
  font-weight:900;
  line-height:1.28;
  text-transform:uppercase;
  display:block;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  padding-top:2px;
}
.student-page .gate-card h1.compact{
  font-size:17px;
  line-height:1.28;
}
.student-page .gate-card .student-logout-popover{
  left:50%;
  top:calc(100% + 8px);
  transform:translateX(-50%);
}
.barcode-wrap{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:18px 12px 14px;
  text-align:center;
}
.student-page .barcode-wrap{
  border-color:#e2e8f0;
  border-radius:8px;
  padding:10px 10px 8px;
}
.barcode-svg{
  width:100%;
  height:112px;
  display:block;
  fill:#0f172a;
}
.student-page .barcode-svg{
  height:78px;
}
.barcode-code{
  margin-top:8px;
  color:#0f172a;
  font-size:22px;
  font-weight:900;
  letter-spacing:0;
}
.gate-state{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#2563eb;
  font-size:12px;
  font-weight:900;
}
.gate-state.in{
  border-color:#bbf7d0;
  background:#ecfdf5;
  color:#16a34a;
}
.gate-state.out{
  border-color:#fecaca;
  background:#fef2f2;
  color:#dc2626;
}
.gate-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:10px;
}
.mobile-tool{
  min-height:44px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:#0f766e;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:900;
  cursor:pointer;
}
.mobile-tool:active{
  transform:translateY(1px);
}
.mobile-tool svg{
  width:18px;
  height:18px;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
  flex:0 0 auto;
}
.mobile-toast{
  margin-top:10px;
  border:1px solid #bbf7d0;
  border-radius:12px;
  background:#ecfdf5;
  color:#166534;
  padding:10px 12px;
  font-size:12px;
  font-weight:800;
  text-align:center;
}
.loyalty-student-card{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8fafc;
  padding:12px;
  display:grid;
  gap:6px;
}
.student-page .loyalty-student-card{
  margin-top:8px;
  padding:0;
  border:0;
  background:transparent;
  gap:6px;
}
.loyalty-student-card.interactive{
  cursor:pointer;
}
.loyalty-student-card.interactive:focus-visible{
  outline:3px solid rgba(15,118,110,.28);
  outline-offset:2px;
}
.loyalty-student-card.eligible{
  border-color:#bbf7d0;
  background:#ecfdf5;
}
.student-page .loyalty-student-card.eligible{
  background:transparent;
}
.loyalty-title{
  font-weight:900;
  color:#0f172a;
}
.loyalty-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#078878;
  font-size:13px;
  font-weight:900;
}
.loyalty-row span{
  white-space:nowrap;
}
.loyalty-rank-badge{
  flex:0 0 auto;
  max-width:128px;
  border:1px solid #cbd5e1;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  padding:4px 7px;
  font-size:10px;
  font-weight:900;
  line-height:1;
  text-align:center;
  overflow:hidden;
  text-overflow:ellipsis;
}
.loyalty-rank-badge.silver{
  border-color:#cbd5e1;
  background:#f8fafc;
  color:#475569;
}
.loyalty-rank-badge.bronze{
  border-color:#fed7aa;
  background:#fff7ed;
  color:#9a3412;
}
.loyalty-rank-badge.gold{
  border-color:#fde68a;
  background:#fffbeb;
  color:#92400e;
}
.loyalty-rank-badge.diamond{
  border-color:#bae6fd;
  background:#eff6ff;
  color:#2563eb;
}
.loyalty-more-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#64748b;
  font-size:9px;
  line-height:1.35;
}
.loyalty-more-row span{
  min-width:0;
}
.loyalty-more-btn{
  flex:0 0 auto;
  min-width:82px;
  height:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  border:1px solid #99f6e4;
  border-radius:999px;
  background:#ecfdf5;
  color:#078878;
  font-size:9px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
}
.loyalty-more-btn span{
  color:inherit;
  font-size:9px;
  line-height:1;
}
.loyalty-more-btn b{
  color:inherit;
  font-size:12px;
  line-height:1;
}
.loyalty-more-btn:active{
  transform:translateY(1px);
}
.loyalty-progress{
  height:24px;
  padding:3px;
  border:1.5px solid #079fa2;
  border-radius:5px;
  background:#fff;
  overflow:hidden;
}
.loyalty-progress i{
  display:block;
  height:100%;
  min-width:64px;
  max-width:100%;
  border-radius:3px;
  background:linear-gradient(90deg, #3e7fc3, #02a997);
  color:#fff;
  font-size:12px;
  font-weight:900;
  line-height:16px;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
}
.loyalty-progress i span{
  display:block;
  padding:0 6px;
  overflow:visible;
  text-overflow:clip;
}
.student-page .loyalty-student-card .small{
  color:#64748b;
  font-size:9px;
  line-height:1.35;
}
.loyalty-modal-card{
  width:min(520px,100%);
}
.activity-event-modal-card{
  width:min(420px,100%);
}
.avatar-preview-modal-card{
  width:min(360px,100%);
}
.avatar-preview-frame{
  width:min(100%, 260px);
  aspect-ratio:1;
  margin:8px auto 12px;
  border:4px solid #e2e8f0;
  border-radius:50%;
  background:#f8fafc;
  overflow:hidden;
  display:grid;
  place-items:center;
}
.avatar-preview-frame img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.avatar-upload-hints{
  display:grid;
  gap:4px;
  margin:0 auto 2px;
  padding:10px 12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fafc;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
}
.avatar-upload-hints b{
  color:#0f766e;
  font-size:13px;
}
.avatar-upload-hints span{
  display:block;
}
.avatar-upload-hints.compact{
  margin:0 0 12px;
}
.avatar-crop-modal-card{
  width:min(380px,100%);
}
.avatar-crop-stage{
  width:min(100%, 300px);
  aspect-ratio:1;
  margin:4px auto 14px;
  border-radius:18px;
  background:#0f766e;
  position:relative;
  overflow:hidden;
  touch-action:none;
  cursor:grab;
  user-select:none;
}
.avatar-crop-stage:active{
  cursor:grabbing;
}
.avatar-crop-stage img{
  position:absolute;
  left:50%;
  top:50%;
  max-width:none;
  transform-origin:center;
  will-change:transform;
  user-select:none;
  -webkit-user-drag:none;
}
.avatar-crop-mask{
  position:absolute;
  inset:0;
  pointer-events:none;
  background:radial-gradient(circle at center, transparent 0 48%, rgba(15,23,42,.58) 48.5%);
}
.avatar-crop-mask:after{
  content:"";
  position:absolute;
  inset:8%;
  border:3px solid #fff;
  border-radius:50%;
  box-shadow:0 0 0 1px rgba(0,0,0,.12);
}
.avatar-zoom-label{
  display:block;
  margin:0 0 8px;
  color:#0f172a;
  font-size:12px;
  font-weight:800;
}
.avatar-zoom-range{
  width:100%;
  accent-color:#07998b;
}
.event-section{
  display:grid;
  gap:8px;
  padding-bottom:14px;
}
.event-section h3{
  margin:0;
  color:#0f172a;
  font-size:14px;
}
.event-banner-link{
  display:block;
  border:1px solid #dbeafe;
  border-radius:8px;
  overflow:hidden;
  background:#f8fafc;
}
.event-banner-link img{
  width:100%;
  aspect-ratio:5 / 2;
  display:block;
  object-fit:cover;
}
.event-banner-link.ended{
  opacity:.72;
}
.event-banner-link:active{
  transform:translateY(1px);
}
.loyalty-info-block{
  display:grid;
  gap:10px;
  padding:0 0 16px;
}
.loyalty-info-block h3{
  margin:0;
  color:#0f172a;
  font-size:15px;
}
.loyalty-info-block ul{
  margin:0;
  padding-left:18px;
  color:#475569;
  font-size:12px;
  line-height:1.5;
}
.loyalty-tier-list{
  display:grid;
  gap:8px;
}
.loyalty-tier{
  display:grid;
  grid-template-columns:1fr auto;
  gap:4px 10px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
  padding:10px;
}
.loyalty-tier.bronze{
  border-color:#fed7aa;
  background:linear-gradient(90deg, #fff7ed, #ffffff);
}
.loyalty-tier.silver{
  border-color:#cbd5e1;
  background:linear-gradient(90deg, #f8fafc, #ffffff);
}
.loyalty-tier.gold{
  border-color:#fde68a;
  background:linear-gradient(90deg, #fffbeb, #ffffff);
}
.loyalty-tier.diamond{
  border-color:#e9d5ff;
  background:linear-gradient(90deg, #faf5ff, #fdf2f8);
}
.loyalty-tier b{
  color:#0f172a;
  font-size:13px;
}
.loyalty-tier.bronze b,
.loyalty-tier.bronze span{
  color:#9a3412;
}
.loyalty-tier.silver b,
.loyalty-tier.silver span{
  color:#475569;
}
.loyalty-tier.gold b,
.loyalty-tier.gold span{
  color:#92400e;
}
.loyalty-tier.diamond b,
.loyalty-tier.diamond span{
  color:#7c3aed;
}
.loyalty-tier span{
  color:#078878;
  font-size:12px;
  font-weight:900;
}
.loyalty-tier small{
  grid-column:1 / -1;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}
.loyalty-event-open{
  width:100%;
  min-height:34px;
  border:1px solid #99f6e4;
  border-radius:9px;
  background:#ecfdf5;
  color:#078878;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.loyalty-event-open:active{
  transform:translateY(1px);
}
.loyalty-chip-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.loyalty-chip{
  border:1px solid #bbf7d0;
  border-radius:999px;
  background:#ecfdf5;
  color:#166534;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
}
.loyalty-event-list{
  display:grid;
  gap:10px;
}
.loyalty-event{
  border:1px solid #fde68a;
  border-radius:12px;
  background:#fffbeb;
  padding:10px 12px;
  display:grid;
  gap:5px;
}
.loyalty-event b{
  color:#92400e;
}
.loyalty-event span{
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}
.section-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
.status-dot{
  width:18px;
  height:18px;
  border-radius:99px;
  background:#f59e0b;
  box-shadow:0 0 0 8px rgba(245,158,11,.14);
  flex:0 0 auto;
}
.status-dot.in{
  background:#16a34a;
  box-shadow:0 0 0 8px rgba(22,163,74,.14);
}
.status-dot.out{
  background:#dc2626;
  box-shadow:0 0 0 8px rgba(220,38,38,.14);
}
.quick-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:14px;
}
.student-page .quick-actions{
  gap:8px;
  margin-bottom:8px;
}
.quick-action{
  border:0;
  text-align:left;
  font:inherit;
  min-height:112px;
  padding:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position:relative;
}
.quick-action:focus-visible{
  outline:3px solid rgba(15,118,110,.25);
  outline-offset:2px;
}
.student-page .quick-action{
  min-height:72px;
  padding:10px 12px;
  justify-content:flex-start;
  gap:5px;
}
.quick-action.attention{
  border-color:#f59e0b;
  background:#fffbeb;
}
.quick-icon{
  width:34px;
  height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#ecfdf5;
  color:#0f766e;
}
.student-page .quick-icon{
  width:22px;
  height:22px;
  border-radius:8px;
}
.student-page .quick-icon svg{
  width:15px;
  height:15px;
}
.quick-icon.notice{
  background:#fffbeb;
  color:#ca8a04;
}
.notice-count{
  position:absolute;
  top:10px;
  right:10px;
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#dc2626;
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.hidden{display:none!important}
.quick-icon svg{
  width:21px;
  height:21px;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}
.quick-action b{
  color:#0f172a;
  line-height:1.2;
}
.student-page .quick-action b{
  font-size:13px;
  color:#078878;
}
.quick-action span,
.booking-item span{
  color:#64748b;
  font-size:12px;
  line-height:1.4;
}
.student-page .quick-action span,
.student-page .booking-item span{
  font-size:10px;
}
.student-page .quick-action > span:last-child{
  color:#527a76;
}
.student-booking-card{
  padding:12px;
  margin-bottom:8px;
}
.student-page .student-booking-card .section-head{
  margin-bottom:8px;
}
.student-page .student-booking-card .eyebrow{
  color:#078878;
  font-size:10px;
}
.student-page .student-booking-card h2{
  margin:2px 0 0;
  font-size:18px;
  color:#0f172a;
}
.student-page .booking-item,
.student-page .empty-state{
  border-radius:8px;
  padding:10px;
  font-size:11px;
}
.upcoming-modal-card{
  width:min(380px,100%);
}
.upcoming-block{
  display:grid;
  gap:8px;
  padding-bottom:14px;
}
.upcoming-block h3{
  margin:0;
  color:#0f172a;
  font-size:14px;
}
.upcoming-list{
  display:grid;
  gap:8px;
}
.upcoming-item{
  display:grid;
  gap:4px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
  padding:10px;
}
.upcoming-item b{
  color:#0f172a;
  font-size:13px;
}
.upcoming-item span{
  color:#64748b;
  font-size:11px;
  line-height:1.35;
}
.upcoming-item.training{
  border-color:#fde68a;
  background:#fffbeb;
}
.student-room-quick-card{
  padding:12px;
  margin-bottom:8px;
}
.student-page .student-room-quick-card .section-head{
  margin-bottom:8px;
}
.student-page .student-room-quick-card .eyebrow{
  color:#078878;
  font-size:10px;
}
.student-page .student-room-quick-card h2{
  margin:2px 0 0;
  font-size:18px;
  color:#0f172a;
}
.student-page .student-training-quick-card h2{
  max-width:210px;
  font-size:16px;
  line-height:1.15;
}
.student-room-expand{
  min-height:28px;
  padding:7px 9px;
  border:1px solid #99f6e4;
  border-radius:8px;
  background:#ecfdf5;
  color:#078878;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.quick-room-slots{
  display:flex;
  gap:8px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:2px;
  scroll-snap-type:x mandatory;
}
.quick-room-slots::-webkit-scrollbar{
  height:0;
}
.quick-room-slot{
  flex:0 0 238px;
  scroll-snap-align:start;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
  padding:10px;
}
.quick-room-slot-main{
  display:grid;
  gap:3px;
}
.quick-room-slot-main b{
  color:#0f172a;
  font-size:14px;
  line-height:1.1;
}
.quick-room-slot-main span{
  color:#64748b;
  font-size:10px;
  font-weight:800;
}
.quick-room-room-row{
  margin-top:8px;
  display:flex;
  gap:6px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.quick-room-room-row::-webkit-scrollbar{
  height:0;
}
.quick-room-room-row button{
  flex:0 0 auto;
  min-height:30px;
  padding:7px 9px;
  border:0;
  border-radius:7px;
  background:#079f9b;
  color:#fff;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.quick-room-room-row button:active{
  transform:translateY(1px);
}
.quick-room-modal-card{
  width:min(360px,100%);
}
.quick-room-modal-card .modal-body{
  padding-bottom:12px;
}
.training-events-list{
  display:grid;
  gap:8px;
}
.training-event-item{
  display:grid;
  gap:4px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
  padding:10px;
}
.training-event-item.registered{
  border-color:#99f6e4;
  background:#ecfdf5;
}
.training-event-item b{
  color:#0f172a;
  font-size:13px;
  line-height:1.2;
}
.training-event-item span,
.training-event-item small{
  color:#64748b;
  font-size:10px;
  line-height:1.35;
}
.training-event-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:4px;
}
.training-event-foot button{
  flex:0 0 auto;
  min-height:28px;
  border:0;
  border-radius:7px;
  padding:6px 9px;
  background:#079f9b;
  color:#fff;
  font-size:11px;
  font-weight:900;
}
.training-event-foot button[disabled]{
  background:#cbd5e1;
  color:#64748b;
}
.training-registered-label{
  flex:0 0 auto;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:7px;
  padding:6px 9px;
  background:#ecfdf5;
  color:#078878;
  font-size:11px;
  font-weight:900;
}
.student-bottom-pattern{
  position:fixed;
  left:50%;
  bottom:0;
  z-index:5;
  width:min(calc(100% - 16px), 344px);
  height:auto;
  aspect-ratio:3017 / 344;
  display:block;
  object-fit:contain;
  object-position:center bottom;
  border-radius:5px 5px 0 0;
  margin-top:auto;
  transform:translateX(-50%);
}
.student-social-links{
  position:fixed;
  right:max(8px, calc((100vw - 360px) / 2 + 8px));
  bottom:48px;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.student-social-link{
  width:34px;
  height:34px;
  display:block;
  background:transparent;
  border:0;
  box-shadow:none;
}
.student-social-link img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
}
.student-social-link:active{
  transform:translateY(1px);
}
.booking-list{
  display:grid;
  gap:10px;
}
.booking-item,
.empty-state{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:#f8fafc;
}
.booking-item{
  display:grid;
  gap:4px;
}
.empty-state{
  color:#64748b;
  font-size:13px;
}

/* ===== Announcement media viewer ===== */
.media-shell{
  min-height:100vh;
  width:min(100%, 760px);
  margin:0 auto;
  padding:calc(env(safe-area-inset-top) + 14px) 14px 24px;
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:14px;
}
.media-topbar{
  display:flex;
  align-items:center;
  gap:12px;
}
.media-topbar h1{
  margin:2px 0 0;
  font-size:24px;
}
.media-viewer{
  min-height:0;
  border:1px solid rgba(15,118,110,.16);
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.10);
  overflow:hidden;
}
.media-track{
  height:100%;
  min-height:520px;
  display:grid;
  place-items:center;
  background:#0f172a;
}
.media-slide{
  width:100%;
  height:100%;
  display:grid;
  grid-template-rows:1fr auto;
}
.media-content{
  width:100%;
  height:100%;
  min-height:460px;
  object-fit:contain;
  background:#0f172a;
}
.media-caption{
  padding:12px 14px;
  background:#fff;
  color:#0f172a;
  font-weight:800;
  text-transform:capitalize;
}
.media-empty{
  padding:24px;
  color:#fff;
  text-align:center;
  display:grid;
  gap:8px;
}
.media-empty span{
  color:rgba(255,255,255,.75);
}
.media-controls{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
}
.media-btn{
  width:46px;
  height:46px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:#0f766e;
  display:grid;
  place-items:center;
  cursor:pointer;
}
.media-btn:disabled{
  opacity:.45;
}
.media-btn svg{
  width:24px;
  height:24px;
  stroke:currentColor;
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}
.media-counter{
  min-width:72px;
  text-align:center;
  font-weight:900;
  color:#0f172a;
}

.room-info-cards{
  display:grid;
  gap:14px;
  margin:10px 0 16px;
}
.room-info-card{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.room-info-image-btn{
  width:100%;
  border:0;
  padding:0;
  background:#0f766e;
  color:#fff;
  display:block;
  cursor:pointer;
  text-align:left;
  position:relative;
}
.room-info-image-btn img{
  display:block;
  width:100%;
  aspect-ratio:16/10;
  object-fit:cover;
  background:#e2e8f0;
}
.room-info-image-btn span{
  position:absolute;
  left:12px;
  bottom:12px;
  padding:7px 10px;
  border-radius:10px;
  background:rgba(15,23,42,.72);
  color:#fff;
  font-weight:900;
  backdrop-filter:blur(8px);
}
.room-info-detail{
  padding:12px;
  line-height:1.55;
  color:#334155;
}
.room-info-detail b{
  color:#0f766e;
}

@media (max-width: 1100px){
  .grid.two{
    grid-template-columns:1fr;
  }
}

/* =========================
   MOBILE RESPONSIVE
   ========================= */
@media (max-width: 720px){

  .container{ padding:12px; }

  .nav{
    padding:10px 12px;
    gap:10px;
    align-items:flex-start;
  }

  .brand{ gap:10px; align-items:center; }
  .brand .logoimg{
    width:36px;
    height:36px;
    border-radius:10px;
    padding:4px;
  }
  .brand .title b{ font-size:14px; }
  .brand .title span{ font-size:11px; }

  .menu{
    width:100%;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:6px;
    gap:8px;
    flex-wrap:nowrap;
  }
  .menu::-webkit-scrollbar{ height:0; }

  .pill{
    padding:8px 12px;
    font-size:13px;
    white-space:nowrap;
  }

  .h1{ font-size:22px; margin:8px 0 6px; }
  .sub{ font-size:13px; margin-bottom:12px; }

  .grid.two{ grid-template-columns:1fr !important; }

  .card{
    padding:14px;
    border-radius:14px;
  }

  .input{
    font-size:16px;
    padding:12px 12px;
    border-radius:12px;
  }

  .label{
    font-size:12px;
  }

  .btn{
    width:100%;
    padding:11px 12px;
    border-radius:12px;
    font-size:14px;
  }

  .small{
    font-size:11px;
  }

  .badge{
    padding:6px 10px;
    font-size:11px;
  }

  .tableWrap{
    display:none;
  }

  .rooms-mobile{
    display:block;
  }

  .student-room-mode .container{
    padding-top:12px;
  }

  .student-room-mode .student-room-back-wrap{
    position:sticky;
    top:8px;
    z-index:20;
  }

  .modal{
    padding:10px;
    align-items:flex-start;
  }

  .modal-card{
    width:100%;
    max-height:92vh;
    margin-top:8px;
    border-radius:16px;
  }

  .modal-actions{
    flex-direction:column;
  }

  .row{ grid-template-columns:1fr; }
  .shift-test-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .kpi{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
  .kpi .tile{
    padding:12px;
    border-radius:14px;
  }
  .kpi .num{ font-size:20px; }
  .kpi .cap{ font-size:11px; }
}
