/* ============================================================
   BrightSpots Kiosk Styles
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  --teal: #1D9E75; --teal-light: #E1F5EE; --teal-dark: #085041;
  --bg: #0F172A; --surface: #1E293B; --surface2: #334155;
  --text: #F1F5F9; --text-secondary: #94A3B8; --text-tertiary: #64748B;
  --border: #334155; --radius: 16px; --radius-sm: 10px;
  --danger: #EF4444; --danger-bg: #450A0A;
  --success: #22C55E; --success-bg: #052E16;
}

html, body {
  height: 100%; background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text); -webkit-font-smoothing: antialiased;
  overflow: hidden; user-select: none; -webkit-user-select: none;
}

.app { width: 100vw; height: 100vh; display: flex; flex-direction: column; }

/* HEADER */
.header { display: flex; align-items: center; justify-content: space-between; padding: 20px 32px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.header-logo { display: flex; align-items: center; gap: 12px; }
.header-logo i { font-size: 28px; color: var(--teal); }
.header-title { font-size: 20px; font-weight: 600; }
.header-right { text-align: right; }
.header-time { font-size: 28px; font-weight: 300; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.header-date { font-size: 14px; color: var(--text-tertiary); }

/* MAIN */
.main { display: flex; flex: 1; overflow: hidden; }

/* STAFF GRID */
.staff-section { flex: 1; padding: 24px; overflow-y: auto; }
.staff-section h2 { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.staff-btn { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 12px; cursor: pointer; text-align: center; transition: all 0.15s; display: flex; flex-direction: column; align-items: center; gap: 8px; -webkit-tap-highlight-color: transparent; width: 100%; }
.staff-btn:active { background: var(--surface2); transform: scale(0.97); }
.staff-btn.clocked-in { border-color: var(--teal); background: rgba(29,158,117,0.08); }
.staff-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--text); }
.staff-btn.clocked-in .staff-avatar { background: var(--teal); color: white; }
.staff-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.staff-status { font-size: 11px; color: var(--text-tertiary); }
.staff-btn.clocked-in .staff-status { color: var(--teal); }

/* SIDEBAR */
.sidebar { width: 260px; border-left: 1px solid var(--border); padding: 20px; overflow-y: auto; flex-shrink: 0; }
.sidebar h2 { font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.in-badge { background: var(--teal); color: white; font-size: 10px; padding: 2px 7px; border-radius: 99px; font-weight: 700; }
.who-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.who-item:last-child { border-bottom: none; }
.who-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: white; flex-shrink: 0; }
.who-info { flex: 1; }
.who-name { font-size: 13px; font-weight: 500; }
.who-time { font-size: 11px; color: var(--teal); margin-top: 1px; }
.nobody-in { font-size: 13px; color: var(--text-tertiary); text-align: center; padding: 24px 0; }

/* PIN OVERLAY */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); }
.overlay.show { display: flex; }
.pin-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px 28px; width: 340px; text-align: center; }
.pin-user { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.pin-action { font-size: 15px; margin-bottom: 24px; }
.pin-action.clock-in { color: var(--teal); }
.pin-action.clock-out { color: var(--danger); }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--border); transition: background 0.15s; }
.pin-dot.filled { background: var(--teal); }
.numpad { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.num-btn { background: var(--surface2); border: none; border-radius: var(--radius-sm); padding: 18px; font-size: 22px; font-weight: 500; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.1s; font-family: inherit; }
.num-btn:active { background: var(--border); }
.num-btn.del { font-size: 18px; color: var(--text-secondary); }
.num-btn.empty { background: transparent; cursor: default; }
.pin-err { font-size: 13px; color: var(--danger); min-height: 18px; margin-bottom: 8px; }
.pin-cancel { background: none; border: none; color: var(--text-tertiary); font-size: 14px; cursor: pointer; padding: 8px 16px; font-family: inherit; }

/* CONFIRMATION */
.confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); display: none; align-items: center; justify-content: center; z-index: 200; }
.confirm-overlay.show { display: flex; }
.confirm-card { text-align: center; padding: 40px; }
.confirm-icon { width: 90px; height: 90px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.confirm-icon.in { background: var(--success-bg); border: 2px solid var(--success); }
.confirm-icon.out { background: var(--danger-bg); border: 2px solid var(--danger); }
.confirm-icon i { font-size: 44px; }
.confirm-icon.in i { color: var(--success); }
.confirm-icon.out i { color: var(--danger); }
.confirm-name { font-size: 30px; font-weight: 600; margin-bottom: 8px; }
.confirm-msg { font-size: 20px; color: var(--text-secondary); }

/* SET PIN OVERLAY */
.setup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none; align-items: center; justify-content: center; z-index: 300; backdrop-filter: blur(4px); }
.setup-overlay.show { display: flex; }
.setup-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px 28px; width: 380px; }
.setup-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.setup-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.setup-field { margin-bottom: 14px; }
.setup-field label { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 6px; }
.setup-field select, .setup-field input { width: 100%; padding: 11px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--text); font-family: inherit; }
.setup-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn-setup-cancel { flex: 1; padding: 11px; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; font-family: inherit; font-size: 14px; }
.btn-setup-save { flex: 2; padding: 11px; background: var(--teal); color: white; border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.setup-msg { font-size: 12px; margin-top: 8px; min-height: 16px; }
.setup-msg.err { color: var(--danger); }
.setup-msg.ok { color: var(--success); }

/* ADMIN BUTTON */
.admin-btn { position: fixed; bottom: 16px; right: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 8px 14px; font-size: 12px; color: var(--text-tertiary); cursor: pointer; display: flex; align-items: center; gap: 6px; z-index: 50; font-family: inherit; }
