/* =============================================================
   MediConnect Bengal - Main Stylesheet
   ============================================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables (Light Mode) --- */
:root {
  --primary:       #4361ee;
  --primary-dark:  #3a0ca3;
  --secondary:     #f72585;
  --accent:        #4cc9f0;
  --success:       #06d6a0;
  --warning:       #ffd166;
  --danger:        #ef476f;
  --bg:            #f0f4ff;
  --card-bg:       #ffffff;
  --text:          #1a1a2e;
  --text-muted:    #6c757d;
  --border:        #dee2e6;
  --shadow:        0 4px 24px rgba(67,97,238,0.10);
  --shadow-hover:  0 8px 32px rgba(67,97,238,0.20);
  --navbar-bg:     #ffffff;
  --bottom-nav-bg: #ffffff;
  --input-bg:      #ffffff;
  --radius:        16px;
  --radius-sm:     10px;
  --transition:    all 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  transition: var(--transition);
  min-height: 100vh;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ---------------------------------------------------------------
   NAVBAR
--------------------------------------------------------------- */
.mc-navbar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.mc-brand {
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

.mc-brand span { font-weight: 300; }

/* --- Theme Toggle --- */
.theme-toggle {
  background: var(--bg);
  border: none;
  border-radius: 50px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  color: var(--text);
}
.theme-toggle:hover { background: var(--primary); color: #fff; }

/* ---------------------------------------------------------------
   BOTTOM NAVIGATION
--------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bottom-nav-bg);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 500;
  gap: 3px;
  transition: var(--transition);
}

.bottom-nav a i { font-size: 1.2rem; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); }
.bottom-nav a.active i { transform: translateY(-2px); }

/* Extra padding so content is not hidden behind bottom nav */
.page-content { padding-bottom: 80px; }

/* ---------------------------------------------------------------
   HERO / BANNER
--------------------------------------------------------------- */
.mc-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 2.5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.mc-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 40px;
  background: var(--bg);
  border-radius: 40px 40px 0 0;
}

.mc-hero h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.3rem; }
.mc-hero p  { font-size: 0.9rem; opacity: 0.85; margin: 0; }

/* ---------------------------------------------------------------
   CARDS
--------------------------------------------------------------- */
.mc-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.mc-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* --- Test Card --- */
.test-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
}

.test-card .test-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.3rem;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.test-card .test-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.test-card .test-cat {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.test-card .test-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.test-card .test-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.test-card .test-price span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------
   BUTTONS
--------------------------------------------------------------- */
.btn-primary-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.btn-primary-gradient:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: white;
  box-shadow: 0 4px 16px rgba(67,97,238,0.35);
}

.btn-outline-primary-custom {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50px;
  padding: 0.55rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-outline-primary-custom:hover {
  background: var(--primary);
  color: white;
}

/* --- Floating Book Button --- */
.btn-float {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(67,97,238,0.40);
  z-index: 998;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(67,97,238,0.50);
  color: white;
}

/* ---------------------------------------------------------------
   FORMS
--------------------------------------------------------------- */
.mc-form-group {
  margin-bottom: 1.2rem;
}

.mc-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mc-input {
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  width: 100%;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

.mc-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,0.15);
}

/* ---------------------------------------------------------------
   OTP BOXES
--------------------------------------------------------------- */
.otp-input-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0;
}

.otp-input-group input {
  width: 52px; height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
  transition: var(--transition);
}

.otp-input-group input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67,97,238,0.15);
}

/* ---------------------------------------------------------------
   STATUS BADGES
--------------------------------------------------------------- */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.status-Pending          { background: #fff3cd; color: #856404; }
.status-Accepted         { background: #cff4fc; color: #055160; }
.status-Sample-Collected { background: #cfe2ff; color: #084298; }
.status-Completed        { background: #d1e7dd; color: #0a3622; }

/* ---------------------------------------------------------------
   CATEGORY FILTER CHIPS
--------------------------------------------------------------- */
.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.chip {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  white-space: nowrap;
}

.chip:hover, .chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ---------------------------------------------------------------
   BOOKING CARD
--------------------------------------------------------------- */
.booking-card {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
}

.booking-card .bc-test { font-weight: 600; font-size: 1rem; }
.booking-card .bc-meta { font-size: 0.78rem; color: var(--text-muted); }
.booking-card .bc-price { font-size: 1rem; font-weight: 700; color: var(--primary); }

/* ---------------------------------------------------------------
   SECTION HEADINGS
--------------------------------------------------------------- */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------------
   AUTH PAGES
--------------------------------------------------------------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 1rem;
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
}

.auth-logo {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* ---------------------------------------------------------------
   ALERTS
--------------------------------------------------------------- */
.mc-alert {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mc-alert-success { background: #d1e7dd; color: #0a3622; }
.mc-alert-error   { background: #f8d7da; color: #58151c; }
.mc-alert-info    { background: #cff4fc; color: #055160; }

/* ---------------------------------------------------------------
   LOADING SPINNER
--------------------------------------------------------------- */
.mc-spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------
   AGENT DASHBOARD STATS
--------------------------------------------------------------- */
.stat-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: white;
  flex-shrink: 0;
}

.stat-icon.blue  { background: linear-gradient(135deg, #4361ee, #4cc9f0); }
.stat-icon.pink  { background: linear-gradient(135deg, #f72585, #b5179e); }
.stat-icon.green { background: linear-gradient(135deg, #06d6a0, #118ab2); }
.stat-icon.orange{ background: linear-gradient(135deg, #ffd166, #ef476f); }

.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ---------------------------------------------------------------
   RESPONSIVE TWEAKS
--------------------------------------------------------------- */
@media (max-width: 576px) {
  .mc-hero { padding: 2rem 1rem 3.5rem; }
  .mc-hero h1 { font-size: 1.3rem; }
}

/* ---------------------------------------------------------------
   ADMIN SIDEBAR LAYOUT
--------------------------------------------------------------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1050;
  transition: transform 0.3s ease, width 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: white;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.sidebar-nav {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  margin-right: 12px;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.10);
  color: white;
  border-left-color: rgba(255,255,255,0.3);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(67,97,238,0.35), rgba(247,37,133,0.2));
  color: white;
  border-left-color: var(--primary);
  font-weight: 600;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
}

.sidebar-link.text-danger { color: #ff6b6b !important; }
.sidebar-link.text-danger:hover { background: rgba(255,107,107,0.15); }

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.5rem 1.5rem;
}

/* Admin main content area */
.admin-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 240px);
}

.admin-topbar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1.2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s;
}

.sidebar-toggle-btn:hover { background: var(--bg); }

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-content {
  padding: 1.5rem;
  flex: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1040;
}

/* Mobile: sidebar hidden by default */
@media (max-width: 991px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open {
    display: block;
  }
  .admin-main {
    margin-left: 0;
    width: 100%;
  }
}

/* page-content-no-nav: no bottom nav padding */
.page-content-no-nav {
  padding-bottom: 2rem;
}
