:root {
  --primary: #2a7f8e;
  --primary-dark: #1f5f6b;
  --accent: #7fd1c1;
  --bg-soft: #f4faf9;
  --text-main: #253238;
  --text-muted: #5a6b70;
  --white: #ffffff;
  --danger: #d9534f;
  --success: #3fa66c;
  --warning: #e0a83e;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(31, 95, 107, 0.08);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: var(--bg-soft);
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'Georgia', 'Segoe UI', serif; color: var(--primary-dark); line-height: 1.25; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header */
header.site-header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo { font-size: 1.4rem; font-weight: bold; color: var(--primary-dark); display: flex; align-items: center; gap: 8px; }
.logo span.dot { color: var(--accent); }
nav.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
nav.main-nav a { color: var(--text-main); font-weight: 500; }
nav.main-nav a.active, nav.main-nav a:hover { color: var(--primary); }
.nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--primary-dark); }
.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--primary-dark); }

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--bg-soft) 0%, #e4f3f1 100%);
  padding: 72px 24px;
}
.hero-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.hero-text { flex: 1 1 380px; }
.hero-text h1 { font-size: 2.6rem; margin-bottom: 16px; }
.hero-text p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 28px; }
.hero-image { flex: 1 1 320px; }
.hero-image .placeholder-img {
  background: var(--accent);
  border-radius: var(--radius);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  text-align: center;
  padding: 20px;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* Sections */
section { padding: 64px 24px; }
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading h2 { font-size: 2rem; }
.section-heading p { color: var(--text-muted); max-width: 600px; margin: 12px auto 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: var(--max-width); margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: var(--max-width); margin: 0 auto; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card .icon-badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

/* Doctors */
.doctor-card { display: flex; gap: 20px; align-items: flex-start; }
.doctor-photo {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: bold; font-size: 1.4rem;
}

/* Forms */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  max-width: 640px;
  margin: 0 auto;
}
label { display: block; font-weight: 600; margin-bottom: 6px; margin-top: 18px; font-size: 0.95rem; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d7e3e4;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.form-row { display: flex; gap: 16px; }
.form-row > div { flex: 1; }
.form-msg { margin-top: 20px; padding: 14px; border-radius: 8px; display: none; }
.form-msg.success { background: #e6f6ec; color: var(--success); display: block; }
.form-msg.error { background: #fbeceb; color: var(--danger); display: block; }

/* Contact */
.contact-info-item { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-info-item .ic { color: var(--primary); font-size: 1.3rem; }

/* Footer */
footer {
  background: var(--primary-dark);
  color: #d8ebe9;
  padding: 40px 24px 24px;
  margin-top: 40px;
}
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer a { color: #d8ebe9; }
footer .foot-bottom { text-align: center; margin-top: 24px; font-size: 0.85rem; color: #9fc4c0; }

/* Admin */
.admin-body { background: #f0f4f5; }
.admin-header {
  background: var(--primary-dark);
  color: white;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 30px 24px; }
table.apt-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.apt-table th, table.apt-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #eef2f2; font-size: 0.92rem; }
table.apt-table th { background: var(--bg-soft); color: var(--primary-dark); }
.status-badge { padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.status-pending { background: #fdf2df; color: var(--warning); }
.status-confirmed { background: #e6f6ec; color: var(--success); }
.status-declined { background: #fbeceb; color: var(--danger); }
.status-handled { background: #e6eef0; color: var(--text-muted); }
.action-btns button { margin-right: 6px; padding: 6px 12px; border-radius: 6px; border: none; cursor: pointer; font-size: 0.82rem; font-weight: 600; }
.btn-confirm { background: var(--success); color: white; }
.btn-decline { background: var(--danger); color: white; }
.btn-handled { background: var(--text-muted); color: white; }
.login-box { max-width: 380px; margin: 100px auto; background: white; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .menu-toggle { display: block; }
  nav.main-nav { position: absolute; top: 100%; left: 0; right: 0; background: white; box-shadow: var(--shadow); display: none; }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; padding: 16px 24px; gap: 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2rem; }
  .form-row { flex-direction: column; }
  .doctor-card { flex-direction: column; text-align: center; align-items: center; }
  table.apt-table { display: block; overflow-x: auto; white-space: nowrap; }
}
