/* ============================================================
   PharmConnect — design system
   An apothecary-label aesthetic: pharmacy green, warm gold,
   paper backgrounds, structured rectangular components instead
   of the generic rounded "SaaS card kit" look.
   ============================================================ */

:root {
  --paper:      #F5F7F1;
  --paper-deep: #ECEFE2;
  --ink:        #16281F;
  --ink-soft:   #4B5A50;
  --green:      #1F6F4E;
  --green-dark: #164F38;
  --green-deep: #0E3B29;
  --gold:       #D9A441;
  --gold-dark:  #B9852B;
  --clay:       #C1483B;
  --clay-dark:  #A03A2F;
  --line:       #D9DFD2;
  --white:      #FFFFFF;
  --radius:     6px;
  --radius-lg:  10px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--green-deep);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }

p { max-width: 62ch; }
table p, td p { max-width: none; }

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2.5px solid var(--gold-dark);
  outline-offset: 2px;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top nav ---------- */
.navbar {
  background: var(--paper);
  border-bottom: 1.5px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand {
  font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 600;
  font-size: 1.4rem; color: var(--green-deep); display: flex; align-items: center; gap: 9px;
}
.brand .dot {
  width: 16px; height: 16px; flex-shrink: 0; position: relative; display: inline-block;
}
.brand .dot::before, .brand .dot::after {
  content: ''; position: absolute; background: var(--gold);
}
.brand .dot::before { top: 6px; left: 0; width: 16px; height: 4px; }
.brand .dot::after { top: 0; left: 6px; width: 4px; height: 16px; }
.nav-links { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink); font-weight: 500; font-size: .93rem; text-decoration: none;
  padding-bottom: 3px; border-bottom: 1.5px solid transparent;
}
.nav-links a:hover { color: var(--green-dark); border-bottom-color: var(--gold); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: .92rem; border: 1.5px solid transparent; cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.btn-orange { background: var(--gold); color: var(--green-deep); border-color: var(--gold); }
.btn-orange:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--green-deep); }
.btn-violet { background: var(--green-deep); color: var(--white); border-color: var(--green-deep); }
.btn-violet:hover { background: #08281B; color: var(--white); }
.btn-outline { background: transparent; border: 1.5px solid var(--green); color: var(--green-dark); }
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-sm { padding: 6px 14px; font-size: .82rem; }
.btn-block { width: 100%; text-align: center; }

/* ---------- Hero ---------- */
.hero {
  background: var(--paper-deep);
  border-bottom: 1.5px solid var(--line);
  padding: 64px 0 56px;
}
.hero .container { display: flex; align-items: center; gap: 56px; }
.hero-copy { flex: 1.1; min-width: 280px; }
.hero h1 { font-size: 2.7rem; max-width: 14ch; }
.hero p { font-size: 1.08rem; color: var(--ink-soft); margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats .value { font-family: 'Fraunces', serif; font-style: italic; font-size: 1.9rem; font-weight: 600; color: var(--green-deep); }
.hero-stats .label { font-size: .82rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Hero ID-card illustration ---------- */
.hero-art { flex: 1; min-width: 240px; display: flex; justify-content: center; }
.rx-card {
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; width: 260px; box-shadow: 0 18px 34px rgba(14,59,41,0.14);
  transform: rotate(-3deg); position: relative;
}
.rx-card::before {
  content: '+'; position: absolute; top: -14px; right: -14px; width: 34px; height: 34px;
  background: var(--green); color: var(--white); border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700;
  border: 3px solid var(--paper);
}
.rx-card .rx-photo {
  width: 56px; height: 56px; border-radius: 50%; background: var(--paper-deep);
  border: 2px solid var(--green); margin-bottom: 12px;
}
.rx-card .rx-line { height: 9px; background: var(--line); border-radius: 3px; margin-bottom: 8px; }
.rx-card .rx-line.short { width: 55%; }
.rx-card .rx-line.gold { background: var(--gold); width: 40%; height: 7px; margin-top: 14px; }
.rx-card .rx-tag {
  display: inline-block; margin-top: 14px; font-size: .68rem; font-weight: 700;
  color: var(--green-dark); border: 1px solid var(--green); border-radius: 3px; padding: 3px 8px;
}

/* ---------- Sections ---------- */
.section { padding: 52px 0; }
.section-title { font-size: 1.6rem; }
.section-sub { color: var(--ink-soft); margin-bottom: 30px; max-width: 60ch; }

/* ---------- Cards (left-accent-bar, not uniform shadow boxes) ---------- */
.card {
  background: var(--white); border: 1.5px solid var(--line); border-left: 4px solid var(--green);
  border-radius: 3px; padding: 22px;
}
.card.orange  { border-left-color: var(--gold); }
.card.violet  { border-left-color: var(--green-deep); }
.card.pink    { border-left-color: var(--clay); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero .container { flex-direction: column; }
  .hero h1 { max-width: none; }
}

/* ---------- Pharmacist / listing cards ---------- */
.profile-card { display: flex; gap: 18px; align-items: flex-start; }
.avatar {
  width: 62px; height: 62px; border-radius: 50%; background: var(--paper-deep);
  border: 2px solid var(--green); display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; color: var(--green-dark); font-size: 1.25rem;
  flex-shrink: 0; overflow: hidden;
}
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600;
  padding: 3px 10px; border-radius: 3px; border: 1px solid transparent;
}
.badge.verified   { background: #E7F3EC; color: var(--green-dark); border-color: #BFDECB; }
.badge.pending    { background: #FBF0DC; color: var(--gold-dark); border-color: #F0D9A4; }
.badge.unverified { background: var(--paper-deep); color: var(--ink-soft); border-color: var(--line); }
.tag {
  display: inline-block; font-size: .74rem; padding: 3px 9px; border-radius: 3px;
  background: var(--paper-deep); color: var(--green-dark); border-left: 2px solid var(--green);
  margin: 2px 5px 2px 0; font-weight: 500;
}
.rating { color: var(--gold-dark); font-weight: 700; }
.meta-row { color: var(--ink-soft); font-size: .88rem; margin: 4px 0; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; max-width: 560px; margin: 40px auto;
}
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .88rem; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=file], select, textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: var(--radius);
  font-size: .95rem; font-family: inherit; background: var(--white); color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.checkbox-row input { width: auto; }
.form-note { color: var(--ink-soft); font-size: .82rem; margin-top: 4px; }
fieldset { border: none; border-top: 1.5px solid var(--line); padding: 18px 0 0; margin: 22px 0 0; }
legend { font-family: 'Fraunces', serif; font-style: italic; font-weight: 600; font-size: 1.05rem; padding: 0 0 6px; color: var(--green-deep); }

/* ---------- Alerts ---------- */
.alert { padding: 12px 18px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 500; font-size: .9rem; border: 1.5px solid; }
.alert-success { background: #E7F3EC; color: var(--green-dark); border-color: #BFDECB; }
.alert-error   { background: #FBEAE7; color: var(--clay-dark); border-color: #EFC4BC; }
.alert-info    { background: #EAF1FB; color: #2E5CA8; border-color: #C4D8F0; }

/* ---------- Filters bar ---------- */
.filters {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; background: var(--white);
  padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius-lg);
}
.filters select, .filters input { width: auto; min-width: 160px; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
th { background: var(--paper-deep); color: var(--green-deep); font-weight: 700; font-family: 'IBM Plex Sans', sans-serif; }
tr:last-child td { border-bottom: none; }

/* ---------- Footer ---------- */
footer { background: var(--green-deep); color: #C9DED2; padding: 38px 0; margin-top: 64px; font-size: .87rem; border-top: 4px solid var(--gold); }
footer p { max-width: 72ch; }
footer a { color: var(--gold); }
footer strong { color: var(--white); font-family: 'Fraunces', serif; font-style: italic; font-size: 1.05rem; }

/* ---------- Pill nav (category tabs) ---------- */
.pill-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.pill-nav a {
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 7px 15px; font-weight: 600; font-size: .85rem; color: var(--ink);
}
.pill-nav a:hover { text-decoration: none; border-color: var(--green); }
.pill-nav a.active { background: var(--green); color: var(--white); border-color: var(--green); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
.list-gap { display: flex; flex-direction: column; gap: 16px; }
