/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a202c;
  background: #f7fafc;
  line-height: 1.6;
}
a { color: #2b6cb0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 24px 0; }

/* Nav */
.nav {
  background: #1a365d;
  color: #fff;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 24px;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-right: auto;
}
.nav a { color: #e2e8f0; font-size: 0.9rem; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav-user { color: #a0aec0; font-size: 0.85rem; margin-left: 8px; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}
.card-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Stats */
.stat { text-align: center; padding: 16px; }
.stat-number { font-size: 2rem; font-weight: 700; color: #2b6cb0; }
.stat-label { font-size: 0.85rem; color: #718096; margin-top: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { font-weight: 600; color: #4a5568; background: #f7fafc; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover { background: #f7fafc; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-blue { background: #ebf8ff; color: #2b6cb0; }
.badge-green { background: #f0fff4; color: #276749; }
.badge-yellow { background: #fffff0; color: #975a16; }
.badge-red { background: #fff5f5; color: #c53030; }
.badge-gray { background: #edf2f7; color: #4a5568; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #4a5568;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}
select.form-control { appearance: auto; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.btn-primary { background: #2b6cb0; color: #fff; }
.btn-primary:hover { background: #2c5282; }
.btn-secondary { background: #edf2f7; color: #4a5568; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #e53e3e; color: #fff; }
.btn-danger:hover { background: #c53030; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { display: block; width: 100%; }

/* Login page */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #1a365d;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: #1a365d;
}
.login-error {
  background: #fff5f5;
  color: #c53030;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 1px solid #feb2b2;
}

/* Schedule page */
.schedule-header {
  text-align: center;
  padding: 32px 0 24px;
}
.schedule-header h1 {
  font-size: 1.8rem;
  color: #1a365d;
}
.schedule-header p {
  color: #718096;
  margin-top: 8px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 24px;
}
.cal-header {
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #718096;
  padding: 8px 0;
}
.cal-day {
  text-align: center;
  padding: 10px 4px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.cal-day:hover { background: #ebf8ff; }
.cal-day.today { border-color: #4299e1; font-weight: 700; }
.cal-day.selected { background: #2b6cb0; color: #fff; }
.cal-day.disabled { color: #cbd5e0; cursor: default; }
.cal-day.disabled:hover { background: transparent; }
.cal-day.empty { cursor: default; }

.slots-container { min-height: 100px; }
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.slot-btn {
  padding: 10px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.slot-btn:hover { border-color: #4299e1; background: #ebf8ff; }
.slot-btn.selected { background: #2b6cb0; color: #fff; border-color: #2b6cb0; }

.booking-form { margin-top: 24px; }
.confirmation-box {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.confirmation-box h3 { color: #276749; margin-bottom: 8px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-info { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }
.alert-success { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.alert-error { background: #fff5f5; color: #c53030; border: 1px solid #feb2b2; }

/* Empty state */
.empty { text-align: center; color: #a0aec0; padding: 32px; font-size: 0.95rem; }

/* Utility */
.text-muted { color: #718096; }
.text-sm { font-size: 0.85rem; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: #2b6cb0;
  border-radius: 4px;
  transition: width 0.3s;
}

/* Video container */
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: #1a202c;
  border-radius: 8px;
  overflow: hidden;
}
.video-container > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Video controls */
.video-controls {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 12px;
  justify-content: center;
  background: #2d3748;
  border-radius: 0 0 8px 8px;
}
.video-controls .btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Sidebar */
.sidebar {
  width: 100%;
  padding: 16px;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
}
.checklist li {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}
.checklist li::before {
  content: "[ ] ";
  font-family: monospace;
  color: #a0aec0;
}
.checklist li.checked::before {
  content: "[x] ";
  font-family: monospace;
  color: #276749;
}

/* Time lock */
.time-lock {
  text-align: center;
  padding: 24px;
  color: #718096;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover {
  border-color: #4299e1;
  background: #ebf8ff;
}

/* Tab row */
.tab-row {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 16px;
}
.tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #718096;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover {
  color: #4a5568;
}
.tab-btn.active {
  border-bottom-color: #2b6cb0;
  color: #2b6cb0;
  font-weight: 600;
}

/* Consultation layout */
.consultation-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 16px;
}
@media (max-width: 1024px) {
  .consultation-layout {
    grid-template-columns: 1fr;
  }
}

/* Status steps */
.status-steps {
  display: flex;
  gap: 0;
}
.status-step {
  flex: 1;
  text-align: center;
  padding: 8px;
  position: relative;
  font-size: 0.8rem;
  color: #a0aec0;
  background: #f7fafc;
}
.status-step.completed {
  color: #276749;
  background: #f0fff4;
}
.status-step.current {
  color: #2b6cb0;
  background: #ebf8ff;
}
.status-step.pending {
  color: #a0aec0;
  background: #f7fafc;
}
