/* Hospital Appointment — professional UI */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5c6b7a;
  --border: #e2e8f0;
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --accent: #0aa2c0;
  --success: #198754;
  --warning: #f0ad4e;
  --danger: #dc3545;
  --sidebar: #0f172a;
  --sidebar-hover: #1e293b;
  --radius: 10px;
  --input-radius: 8px;
  --input-border: #cbd5e1;
  --input-bg: #ffffff;
  --input-focus: #0d6efd;
  --input-focus-glow: rgba(13, 110, 253, 0.22);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Public top bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
  color: var(--primary);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}
.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
}
.btn-primary:hover {
  color: #fff;
  filter: brightness(1.03);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 500px at 10% -10%, rgba(13, 110, 253, 0.12), transparent),
    radial-gradient(900px 400px at 90% 0%, rgba(10, 162, 192, 0.12), transparent),
    linear-gradient(180deg, #fff, var(--bg));
  padding: 72px 0 56px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero p.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 52ch;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.hero-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.stat strong {
  display: block;
  font-size: 1.25rem;
}
.stat span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 56px 0;
}
.section h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}
.section .sub {
  color: var(--muted);
  margin: 0 0 28px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
  background: #fff;
}
.site-footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Auth pages */
.auth-wrap {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  padding: 40px 16px;
}
.auth-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
}
.auth-card .hint {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 0.95rem;
}

/* Forms — consistent, accessible controls */
.form-row {
  margin-bottom: 16px;
}
.form-row:last-child {
  margin-bottom: 0;
}
label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* All single-line fields share height, radius, and border */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="image"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--text);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--input-radius);
  padding: 11px 14px;
  min-height: 46px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.5;
}

select {
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235c6b7a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

input:hover:not(:disabled):not(:read-only),
select:hover:not(:disabled),
textarea:hover:not(:disabled):not(:read-only) {
  border-color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--input-focus-glow);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--input-focus-glow);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: #f1f5f9;
}

/* Date/time: normalize WebKit / Edge control height */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  min-height: 46px;
}

/* Search cancel button spacing (WebKit) */
input[type="search"]::-webkit-search-cancel-button {
  margin-right: 4px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}
.alert-error {
  background: #fde8ea;
  color: #842029;
  border: 1px solid #f5c2c7;
}
.alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

/* Dashboard layout */
.dash {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
@media (max-width: 960px) {
  .dash {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
  }
}
.dash-sidebar {
  background: var(--sidebar);
  color: #e2e8f0;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-sidebar .brand {
  color: #fff;
  margin-bottom: 12px;
  padding: 0 10px;
}
.dash-sidebar .brand:hover {
  color: #fff;
  opacity: 0.9;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.dash-nav a:hover {
  background: var(--sidebar-hover);
  color: #fff;
  text-decoration: none;
}
.dash-nav a.active {
  background: rgba(13, 110, 253, 0.22);
  color: #fff;
}
.dash-sidebar .foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: #94a3b8;
  padding-left: 10px;
}
.dash-main {
  padding: 26px 28px 40px;
}
.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.dash-top h1 {
  margin: 0;
  font-size: 1.45rem;
}
.dash-top .meta {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 0.95rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.metric .k {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.metric .v {
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 6px;
}

.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th,
table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
table.data th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #fafbfc;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-pending {
  background: #fff3cd;
  color: #664d03;
}
.badge-approved {
  background: #cfe2ff;
  color: #084298;
}
.badge-cancelled {
  background: #f8d7da;
  color: #842029;
}
.badge-completed {
  background: #d1e7dd;
  color: #0f5132;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  align-items: start;
}
.split > .form-row {
  min-width: 0;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}
