/* BotBuilders Sign-In/Out — app styles. Tokens from colors_and_type.css */
@import url('colors_and_type.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  color: var(--fg1);
  background: #0c0f14;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; }
.pixel { image-rendering: pixelated; }

/* ============================================================
   DEMO SHELL  (the harness — not part of the product)
   ============================================================ */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.shell-bar {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: #11151c;
  border-bottom: 1px solid #20262f;
  color: #fff;
}
.shell-brand { display: flex; align-items: center; gap: 9px; }
.shell-brand img { height: 26px; }
.shell-brand .word {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--bb-blue);
  -webkit-text-stroke: 1.2px var(--bb-ink);
  paint-order: stroke fill;
  letter-spacing: .02em;
}
.shell-brand .sub {
  font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: #6b7685;
}
.shell-seg {
  margin-left: auto;
  display: flex;
  gap: 3px;
  background: #0c0f14;
  border: 1px solid #20262f;
  border-radius: var(--r-md);
  padding: 3px;
}
.shell-seg button {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; background: transparent; cursor: pointer;
  color: #8a94a3; font-weight: 600; font-size: 13px;
  padding: 7px 14px; border-radius: var(--r-sm);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.shell-seg button:hover { color: #cfd6df; }
.shell-seg button.on { background: var(--bb-blue); color: #fff; }
.shell-seg button.on:hover { color: #fff; }
.shell-hint { font-size: 12px; color: #6b7685; font-weight: 500; }

.shell-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  overflow: auto;
  background:
    radial-gradient(1200px 700px at 50% -10%, #161b24 0%, #0c0f14 60%);
}

/* ============================================================
   TABLET (door kiosk) bezel
   ============================================================ */
.tablet {
  position: relative;
  width: 1024px;
  height: 640px;
  background: #15181d;
  border-radius: 26px;
  padding: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 2px #2b313b;
  flex: none;
}
.tablet::after { /* camera dot */
  content: '';
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #2b313b;
}
.tablet-screen {
  width: 100%; height: 100%;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}

/* ============================================================
   KIOSK
   ============================================================ */
.kiosk { position: absolute; inset: 0; display: flex; flex-direction: column; }
.kiosk-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--n100) 1px, transparent 1px),
    linear-gradient(90deg, var(--n100) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .5;
  pointer-events: none;
}
.kiosk-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  border-bottom: var(--bw-bold) solid var(--bb-ink);
  background: #fff;
}
.kiosk-top img { height: 30px; }
.kiosk-top .word {
  font-family: var(--font-display); font-size: 17px; color: var(--bb-blue);
  -webkit-text-stroke: 1.4px var(--bb-ink); paint-order: stroke fill;
}
.kiosk-top .where { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg3); }
.kiosk-clock {
  margin-left: auto; text-align: right; line-height: 1;
}
.kiosk-clock .t { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg1); }
.kiosk-clock .d { font-size: 12px; font-weight: 600; color: var(--fg3); margin-top: 3px; }

.kiosk-body {
  position: relative; z-index: 2;
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 22px 32px;
  text-align: center;
}

/* attract */
.reader {
  width: 138px; height: 138px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bb-blue-tint);
  border: var(--bw-bold) solid var(--bb-ink);
  box-shadow: var(--shadow-hard);
  margin-bottom: 6px;
  position: relative;
}
.reader img { width: 78px; }
.reader .ring {
  position: absolute; inset: -3px; border-radius: 50%;
  border: var(--bw-bold) solid var(--bb-blue);
  animation: pulse 1.8s var(--ease-out) infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}
.attract h1 { font-size: 38px; margin: 18px 0 8px; letter-spacing: -.02em; }
.attract h1 .b { color: var(--bb-blue-dark); }
.attract p { font-size: 16px; margin: 0; color: var(--fg2); }

.kiosk-foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 22px; border-top: 1px solid var(--n100); background: #fff;
}
.count-chip {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 14px; color: var(--fg1);
}
.count-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(47,174,74,.18); }
.count-chip b { color: var(--bb-blue-dark); }
.linkbtn {
  background: none; border: none; cursor: pointer;
  font-weight: 700; font-size: 14px; color: var(--bb-blue-dark);
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: var(--r-sm);
}
.linkbtn:hover { background: var(--bb-blue-tint); }

/* greeting + activity picker */
.greet { width: 100%; max-width: 760px; }
.greet-head { display: flex; align-items: center; gap: 16px; justify-content: center; margin-bottom: 4px; }
.avatar {
  border-radius: var(--r-md); display: grid; place-items: center;
  font-weight: 700; color: #fff; flex: none;
  border: 2px solid var(--bb-ink);
}
.greet .avatar { width: 64px; height: 64px; font-size: 24px; box-shadow: var(--shadow-hard-sm); }
.greet h1 { font-size: 32px; margin: 0; letter-spacing: -.02em; text-align: left; }
.greet .sub { font-size: 15px; color: var(--fg2); margin: 2px 0 0; text-align: left; }
.greet h2 { font-size: 19px; margin: 22px 0 16px; color: var(--fg2); font-weight: 600; }

.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.act-btn {
  position: relative; cursor: pointer; text-align: left;
  background: #fff; border: var(--bw-bold) solid var(--bb-ink); border-radius: var(--r-md);
  box-shadow: var(--shadow-hard-sm); padding: 16px 16px 15px;
  display: flex; flex-direction: column; gap: 10px; min-height: 104px;
  transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast) var(--ease-pop);
}
.act-btn:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); }
.act-btn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--bb-ink); }
.act-ic { width: 42px; height: 42px; border-radius: var(--r-sm); display: grid; place-items: center; color: #fff; }
.act-btn .nm { font-weight: 700; font-size: 16px; line-height: 1.15; }
.act-btn .mt { font-size: 12px; color: var(--fg3); font-weight: 600; }
.act-btn .corner { position: absolute; top: 12px; right: 12px; color: var(--bb-blue); opacity: 0; transition: opacity var(--dur-fast); }
.act-btn.selected { background: var(--bb-blue-tint); box-shadow: var(--shadow-hard); transform: translate(-2px,-2px); }
.act-btn.selected .corner { opacity: 1; }
.act-btn.enrolled .mt { color: var(--bb-blue-dark); }
.act-other { border-style: dashed; background: var(--n50); box-shadow: none; }
.act-other:hover { box-shadow: var(--shadow-hard-sm); }
.greet-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.greet-actions .kbtn { margin-top: 0; }

/* success */
.success { display: flex; flex-direction: column; align-items: center; }
.success .burst {
  width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 16px;
  border: var(--bw-bold) solid var(--bb-ink); box-shadow: var(--shadow-hard);
  animation: pop .4s var(--ease-pop) both;
}
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success .burst img { width: 66px; }
.success h1 { font-size: 32px; margin: 4px 0 4px; letter-spacing: -.02em; line-height: 1.12; max-width: 18ch; }
.success .line {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; color: var(--fg2); font-weight: 600;
  background: var(--n50); border: 1px solid var(--n100); border-radius: var(--r-pill);
  padding: 8px 16px; margin-top: 10px;
}
.success .hint { font-size: 13px; color: var(--fg3); margin-top: 18px; }
.kbtn {
  cursor: pointer; font-weight: 700; font-size: 16px;
  border: var(--bw-bold) solid var(--bb-ink); border-radius: var(--r-sm);
  padding: 13px 26px; background: var(--bb-blue); color: #fff;
  box-shadow: var(--shadow-hard-sm); margin-top: 22px;
  display: inline-flex; align-items: center; gap: 9px;
  transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast) var(--ease-pop), background var(--dur-fast);
}
.kbtn:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); background: var(--bb-blue-bright); }
.kbtn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--bb-ink); }
.kbtn.ghost { background: #fff; color: var(--fg1); }
.kbtn.dark { background: var(--bb-ink); color: #fff; }

/* manual search */
.manual { width: 100%; max-width: 620px; }
.manual h1 { font-size: 26px; margin: 0 0 4px; }
.manual .sub { color: var(--fg2); font-size: 14px; margin: 0 0 16px; }
.search {
  display: flex; align-items: center; gap: 10px;
  border: var(--bw-bold) solid var(--bb-ink); border-radius: var(--r-sm);
  padding: 12px 16px; background: #fff; box-shadow: var(--shadow-hard-sm); margin-bottom: 14px;
}
.search input { border: none; outline: none; font-size: 17px; flex: 1; font-family: var(--font-ui); color: var(--fg1); }
.name-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 280px; overflow: auto; padding: 2px; }
.name-row {
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
  background: #fff; border: 1px solid var(--n200); border-radius: var(--r-sm); padding: 10px 12px;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.name-row:hover { border-color: var(--bb-blue); background: var(--bb-blue-tint); }
.name-row .avatar { width: 38px; height: 38px; font-size: 14px; border-radius: var(--r-sm); }
.name-row .nm { font-weight: 700; font-size: 15px; }
.name-row .mt { font-size: 12px; color: var(--fg3); }
.name-row.present { opacity: .9; }
.name-row .pin { margin-left: auto; }

/* PIN keypad (by-name path) */
.pinpad { width: 100%; max-width: 360px; }
.pin-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pin-head .avatar { width: 54px; height: 54px; font-size: 20px; border-radius: var(--r-md); box-shadow: var(--shadow-hard-sm); }
.pin-head h1 { font-size: 24px; margin: 0; letter-spacing: -.02em; text-align: left; }
.pin-head .sub { font-size: 14px; color: var(--fg2); margin: 2px 0 0; text-align: left; max-width: 32ch; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 4px 0 10px; }
.pin-dots.err { animation: shake .4s var(--ease-out); }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: var(--bw-bold) solid var(--bb-ink); background: #fff; transition: background var(--dur-fast); }
.pin-dot.on { background: var(--bb-blue); }
.pin-dots.err .pin-dot { border-color: var(--danger); }
.pin-dots.err .pin-dot.on { background: var(--danger); }
.pin-err { text-align: center; color: var(--danger); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; justify-content: center; width: 100%; margin-bottom: 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key {
  cursor: pointer; font-family: var(--font-ui); font-weight: 700; font-size: 26px; color: var(--fg1);
  height: 60px; background: #fff; border: var(--bw-bold) solid var(--bb-ink); border-radius: var(--r-md);
  box-shadow: var(--shadow-hard-sm); display: grid; place-items: center;
  transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast) var(--ease-pop), background var(--dur-fast);
}
.key:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); background: var(--bb-blue-tint); }
.key:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--bb-ink); }
.key.ghost { background: var(--n50); color: var(--fg3); box-shadow: none; border-color: var(--n200); }
.key.ghost:hover { background: #fff; color: var(--fg1); box-shadow: var(--shadow-hard-sm); border-color: var(--bb-ink); }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }

/* demo tray */
.demo-tray {
  position: relative; z-index: 5; flex: none;
  background: rgba(11,11,12,.92); backdrop-filter: blur(4px);
  border-top: 2px solid var(--bb-blue);
  padding: 9px 16px; display: flex; align-items: center; gap: 12px;
}
.demo-tray .lbl { font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--bb-blue-bright); text-transform: uppercase; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.demo-tags { display: flex; gap: 8px; overflow: auto; }
.demo-tag {
  flex: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  background: #1b2029; border: 1px solid #2f3742; border-radius: var(--r-pill);
  padding: 5px 12px 5px 5px; color: #e7ecf0; font-weight: 600; font-size: 12px;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.demo-tag:hover { border-color: var(--bb-blue); background: #222a35; }
.demo-tag .avatar { width: 24px; height: 24px; font-size: 10px; border-radius: 50%; border-width: 1px; }
.demo-tag .st { font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--r-pill); }
.demo-tag .st.in { background: rgba(47,174,74,.2); color: #6fe08a; }
.demo-tag .st.out { background: rgba(122,134,149,.2); color: #9aa5b1; }

/* ============================================================
   ADMIN (desktop)
   ============================================================ */
.admin { display: flex; flex-direction: column; height: 100%; background: var(--bg-sunken); }
.admin-head {
  flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 26px; height: 62px; background: #fff;
  border-bottom: var(--bw-bold) solid var(--bb-ink);
}
.admin-head .brand { display: flex; align-items: center; gap: 9px; }
.admin-head .brand img { height: 28px; }
.admin-head .brand .word { font-family: var(--font-display); font-size: 15px; color: var(--bb-blue); -webkit-text-stroke: 1.2px var(--bb-ink); paint-order: stroke fill; }
.admin-tabs { display: flex; gap: 3px; margin-left: 8px; }
.admin-tab {
  background: none; border: none; cursor: pointer; font-weight: 600; font-size: 14px;
  color: var(--fg2); padding: 8px 14px; border-radius: var(--r-sm);
}
.admin-tab:hover { background: var(--bb-blue-tint); color: var(--bb-blue-dark); }
.admin-tab.on { background: var(--bb-blue); color: #fff; }
.admin-head .live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--fg2);
}
.admin-head .live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(47,174,74,.16); }
.admin-user {
  display: flex; align-items: center; gap: 12px;
}
.admin-user .user-name {
  font-size: 13px; font-weight: 600; color: var(--fg1);
}
.admin-user .logout-btn {
  background: none; border: 1px solid var(--n200); border-radius: var(--r-sm);
  padding: 8px; cursor: pointer; color: var(--fg2); transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.admin-user .logout-btn:hover {
  background: var(--n50); border-color: var(--n300); color: var(--fg1);
}

.admin-scroll { flex: 1; overflow: auto; padding: 24px 26px 40px; }
.admin-wrap { max-width: 1180px; margin: 0 auto; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-title h1 { font-size: 28px; margin: 0; letter-spacing: -.02em; }
.page-title .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bb-blue-dark); margin-bottom: 5px; }
.page-title .when { font-size: 13px; color: var(--fg3); font-weight: 600; }

/* buttons */
.btn-primary {
  background: var(--bb-blue); color: #fff; border: none; border-radius: var(--r-sm);
  padding: 8px 16px; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
  display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.btn-primary:hover { background: var(--bb-blue-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: var(--n50); color: var(--fg1); border: 1px solid var(--n200); border-radius: var(--r-sm);
  padding: 8px 16px; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
  display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.btn-secondary:hover { background: var(--n100); border-color: var(--n300); }
.btn-danger {
  background: var(--danger); color: #fff; border: none; border-radius: var(--r-sm);
  padding: 8px 16px; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
  display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.btn-danger:hover { background: #c53030; }
.btn-danger:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-icon-danger {
  background: none; border: none; color: var(--danger); cursor: pointer;
  padding: 6px; border-radius: var(--r-sm); transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.btn-icon-danger:hover { background: rgba(224, 59, 54, 0.1); }

/* Activity Management Styles */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.activity-card {
  background: #fff;
  border: 1px solid var(--n100);
  border-radius: var(--r-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.activity-info {
  flex: 1;
}

.activity-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.activity-meta {
  font-size: 14px;
  color: var(--fg3);
  font-weight: 500;
}

.activity-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.activity-stats .stat {
  text-align: center;
}

.activity-stats .stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--fg1);
  line-height: 1;
}

.activity-stats .stat-label {
  display: block;
  font-size: 11px;
  color: var(--fg3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.activity-color-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid currentColor;
}

.activity-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--n50);
  border: 1px solid var(--n200);
  border-radius: var(--r-sm);
  font-weight: 600;
}

.activity-preview small {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg3);
}

.icon-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-option {
  width: 40px;
  height: 40px;
  border: 1px solid var(--n200);
  border-radius: var(--r-sm);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-option:hover {
  border-color: var(--bb-blue);
  background: rgba(24, 160, 240, 0.1);
}

.icon-option.selected {
  border-color: var(--bb-blue);
  background: var(--bb-blue);
  color: white;
}

.warning-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid #F59E0B;
  border-radius: var(--r-sm);
  color: #F59E0B;
  font-size: 14px;
}

/* hero stat row */
.stat-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border: 1px solid var(--n100); border-radius: var(--r-md);
  box-shadow: var(--shadow-soft-sm); padding: 18px 20px;
}
.stat-card.hero {
  background: #fff; color: var(--fg1); border: var(--bw-bold) solid var(--bb-ink);
  box-shadow: var(--shadow-hard); display: flex; align-items: center; gap: 18px; position: relative; overflow: hidden;
}
.stat-card.hero .rb { width: 70px; opacity: .95; flex: none; }
.stat-card.hero .big { font-size: 56px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card.hero .lbl { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bb-blue); margin-bottom: 4px; }
.stat-card.hero .meta { font-size: 12px; color: var(--fg3); margin-top: 6px; }
.stat-card .k { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fg3); }
.stat-card .v { font-size: 34px; font-weight: 800; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card .vsub { font-size: 13px; color: var(--fg3); font-weight: 600; margin-top: 3px; }

.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--n100); border-radius: var(--r-md); box-shadow: var(--shadow-soft-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--n100); }
.panel-head h3 { font-size: 16px; margin: 0; }
.panel-head .badge-ct { font-size: 12px; font-weight: 700; color: var(--fg3); }

/* present table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fg3); padding: 9px 18px; border-bottom: 1px solid var(--n100); background: var(--n50);
}
.tbl td { padding: 11px 18px; border-bottom: 1px solid var(--n100); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { cursor: pointer; transition: background var(--dur-fast); }
.tbl tbody tr:hover { background: var(--bb-blue-tint); }
.cell-name { display: flex; align-items: center; gap: 11px; }
.cell-name .avatar { width: 34px; height: 34px; font-size: 13px; border-radius: var(--r-sm); border-width: 2px; }
.cell-name .nm { font-weight: 700; }
.cell-name .mt { font-size: 12px; color: var(--fg3); }
.dur { font-variant-numeric: tabular-nums; font-weight: 700; }
.via { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--fg3); display: inline-flex; align-items: center; gap: 5px; }

/* activity tag */
.atag {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-weight: 700; font-size: 12px; padding: 4px 11px 4px 8px; border-radius: var(--r-pill);
  border: 2px solid; background: #fff;
}
.atag .sw { width: 9px; height: 9px; border-radius: 2px; }

/* activity breakdown list */
.brk { padding: 8px 0; }
.brk-row { display: flex; align-items: center; gap: 12px; padding: 9px 18px; }
.brk-row .ic { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; color: #fff; flex: none; }
.brk-row .nm { font-weight: 700; font-size: 14px; }
.brk-row .bar { flex: 1; height: 8px; border-radius: var(--r-pill); background: var(--n100); overflow: hidden; }
.brk-row .bar i { display: block; height: 100%; border-radius: var(--r-pill); }
.brk-row .ct { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; width: 22px; text-align: right; }

/* trend chart */
.chart { padding: 18px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-col .col {
  width: 100%; max-width: 38px; background: var(--bb-blue); border: 2px solid var(--bb-ink);
  border-radius: var(--r-sm) var(--r-sm) 0 0; position: relative; min-height: 4px;
  transition: height var(--dur) var(--ease-out);
}
.bar-col .col:hover { background: var(--bb-blue-bright); }
.bar-col .col .n { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--fg2); }
.bar-col .xl { font-size: 11px; font-weight: 600; color: var(--fg3); }
.bar-col.today .col { background: var(--success); }

/* members roster */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar .search { box-shadow: none; border: 2px solid var(--n200); margin: 0; flex: 1; max-width: 360px; padding: 9px 14px; }
.toolbar .search input { font-size: 15px; }
.filter-chip {
  cursor: pointer; font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: var(--r-pill);
  border: 2px solid var(--n200); background: #fff; color: var(--fg2);
}
.filter-chip:hover { border-color: var(--bb-blue); color: var(--bb-blue-dark); }
.filter-chip.on { background: var(--bb-blue); border-color: var(--bb-ink); color: #fff; }

.roster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mcard {
  background: #fff; border: 1px solid var(--n100); border-radius: var(--r-md); box-shadow: var(--shadow-soft-sm);
  padding: 16px; cursor: pointer; display: flex; gap: 13px; align-items: center;
  transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast) var(--ease-pop), border-color var(--dur-fast);
}
.mcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: var(--n200); }
.mcard .avatar { width: 48px; height: 48px; font-size: 18px; border-radius: var(--r-sm); }
.mcard .nm { font-weight: 700; font-size: 16px; }
.mcard .mt { font-size: 12px; color: var(--fg3); margin-top: 1px; }
.mcard .hrs { margin-left: auto; text-align: right; }
.mcard .hrs b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mcard .hrs span { display: block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg3); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status-dot.in { background: var(--success); box-shadow: 0 0 0 3px rgba(47,174,74,.18); }
.status-dot.out { background: var(--n200); }

/* student detail */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--bb-blue-dark); cursor: pointer; margin-bottom: 16px; background: none; border: none; font-size: 14px; padding: 0; }
.back-link:hover { text-decoration: underline; }
.detail-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.detail-head .avatar { width: 78px; height: 78px; font-size: 30px; border-radius: var(--r-md); box-shadow: var(--shadow-hard-sm); }
.detail-head h1 { font-size: 30px; margin: 0; letter-spacing: -.02em; }
.detail-head .meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 7px; font-size: 13px; color: var(--fg2); font-weight: 600; }
.detail-head .meta .it { display: inline-flex; align-items: center; gap: 6px; }
.detail-head .meta code { font-family: var(--font-mono); font-size: 12px; background: var(--n50); border: 1px solid var(--n100); padding: 1px 7px; border-radius: var(--r-sm); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; padding: 7px 14px; border-radius: var(--r-pill); border: 2px solid var(--bb-ink); }
.status-pill.in { background: var(--success); color: #fff; }
.status-pill.out { background: #fff; color: var(--fg3); border-color: var(--n200); }

.stat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.mini { background: #fff; border: 1px solid var(--n100); border-radius: var(--r-md); box-shadow: var(--shadow-soft-sm); padding: 16px 18px; }
.mini .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg3); }
.mini .v { font-size: 30px; font-weight: 800; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.mini .v small { font-size: 15px; font-weight: 700; color: var(--fg3); }
.mini.accent { background: var(--bb-blue); border-color: var(--bb-ink); color: #fff; }
.mini.accent .k { color: rgba(255,255,255,.8); }

.detail-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; align-items: start; }
.hbar-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--n100); }
.hbar-row:last-child { border-bottom: none; }
.hbar-row .nm { font-weight: 700; font-size: 13px; width: 130px; display: flex; align-items: center; gap: 8px; }
.hbar-row .nm .sw { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.hbar-row .bar { flex: 1; height: 10px; border-radius: var(--r-pill); background: var(--n100); overflow: hidden; }
.hbar-row .bar i { display: block; height: 100%; }
.hbar-row .hh { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; width: 52px; text-align: right; }

.sess-tbl td { font-size: 13px; }
.sess-tbl .date { font-weight: 700; }
.sess-tbl .tm { font-variant-numeric: tabular-nums; color: var(--fg2); }
.live-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--success); }
.live-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.empty { text-align: center; padding: 40px 20px; color: var(--fg3); }
.empty img { width: 56px; margin: 0 auto 12px; opacity: .5; }

/* fade */
.fade { animation: fade var(--dur) var(--ease-out) both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

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

/* ============================================================
   FULLSCREEN KIOSK (production mode)
   ============================================================ */
.fullscreen-kiosk {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.fullscreen-kiosk .kiosk {
  position: static;
  width: 100%;
  height: 100%;
}

/* ============================================================
   FULLSCREEN ADMIN (production mode)
   ============================================================ */
.fullscreen-admin {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #fff;
  position: relative;
}

.fullscreen-admin .admin {
  width: 100%;
  height: 100%;
}

/* ============================================================
   ADMIN LOGIN
   ============================================================ */
.admin-login {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: var(--font-ui);
}

.admin-login-container {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
  margin: 20px;
}

.admin-login-header {
  text-align: center;
  margin-bottom: 32px;
}

.admin-login-header img {
  height: 48px;
  margin: 0 auto 16px;
}

.admin-login-header h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--bb-blue);
}

.admin-login-header p {
  margin: 0;
  color: var(--fg2);
  font-size: 14px;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg1);
}

.form-group input {
  padding: 12px 16px;
  border: 2px solid var(--n200);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--bb-blue);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-error {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #c44;
}

.admin-login-btn {
  background: var(--bb-blue);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s;
  margin-top: 8px;
}

.admin-login-btn:hover:not(:disabled) {
  background: #5a6fd8;
}

.admin-login-btn:disabled {
  background: var(--n300);
  cursor: not-allowed;
}

.admin-login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--n200);
}

.admin-login-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--fg3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ============================================================
   MODAL & FORMS
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-hard);
  border: var(--bw-bold) solid var(--bb-ink);
  max-width: 900px;
  width: 95vw;
  max-height: 90vh;
  overflow: auto;
}

.modal-card {
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-hard);
  border: var(--bw-bold) solid var(--bb-ink);
  max-width: 500px;
  width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--n100);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--fg1);
}

.modal-body {
  padding: 20px 24px;
}

.modal-body > :first-child {
  margin-top: 0;
}

.modal-body > :last-child {
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--n100);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--r-sm);
  color: var(--fg2);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--n100);
  color: var(--fg1);
}

.add-student-form {
  padding: 20px 24px 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  font-size: 13px;
  color: var(--fg1);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid var(--n200);
  border-radius: var(--r-sm);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--bb-blue);
  box-shadow: 0 0 0 3px rgba(24, 160, 240, 0.1);
}

.form-group input.error,
.form-group select.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(224, 59, 54, 0.1);
}

.error-text {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(224, 59, 54, 0.1);
  border: 1px solid var(--danger);
  border-radius: var(--r-sm);
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 16px;
}

.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 4px 2px;
}

.color-option {
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-option.selected {
  border-color: var(--bb-ink);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bb-ink);
}

.activity-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.activity-chip {
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.activity-chip:hover {
  opacity: 0.8;
}

.activity-chip.selected {
  background: var(--activity-color, var(--bb-blue)) !important;
  color: #fff !important;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--n100);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }
}
