/* ============================================================
   Doktori Im — Design System CSS
   Premium Medical SaaS Platform
   ============================================================ */

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

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  /* Brand colors */
  --color-primary:      #0A2F6E;
  --color-primary-700:  #0f3d8a;
  --color-blue:         #1a56db;
  --color-blue-light:   #E8F0FE;
  --color-blue-hover:   #1444b8;
  --color-green:        #059669;
  --color-green-light:  #ECFDF5;

  /* Grays */
  --color-gray-50:  #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Semantic */
  --color-danger:        #DC2626;
  --color-danger-light:  #FEF2F2;
  --color-warning:       #D97706;
  --color-warning-light: #FFFBEB;
  --color-white:         #FFFFFF;

  /* Typography */
  --font-base: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(10,47,110,0.10), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(10,47,110,0.14), 0 4px 8px rgba(0,0,0,0.06);

  /* Transitions */
  --transition: all 0.15s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* prevent horizontal scroll globally */
}
body {
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-gray-700);
  background: var(--color-gray-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* belt + suspenders */
  width: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a  { color: var(--color-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-blue-hover); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-base);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
  letter-spacing: -0.3px;
}
h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.5px; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: clamp(18px, 2.5vw, 22px); }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.text-muted { color: var(--color-gray-500); }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 11px; }
.text-lg    { font-size: 18px; }
.text-xl    { font-size: 20px; }
.fw-600     { font-weight: 600; }
.fw-700     { font-weight: 700; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 20px;
  height: 44px;
  font-family: var(--font-base);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  outline: none;
  line-height: 1;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(26,86,219,0.3); }
.btn i { font-size: 17px; }

.btn-primary {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
}
.btn-primary:hover { background: var(--color-blue-hover); border-color: var(--color-blue-hover); color: #fff; }
.btn-primary:active { transform: scale(0.98); }

.btn-dark {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-dark:hover { background: var(--color-primary-700); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--color-blue);
  border-color: var(--color-blue);
}
.btn-outline:hover { background: var(--color-blue-light); }

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

.btn-secondary {
  background: var(--color-blue-light);
  color: var(--color-blue);
  border-color: var(--color-blue-light);
}
.btn-secondary:hover { background: #d8e9ff; }

.btn-success {
  background: var(--color-green);
  color: #fff;
  border-color: var(--color-green);
}
.btn-success:hover { background: #047857; color: #fff; }

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--color-gray-600);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--color-gray-100); }

.btn-sm  { height: 34px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg  { height: 54px; padding: 0 32px; font-size: 16px; }
.btn-xl  { height: 60px; padding: 0 40px; font-size: 17px; border-radius: var(--radius-lg); }
.btn-icon{ width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.4;
}
.badge-blue    { background: var(--color-blue-light);  color: var(--color-blue); }
.badge-green   { background: var(--color-green-light); color: var(--color-green); }
.badge-red     { background: var(--color-danger-light);color: var(--color-danger); }
.badge-amber   { background: var(--color-warning-light);color: var(--color-warning); }
.badge-gray    { background: var(--color-gray-100);    color: var(--color-gray-600); }
.badge-dark    { background: var(--color-primary);     color: #fff; }
.badge-dot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 2px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body   { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--color-gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--color-gray-100); background: var(--color-gray-50); }
.card-hover  { transition: box-shadow 0.2s; cursor: pointer; }
.card-hover:hover { box-shadow: var(--shadow-md); }

/* ── Doctor Card ──────────────────────────────────────────── */
.doctor-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.doctor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.doctor-card__img {
  height: 90px;
  background: linear-gradient(135deg, #E8F0FE 0%, #DBEAFE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.doctor-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
}
.doctor-card__avatar-initials {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-blue);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
}
.doctor-card__verified {
  position: absolute; top: 8px; right: 8px;
  background: var(--color-green);
  color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
}
.doctor-card__body  { padding: 14px; flex: 1; }
.doctor-card__name  { font-size: 15px; font-weight: 700; color: var(--color-gray-900); }
.doctor-card__spec  { font-size: 12px; color: var(--color-blue); font-weight: 600; margin-top: 2px; }
.doctor-card__stars { color: #F59E0B; font-size: 12px; margin-top: 6px; }
.doctor-card__meta  { font-size: 11px; color: var(--color-gray-500); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.doctor-card__footer { padding: 10px 14px; border-top: 1px solid var(--color-gray-100); display: flex; align-items: center; justify-content: space-between; }
.doctor-card__price { font-size: 14px; font-weight: 700; color: var(--color-primary); }
.doctor-card__price span { font-size: 10px; font-weight: 400; color: var(--color-gray-400); }

/* ── Forms ────────────────────────────────────────────────── */
.form-group   { margin-bottom: 18px; }
.form-label   { display: block; font-size: 13px; font-weight: 600; color: var(--color-gray-700); margin-bottom: 6px; }
.form-label .required { color: var(--color-danger); margin-left: 2px; }
.form-control {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: var(--font-base);
  font-size: 14px;
  color: var(--color-gray-900);
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus { border-color: var(--color-blue); box-shadow: 0 0 0 3px rgba(26,86,219,0.12); }
.form-control.is-invalid { border-color: var(--color-danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }
.form-control:disabled { background: var(--color-gray-100); opacity: 0.65; cursor: not-allowed; }
textarea.form-control { height: auto; padding: 12px 14px; resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%236B7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint  { font-size: 12px; color: var(--color-gray-500); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--color-danger); margin-top: 5px; font-weight: 500; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 576px) { .form-row { grid-template-columns: 1fr; } }

/* ── Search bar ───────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(10,47,110,0.18);
  overflow: hidden;
  height: 58px;
}
.search-bar__field { flex: 1; display: flex; align-items: center; padding: 0 20px; gap: 10px; border-right: 1px solid var(--color-gray-200); min-width: 0; }
.search-bar__field input { flex: 1; border: none; outline: none; font-family: var(--font-base); font-size: 15px; color: var(--color-gray-900); background: transparent; min-width: 0; }
.search-bar__field input::placeholder { color: var(--color-gray-400); }
.search-bar__divider { width: 1px; height: 30px; background: var(--color-gray-200); flex-shrink: 0; }
.search-bar__city { display: flex; align-items: center; padding: 0 16px; gap: 6px; font-size: 14px; color: var(--color-gray-500); white-space: nowrap; border-right: 1px solid var(--color-gray-200); }
.search-bar__city input { border: none; outline: none; font-family: var(--font-base); font-size: 14px; color: var(--color-gray-700); background: transparent; width: 100px; }
.search-bar__btn { height: 58px; padding: 0 28px; background: var(--color-blue); color: #fff; border: none; font-family: var(--font-base); font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; transition: background 0.15s; }
.search-bar__btn:hover { background: var(--color-blue-hover); }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-200);
  height: 68px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.navbar__inner { display: flex; align-items: center; gap: 24px; width: 100%; }
.navbar__brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.navbar__logo-text { font-size: 22px; font-weight: 800; color: var(--color-primary); letter-spacing: -0.5px; }
.navbar__logo-text span { color: var(--color-blue); }
.navbar__nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.navbar__nav a { padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--color-gray-700); border-radius: var(--radius-sm); transition: var(--transition); white-space: nowrap; }
.navbar__nav a:hover, .navbar__nav a.active { color: var(--color-blue); background: var(--color-blue-light); }
.navbar__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #0A2F6E 0%, #1a56db 55%, #1e40af 100%);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden; /* clips decorative circles */
  width: 100%;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}
.hero__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #93C5FD; margin-bottom: 16px; }
.hero__title   { font-size: clamp(32px, 5vw, 54px); font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: -1px; margin-bottom: 18px; }
.hero__title span { color: #60A5FA; }
.hero__subtitle{ font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,0.8); max-width: 520px; line-height: 1.6; margin-bottom: 36px; }
.hero__search  { max-width: 680px; margin-bottom: 28px; }
.hero__trust   { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__trust-pill {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 13px; font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; gap: 6px;
}

/* ── Section ──────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--color-white); }
.section-blue { background: linear-gradient(135deg, #0A2F6E 0%, #1a56db 100%); }
.section__title { font-size: clamp(24px, 3vw, 34px); font-weight: 700; color: var(--color-primary); margin-bottom: 10px; }
.section__subtitle { font-size: 16px; color: var(--color-gray-500); max-width: 560px; }
.section__header { margin-bottom: 40px; }

/* ── Specialty cards ──────────────────────────────────────── */
.specialty-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  text-decoration: none;
}
.specialty-card:hover { border-color: var(--color-blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.specialty-card__icon { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--color-blue-light); color: var(--color-blue); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 26px; }
.specialty-card__name { font-size: 14px; font-weight: 600; color: var(--color-gray-900); }
.specialty-card__count { font-size: 12px; color: var(--color-gray-500); margin-top: 3px; }

/* ── Stats bar ────────────────────────────────────────────── */
.stats-bar { background: var(--color-primary); padding: 40px 0; }
.stat-item { text-align: center; }
.stat-item__value { font-size: 36px; font-weight: 800; color: #fff; letter-spacing: -1px; }
.stat-item__label { font-size: 14px; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* ── Testimonials ─────────────────────────────────────────── */
.testimonial-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.testimonial-card__stars { color: #F59E0B; font-size: 14px; margin-bottom: 12px; }
.testimonial-card__text  { font-size: 15px; color: var(--color-gray-700); line-height: 1.7; margin-bottom: 16px; font-style: italic; }
.testimonial-card__author { display: flex; align-items: center; gap: 10px; }
.testimonial-card__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--color-blue-light); color: var(--color-blue); font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.testimonial-card__name { font-size: 14px; font-weight: 600; color: var(--color-gray-900); }
.testimonial-card__role { font-size: 12px; color: var(--color-gray-500); }

/* ── Dashboard Layout ─────────────────────────────────────── */
.dash-layout { display: flex; }
.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-primary);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.dash-sidebar__logo { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dash-sidebar__logo-text { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.dash-sidebar__logo-text span { color: #60A5FA; }
.dash-sidebar__role { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }
.dash-nav { padding: 16px 12px; flex: 1; }
.dash-nav__section { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); padding: 8px 8px 4px; margin-top: 12px; }
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 2px;
  transition: var(--transition);
}
.dash-nav a i { font-size: 18px; flex-shrink: 0; }
.dash-nav a:hover  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.dash-nav a.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }
.dash-nav a .badge { margin-left: auto; font-size: 10px; background: var(--color-blue); color: #fff; }
.dash-sidebar__user { padding: 14px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; }
.dash-sidebar__user-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-sidebar__user-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); }
.dash-sidebar__user-role { font-size: 11px; color: rgba(255,255,255,0.45); }

.dash-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-topbar {
  height: 64px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.dash-topbar__title { font-size: 17px; font-weight: 700; color: var(--color-gray-900); flex: 1; }
.dash-content { padding: 28px 28px; flex: 1; }

/* ── Stat Cards (dashboard) ───────────────────────────────── */
.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card__label { font-size: 12px; font-weight: 600; color: var(--color-gray-500); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card__value { font-size: 30px; font-weight: 800; color: var(--color-primary); margin: 6px 0; line-height: 1; }
.stat-card__trend { font-size: 12px; font-weight: 600; }
.stat-card__trend.up   { color: var(--color-green); }
.stat-card__trend.down { color: var(--color-danger); }
.stat-card__icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-card__icon-blue  { background: var(--color-blue-light);  color: var(--color-blue); }
.stat-card__icon-green { background: var(--color-green-light); color: var(--color-green); }
.stat-card__icon-amber { background: var(--color-warning-light); color: var(--color-warning); }
.stat-card__icon-red   { background: var(--color-danger-light); color: var(--color-danger); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }

/* ── Table ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-gray-200); box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; background: var(--color-white); font-size: 14px; }
.table th { padding: 12px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-gray-500); background: var(--color-gray-50); border-bottom: 1px solid var(--color-gray-200); white-space: nowrap; text-align: left; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--color-gray-100); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--color-gray-50); }
.table__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.table__avatar-initials { width: 32px; height: 32px; border-radius: 50%; background: var(--color-blue-light); color: var(--color-blue); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── Toast ────────────────────────────────────────────────── */
.toast-container { position: fixed; top: 80px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s ease;
}
.toast__icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.toast__icon-success { background: var(--color-green-light);  color: var(--color-green); }
.toast__icon-error   { background: var(--color-danger-light); color: var(--color-danger); }
.toast__icon-warning { background: var(--color-warning-light);color: var(--color-warning); }
.toast__icon-info    { background: var(--color-blue-light);   color: var(--color-blue); }
.toast__body  { flex: 1; }
.toast__title { font-size: 14px; font-weight: 600; color: var(--color-gray-900); }
.toast__msg   { font-size: 13px; color: var(--color-gray-500); margin-top: 2px; }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--color-blue-light); color: var(--color-blue); font-size: 28px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty-state__title { font-size: 16px; font-weight: 700; color: var(--color-gray-900); margin-bottom: 6px; }
.empty-state__text  { font-size: 14px; color: var(--color-gray-500); margin-bottom: 20px; }

/* ── Skeleton ─────────────────────────────────────────────── */
@keyframes shimmer { 0%{background-position:-200%} 100%{background-position:200%} }
.skeleton {
  background: linear-gradient(90deg, var(--color-gray-200) 25%, var(--color-gray-100) 50%, var(--color-gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--color-gray-700);
  border: 1px solid var(--color-gray-200);
  background: var(--color-white);
  text-decoration: none;
  transition: var(--transition);
}
.pagination a:hover   { background: var(--color-blue-light); border-color: var(--color-blue); color: var(--color-blue); }
.pagination .active   { background: var(--color-blue); color: #fff; border-color: var(--color-blue); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { background: var(--color-primary); color: rgba(255,255,255,0.7); padding: 56px 0 24px; }
.footer__logo { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer__logo span { color: #60A5FA; }
.footer__tagline { font-size: 14px; color: rgba(255,255,255,0.6); max-width: 300px; }
.footer__heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 8px; }
.footer__links a { font-size: 14px; color: rgba(255,255,255,0.7); text-decoration: none; transition: var(--transition); }
.footer__links a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 40px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; }

/* ── Appointment card ─────────────────────────────────────── */
.appt-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--color-gray-100); }
.appt-item:last-child { border-bottom: none; }
.appt-item__avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.appt-item__info { flex: 1; min-width: 0; }
.appt-item__name { font-size: 14px; font-weight: 600; color: var(--color-gray-900); }
.appt-item__meta { font-size: 12px; color: var(--color-gray-500); }
.appt-item__time { text-align: right; flex-shrink: 0; }
.appt-item__hour { font-size: 14px; font-weight: 700; color: var(--color-gray-900); }

/* ── Chat ─────────────────────────────────────────────────── */
.chat-layout { display: flex; height: calc(100vh - 64px); }
.chat-sidebar { width: 300px; flex-shrink: 0; border-right: 1px solid var(--color-gray-200); overflow-y: auto; background: var(--color-white); }
.chat-sidebar__search { padding: 14px; border-bottom: 1px solid var(--color-gray-100); }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; border-bottom: 1px solid var(--color-gray-100); transition: background 0.1s; }
.chat-item:hover, .chat-item.active { background: var(--color-blue-light); }
.chat-item__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--color-blue-light); color: var(--color-blue); font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-item__name { font-size: 14px; font-weight: 600; color: var(--color-gray-900); }
.chat-item__last { font-size: 12px; color: var(--color-gray-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item__unread { width: 18px; height: 18px; border-radius: 50%; background: var(--color-blue); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-left: auto; flex-shrink: 0; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header { padding: 14px 20px; border-bottom: 1px solid var(--color-gray-200); background: var(--color-white); display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--color-gray-50); }
.chat-message { display: flex; gap: 10px; max-width: 70%; }
.chat-message.sent { align-self: flex-end; flex-direction: row-reverse; }
.chat-message__bubble { padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.chat-message.recv .chat-message__bubble { background: var(--color-white); border: 1px solid var(--color-gray-200); color: var(--color-gray-900); border-bottom-left-radius: 4px; }
.chat-message.sent .chat-message__bubble { background: var(--color-blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-message__time { font-size: 10px; color: var(--color-gray-400); margin-top: 4px; text-align: right; }
.chat-input { padding: 14px 20px; border-top: 1px solid var(--color-gray-200); background: var(--color-white); display: flex; gap: 10px; align-items: center; }
.chat-input input { flex: 1; height: 44px; padding: 0 14px; border: 1.5px solid var(--color-gray-200); border-radius: var(--radius-full); font-family: var(--font-base); font-size: 14px; outline: none; }
.chat-input input:focus { border-color: var(--color-blue); }

/* ── Stories ──────────────────────────────────────────────── */
.stories-bar { display: flex; gap: 16px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.stories-bar::-webkit-scrollbar { display: none; }
.story-thumb { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; }
.story-thumb__ring { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(45deg, #0A2F6E, #1a56db, #059669); padding: 2.5px; }
.story-thumb__img { width: 100%; height: 100%; border-radius: 50%; border: 2.5px solid #fff; object-fit: cover; overflow: hidden; background: var(--color-blue-light); display: flex; align-items: center; justify-content: center; }
.story-thumb__name { font-size: 11px; color: var(--color-gray-700); font-weight: 500; text-align: center; max-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Custom Modal (non-Bootstrap) ────────────────────────── */
.custom-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.custom-modal-backdrop .custom-modal { background: var(--color-white); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal__header { padding: 20px 24px; border-bottom: 1px solid var(--color-gray-100); display: flex; align-items: center; justify-content: space-between; }
.modal__title  { font-size: 17px; font-weight: 700; color: var(--color-gray-900); }
.modal__body   { padding: 24px; }
.modal__footer { padding: 16px 24px; border-top: 1px solid var(--color-gray-100); display: flex; gap: 10px; justify-content: flex-end; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--color-gray-200); gap: 0; margin-bottom: 24px; }
.tab  { padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--color-gray-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; text-decoration: none; transition: var(--transition); white-space: nowrap; }
.tab:hover  { color: var(--color-gray-900); }
.tab.active { color: var(--color-blue); border-bottom-color: var(--color-blue); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert { padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--color-green-light);  border: 1px solid #A7F3D0; color: #065F46; }
.alert-error   { background: var(--color-danger-light); border: 1px solid #FECACA; color: #991B1B; }
.alert-warning { background: var(--color-warning-light);border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: var(--color-blue-light);   border: 1px solid #BFDBFE; color: #1e40af; }

/* ── Print (prescription) ─────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .prescription-print { max-width: 100%; margin: 0; padding: 20px; }
}

/* ── Utility ──────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.flex     { display: flex; }
.flex-1   { flex: 1; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.gap-16   { gap: 16px; }
.gap-20   { gap: 20px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-0   { padding: 0 !important; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.d-none      { display: none; }
.w-full      { width: 100%; }
.rounded     { border-radius: var(--radius-md); }
.rounded-full{ border-radius: var(--radius-full); }
.truncate    { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider     { height: 1px; background: var(--color-gray-200); margin: 16px 0; }
.overlay-loading { position: absolute; inset: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 10; border-radius: inherit; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — full breakpoint system
   ══════════════════════════════════════════════════════════ */

/* ── 1280px – wide laptops ─────────────────────────────── */
@media (max-width: 1280px) {
  .container { padding: 0 24px; }
}

/* ── 1024px – tablets landscape / small laptops ────────── */
@media (max-width: 1024px) {
  .dash-sidebar { width: 200px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .dash-content { padding: 20px; }
}

/* ── 900px – nav collapses ──────────────────────────────── */
@media (max-width: 900px) {
  /* hero search: stack vertically */
  .hero__search .search-bar {
    flex-direction: column;
    height: auto;
    border-radius: var(--radius-lg);
    overflow: visible;
    gap: 0;
  }
  .search-bar__field {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-gray-200);
    height: 52px;
  }
  .search-bar__city {
    display: flex !important;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-gray-200);
    height: 52px;
  }
  .search-bar__city input { width: 100%; }
  .search-bar__btn {
    width: 100%;
    height: 52px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    justify-content: center;
  }
}

/* ── 768px – tablets portrait ───────────────────────────── */
@media (max-width: 768px) {
  /* Old navbar hidden (nav2 handles mobile) */
  .navbar__nav { display: none; }

  /* Dashboard sidebar */
  .dash-sidebar { display: none; }
  .dash-sidebar.open {
    display: flex;
    position: fixed; left: 0; top: 0;
    height: 100vh; z-index: 999;
    width: 260px;
  }
  .dash-content { padding: 16px; }
  .dash-topbar  { padding: 0 16px; }

  /* Grids */
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Hero */
  .hero { padding: 48px 0 56px; }
  .hero__subtitle { font-size: 16px; }
  .hero__trust { gap: 8px; }
  .hero__trust-pill { font-size: 12px; padding: 5px 10px; }

  /* Sections */
  .section { padding: 48px 0; }

  /* Chat */
  .chat-sidebar { width: 100%; }
  .chat-layout  { flex-direction: column; }

  /* Tables — allow horizontal scroll */
  .table-wrapper { -webkit-overflow-scrolling: touch; }
  .table th, .table td { font-size: 13px; padding: 10px 12px; }

  /* Footer */
  .footer { padding: 40px 0 20px; }

  /* Doctors sidebar filter — hide on mobile (drawer) */
  .doctors-sidebar { display: none; }

  /* Doctor profile flex */
  .doctor-profile-flex { flex-direction: column; }

  /* Tabs — scrollable */
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; font-size: 13px; padding: 8px 14px; }

  /* Toast */
  .toast-container { left: 16px; right: 16px; top: 70px; }
  .toast { min-width: unset; max-width: 100%; }

  /* Pagination */
  .pagination a, .pagination span { width: 32px; height: 32px; font-size: 13px; }

  /* Section header stacking */
  .section__header.d-flex { flex-direction: column; align-items: flex-start !important; gap: 12px; }
}

/* ── 640px – large phones ───────────────────────────────── */
@media (max-width: 640px) {
  .container { padding: 0 16px; }

  /* Stats bar 2-col */
  .stats-bar .row > div { padding-top: 8px; padding-bottom: 8px; }
  .stat-item__value { font-size: 28px; }

  /* Specialty grid 2-col */
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  /* doctor grid tighter */
  .grid-auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

  /* Section spacing */
  .section { padding: 36px 0; }
  .section__header { margin-bottom: 28px; }

  /* Search bar city hidden at small screens (hero has its own city field) */
  .search-bar__city { display: none !important; }

  /* form-row single col */
  .form-row { grid-template-columns: 1fr; }

  /* Dashboard stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* hiw steps */
  .hiw-step { padding: 28px 20px !important; border-right: none !important; border-bottom: 1px solid #F3F4F6; }
  .hiw-step:last-child { border-bottom: none; }
}

/* ── 480px – small phones ───────────────────────────────── */
@media (max-width: 480px) {
  /* Typography scale down */
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  .hero__title { font-size: 28px; letter-spacing: -0.5px; }

  /* Buttons */
  .btn-xl { height: 50px; padding: 0 24px; font-size: 15px; border-radius: var(--radius-md); }
  .btn-lg { height: 46px; padding: 0 20px; font-size: 15px; }

  /* Search bar */
  .search-bar { border-radius: var(--radius-md); }
  .search-bar__btn { font-size: 14px; padding: 0 14px; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .grid-auto { grid-template-columns: repeat(2, 1fr); }

  /* Dashboard */
  .dash-content { padding: 12px; }
  .card-body { padding: 14px; }

  /* Testimonials */
  .testimonial-card { padding: 18px; }

  /* Footer bottom stack */
  .footer__bottom { flex-direction: column; text-align: center; gap: 8px; }
  .footer__bottom > div { justify-content: center; }

  /* Nav2 inner padding */
  .nav2__inner { padding: 0 14px; }

  /* Modal full-width */
  .custom-modal-backdrop { padding: 12px; }
  .modal__body { padding: 16px; }

  /* Tables — min col widths */
  .table th, .table td { font-size: 12px; padding: 8px 10px; }

  /* Appt card */
  .appt-item { gap: 10px; }

  /* Hero trust pills — single line scroll */
  .hero__trust { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .hero__trust::-webkit-scrollbar { display: none; }
  .hero__trust-pill { flex-shrink: 0; }

  /* Section CTA buttons stack */
  .section-blue .d-flex { flex-direction: column; align-items: stretch; }
  .section-blue .btn { justify-content: center; }
}

/* ── 360px – very small phones ──────────────────────────── */
@media (max-width: 360px) {
  .hero__title { font-size: 24px; }
  .nav2__logo-text { font-size: 17px; }
  .nav2__badge { display: none; }
  .container { padding: 0 12px; }
}

/* ── Mobile Nav (bottom) ──────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-gray-200);
  z-index: 1000;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}
.mobile-nav__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--color-gray-400); font-size: 9px; font-weight: 500; cursor: pointer; padding: 4px 0; text-decoration: none; transition: color 0.15s; }
.mobile-nav__item i { font-size: 22px; }
.mobile-nav__item.active { color: var(--color-blue); }
@media (max-width: 768px) { .mobile-nav { display: flex; } body { padding-bottom: 64px; } }

/* ── Accessibility ────────────────────────────────────────── */
:focus-visible { outline: 3px solid var(--color-blue); outline-offset: 2px; border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Bootstrap Modal Fix ──────────────────────────────────── */
.modal { z-index: 10500 !important; }
.modal-backdrop { z-index: 10400 !important; }
body.modal-open { overflow: hidden !important; padding-right: 0 !important; }
body.modal-open .dash-topbar { z-index: 1 !important; }
body.modal-open .dash-sidebar { z-index: 1 !important; }
.dash-main { overflow: visible !important; }
.dash-content { overflow: visible !important; }

/* ── FIX: Bootstrap modal backdrop mbi çdo gjë ─────────────── */
.modal-backdrop { z-index: 1040 !important; }
.modal          { z-index: 1050 !important; }
/* overflow-x:hidden te html/body prish stacking context — override kur modal eshte hapur */
html.modal-open,
body.modal-open { overflow-x: clip !important; }

/* ── Toast Notifications ──────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(10,47,110,0.16), 0 2px 8px rgba(0,0,0,0.08);
  padding: 14px 16px;
  min-width: 280px;
  max-width: 360px;
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(.21,1.02,.73,1) forwards;
  border-left: 4px solid #1A56DB;
}
@keyframes toastIn {
  from { opacity:0; transform:translateX(40px) scale(0.95); }
  to   { opacity:1; transform:translateX(0)    scale(1); }
}
.toast__icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.toast__icon-success { background: #D1FAE5; color: #059669; border-color: #059669; }
.toast__icon-success ~ * { --toast-border: #059669; }
.toast.toast--success { border-left-color: #059669; }
.toast__icon-error   { background: #FEE2E2; color: #DC2626; }
.toast.toast--error  { border-left-color: #DC2626; }
.toast__icon-warning { background: #FEF3C7; color: #D97706; }
.toast.toast--warning{ border-left-color: #D97706; }
.toast__icon-info    { background: #DBEAFE; color: #1A56DB; }
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-size: 13px; font-weight: 700; color: #111827; margin-bottom: 2px; }
.toast__msg   { font-size: 12px; color: #6B7280; line-height: 1.4; word-break: break-word; }
@media (max-width: 480px) {
  .toast-container { bottom: 80px; right: 12px; left: 12px; }
  .toast { min-width: unset; max-width: 100%; }
}
