/* Top Star Driving School CRM — Static Wireframe Stylesheet */
:root {
  --wf-bg: #f4f5f7;
  --wf-surface: #ffffff;
  --wf-surface-muted: #f8fafc;
  --wf-border: #cbd5e1;
  --wf-border-strong: #94a3b8;
  --wf-text: #0f172a;
  --wf-muted: #475569;
  --wf-subtle: #64748b;
  --wf-brand: #d9272d;
  --wf-brand-dark: #b91c1c;
  --wf-brand-soft: #fef2f2;
  --wf-blue: #2563eb;
  --wf-blue-soft: #eff6ff;
  --wf-green: #15803d;
  --wf-green-soft: #f0fdf4;
  --wf-amber: #b45309;
  --wf-amber-soft: #fffbeb;
  --wf-red: #b91c1c;
  --wf-red-soft: #fef2f2;
  --wf-radius: 10px;
  --wf-radius-sm: 6px;
  --wf-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --wf-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --wf-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--wf-bg);
  color: var(--wf-text);
  font-family: var(--wf-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--wf-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Wireframe Top Toolbar */
.wf-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 2px solid var(--wf-brand);
  padding: 10px 16px;
}

.wf-toolbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wf-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wf-back-link {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.wf-back-link:hover {
  background: rgba(255, 255, 255, 0.18);
  text-decoration: none;
}

.wf-ref-badge {
  background: var(--wf-brand);
  color: #fff;
  font-family: var(--wf-mono);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 5px;
}

.wf-toolbar-title {
  font-weight: 600;
  font-size: 13px;
}

.wf-toolbar-meta {
  font-size: 11px;
  color: #cbd5e1;
  font-family: var(--wf-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
}

.wf-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wf-tool-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.wf-tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.wf-tool-btn.active {
  background: #f8fafc;
  color: #0f172a;
  border-color: #f8fafc;
  font-weight: 600;
}

/* Spec Annotation Strip */
.wf-spec-panel {
  max-width: 1200px;
  margin: 14px auto 0;
  padding: 0 16px;
}

.wf-spec-box {
  background: #fffbeb;
  border: 1px dashed #d97706;
  border-radius: var(--wf-radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #78350f;
}

.wf-spec-box strong {
  color: #451a03;
}

.wf-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
  margin-top: 6px;
}

.wf-spec-hidden .wf-spec-panel {
  display: none;
}

/* Stage & Device Frame */
.wf-stage {
  max-width: 1200px;
  margin: 18px auto 40px;
  padding: 0 16px;
}

.wf-frame {
  margin: 0 auto;
  transition: max-width 0.2s ease;
}

body[data-viewport="mobile"] .wf-frame {
  max-width: 412px;
  background: #e2e8f0;
  border: 10px solid #1e293b;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  min-height: 760px;
  display: flex;
  flex-direction: column;
}

body[data-viewport="desktop"] .wf-frame {
  max-width: 1120px;
}

/* Wireframe State Bar (inside stage, above screen) */
.wf-state-bar {
  max-width: 1200px;
  margin: 12px auto 0;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wf-state-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-muted);
}

.wf-pill-btn {
  appearance: none;
  border: 1px solid var(--wf-border-strong);
  background: var(--wf-surface);
  color: var(--wf-text);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.wf-pill-btn.active {
  background: var(--wf-text);
  color: #fff;
  border-color: var(--wf-text);
}

/* App Shell Styles */
.app-shell {
  background: var(--wf-bg);
  min-height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--wf-surface);
  border-bottom: 1px solid var(--wf-border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-star {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--wf-brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--wf-text);
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--wf-subtle);
}

.app-main {
  padding: 18px 16px 28px;
  flex: 1;
}

.app-main-centered {
  max-width: 460px;
  margin: 0 auto;
  width: 100%;
}

.app-main-wide {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

/* Cards & Typography */
.wf-card {
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  box-shadow: var(--wf-shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.wf-card-muted {
  background: var(--wf-surface-muted);
  border: 1px dashed var(--wf-border-strong);
  border-radius: var(--wf-radius);
  padding: 14px;
  margin-bottom: 14px;
}

.wf-h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--wf-text);
}

.wf-h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--wf-text);
}

.wf-h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wf-text);
}

.wf-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--wf-muted);
}

.wf-divider {
  border: 0;
  border-top: 1px solid var(--wf-border);
  margin: 14px 0;
}

/* Forms */
.wf-field {
  margin-bottom: 12px;
}

.wf-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--wf-text);
  margin-bottom: 5px;
}

.wf-input, .wf-select, .wf-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--wf-border-strong);
  border-radius: var(--wf-radius-sm);
  font-family: var(--wf-font);
  font-size: 14px;
  background: #fff;
  color: var(--wf-text);
}

.wf-input:focus, .wf-select:focus, .wf-textarea:focus {
  outline: 2px solid rgba(217, 39, 45, 0.25);
  border-color: var(--wf-brand);
}

.wf-input[readonly] {
  background: var(--wf-surface-muted);
  color: var(--wf-muted);
}

.wf-help {
  font-size: 11px;
  color: var(--wf-subtle);
  margin-top: 4px;
}

.wf-input-group {
  position: relative;
  display: block;
  width: 100%;
}

.wf-input-group .wf-input {
  width: 100%;
  padding-right: 42px;
}

.wf-input-addon-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--wf-subtle);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}

.wf-input-addon-btn.wf-eye-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: var(--wf-radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.wf-input-addon-btn.wf-eye-btn:hover {
  color: var(--wf-text);
  background: rgba(0, 0, 0, 0.05);
}

.wf-eye-icon {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  pointer-events: none;
}

.wf-user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--wf-surface-muted);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
}

.wf-user-greeting-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wf-user-greeting-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wf-text);
  line-height: 1.3;
}

.wf-user-greeting-sub {
  font-size: 12px;
  color: var(--wf-subtle);
  line-height: 1.3;
  margin-top: 2px;
}

/* OTP Boxes */
.otp-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 340px;
  margin: 12px auto;
}

.otp-box {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0;
  text-align: center;
  font-family: var(--wf-mono);
  font-size: 20px;
  font-weight: 700;
  border: 1.5px solid var(--wf-border-strong);
  border-radius: var(--wf-radius-sm);
  background: #fff;
  color: var(--wf-text);
}

.otp-box:focus {
  outline: 2px solid rgba(217, 39, 45, 0.25);
  border-color: var(--wf-brand);
}

/* Buttons */
.wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--wf-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease;
}

.wf-btn:hover {
  text-decoration: none;
}

.wf-btn-block {
  width: 100%;
}

.wf-btn-primary {
  background: var(--wf-brand);
  color: #fff;
}

.wf-btn-primary:hover {
  background: var(--wf-brand-dark);
}

.wf-btn-dark {
  background: #0f172a;
  color: #fff;
}

.wf-btn-outline {
  background: #fff;
  border-color: var(--wf-border-strong);
  color: var(--wf-text);
}

.wf-btn-outline:hover {
  background: var(--wf-surface-muted);
}

.wf-btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.wf-btn-disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

/* Badges & Alerts */
.wf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}

.wf-badge-gray { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.wf-badge-blue { background: var(--wf-blue-soft); color: #1d4ed8; border-color: #bfdbfe; }
.wf-badge-green { background: var(--wf-green-soft); color: var(--wf-green); border-color: #bbf7d0; }
.wf-badge-amber { background: var(--wf-amber-soft); color: var(--wf-amber); border-color: #fde68a; }
.wf-badge-red { background: var(--wf-red-soft); color: var(--wf-red); border-color: #fecaca; }

.wf-alert {
  border-radius: var(--wf-radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  margin-bottom: 12px;
  border: 1px solid;
}

.wf-alert-info { background: var(--wf-blue-soft); border-color: #bfdbfe; color: #1e3a8a; }
.wf-alert-success { background: var(--wf-green-soft); border-color: #bbf7d0; color: #14532d; }
.wf-alert-warn { background: var(--wf-amber-soft); border-color: #fde68a; color: #78350f; }
.wf-alert-error { background: var(--wf-red-soft); border-color: #fecaca; color: #7f1d1d; }

/* Tabs */
.wf-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--wf-border);
  margin-bottom: 14px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.wf-tab {
  padding: 6px 12px;
  border-radius: var(--wf-radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface-muted);
  color: var(--wf-muted);
  cursor: pointer;
}

.wf-tab.active {
  background: var(--wf-text);
  color: #fff;
  border-color: var(--wf-text);
}

/* Grids & Lists */
.wf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 600px) {
  .wf-grid-2, .wf-grid-3 {
    grid-template-columns: 1fr;
  }
}

.wf-kpi {
  background: var(--wf-surface-muted);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  padding: 10px;
}

.wf-kpi-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--wf-text);
}

.wf-kpi-lbl {
  font-size: 11px;
  color: var(--wf-subtle);
}

.wf-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
  font-size: 13px;
}

.wf-kv-row:last-child {
  border-bottom: 0;
}

.wf-kv-key {
  color: var(--wf-muted);
}

.wf-kv-val {
  font-weight: 600;
  text-align: right;
}

/* Progress Bar */
.wf-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.wf-progress-fill {
  height: 100%;
  background: var(--wf-brand);
  border-radius: 999px;
}

/* Wireframe Placeholders (Turnstile, QR) */
.wf-placeholder-box {
  border: 1.5px dashed var(--wf-border-strong);
  background: #f8fafc;
  border-radius: var(--wf-radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--wf-muted);
}

/* Instructor Mobile Bottom Nav */
.inst-bottom-nav {
  position: sticky;
  bottom: 0;
  background: var(--wf-surface);
  border-top: 1px solid var(--wf-border);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px;
  z-index: 20;
}

.inst-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--wf-muted);
  text-decoration: none;
  border-radius: 6px;
}

.inst-nav-item:hover {
  background: var(--wf-surface-muted);
  text-decoration: none;
}

.inst-nav-item.active {
  color: var(--wf-brand);
  background: var(--wf-brand-soft);
}

.inst-nav-icon {
  font-size: 15px;
  line-height: 1;
}

/* Stepper */
.wf-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--wf-subtle);
}

.wf-step-dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wf-border-strong);
  background: #fff;
}

.wf-step-dot.active {
  background: var(--wf-brand);
  border-color: var(--wf-brand);
  color: #fff;
}

.wf-step-dot.done {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

/* Chips */
.wf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wf-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--wf-border-strong);
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.wf-chip.selected {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

/* Table */
.wf-table-wrap {
  overflow-x: auto;
}

.wf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.wf-table th, .wf-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--wf-border);
}

.wf-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wf-subtle);
  background: var(--wf-surface-muted);
}

/* Utility */
.hidden, svg.hidden { display: none !important; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 11.5px; color: var(--wf-subtle); }
.text-sm { font-size: 12.5px; color: var(--wf-muted); }
.font-mono { font-family: var(--wf-mono); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }



/* ========================================================
   Google Calendar-Style Component Styles (N1 Schedule)
   ======================================================== */

.wf-cal-card {
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  box-shadow: var(--wf-shadow);
  overflow: hidden;
  margin-bottom: 14px;
}

/* Toolbar */
.wf-cal-toolbar {
  padding: 10px 14px;
  background: var(--wf-surface);
  border-bottom: 1px solid var(--wf-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.wf-cal-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wf-cal-arrows {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.wf-cal-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  color: var(--wf-text);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.wf-cal-arrow-btn:hover {
  background: var(--wf-surface-muted);
}

.wf-cal-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--wf-text);
  margin-left: 2px;
}

.wf-cal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wf-cal-view-selector {
  display: inline-flex;
  border: 1px solid var(--wf-border-strong);
  border-radius: var(--wf-radius-sm);
  overflow: hidden;
  background: var(--wf-surface);
}

.wf-cal-view-btn {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--wf-border);
  background: transparent;
  color: var(--wf-muted);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wf-cal-view-btn:last-child {
  border-right: 0;
}

.wf-cal-view-btn:hover {
  background: var(--wf-surface-muted);
  color: var(--wf-text);
}

.wf-cal-view-btn.active {
  background: #0f172a;
  color: #fff;
}

/* Day View Timeline */
.wf-cal-day-timeline {
  padding: 12px 14px 16px;
  background: var(--wf-surface);
}

.wf-cal-time-slot {
  display: flex;
  position: relative;
  min-height: 26px;
}

.wf-cal-time-col {
  width: 65px;
  flex-shrink: 0;
  padding-right: 12px;
  text-align: right;
  font-size: 11px;
  font-family: var(--wf-mono);
  color: var(--wf-subtle);
  line-height: 1.2;
}

.wf-cal-slot-body {
  flex: 1;
  min-width: 0;
  border-left: 2px solid #e2e8f0;
  padding-left: 12px;
  padding-bottom: 8px;
  position: relative;
}

.wf-cal-slot-line {
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  border-top: 1px solid #f1f5f9;
  z-index: 1;
}

.wf-cal-now-line {
  display: flex;
  align-items: center;
  margin: 6px 0;
  position: relative;
  z-index: 2;
}

.wf-cal-now-badge {
  width: 65px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--wf-brand);
  font-family: var(--wf-mono);
}

.wf-cal-now-track {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.wf-cal-now-dot {
  width: 8px;
  height: 8px;
  background: var(--wf-brand);
  border-radius: 999px;
  position: absolute;
  left: -4px;
}

.wf-cal-now-bar {
  flex: 1;
  height: 2px;
  background: var(--wf-brand);
}

/* Week View */
.wf-cal-week-scroll {
  overflow-x: auto;
  background: var(--wf-surface);
}

.wf-cal-week-grid {
  min-width: 680px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--wf-border);
}

.wf-cal-week-col-head {
  padding: 8px 4px;
  text-align: center;
  border-right: 1px solid var(--wf-border);
  background: var(--wf-surface-muted);
}

.wf-cal-week-col-head:last-child {
  border-right: 0;
}

.wf-cal-week-dayname {
  color: var(--wf-subtle);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
}

.wf-cal-week-daynum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  color: var(--wf-text);
  margin-top: 2px;
}

.wf-cal-week-daynum.today {
  background: var(--wf-brand);
  color: #fff;
}

.wf-cal-week-col-body {
  border-right: 1px solid var(--wf-border);
  min-height: 280px;
  padding: 8px 5px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wf-cal-week-col-body:last-child {
  border-right: 0;
}

.wf-cal-week-col-body.is-today {
  background: rgba(217, 39, 45, 0.02);
}

.wf-cal-week-col-body.is-off {
  background: #f8fafc;
}

.wf-cal-event-pill {
  padding: 6px 7px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.3;
  border-left: 3px solid;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.wf-cal-pill-logged {
  background: var(--wf-green-soft);
  border-color: var(--wf-green);
  color: #14532d;
}

.wf-cal-pill-upnext {
  background: #fff5f5;
  border-color: var(--wf-brand);
  color: #7f1d1d;
  font-weight: 600;
}

.wf-cal-pill-scheduled {
  background: #f1f5f9;
  border-color: #64748b;
  color: #1e293b;
}

/* Month View */
.wf-cal-month-wrap {
  padding: 12px;
  background: var(--wf-surface);
}

.wf-cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--wf-border);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  overflow: hidden;
}

.wf-cal-month-th {
  background: var(--wf-surface-muted);
  text-align: center;
  padding: 7px 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--wf-subtle);
}

.wf-cal-month-cell {
  background: #fff;
  min-height: 84px;
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.wf-cal-month-cell.muted {
  background: #f8fafc;
  color: #94a3b8;
}

.wf-cal-month-cell.is-today {
  background: #fff8f8;
  box-shadow: inset 0 0 0 1.5px var(--wf-brand);
}

.wf-cal-month-date {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wf-cal-month-pill {
  font-size: 9.5px;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.2;
}

/* Year View */
.wf-cal-year-wrap {
  padding: 14px;
  background: var(--wf-surface);
}

.wf-cal-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .wf-cal-year-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wf-cal-mini-month {
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  padding: 8px 6px;
  background: #fff;
}

.wf-cal-mini-month.is-active-month {
  border: 2px solid var(--wf-brand);
  background: #fffafa;
}

.wf-cal-mini-title {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.wf-cal-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  text-align: center;
  font-size: 8.5px;
}

.wf-cal-mini-head {
  color: var(--wf-subtle);
  font-weight: 600;
  padding-bottom: 2px;
}

.wf-cal-mini-day {
  padding: 2px 0;
  color: var(--wf-text);
  border-radius: 2px;
}

.wf-cal-mini-day.has-lesson {
  font-weight: 700;
  background: rgba(217, 39, 45, 0.12);
  color: var(--wf-brand);
}

.wf-cal-mini-day.is-today {
  background: var(--wf-brand);
  color: #fff;
  font-weight: 700;
}

.wf-cal-mini-day.empty {
  color: transparent;
}

/* ========================================================
   Google Calendar Event Popup (N1 — click-to-reveal)
   ======================================================== */

/* Backdrop (invisible click-catcher) */
.wf-cal-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
}

.wf-cal-popup-backdrop.active {
  display: block;
}

/* The popup card itself */
.wf-cal-popup {
  display: none;
  position: fixed;
  z-index: 200;
  min-width: 280px;
  max-width: 340px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  box-shadow: 0 8px 24px rgba(15,23,42,0.18), 0 2px 6px rgba(15,23,42,0.08);
  overflow: hidden;
  animation: wfPopupIn 0.15s ease;
}

.wf-cal-popup.active {
  display: block;
}

@keyframes wfPopupIn {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

/* Popup header stripe */
.wf-cal-popup-header {
  padding: 10px 12px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--wf-border);
}

.wf-cal-popup-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.wf-cal-popup-student {
  font-size: 14px;
  font-weight: 700;
  color: var(--wf-text);
  line-height: 1.2;
}

.wf-cal-popup-id {
  font-family: var(--wf-mono);
  font-size: 11px;
  color: var(--wf-subtle);
}

.wf-cal-popup-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--wf-subtle);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: -2px;
}

.wf-cal-popup-close:hover {
  background: var(--wf-surface-muted);
  color: var(--wf-text);
}

/* Popup body */
.wf-cal-popup-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wf-cal-popup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--wf-muted);
}

.wf-cal-popup-row-icon {
  width: 16px;
  flex-shrink: 0;
  text-align: center;
  font-size: 13px;
}

/* Popup footer with action buttons */
.wf-cal-popup-footer {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--wf-border);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Make lesson pills in grid clickable */
.wf-cal-event-pill {
  cursor: pointer;
  transition: filter 0.1s ease, transform 0.1s ease;
}

.wf-cal-event-pill:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

/* Month cell lesson pills clickable */
.wf-cal-month-pill {
  cursor: pointer;
  transition: filter 0.1s ease;
}

.wf-cal-month-pill:hover {
  filter: brightness(0.93);
}

/* ─── Google Calendar Year Day Popup (Screen 2) ─────────────────────────── */
.wf-year-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 210;
}
.wf-year-popup-backdrop.active {
  display: block;
}
.wf-year-popup {
  display: none;
  position: fixed;
  z-index: 220;
  width: 350px;
  max-width: 92vw;
  background: #ffffff;
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(15,23,42,0.2), 0 2px 8px rgba(15,23,42,0.08);
  overflow: hidden;
  animation: wfPopupIn 0.15s ease;
}
.wf-year-popup.active {
  display: block;
}
.wf-year-popup-header {
  padding: 12px 16px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--wf-border);
  background: var(--wf-surface-muted);
}
.wf-year-popup-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.wf-year-popup-dayname {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--wf-subtle);
}
.wf-year-popup-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--wf-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin: 3px 0 2px;
  box-shadow: 0 2px 6px rgba(217,39,45,0.3);
}
.wf-year-popup-monthname {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--wf-muted);
}
.wf-year-popup-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--wf-subtle);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, color 0.1s ease;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}
.wf-year-popup-close:hover {
  background: rgba(0,0,0,0.06);
  color: var(--wf-text);
}
.wf-year-popup-body {
  padding: 12px 14px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wf-year-popup-card {
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--wf-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.wf-cal-mini-day {
  cursor: pointer;
  user-select: none;
}
.wf-cal-mini-day:hover:not(.empty) {
  background: #fee2e2;
  color: var(--wf-brand);
  border-radius: 50%;
}
