@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --bg: #eef2fb;
  --bg-accent: #f8faff;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #20304a;
  --muted: #6b7c93;
  --primary: #2b59d6;
  --primary-dark: #1f42a6;
  --primary-soft: #e3ebff;
  --secondary: #4a90e2;
  --accent: #f4b740;
  --success: #2fb972;
  --danger: #e05252;
  --warning: #f0b429;
  --border: #e2e8f5;
  --shadow: 0 12px 30px rgba(32, 48, 74, 0.08);
  --shadow-soft: 0 6px 18px rgba(32, 48, 74, 0.08);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #f5f7ff 0%, #eef2fb 40%, #e8f0ff 100%);
  color: var(--text);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", "Georgia", serif;
  margin: 0 0 0.5rem 0;
}

p {
  margin: 0 0 1rem 0;
  color: var(--muted);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.page-wrap {
  padding: 2.5rem 0 3.5rem;
}

.section {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  animation: fadeIn 0.4s ease-out;
}

.card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.card + .card {
  margin-top: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hero {
  background: linear-gradient(135deg, #eff3ff 0%, #f5f8ff 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(43, 89, 214, 0.15), transparent 70%);
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), #6aa8ff);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(43, 89, 214, 0.3);
}

.logo-mark svg {
  width: 44px;
  height: 44px;
  fill: #ffffff;
}

.hero-title {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--muted);
}

.notice {
  background: #fff2d8;
  border: 1px solid #f3d49b;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  color: #7a5210;
  margin: 1.5rem 0;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(43, 89, 214, 0.2);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(43, 89, 214, 0.28);
  text-decoration: none;
}

.btn-secondary {
  background: #e7edf9;
  color: var(--primary-dark);
  box-shadow: none;
}

.btn-google {
  background: #ffffff;
  color: #1f2b4d;
  border: 1px solid #d9e2ff;
  box-shadow: none;
  gap: 0.6rem;
}

.btn-google:hover {
  background: #f5f7ff;
  box-shadow: none;
}

.btn-google::before {
  content: '';
  width: 18px;
  height: 18px;
  display: inline-block;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path fill=\"%23EA4335\" d=\"M24 9.5c3.54 0 6.7 1.22 9.2 3.6l6.9-6.9C35.9 2.4 30.5 0 24 0 14.6 0 6.5 5.3 2.7 13l8 6.2C12.5 13 17.8 9.5 24 9.5z\"/><path fill=\"%234285F4\" d=\"M46.1 24.6c0-1.6-.1-2.8-.4-4.2H24v8h12.5c-.5 3-2.1 5.6-4.7 7.3l7.3 5.7c4.3-4 7-9.9 7-16.8z\"/><path fill=\"%23FBBC05\" d=\"M10.7 28.2c-.5-1.5-.8-3.1-.8-4.7s.3-3.2.8-4.7l-8-6.2C.9 15.7 0 19.7 0 23.5s.9 7.8 2.7 11.1l8-6.4z\"/><path fill=\"%2334A853\" d=\"M24 47.5c6.5 0 11.9-2.1 15.9-5.7l-7.3-5.7c-2 1.4-4.7 2.2-8.6 2.2-6.2 0-11.5-3.5-13.3-8.5l-8 6.4C6.5 42.7 14.6 47.5 24 47.5z\"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
}

.btn-danger {
  background: linear-gradient(135deg, #f05c5c, #d13a3a);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.pending { background: #fff4cf; color: #876000; }
.badge.confirmed { background: #e1f7ec; color: #1c7a52; }
.badge.cancelled { background: #fde3e3; color: #a62828; }
.badge.completed { background: #e3e7f5; color: #3f4f7a; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.calendar-panel {
  background: #ffffff;
  border: 1px solid #e1e7f4;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(44, 79, 178, 0.08);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calendar-title {
  font-weight: 700;
  color: #2b3e5e;
}

.calendar-nav {
  border: none;
  background: #eef2ff;
  color: #2b59d6;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7c93;
}

.calendar-spacer {
  height: 38px;
}

.calendar-day {
  border: 1px solid #e3e9ff;
  background: #f7f9ff;
  border-radius: 12px;
  height: 38px;
  font-weight: 700;
  color: #2b3e5e;
  position: relative;
  cursor: pointer;
}

.calendar-day.is-available {
  background: #ecf4ff;
  border-color: #b9cdfc;
  color: #1d3b8b;
}

.calendar-day.is-selected {
  background: #2b59d6;
  color: #ffffff;
  border-color: #2b59d6;
}

.calendar-day.is-disabled,
.calendar-day.is-full {
  background: #f2f2f2;
  color: #a0a8b8;
  border-color: #e3e7ef;
  cursor: not-allowed;
}

.calendar-day.is-full::after {
  content: 'Full';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: #a62828;
}

.day-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #2b59d6;
  color: #ffffff;
  font-size: 0.65rem;
  border-radius: 999px;
  padding: 2px 6px;
}

.date-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.date-pill {
  border: 1px solid #d7e1ff;
  background: #f1f5ff;
  border-radius: 12px;
  padding: 0.55rem 0.6rem;
  text-align: center;
  font-weight: 700;
  color: #2b3e5e;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.date-pill small {
  font-size: 0.72rem;
  color: #6b7c93;
}

.date-pill.is-active {
  background: #2b59d6;
  color: #ffffff;
  border-color: #2b59d6;
}

.date-pill.is-active small {
  color: #eaf0ff;
}

.date-pill.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.slot-chip {
  border: 1px solid #dfe5fb;
  background: #ffffff;
  border-radius: 14px;
  padding: 0.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(44, 79, 178, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border 0.15s ease;
}

.slot-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(44, 79, 178, 0.16);
  border-color: #b7c7ff;
}

.slot-chip .slot-time {
  font-weight: 700;
  color: #2b3e5e;
}

.slot-chip .slot-meta {
  font-size: 0.8rem;
  color: #6b7c93;
}

.slot-chip .slot-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #2c4fb2;
}

.slot-chip.is-selected {
  border-color: #2b59d6;
  box-shadow: 0 12px 24px rgba(43, 89, 214, 0.24);
  background: #f2f6ff;
}

.slot-chip.is-unavailable {
  background: #f7f7f7;
  color: #9aa4b2;
  border-color: #e5e7eb;
  cursor: not-allowed;
  box-shadow: none;
}

.slot-chip.is-unavailable .slot-time {
  color: #9aa4b2;
}

.slot-chip.is-unavailable .slot-status {
  color: #a62828;
}

label {
  font-weight: 700;
  color: #2b3e5e;
}

input, select, textarea {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(43, 89, 214, 0.2);
  border-color: var(--primary);
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.table th, .table td {
  text-align: left;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: var(--bg-accent);
  color: #3b4f6b;
  font-weight: 700;
}

.table tr:hover {
  background: #f7f9ff;
}

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

.alert {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert-error {
  background: #fde3e3;
  color: #a62828;
  border: 1px solid #f5b5b5;
}

.alert-success {
  background: #e1f7ec;
  color: #1c7a52;
  border: 1px solid #b8ead0;
}

.help-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: #eef2ff;
  color: #2f4dbb;
  font-weight: 700;
  font-size: 0.75rem;
  text-decoration: none;
  position: relative;
}

.help-link:hover {
  background: #dfe7ff;
  color: #1f3ea3;
}

.help-link::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2b4d;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.help-link:hover::after {
  opacity: 1;
}

.sidebar {
  background: #1f2b4d;
  color: #d7e1ff;
  padding: 2rem 1.4rem;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar h3 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #d7e1ff;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.main {
  padding: 2rem 3vw 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.topbar .user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--panel);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.topbar .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5d8bff, #3d5ad6);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.auth-card {
  width: min(480px, 95%);
  background: var(--panel);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .hero-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

.is-hidden { display: none; }


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

.patient-nav nav a {
  background: #eff3ff;
  color: var(--primary);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.patient-nav nav a.active,
.patient-nav nav a:hover {
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
}


.layout-auth {
  background: radial-gradient(circle at top, #f3f6ff 0%, #e8efff 50%, #e4ecfb 100%);
}


.logo-mark img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 12px;
}

