/* ==========================================================================
   E-Doctor :: Global theme
   Professional Red, Blue & Silver, modern "soft 3D" style: red is reserved
   for the brand mark and primary/call-to-action buttons; navy blue is the
   structural dark chrome (sidebar/footer/hero blends) and also carries
   navigation/selection ("you are here") states and info-style badges/
   buttons, so it reads as a genuine second identity color rather than a
   tint of red; silver-gray is the neutral resting surface — card/table/
   divider backgrounds and the at-rest border/text of secondary buttons.
   All brand color lives in the --ed-* custom properties below.
   ========================================================================== */

:root {
  --ed-primary: #b3182f;
  --ed-primary-dark: #7a0f21;
  --ed-primary-light: #d8465b;
  --ed-accent: #3f7cc4;
  --ed-danger: #8f1424;
  --ed-danger-light: #b8293a;
  --ed-warning: #c9862f;
  --ed-blue: #2f6db0;
  --ed-blue-dark: #1c4a80;
  --ed-blue-light: #6ea0d8;
  --ed-navy: #101d30;
  --ed-navy-2: #16283f;
  --ed-navy-3: #223a5c;
  --ed-bg: #f4f6f8;
  --ed-surface: #ffffff;
  --ed-text: #1f2733;
  --ed-muted: #5c6673;
  --ed-border: #d9dee5;
  --ed-silver: #cfd4dc;
  --ed-silver-2: #e8eaee;
  --ed-radius: 16px;
  --ed-shadow-sm: 0 2px 6px rgba(16, 29, 48, 0.07);
  --ed-shadow-md: 0 10px 25px rgba(16, 29, 48, 0.10);
  --ed-shadow-lift: 0 18px 34px rgba(16, 29, 48, 0.18), 0 0 0 1px rgba(47, 109, 176, 0.08);
  --ed-gradient: linear-gradient(135deg, #c33049 0%, #b3182f 55%, #7a0f21 100%);
  --ed-gradient-blue: linear-gradient(135deg, #4a8ed0 0%, #2f6db0 55%, #1c4a80 100%);
  --ed-gradient-dark: linear-gradient(160deg, #223a5c 0%, #101d30 100%);
  --ed-gradient-hero: linear-gradient(120deg, #101d30 0%, #1c4a80 45%, #b3182f 100%);
}

* { box-sizing: border-box; }

body {
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  background: var(--ed-bg);
  color: var(--ed-text);
}

/* Plain inline links (notification lists, "View all", footer links, etc.)
   are blue rather than red — the classic "link" affordance — so red stays
   legible as "this is a button to click" wherever it appears. Anything
   meant as a strong call to action already uses an explicit .btn class,
   which is untouched by this rule. */
a { text-decoration: none; }
a:not(.btn):not(.nav-link):not(.category-pill) { color: var(--ed-blue); }
a:not(.btn):not(.nav-link):not(.category-pill):hover { color: var(--ed-blue-dark); }

/* ==========================================================================
   Buttons — modern 3D. Solid red is reserved for primary/call-to-action
   buttons; blue marks navigation/selection ("you are here") and info-style
   actions; secondary and neutral actions rest in white with a silver
   border/navy text and pick up blue — not red — as their interaction
   highlight, so red stays legible as "the thing to click" everywhere else.
   ========================================================================== */
.btn {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .22s cubic-bezier(.34,1.2,.4,1), box-shadow .25s ease, filter .2s ease, background .25s ease, color .2s ease, border-color .2s ease;
  position: relative;
}
.btn:focus { box-shadow: none; }

/* Solid red — primary calls to action (Bootstrap's primary/success
   variants are unified here so nothing renders stock Bootstrap blue/green) */
.btn-primary, .btn-success,
.btn-check:checked + .btn-outline-primary, .btn-check:active + .btn-outline-primary {
  background: var(--ed-gradient) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(179,24,47,.3), inset 0 1px 0 rgba(255,255,255,.22) !important;
}
.btn-primary:hover, .btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(179,24,47,.36), inset 0 1px 0 rgba(255,255,255,.28) !important;
  filter: brightness(1.04);
  color: #fff !important;
}
.btn-primary:active, .btn-success:active,
.btn-primary.active, .btn-success.active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(179,24,47,.32), inset 0 2px 4px rgba(0,0,0,.18) !important;
  filter: none;
}
.btn-primary:focus-visible, .btn-success:focus-visible {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(179,24,47,.25), 0 6px 16px rgba(179,24,47,.3) !important;
}
.btn-primary:disabled, .btn-success:disabled { filter: grayscale(.3) opacity(.65); box-shadow: none !important; }

/* Solid blue — "info"-tier actions (e.g. order fulfillment steps like
   "Ship"), kept visually distinct from the red primary CTA tier so a
   button's color hints at what kind of action it is */
.btn-info {
  background: var(--ed-gradient-blue) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(47,109,176,.32), inset 0 1px 0 rgba(255,255,255,.22) !important;
}
.btn-info:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(47,109,176,.38), inset 0 1px 0 rgba(255,255,255,.28) !important;
  filter: brightness(1.05);
  color: #fff !important;
}
.btn-info:active, .btn-info.active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(47,109,176,.34), inset 0 2px 4px rgba(0,0,0,.18) !important;
}
.btn-info:focus-visible {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(47,109,176,.25), 0 6px 16px rgba(47,109,176,.3) !important;
}
.btn-info:disabled { filter: grayscale(.3) opacity(.65); box-shadow: none !important; }

/* Deep red — destructive / reject / cancel actions, visibly darker/more
   muted than the primary gradient so a "danger" click never looks routine */
.btn-danger {
  background: linear-gradient(135deg, #8f1424 0%, #4a0a13 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(74,10,19,.4), inset 0 1px 0 rgba(255,255,255,.18) !important;
}
.btn-danger:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 26px rgba(74,10,19,.46), inset 0 1px 0 rgba(255,255,255,.22) !important;
  filter: brightness(1.06);
  color: #fff !important;
}
.btn-danger:active, .btn-danger.active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(74,10,19,.4), inset 0 2px 4px rgba(0,0,0,.2) !important;
}
.btn-danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(74,10,19,.25), 0 6px 16px rgba(74,10,19,.4) !important;
}

/* White + silver border at rest — neutral/secondary actions (Bootstrap's
   secondary/outline-primary/outline-success/outline-info/light are all
   unified here). Blue appears only as the hover/active highlight, not the
   resting state, so most of the interface reads as clean silver-and-white. */
.btn-outline-primary, .btn-outline-secondary, .btn-secondary,
.btn-outline-success, .btn-outline-info, .btn-light {
  background: #fff !important;
  border: 1.5px solid var(--ed-silver) !important;
  color: var(--ed-navy) !important;
  box-shadow: 0 3px 10px rgba(16,29,48,.08) !important;
}
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-secondary:hover,
.btn-outline-success:hover, .btn-outline-info:hover, .btn-light:hover {
  background: rgba(47,109,176,.07) !important;
  border-color: var(--ed-blue) !important;
  color: var(--ed-blue-dark) !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(47,109,176,.18) !important;
}
.btn-outline-primary:active, .btn-outline-secondary:active, .btn-secondary:active,
.btn-outline-success:active, .btn-outline-info:active, .btn-light:active,
.btn-outline-primary.active, .btn-outline-secondary.active, .btn-secondary.active,
.btn-outline-success.active, .btn-outline-info.active, .btn-light.active {
  background: var(--ed-gradient-blue) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(47,109,176,.3) !important;
}
.btn-outline-primary:disabled, .btn-outline-secondary:disabled, .btn-secondary:disabled,
.btn-outline-success:disabled, .btn-outline-info:disabled, .btn-light:disabled { opacity: .55; box-shadow: none !important; }

/* White + deep-red border — neutral variant of the destructive action;
   this one keeps a red-family border at rest since "danger" is a semantic
   signal worth showing before the user even hovers it */
.btn-outline-danger {
  background: #fff !important;
  border: 1.5px solid #6b111e !important;
  color: #6b111e !important;
  box-shadow: 0 3px 10px rgba(16,29,48,.08) !important;
}
.btn-outline-danger:hover {
  background: linear-gradient(135deg, #8f1424 0%, #4a0a13 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(74,10,19,.3) !important;
}
.btn-outline-danger:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(74,10,19,.28) !important; }

/* Ghost buttons used over the hero / dark sections */
.btn-outline-light {
  border: 1.5px solid rgba(255,255,255,.7) !important;
  color: #fff !important;
  background: transparent !important;
}
.btn-outline-light:hover {
  background: #fff !important;
  color: var(--ed-navy) !important;
  border-color: #fff !important;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,0,0,.22) !important;
}
.btn-outline-light:active { transform: translateY(0); }

.btn-accent { background: var(--ed-gradient); color: #fff; border: none; box-shadow: 0 6px 16px rgba(179,24,47,.28); }
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(179,24,47,.34); color:#fff; }
.btn-accent:active { transform: translateY(0); }

.btn-check:checked + .btn-outline-primary { color: #fff !important; }

/* ---- Bootstrap color utilities: red = primary/highlight, blue = info --- */
.text-primary { color: var(--ed-primary) !important; }
.bg-primary { background-color: var(--ed-primary) !important; }
.border-primary { border-color: var(--ed-primary) !important; }
.text-bg-primary, .badge.bg-primary { background-color: var(--ed-primary) !important; color: #fff !important; }
.text-info { color: var(--ed-blue) !important; }
.bg-info { background-color: var(--ed-blue) !important; }
.text-bg-info, .badge.bg-info { background-color: var(--ed-blue) !important; color: #fff !important; }
.link-primary { color: var(--ed-primary) !important; }

/* ---- Form controls, nav/list active states, pagination, progress ---------
   Selection/navigation state is blue (distinct from red's "primary CTA"
   meaning) so a user can tell "this is selected" from "click this to act"
   at a glance. */
.form-control:focus, .form-select:focus {
  border-color: var(--ed-blue) !important;
  box-shadow: 0 0 0 .2rem rgba(47,109,176,.15) !important;
}
.form-check-input:checked {
  background-color: var(--ed-primary) !important;
  border-color: var(--ed-primary) !important;
}
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(47,109,176,.15) !important; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background-color: var(--ed-blue) !important; color: #fff !important; }
.nav-tabs .nav-link.active { border-color: var(--ed-blue) var(--ed-blue) #fff !important; color: var(--ed-blue) !important; }
.dropdown-item.active, .dropdown-item:active { background-color: var(--ed-blue) !important; color: #fff !important; }
.list-group-item.active { background-color: var(--ed-blue) !important; border-color: var(--ed-blue) !important; }
.page-link { color: var(--ed-blue); }
.page-item.active .page-link { background-color: var(--ed-blue) !important; border-color: var(--ed-blue) !important; }
.progress-bar { background-color: var(--ed-primary) !important; }
.accordion-button:not(.collapsed) { background-color: rgba(47,109,176,.08) !important; color: var(--ed-blue-dark) !important; box-shadow: none !important; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(47,109,176,.15) !important; }

/* ---- Public site header --------------------------------------------- */
.ed-navbar {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  box-shadow: var(--ed-shadow-sm);
}
.ed-navbar .navbar-brand { font-weight: 700; color: var(--ed-navy); }
.ed-navbar .navbar-brand span { color: var(--ed-primary); }
.ed-navbar .nav-link { font-weight: 500; color: var(--ed-text); }
.ed-navbar .nav-link.active, .ed-navbar .nav-link:hover { color: var(--ed-blue); }

.ed-hero {
  background: var(--ed-gradient-hero);
  border-radius: 0 0 32px 32px;
  color: #fff;
  padding: 70px 0 100px;
  position: relative;
  overflow: hidden;
}
.ed-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.14), transparent 60%);
}
.ed-hero h1 { font-weight: 700; }
.ed-hero-card {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--ed-radius);
  backdrop-filter: blur(6px);
}

/* ---- Generic "3D" card ------------------------------------------------ */
.ed-card {
  background: var(--ed-surface);
  border: none;
  border-radius: var(--ed-radius);
  box-shadow: var(--ed-shadow-md);
  transition: transform .25s ease, box-shadow .25s ease;
}
.ed-card:hover { transform: translateY(-6px); box-shadow: var(--ed-shadow-lift); }

.ed-icon-circle {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: var(--ed-gradient);
  box-shadow: 0 8px 18px rgba(179,24,47,.3);
}

/* ---- Dashboard stat cards -------------------------------------------- */
.stat-card {
  border-radius: var(--ed-radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
  box-shadow: var(--ed-shadow-md);
  position: relative;
  overflow: hidden;
}
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; }
.stat-card .stat-label { opacity: .9; font-size: .85rem; }
/* Every stat card is a real link to its detail page (not just a display
   tile) -- an anchor needs its own reset since default link styling would
   otherwise fight the white text/no-underline look, plus a hover affordance
   so it reads as clickable. */
a.stat-card { display: block; text-decoration: none; color: #fff !important; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
a.stat-card:hover, a.stat-card:focus-visible { transform: translateY(-4px); box-shadow: var(--ed-shadow-lift); color: #fff !important; }
.stat-card i.bg-icon {
  position: absolute; right: -10px; bottom: -10px;
  font-size: 5rem; opacity: .16;
}
/* A deliberate mix — red, blue, navy, silver and amber — so a row of stat
   cards reads as a designed multi-color palette, not a wall of one hue. */
.stat-card.bg-blue   { background: linear-gradient(135deg,#4a8ed0,#1c4a80); }
.stat-card.bg-teal   { background: linear-gradient(135deg,#223a5c,#101d30); }
.stat-card.bg-purple { background: linear-gradient(135deg,#8f1424,#4a0a13); }
.stat-card.bg-orange { background: linear-gradient(135deg,#c9862f,#8a5a1e); }
.stat-card.bg-pink   { background: linear-gradient(135deg,#8a94a3,#5c6673); }
.stat-card.bg-dark   { background: linear-gradient(135deg,#b3182f,#7a0f21); }

/* ---- Dashboard shell (admin / client / doctor) ------------------------ */
.ed-shell { display: flex; min-height: 100vh; }
.ed-sidebar {
  width: 260px;
  background: var(--ed-gradient-dark);
  color: #b6b9bf;
  flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.ed-sidebar .brand { padding: 1.25rem 1.5rem; font-weight: 700; color: #fff; font-size: 1.2rem; }
.ed-sidebar .brand span { color: var(--ed-primary-light); }
.ed-sidebar .nav-link {
  color: #9aa5b5; padding: .65rem 1.5rem; border-radius: 0;
  display: flex; align-items: center; gap: .6rem; font-size: .92rem;
}
.ed-sidebar .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.ed-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.ed-sidebar .nav-link.active {
  background: rgba(47,109,176,.32);
  color: #fff;
  border-right: 3px solid var(--ed-blue-light);
}
.ed-sidebar .nav-section-title {
  padding: 1rem 1.5rem .35rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: #7d8aa0;
}

.ed-main { flex: 1; min-width: 0; }
.ed-topbar {
  background: #fff; box-shadow: var(--ed-shadow-sm);
  padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.ed-content { padding: 1.5rem; }

/* ---- Tables ------------------------------------------------------------ */
.ed-table thead { background: var(--ed-silver-2); }
.ed-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ed-muted); }
.table-card { background: #fff; border-radius: var(--ed-radius); box-shadow: var(--ed-shadow-md); overflow: hidden; }

/* ---- Product / medicine cards ------------------------------------------ */
.product-card { border-radius: var(--ed-radius); overflow: hidden; box-shadow: var(--ed-shadow-md); transition: transform .2s; background:#fff; }
.product-card:hover { transform: translateY(-5px); }
.product-card .product-img { height: 160px; object-fit: cover; width: 100%; background: var(--ed-silver-2); }
.badge-stock-low { background: var(--ed-warning) !important; }
.badge-out { background: var(--ed-danger) !important; }
.category-pill {
  border-radius: 999px; padding: .4rem 1rem; background: #fff; box-shadow: var(--ed-shadow-sm);
  font-size: .85rem; font-weight: 500; color: var(--ed-text); border: 1px solid var(--ed-border);
}
.category-pill.active, .category-pill:hover { background: var(--ed-gradient-blue); color: #fff; border-color: transparent; }

/* ---- Notification bell -------------------------------------------------- */
.notif-dot {
  position:absolute; top:2px; right:2px; width:9px; height:9px; border-radius:50%;
  background: var(--ed-danger); border: 2px solid #fff;
}

/* ---- Misc ---------------------------------------------------------------- */
.step-badge {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ed-gradient); color: #fff; font-weight: 700; font-size: .9rem;
}
.ed-empty { padding: 3rem 1rem; text-align: center; color: var(--ed-muted); }
.ed-empty i { font-size: 3rem; opacity: .3; }

@media (max-width: 991.98px) {
  .ed-sidebar { position: fixed; left: -260px; z-index: 1050; transition: left .25s ease; }
  .ed-sidebar.show { left: 0; }
}

/* ---- Messaging / chat ----------------------------------------------------- */
.chat-shell { display: flex; height: calc(100vh - 140px); min-height: 480px; background: #fff; border-radius: var(--ed-radius); box-shadow: var(--ed-shadow-md); overflow: hidden; }
.chat-list { width: 300px; flex-shrink: 0; border-right: 1px solid var(--ed-border); overflow-y: auto; }
.chat-list-item { display: block; padding: .9rem 1rem; border-bottom: 1px solid #eef0f1; text-decoration: none; color: var(--ed-text); position: relative; }
.chat-list-item:hover { background: #f7f8f9; }
.chat-list-item.active { background: rgba(47,109,176,.08); border-right: 3px solid var(--ed-blue); }
.chat-list-item .name { font-weight: 600; font-size: .9rem; }
.chat-list-item .preview { font-size: .8rem; color: var(--ed-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.chat-list-item .time { font-size: .7rem; color: var(--ed-muted); position: absolute; top: .9rem; right: 1rem; }
.chat-list-item .unread-badge { position: absolute; bottom: .8rem; right: 1rem; background: var(--ed-danger); color: #fff; border-radius: 999px; font-size: .68rem; padding: .1rem .45rem; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header { padding: .9rem 1.25rem; border-bottom: 1px solid var(--ed-border); display: flex; align-items: center; justify-content: space-between; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; background: #f7f8f9; display: flex; flex-direction: column; gap: .6rem; }
.chat-bubble-row { display: flex; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble { max-width: 65%; padding: .55rem .85rem; border-radius: 16px; font-size: .88rem; box-shadow: var(--ed-shadow-sm); background: #fff; }
.chat-bubble-row.mine .chat-bubble { background: var(--ed-gradient-blue); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble-row:not(.mine) .chat-bubble { border-bottom-left-radius: 4px; }
.chat-bubble img.chat-img { max-width: 220px; border-radius: 10px; display: block; margin-top: .25rem; }
.chat-bubble audio { max-width: 220px; margin-top: .25rem; }
.chat-file-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--ed-blue); text-decoration: underline; }
.chat-bubble-row.mine a.chat-file-link { color: #fff; }
.chat-bubble .chat-time { font-size: .68rem; opacity: .7; display: block; margin-top: .2rem; text-align: right; }
.chat-composer { padding: .75rem 1rem; border-top: 1px solid var(--ed-border); display: flex; align-items: center; gap: .5rem; background: #fff; }
.chat-composer textarea { resize: none; border-radius: 20px; }
.chat-record-btn.recording { background: var(--ed-danger) !important; color: #fff !important; animation: pulseRec 1.2s infinite; }
@keyframes pulseRec { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.chat-empty-state { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--ed-muted); }
@media (max-width: 767.98px) {
  .chat-shell { flex-direction: column; height: auto; }
  .chat-list { width: 100%; max-height: 220px; }
}

/* ---- Homepage: hero search ------------------------------------------------ */
.ed-hero-search {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.95); border-radius: 999px;
  padding: .4rem .4rem .4rem 1.1rem; box-shadow: var(--ed-shadow-md); max-width: 560px;
}
.ed-hero-search i.bi-search { color: var(--ed-muted); }
.ed-hero-search input {
  border: none; outline: none; flex: 1; font-size: .92rem; background: transparent; padding: .5rem 0;
}
.ed-hero-search .btn { border-radius: 999px; white-space: nowrap; }
@media (max-width: 400px) {
  .ed-hero-search { padding: .35rem .35rem .35rem .9rem; }
  .ed-hero-search input { font-size: .82rem; }
  .ed-hero-search .btn { padding: .5rem .9rem; font-size: .85rem; }
}

/* ---- Homepage: service / facility cards ----------------------------------- */
.service-card { transition: transform .25s ease, box-shadow .25s ease; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--ed-shadow-lift); }
.service-card h5 { transition: color .2s; }
.service-card:hover h5 { color: var(--ed-primary) !important; }

/* category-pill used as an interactive <button> filter (homepage grid) */
button.category-pill { border: none; cursor: pointer; font-family: inherit; }

/* ---- Homepage: generic responsive slider (doctors / medicines) ----------- */
.ed-slider { position: relative; padding: 0 3rem; }
.ed-slider-viewport { overflow: hidden; }
.ed-slider-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.ed-slider-item {
  flex: 0 0 calc(100% / var(--ed-per-page, 3));
  max-width: calc(100% / var(--ed-per-page, 3));
  padding: 0 .6rem; box-sizing: border-box;
}
.ed-slider-item .ed-card, .ed-slider-item .product-card { display: flex; flex-direction: column; }
.ed-slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: #fff; box-shadow: var(--ed-shadow-md); color: var(--ed-navy);
  display: flex; align-items: center; justify-content: center; z-index: 5;
  transition: background .2s, color .2s;
}
.ed-slider-nav:hover { background: var(--ed-gradient-blue); color: #fff; }
.ed-slider-nav.prev { left: 0; }
.ed-slider-nav.next { right: 0; }
.ed-slider-dots { display: flex; justify-content: center; gap: .4rem; margin-top: 1.25rem; }
.ed-slider-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: none; background: var(--ed-silver); padding: 0; cursor: pointer;
  transition: background .2s, transform .2s;
}
.ed-slider-dots button.active { background: var(--ed-blue); transform: scale(1.3); }
@media (max-width: 575.98px) {
  .ed-slider { padding: 0 2.25rem; }
  .ed-slider-nav { width: 34px; height: 34px; }
}

/* Doctor slider card extras */
.doctor-slide-card { position: relative; }
.badge-available-today {
  position: absolute; top: .6rem; right: .6rem; background: var(--ed-accent); color: #fff;
  font-size: .65rem; font-weight: 600; padding: .25rem .55rem; border-radius: 999px;
}

/* ---- Doctor availability: date strip + slot grid (client/doctor_profile.php) */
.ed-date-strip {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .35rem;
  scroll-snap-type: x proximity;
}
.ed-date-strip::-webkit-scrollbar { height: 5px; }
.ed-date-strip::-webkit-scrollbar-thumb { background: #dde0e3; border-radius: 999px; }
.ed-date-pill {
  flex: 0 0 auto; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  width: 60px; padding: .5rem .3rem .6rem; border-radius: 14px; border: 1px solid var(--ed-border);
  background: #fff; cursor: pointer; position: relative; transition: border-color .15s, background .15s;
  min-height: 44px;
}
.ed-date-pill:hover { border-color: var(--ed-blue); }
.ed-date-pill.active { border-color: var(--ed-blue); background: rgba(47,109,176,.08); box-shadow: 0 4px 12px rgba(47,109,176,.16); }
.ed-date-pill-muted { opacity: .55; }
.ed-date-pill-dow { font-size: .68rem; text-transform: uppercase; color: var(--ed-muted); letter-spacing: .03em; }
.ed-date-pill-num { font-size: 1.15rem; font-weight: 700; line-height: 1.1; }
.ed-date-pill-mon { font-size: .68rem; color: var(--ed-muted); }
.ed-date-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: .2rem; }
.ed-date-dot-available { background: var(--ed-accent); }
.ed-date-dot-partial { background: var(--ed-warning); }
.ed-date-dot-full { background: var(--ed-danger); }
.ed-date-dot-leave { background: var(--ed-navy); }
.ed-date-dot-reserved { background: var(--ed-muted); }
.ed-date-dot-closed { background: var(--ed-silver); }

.ed-slot-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.ed-slot-btn {
  border: 1px solid var(--ed-border); background: #fff; border-radius: 10px;
  padding: .5rem .8rem; font-size: .82rem; font-weight: 500; min-height: 44px;
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.ed-slot-btn:hover { border-color: var(--ed-blue); color: var(--ed-blue); }
.ed-slot-btn.active { background: var(--ed-gradient-blue); border-color: transparent; color: #fff; }
.ed-slot-btn-taken { background: var(--ed-silver-2); color: #8a94a3; text-decoration: line-through; cursor: not-allowed; }
.ed-slot-btn-taken:hover { border-color: var(--ed-border); color: #8a94a3; }
.ed-slot-btn-booked {
  background: var(--ed-silver-2); border-color: var(--ed-border); color: var(--ed-navy); line-height: 1.25; text-align: center;
}
.ed-slot-btn-booked small { display: block; font-weight: 400; opacity: .85; font-size: .7rem; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-slot-btn-booked:hover { border-color: var(--ed-border); color: var(--ed-navy); }
/* Doctor/admin-reserved slot -- distinct from a patient-booked one: a soft
   blue tint (blue = navigation/administrative state elsewhere in this theme)
   with a lock icon, so patients and staff can tell "reserved" apart from
   "someone already booked this" at a glance. */
.ed-slot-btn-reserved {
  background: rgba(47,109,176,.09); border-color: rgba(47,109,176,.35); color: var(--ed-blue-dark);
  cursor: not-allowed; font-weight: 600;
}
.ed-slot-btn-reserved:hover { border-color: rgba(47,109,176,.35); color: var(--ed-blue-dark); }
button.ed-slot-btn-reserved[data-cancel] { cursor: pointer; }
button.ed-slot-btn-reserved[data-cancel]:hover { background: rgba(47,109,176,.18); }

.ed-selection-summary {
  background: #f7f8f9; border-radius: 12px; padding: .7rem .9rem; font-size: .88rem;
}

/* ---- Auth screens (client / doctor / admin login) ----------------------- */
.ed-auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
  padding-top: max(2rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow: hidden;
}
.ed-auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: .3;
  pointer-events: none;
}
.ed-auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,.98);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(16,29,48,.32);
  padding: 2.25rem 1.75rem;
  animation: edAuthIn .5s cubic-bezier(.16,1,.3,1);
}
@keyframes edAuthIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.ed-auth-icon {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff;
  background: var(--ed-gradient);
  box-shadow: 0 12px 26px rgba(179,24,47,.32);
  animation: edAuthPop .6s cubic-bezier(.34,1.56,.64,1) .1s both;
}
@keyframes edAuthPop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ed-auth-switch {
  display: flex; gap: .5rem; justify-content: center; margin-bottom: 1.5rem;
  position: relative; z-index: 1; flex-wrap: wrap;
}
.ed-auth-switch a {
  font-size: .76rem; font-weight: 600; padding: .5rem 1rem; border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.32);
  display: inline-flex; align-items: center; gap: .35rem; min-height: 36px;
}
.ed-auth-switch a.active { background: #fff; color: var(--ed-navy); border-color: #fff; }
.ed-auth-input-group { position: relative; }
.ed-auth-input-group i.field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ed-muted); font-size: 1rem; pointer-events: none;
}
.ed-auth-input-group input { padding-left: 2.6rem; }
.ed-auth-input-group input.has-toggle { padding-right: 2.6rem; }
.ed-auth-input-group .toggle-pass {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--ed-muted);
  width: 36px; height: 36px; border-radius: 50%;
}
.ed-auth-input-group .toggle-pass:active { background: var(--ed-bg); }

/* ---- Homepage: login portal cards ----------------------------------------- */
.portal-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--ed-radius); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; transition: transform .25s ease, background .25s ease;
}
.portal-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.1); }
.portal-feature-list { list-style: none; padding: 0; margin: 0; }
.portal-feature-list li {
  color: #cfd1d4; font-size: .85rem; padding: .3rem 0; display: flex; align-items: flex-start; gap: .5rem;
}
.portal-feature-list li i { color: var(--ed-accent); margin-top: .15rem; }
