/* OmniTrack — Purple/Indigo Theme */
:root {
  --background:          #07070f;
  --card:                #0e0e1c;
  --surface:             #13132a;
  --border:              rgba(99, 102, 241, 0.15);
  --border-subtle:       rgba(255, 255, 255, 0.06);
  --text:                rgba(255, 255, 255, 0.92);
  --muted:               rgba(255, 255, 255, 0.45);
  --muted-foreground:    rgba(255, 255, 255, 0.45);

  --primary:             #818cf8;
  --primary-gradient:    linear-gradient(135deg, #6366f1, #8b5cf6);
  --primary-foreground:  #ffffff;

  --secondary:           rgba(129, 140, 248, 0.12);
  --secondary-foreground:#a5b4fc;

  --ok:                  #a5b4fc;
  --warn:                #fbbf24;
  --danger:              #f87171;

  --glow:                rgba(99, 102, 241, 0.25);
  --shadow:              0 8px 28px rgba(0, 0, 0, 0.6);
  --shadow-hover:        0 12px 36px rgba(0, 0, 0, 0.7);
  --radius:              1rem;
  --spacing:             8px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Inter, Roboto, sans-serif;
  background: var(--background);
  min-height: 100vh;
  padding: 24px 0; /* no horizontal padding — keeps footer same width as landing page */
  /* Flex column ensures footer is always at the bottom of the viewport */
  display: flex;
  flex-direction: column;
  /* Dot grid like landing page */
  background-image: radial-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
}

/* Top glow */
body::before {
  content: '';
  position: fixed;
  top: -160px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── FOCUS ── */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--spacing) * 2);
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover,
.nav a.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

/* ── CONTAINER / GRID ── */
.container {
  max-width: 1140px;
  margin: 1.5rem auto;
  padding: 0 calc(var(--spacing) * 3) calc(var(--spacing) * 4);
  position: relative;
  z-index: 1;
}

.grid { display: grid; gap: calc(var(--spacing) * 2); }
.grid.two   { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.manager-grid { align-items: flex-start; }

.page-header   { margin-bottom: 1.5rem; }
.form-row      { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: calc(var(--spacing) * 2); margin-bottom: calc(var(--spacing) * 2); }
.form-col      { min-width: 0; }

/* ── CARD ── */
.card {
  background: rgba(14, 14, 28, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: calc(var(--spacing) * 3);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
  z-index: 1;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.28);
}

/* ── TYPOGRAPHY ── */
h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

.muted { color: var(--muted); font-size: 0.9375rem; margin-top: 6px; }
.microcopy { font-size: 0.875rem; color: var(--muted); }

.kpi {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 0.25rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── FORM ELEMENTS ── */
label {
  font-size: 0.9375rem;
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
  margin-top: 14px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  margin-bottom: calc(var(--spacing) * 2);
  margin-top: 6px;
  color: var(--text);
  background: rgba(13, 13, 26, 0.8);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea { min-height: 120px; resize: vertical; }

/* ── BUTTONS ── */
button {
  width: 100%;
  margin-top: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

/* Primary action buttons */
#verifyBtn,
#companyLoginBtn,
#supLoginBtn {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

#verifyBtn:hover,
#companyLoginBtn:hover,
#supLoginBtn:hover {
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

#actionBtn {
  background: linear-gradient(135deg, rgba(99,102,241,0.25), rgba(139,92,246,0.2));
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.3);
}

/* .btn class */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--muted);
}
.btn.secondary:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--border);
  color: var(--text);
}

.btn.ok {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}
.btn.ok:hover {
  background: rgba(99, 102, 241, 0.28);
}

.btn.warn {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
  color: #fbbf24;
}
.btn.warn:hover { background: rgba(251, 191, 36, 0.18); }

.btn.danger {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.25);
  color: #f87171;
}
.btn.danger:hover { background: rgba(248, 113, 113, 0.18); }

.btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-row button { width: auto; flex: 1 1 0; }

/* btn-link (used in nav actions on clock page) */
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.08);
  color: #a5b4fc;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  min-height: 40px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
  margin-top: 0;
  width: auto;
}
.btn-link:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

/* ── MESSAGES ── */
.hidden { display: none; }

.msg { margin-top: 12px; min-height: 20px; font-size: 0.9rem; }
.msg.ok  { color: #a5b4fc; }
.msg.err { color: #f87171; }

/* ── HOME / CLOCK CARD ── */
.home-card {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

/* ── NARROW CARD (login forms) ── */
.narrow-card {
  max-width: 440px;
  margin: 0 auto;
}

/* ── DASHBOARD CARD (supervisor / manager) ── */
.dashboard-card {
  max-width: none;
  width: calc(100% - 48px);
  margin: 24px auto;
}

.home-card label { text-align: left; }

.home-card #verifyBtn,
.home-card #actionBtn {
  min-height: 60px;
  font-size: 1.15rem;
}

.admin-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  margin-bottom: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.nav-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
  margin-bottom: 4px;
}

.nav-actions .btn-link {
  flex: 0 0 auto;
  min-width: 100px;
}

/* ── STATUS PILLS / BADGES ── */
.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.flag-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

/* ── HR / DIVIDERS ── */
.hr, hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

/* ── CANVAS / CHARTS ── */
canvas {
  width: 100%;
  max-width: 100%;
  background: rgba(13, 13, 26, 0.6);
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* ── MISC ── */
ul { margin-top: 0.35rem; }

.admin { margin-top: 10px; }

details { margin-top: 14px; }

.kiosk-input {
  font-size: 2rem;
  letter-spacing: 0.1em;
  text-align: center;
  padding: 1rem;
  min-height: 56px;
}

.token-card {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(99, 102, 241, 0.08);
  color: var(--text);
}

.table-like { display: grid; gap: calc(var(--spacing) * 2); }

.patient-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: calc(var(--spacing) * 3);
  background: var(--card);
  transition: transform 0.15s, border-color 0.15s;
}
.patient-row:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.wizard-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: calc(var(--spacing) * 2);
  flex-wrap: wrap;
}
.step {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.step.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

/* ── Employee avatar initials circle ── */
.emp-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* ── Status pills ── */
.status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 2px 7px;
}
.status-pill.active  { background: rgba(99,241,120,0.12); color: #6ee76e; border: 1px solid rgba(99,241,120,0.25); }
.status-pill.break   { background: rgba(251,191,36,0.12);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.status-pill.done    { background: rgba(99,102,241,0.12);  color: #a5b4fc; border: 1px solid rgba(99,102,241,0.25); }

/* ── DASHBOARD GRID ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.dash-card {
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.14);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(99,102,241,0.10);
  background: rgba(99,102,241,0.05);
  gap: 8px;
}

.dash-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.88);
  flex: 1;
  min-width: 0;
}

.dash-card-title svg {
  width: 14px; height: 14px;
  stroke: #818cf8;
  stroke-width: 1.9;
  flex-shrink: 0;
}

.drag-handle {
  cursor: grab;
  color: rgba(255,255,255,0.18);
  padding: 4px 5px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.drag-handle svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  stroke-width: 2;
}

.drag-handle:hover {
  color: rgba(255,255,255,0.5);
  background: rgba(99,102,241,0.14);
}

.drag-handle:active { cursor: grabbing; }

.dash-card-body {
  padding: 14px 16px 16px;
  flex: 1;
}

/* first label inside a card body — no extra top gap */
.dash-card-body > label:first-child,
.dash-card-body > p:first-child {
  margin-top: 0;
}

/* Sortable drag states */
.dash-card.sortable-ghost {
  opacity: 0.22;
  border: 2px dashed rgba(99,102,241,0.45);
  border-radius: 14px;
}

.dash-card.sortable-chosen {
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  border-color: rgba(99,102,241,0.45);
}

.dash-card.sortable-drag {
  opacity: 1 !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.65);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .grid.two.manager-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .title { font-size: 1.2rem; }
  h1 { font-size: 1.2rem; }
  .kiosk-input { font-size: 1.5rem; }
  body { padding: 1rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ── Site-wide logo bar ────────────────────────────────────────── */
.site-logo-bar {
  display: flex;
  justify-content: center;
  padding: 6px 0 18px;
}
.site-logo-link {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.3px;
  transition: opacity 0.15s;
}
.site-logo-link:hover { opacity: 0.75; }

/* ── Global footer — identical to landing page ─────────────────── */
.footer-wrap {
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 1;
  margin-top: auto; /* push to bottom of viewport on short pages */
}
.footer-wrap footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px;
}
.footer-logo {
  font-size: 1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.footer-wrap footer p {
  font-size: 0.775rem;
  color: rgba(255,255,255,0.45);
}
.footer-wrap footer a {
  font-size: 0.775rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-wrap footer a:hover { color: rgba(165,180,252,0.9); }
@media (max-width: 640px) {
  .footer-wrap footer { flex-direction: column; text-align: center; }
}
