/* ========================================================================
   MiracleDis - Professional Dental Clinic Management Theme
   ======================================================================== */

:root {
  /* Color Palette */
  --bg: #f0f4f8;
  --bg-soft: #f8fafc;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-dark: #0c1829;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);

  /* Brand Colors */
  --primary: #0891b2;
  --primary-strong: #0e7490;
  --primary-light: rgba(8, 145, 178, 0.08);
  --primary-glow: rgba(8, 145, 178, 0.25);
  --accent: #6366f1;
  --accent-soft: #eef2ff;
  --accent-glow: rgba(99, 102, 241, 0.2);

  /* Status Colors */
  --success: #10b981;
  --success-soft: #d1fae5;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --info: #3b82f6;
  --info-soft: #dbeafe;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 8px 24px rgba(8, 145, 178, 0.18);

  /* Borders */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sidebar */
  --sidebar-width: 272px;
  --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

/* ========================================================================
   Base
   ======================================================================== */

html {
  font-size: 15px;
  min-height: 100%;
  scroll-behavior: smooth;
}

@media (min-width: 992px) {
  html { font-size: 15.5px; }
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.public-body {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(8, 145, 178, 0.08), transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(99, 102, 241, 0.06), transparent 50%),
    linear-gradient(180deg, #f0f4f8 0%, #e2e8f0 100%);
}

body.admin-body {
  background: #f1f5f9;
}

/* Page load animation */
body {
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.page-loaded {
  opacity: 1;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-strong);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

::selection {
  background: var(--primary-light);
  color: var(--primary-strong);
}

/* ========================================================================
   Public Shell
   ======================================================================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 1rem 0 0;
}

.app-nav-wrap {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.app-navbar {
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.app-navbar:hover {
  box-shadow: var(--shadow-md);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.app-brand:hover {
  color: var(--text);
}

.app-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-brand:hover .app-brand-mark {
  transform: scale(1.05) rotate(-3deg);
  box-shadow: 0 12px 32px rgba(8, 145, 178, 0.28);
}

.app-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.app-brand-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.navbar-toggler {
  border: 0;
  box-shadow: none !important;
}

.navbar-nav {
  gap: 0.25rem;
}

.navbar-nav .nav-link,
.navbar-nav .btn-link.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-full);
  padding: 0.6rem 1rem !important;
  transition: all 0.25s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .btn-link.nav-link:hover,
.navbar-nav .show > .nav-link {
  color: var(--text) !important;
  background: var(--primary-light);
  transform: translateY(-1px);
}

.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.96);
}

.dropdown-item {
  border-radius: var(--radius-xs);
  padding: 0.6rem 0.85rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.dropdown-item:hover {
  background: var(--primary-light);
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.75rem;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--text) !important;
  font-weight: 700;
  font-size: 0.88rem;
  transition: background 0.2s ease;
}

.auth-chip:hover {
  background: rgba(8, 145, 178, 0.12);
  color: var(--text) !important;
}

.auth-chip strong {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-main {
  flex: 1;
  padding: 1.5rem 0 3rem;
}

/* ========================================================================
   Admin Shell (Sidebar + Main)
   ======================================================================== */

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

/* Sidebar */
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.25rem 0.85rem;
  background: var(--sidebar-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1050;
}

.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: background 0.2s ease;
}

.admin-brand:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-brand .app-brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1rem;
}

.admin-brand span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.admin-brand strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.admin-brand small {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-nav {
  display: grid;
  gap: 0.2rem;
  flex: 1;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-xs);
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  position: relative;
}

.admin-nav-link i {
  font-size: 1.1rem;
  width: 1.3rem;
  text-align: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.admin-nav-link:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav-link:hover i {
  opacity: 1;
}

.admin-nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.22), rgba(99, 102, 241, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.admin-nav-link.active i {
  opacity: 1;
  color: var(--primary);
}

.admin-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer .auth-links {
  margin-left: 0;
  flex-direction: column;
  align-items: stretch;
}

.sidebar-footer .auth-chip {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0 !important;
  font-size: 0.82rem;
}

.sidebar-footer .auth-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-footer .nav-link,
.sidebar-footer .btn-link.nav-link {
  color: #94a3b8 !important;
  font-size: 0.85rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: var(--radius-xs);
}

.sidebar-footer .nav-link:hover {
  color: #e2e8f0 !important;
  background: rgba(255, 255, 255, 0.06);
}

/* Mobile Sidebar */
.admin-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-menu-toggle:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Admin Main */
.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem 0;
}

.admin-topbar-title {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.admin-topbar-subtitle {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.admin-content {
  padding: 1.5rem 2rem 2rem;
}

/* ========================================================================
   Page Layout
   ======================================================================== */

.app-page {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
}

.app-page.app-page-wide,
.page-full-bleed {
  width: min(1400px, calc(100% - 1.5rem));
}

/* Footer */
.app-footer {
  margin-top: auto;
  padding: 1.5rem 0 2.5rem;
}

.app-footer-card {
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ========================================================================
   Cards & Surfaces
   ======================================================================== */

.hero-panel,
.glass-card,
.stat-card,
.content-card,
.dashboard-hero,
.pricing-card,
.faq-card {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-panel,
.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.hero-panel::before,
.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: auto auto -30% -10%;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 68%);
  animation: float 20s ease-in-out infinite;
}

.hero-panel::after,
.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.12), transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -15px); }
  66% { transform: translate(-15px, 10px); }
}

.hero-panel > *,
.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

/* ========================================================================
   Typography Helpers
   ======================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.72);
  color: var(--primary-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.display-title {
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.lead-copy {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 42rem;
  line-height: 1.7;
}

.accent-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.muted {
  color: var(--muted);
}

.pill-note {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.82rem;
}

/* ========================================================================
   Grid Layouts
   ======================================================================== */

.hero-actions,
.section-actions,
.metric-grid,
.feature-grid,
.pricing-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(200px, max-content));
  margin-top: 2rem;
}

.feature-grid,
.pricing-grid,
.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card,
.stat-card,
.pricing-card,
.faq-card,
.cta-strip,
.content-card {
  border-radius: var(--radius-md);
}

.feature-card,
.stat-card,
.content-card,
.faq-card {
  padding: 1.35rem;
}

.feature-card {
  height: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover,
.pricing-card:hover,
.stat-card:hover,
.content-card:hover,
.faq-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(8, 145, 178, 0.15);
}

.feature-icon,
.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary-light), var(--accent-soft));
  color: var(--primary-strong);
  font-size: 1.1rem;
  font-weight: 800;
}

.section-block {
  margin-top: 1.75rem;
  padding: 2rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading p {
  max-width: 42rem;
  color: var(--muted);
}

/* ========================================================================
   Buttons
   ======================================================================== */

.btn {
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.15rem;
  box-shadow: none;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-lg {
  padding: 0.85rem 1.4rem;
  font-size: 0.95rem;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 0;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-strong), #4f46e5);
  box-shadow: 0 12px 32px rgba(8, 145, 178, 0.3);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border: 1.5px solid rgba(8, 145, 178, 0.25);
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.7);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline-danger,
.btn-outline-success,
.btn-outline-info {
  border-width: 1.5px;
}

.btn-link {
  text-decoration: none;
}

/* ========================================================================
   Forms
   ======================================================================== */

.form-control,
.form-select,
.form-check-input {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  padding: 0.75rem 0.95rem;
  background-color: var(--surface-strong);
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

/* ========================================================================
   Cards, Tables, Alerts
   ======================================================================== */

.card,
.modal-content,
.table-responsive,
.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card,
.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
}

.card-body,
.modal-body,
.modal-header,
.modal-footer {
  padding: 1.25rem 1.35rem;
}

.table-responsive {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table {
  margin-bottom: 0;
  color: var(--text);
}

.table thead th {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 145, 178, 0.03);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
}

.table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
  border-bottom-color: var(--border);
}

.table-hover tbody tr {
  transition: background 0.15s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(8, 145, 178, 0.04);
}

.badge {
  border-radius: var(--radius-full);
  padding: 0.4rem 0.7rem;
  font-weight: 600;
  font-size: 0.78rem;
}

.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-info { background-color: var(--info) !important; }
.bg-warning { background-color: var(--warning) !important; color: #fff !important; }

.alert {
  padding: 1rem 1.15rem;
  background: var(--surface);
  font-size: 0.92rem;
}

.alert-info {
  border-color: rgba(59, 130, 246, 0.15);
  background: var(--info-soft);
  color: #1e40af;
}

.alert-success {
  border-color: rgba(16, 185, 129, 0.15);
  background: var(--success-soft);
  color: #065f46;
}

.alert-danger {
  border-color: rgba(239, 68, 68, 0.15);
  background: var(--danger-soft);
  color: #991b1b;
}

/* ========================================================================
   Stat Cards
   ======================================================================== */

.stat-card {
  height: 100%;
  padding: 1.3rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  margin: 0.5rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-note {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ========================================================================
   Dashboard
   ======================================================================== */

.dashboard-hero {
  padding: 1.75rem;
}

.admin-overview {
  display: grid;
  gap: 1.25rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 1.25rem;
}

.admin-table-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.admin-table-card:hover {
  box-shadow: var(--shadow-md);
}

.admin-table-card .table-responsive {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0;
}

.admin-section-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.dashboard-panel {
  margin-top: 1.5rem;
}

/* ========================================================================
   List Links
   ======================================================================== */

.list-links {
  display: grid;
  gap: 0.6rem;
}

.list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.list-link:hover {
  background: var(--primary-light);
  border-color: rgba(8, 145, 178, 0.15);
  color: var(--primary-strong);
  transform: translateX(4px);
}

/* ========================================================================
   Pricing
   ======================================================================== */

.pricing-card {
  position: relative;
  height: 100%;
  padding: 1.75rem;
}

.pricing-card.popular {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #164e63 100%);
  color: #fff;
  border-color: rgba(8, 145, 178, 0.3);
}

.pricing-card.popular h3,
.pricing-card.popular p,
.pricing-card.popular li,
.pricing-card.popular .price-copy,
.pricing-card.popular .pricing-subtle {
  color: rgba(255, 255, 255, 0.92);
}

.pricing-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-card.popular .pricing-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.price-copy {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 1.25rem 0 0.4rem;
  color: var(--text);
}

.price-copy strong {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1;
}

.pricing-features {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.pricing-features li::before,
.check-list li::before {
  content: "✓";
  margin-right: 0.6rem;
  color: var(--success);
  font-weight: 800;
}

.pricing-card.popular .pricing-features li::before {
  color: #6ee7b7;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.faq-card summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card p {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.cta-strip {
  padding: 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #164e63 100%);
  color: #fff;
}

.cta-strip h2,
.cta-strip p {
  color: #fff;
}

/* ========================================================================
   Auth Pages
   ======================================================================== */

.auth-shell {
  width: min(1320px, calc(100% - 1rem));
  margin: 0 auto;
}

.auth-shell.auth-shell-compact {
  width: min(760px, calc(100% - 1rem));
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border-radius: var(--radius-xl);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: -10% auto auto -5%;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -18% auto;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.15), transparent 70%);
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-side {
  height: 100%;
  padding: clamp(1.6rem, 3vw, 3rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92) 58%, rgba(22, 78, 99, 0.88));
  color: #fff;
  box-shadow: 0 30px 80px rgba(10, 24, 43, 0.28);
}

.auth-side h1,
.auth-side h2,
.auth-side p,
.auth-side li,
.auth-side strong {
  color: #fff;
}

.auth-side .eyebrow {
  background: rgba(255, 255, 255, 0.1);
  color: #f5fbff;
}

.auth-highlights {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
}

.auth-highlight {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}

.auth-highlight:hover {
  background: rgba(255, 255, 255, 0.08);
}

.auth-highlight strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.auth-card {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}

.auth-card.auth-card-compact {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.75rem;
}

.auth-card-header {
  margin-bottom: 1.5rem;
}

.auth-card-header h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.auth-card-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

.auth-field .form-control {
  min-height: 3.2rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-soft);
}

.auth-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 600;
}

.auth-check .form-check-input {
  margin: 0;
}

.auth-submit {
  min-height: 3.2rem;
  font-size: 1rem;
}

.auth-divider {
  margin: 1.5rem 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.auth-footer {
  color: var(--muted);
  text-align: center;
}

.auth-footer a {
  font-weight: 700;
}

.auth-center-stage {
  min-height: calc(100vh - 15rem);
  display: grid;
  place-items: center;
}

/* ========================================================================
   Page Title Row
   ======================================================================== */

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-title-row h1,
.page-title-row h2 {
  margin-bottom: 0;
}

/* ========================================================================
   Calendar Page Styles
   ======================================================================== */

.calendar-page {
  display: grid;
  gap: 1.25rem;
}

.calendar-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-wrapper {
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

/* FullCalendar Overrides */
.fc {
  font-family: var(--font-sans) !important;
}

.fc .fc-toolbar-title {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

.fc .fc-button {
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 0.45rem 0.85rem !important;
  border: 1.5px solid var(--border-strong) !important;
  background: var(--surface) !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

.fc .fc-button:hover {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  color: var(--primary-strong) !important;
}

.fc .fc-button-active,
.fc .fc-button.fc-button-active {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.fc .fc-daygrid-day {
  transition: background 0.15s ease;
}

.fc .fc-daygrid-day:hover {
  background: var(--primary-light) !important;
}

.fc .fc-daygrid-day-number {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  padding: 0.5rem;
}

.fc .fc-day-today {
  background: rgba(8, 145, 178, 0.06) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc .fc-event {
  border: none !important;
  border-radius: var(--radius-xs) !important;
  padding: 0.2rem 0.45rem !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.fc .fc-event:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-sm);
}

.fc .fc-col-header-cell-cushion {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0.65rem;
}

.fc .fc-timegrid-slot {
  height: 2.5rem;
}

.fc .fc-timegrid-slot-label-cushion {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.fc .fc-list-event-title a {
  color: var(--text) !important;
  font-weight: 600;
}

.fc .fc-list-day-cushion {
  background: var(--primary-light) !important;
}

/* Appointment Detail Modal */
.appointment-detail-grid {
  display: grid;
  gap: 0.65rem;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-xs);
  background: var(--bg-soft);
}

.detail-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
}

.detail-value {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

/* ========================================================================
   Today's Appointments Widget
   ======================================================================== */

.today-appointments {
  display: grid;
  gap: 0.5rem;
}

.today-appointment-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.today-appointment-item:hover {
  background: var(--primary-light);
  transform: translateX(3px);
}

.today-time {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--primary-strong);
  min-width: 3.5rem;
}

.today-info {
  flex: 1;
  min-width: 0;
}

.today-patient {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-procedure {
  font-size: 0.78rem;
  color: var(--muted);
}

.today-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ========================================================================
   Responsive
   ======================================================================== */

@media (max-width: 991.98px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-menu-toggle {
    display: flex;
  }

  .admin-topbar,
  .admin-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .app-navbar {
    border-radius: var(--radius-lg);
    padding: 0.85rem;
  }

  .auth-links {
    margin-left: 0;
    margin-top: 0.75rem;
    flex-wrap: wrap;
  }

  .hero-panel,
  .dashboard-hero,
  .section-block,
  .cta-strip {
    padding: 1.5rem;
  }

  .calendar-wrapper {
    padding: 0.75rem;
  }

  .fc .fc-toolbar {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .app-main {
    padding-top: 1rem;
  }

  .display-title {
    font-size: 2rem;
  }

  .page-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .calendar-legend {
    gap: 0.75rem;
    font-size: 0.78rem;
  }
}
