/* St. Aurelia Hospital — base styles, written mobile-first.
   Palette: deep teal, warm off-white, soft gold accent. */

:root {
    --ink: #16302b;
    --teal: #0e5e55;
    --teal-dark: #0a453e;
    --paper: #f7f4ec;
    --gold: #d9a441;
    --error: #b23a48;
    --success: #2e6e4e;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
}

h1, .brand-mark {
    font-family: 'Fraunces', Georgia, serif;
}

/* ---------- Auth pages ---------- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        linear-gradient(rgba(14, 94, 85, 0.92), rgba(10, 69, 62, 0.92)),
        /* replace with a real photo of your hospital for production */
        radial-gradient(circle at 20% 20%, #1a7a6e, #0a453e);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 50px rgba(10, 40, 36, 0.35);
}

.brand-mark {
    margin: 0 0 0.25rem;
    color: var(--teal);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.auth-card h1 {
    margin: 0;
    font-size: 1.75rem;
}

.muted { color: #5c6b67; margin-top: 0.25rem; }

.auth-card label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 1.1rem 0 0.3rem;
}

.optional { font-weight: 400; color: #8a9693; }

.auth-card input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
    background: #fdfdfb;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 94, 85, 0.15);
}

.hint { font-size: 0.8rem; color: #8a9693; margin: 0.25rem 0 0; }

.btn-primary {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:active { transform: scale(0.98); }

.form-error, .form-success {
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 1rem 0 0;
}

.form-error {
    background: #f9e8ea;
    color: var(--error);
    border: 1px solid #ecc4ca;
}

.form-success {
    background: #e7f2ec;
    color: var(--success);
    border: 1px solid #c4ddd0;
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    margin: 1.25rem 0 0;
}

.auth-switch a { color: var(--teal); font-weight: 600; }

@media (min-width: 640px) {
    .auth-card { padding: 2.5rem 2.25rem; }
}

/* ---------- Shared page shell ---------- */

.site-header {
    background: var(--teal-dark);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-family: 'Fraunces', Georgia, serif;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
}

/* Hamburger — hidden on desktop, shown on mobile */
.nav-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.site-nav {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--teal-dark);
    padding: 0.5rem 1.25rem 1rem;
}

.site-nav.open { display: flex; }

.site-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.55rem 0;
    font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.active { color: #fff; }

.nav-signout {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 0.4rem;
    padding-top: 0.8rem !important;
}

.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 3rem;
}

.site-footer {
    text-align: center;
    color: #7a8884;
    font-size: 0.85rem;
    padding: 1.5rem;
    border-top: 1px solid #e4e0d4;
}

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .site-nav {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        position: static;
        background: none;
        padding: 0;
    }
    .site-nav a { padding: 0; }
    .nav-signout { border: none; margin: 0; padding: 0.35rem 0.8rem !important; }
}

/* ---------- Dashboard ---------- */

.page-head h1 { font-size: 1.6rem; margin: 0 0 0.15rem; }

.quick-actions {
    display: grid;
    gap: 0.9rem;
    margin: 1.5rem 0;
}

.action-card {
    display: block;
    background: #fff;
    border: 1px solid #e4e0d4;
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.action-card:hover {
    border-color: var(--teal);
    box-shadow: 0 6px 18px rgba(14, 94, 85, 0.12);
}

.action-card strong { display: block; margin: 0.35rem 0 0.15rem; }
.action-card span:not(.action-icon) { font-size: 0.88rem; color: #5c6b67; }
.action-icon { font-size: 1.3rem; color: var(--teal); }

.dash-grid {
    display: grid;
    gap: 0.9rem;
}

.panel {
    background: #fff;
    border: 1px solid #e4e0d4;
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
}

.panel h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.15rem;
    margin: 0;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.panel-link { font-size: 0.85rem; color: var(--teal); font-weight: 600; }

.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid #eeeae0;
}

.item-list li:first-child { border-top: none; }
.item-list strong { display: block; font-size: 0.95rem; }
.item-list time { font-size: 0.85rem; color: #5c6b67; white-space: nowrap; }

.item-sub { font-size: 0.82rem; color: #8a9693; display: block; }
.item-right { text-align: right; }

.status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    margin-bottom: 0.15rem;
}

.status-pending    { background: #fdf3dd; color: #8a6d1d; }
.status-dispatched { background: #e2eefc; color: #245a8f; }
.status-delivered  { background: #e7f2ec; color: #2e6e4e; }
.status-cancelled  { background: #f9e8ea; color: #b23a48; }

.empty-state {
    color: #8a9693;
    font-size: 0.92rem;
    margin: 0.75rem 0 0.25rem;
}

.empty-state a { color: var(--teal); }

.health-facts { margin: 0.9rem 0 0.6rem; }
.health-facts div { display: flex; justify-content: space-between; padding: 0.45rem 0; border-top: 1px solid #eeeae0; }
.health-facts dt { color: #5c6b67; font-size: 0.9rem; }
.health-facts dd { margin: 0; font-weight: 600; font-size: 0.92rem; }

@media (min-width: 768px) {
    .quick-actions { grid-template-columns: repeat(3, 1fr); }
    .dash-grid { grid-template-columns: 1fr 1fr; }
    .panel-health { grid-column: 1 / -1; }
    .page-head h1 { font-size: 2rem; }
}

/* ---------- Pharmacy / cart / orders ---------- */

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.25rem 0;
}

.search-bar input[type="search"],
.search-bar select {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
    background: #fdfdfb;
    flex: 1 1 200px;
}

.btn-inline {
    display: inline-block;
    width: auto;
    margin-top: 0;
    padding: 0.7rem 1.4rem;
}

.btn-secondary {
    padding: 0.6rem 1.1rem;
    border: none;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-secondary:hover { background: var(--teal-dark); }

.btn-small {
    padding: 0.35rem 0.7rem;
    border: 1px solid #cfd8d5;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.btn-danger { color: var(--error); border-color: #ecc4ca; }
.btn-danger:hover { background: #f9e8ea; }

.btn-ghost {
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
}

.drug-grid {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.25rem;
}

.drug-card {
    background: #fff;
    border: 1px solid #e4e0d4;
    border-radius: var(--radius);
    padding: 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
}

.drug-card h3 {
    font-size: 1rem;
    margin: 0.5rem 0 0.25rem;
}

.drug-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.drug-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a9693;
}

.rx-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    background: #fdf3dd;
    color: #8a6d1d;
    margin-left: 0.3rem;
}

.drug-desc {
    font-size: 0.88rem;
    color: #5c6b67;
    margin: 0 0 0.6rem;
    flex: 1;
}

.drug-price {
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0 0 0.15rem;
}

.qty-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.qty-row input[type="number"],
.qty-update input[type="number"] {
    width: 64px;
    padding: 0.5rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
}

.qty-update {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.cart-table th {
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a9693;
    padding: 0.5rem 0.6rem 0.7rem;
    border-bottom: 2px solid #eeeae0;
}

.cart-table td {
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid #eeeae0;
    vertical-align: middle;
}

.cart-table tfoot td { border-bottom: none; }

.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.rx-note {
    background: #fdf3dd;
    border: 1px solid #ecd9a8;
    color: #6d5514;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.order-card { margin-bottom: 0.9rem; }
.order-card .item-list { margin-top: 0.4rem; }

@media (min-width: 768px) {
    .drug-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Consultation forms ---------- */

.form-panel { max-width: 640px; }

.form-row { margin-top: 1.1rem; }
.form-row:first-child { margin-top: 0; }

.form-row label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
    background: #fdfdfb;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(14, 94, 85, 0.15);
}

.form-panel .btn-primary { margin-top: 1.5rem; }

@media (min-width: 640px) {
    .form-row-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

.consult-reason {
    font-size: 0.92rem;
    color: #5c6b67;
    margin: 0.4rem 0 0.6rem;
}

.cancel-form { margin-top: 0.5rem; }

/* Consultation status badges */
.status-booked    { background: #e2eefc; color: #245a8f; }
.status-completed { background: #e7f2ec; color: #2e6e4e; }

/* ---------- Admin ---------- */

.admin-header { background: #33261a; }
.admin-header .site-nav a:hover,
.admin-header .site-nav a.active { color: var(--gold); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: #fff;
    border: 1px solid #e4e0d4;
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
}

.stat-num {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--teal);
}

.stat-label { font-size: 0.82rem; color: #5c6b67; }

.admin-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.admin-actions a { text-decoration: none; }
.admin-actions form { margin: 0; }

.checkbox-row {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.4rem;
}
.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin: 0;
}
.checkbox-row input[type="checkbox"] { width: auto; }

.status-form,
.notes-form { margin-top: 0.75rem; }

.status-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.status-form select,
.notes-form select,
.notes-form textarea {
    padding: 0.5rem 0.7rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
    background: #fdfdfb;
}

.notes-form textarea { width: 100%; }
.notes-form-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Admin panel ---------- */

.stat-card strong {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2rem;
    color: var(--teal);
    margin: 0.2rem 0;
}

.stock-low { color: var(--error); font-weight: 700; }

.btn-link {
    display: inline-block;
    text-decoration: none;
    color: var(--teal);
    border-color: #cfd8d5;
    margin-right: 0.3rem;
}

.checkbox-row {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.55rem;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] { width: auto; }

.status-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

.status-form select,
.notes-form select {
    padding: 0.45rem 0.6rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
    font-size: 0.88rem;
}

.notes-form { margin-top: 0.6rem; }
.notes-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
    font-size: 0.9rem;
    background: #fdfdfb;
}
.notes-form-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

/* ---------- Public homepage ---------- */

.public-header { background: rgba(10, 69, 62, 0.97); }

.nav-cta {
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    padding: 0.4rem 0.9rem !important;
}

@media (min-width: 768px) {
    .nav-cta { border-radius: 20px; }
}

.hero {
    background:
        linear-gradient(rgba(10, 69, 62, 0.88), rgba(10, 69, 62, 0.88)),
        radial-gradient(circle at 30% 20%, #1a7a6e, #0a453e);
    color: #fff;
    padding: 4rem 1.25rem 3.5rem;
}

.hero-inner { max-width: 720px; margin: 0 auto; }

.hero h1 {
    font-size: 2.1rem;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.hero p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.75rem;
}

.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.btn-ghost-light { color: #fff; align-self: center; }

.hero .btn-primary { background: var(--gold); color: var(--ink); }
.hero .btn-primary:hover { background: #c8932f; }

@media (min-width: 768px) {
    .hero { padding: 6rem 1.25rem 5rem; }
    .hero h1 { font-size: 2.9rem; }
}

.trust-strip {
    max-width: 900px;
    margin: -2rem auto 0;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.trust-strip div {
    background: #fff;
    border: 1px solid #e4e0d4;
    border-radius: var(--radius);
    padding: 1rem 0.8rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(10, 40, 36, 0.08);
}

.trust-strip strong {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    color: var(--teal);
}

.trust-strip span { font-size: 0.78rem; color: #5c6b67; }

.content-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3.5rem 1.25rem 1rem;
}

.content-section h2 {
    font-size: 1.7rem;
    margin: 0 0 1.25rem;
}

.services-grid {
    display: grid;
    gap: 0.9rem;
}

.service-card {
    background: #fff;
    border: 1px solid #e4e0d4;
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
}

.service-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.service-card p { margin: 0; font-size: 0.92rem; color: #5c6b67; }
.doctor-specialty { color: var(--teal) !important; font-weight: 600; font-size: 0.85rem !important; }

.alt-section { background: #efece2; max-width: none; }
.alt-section > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.1rem;
}

.steps-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.steps-list p { margin: 0.15rem 0 0; font-size: 0.92rem; color: #5c6b67; }

.step-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-section {
    background: var(--teal-dark);
    color: #fff;
    text-align: center;
    padding: 3.5rem 1.25rem;
    margin-top: 3rem;
}

.cta-section h2 { font-size: 1.8rem; margin: 0 0 0.5rem; }
.cta-section p { color: rgba(255, 255, 255, 0.8); margin: 0 0 1.5rem; }
.cta-section .btn-primary { background: var(--gold); color: var(--ink); }
.cta-section .btn-primary:hover { background: #c8932f; }

.footer-grid {
    max-width: 1100px;
    margin: 0 auto 1.25rem;
    display: grid;
    gap: 1.25rem;
    text-align: left;
}

.footer-grid p { margin: 0.2rem 0; }
.footer-grid a { color: var(--teal); }

@media (min-width: 768px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .steps-list { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Order confirmation ---------- */

.success-hero { text-align: center; padding: 1.5rem 0 2rem; }

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e7f2ec;
    color: var(--success);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.success-hero h1 { margin: 0 0 0.4rem; font-size: 1.6rem; }
.success-hero p { color: #5c6b67; max-width: 480px; margin: 0 auto; }

/* ---------- Public pharmacy page (custom classes) ---------- */

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand span {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.nav-links { display: flex; gap: 1.4rem; }
.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.6rem;
}

.hero-note {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 480px;
}

.main-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.catalog-header h2 { margin: 0 0 0.2rem; }
.catalog-header p { margin: 0; color: #5c6b67; font-size: 0.92rem; }

.search-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.search-form input[type="search"] {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #cfd8d5;
    border-radius: 8px;
    font: inherit;
    background: #fdfdfb;
    min-width: 220px;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.15rem;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: #eef2f1; color: var(--ink); }
.btn-secondary:hover { background: #e0e6e4; }

.result-count { color: #5c6b67; font-size: 0.9rem; margin: 0 0 1rem; }

.notice {
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
    margin-top: 1.5rem;
}
.notice-info { background: #e8f0fa; border: 1px solid #c3d7ef; color: #24506e; }
.notice-error { background: #f9e8ea; border: 1px solid #ecc4ca; color: var(--error); }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    border: 1.5px dashed #cfd8d5;
    border-radius: var(--radius);
}
.empty-state h3 { margin: 0 0 0.4rem; }
.empty-state p { color: #5c6b67; margin: 0 0 1rem; }

/* image cards inside the existing grid */
.drug-card .drug-image { margin-bottom: 0.6rem; }
.drug-card .drug-image img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.drug-image-placeholder {
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f1;
    color: #8a9693;
    font-size: 0.82rem;
    border-radius: 8px;
}

.drug-description {
    font-size: 0.88rem;
    color: #5c6b67;
    margin: 0 0 0.8rem;
    flex: 1;
}

.drug-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }

.meta-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
    background: #eef2f1;
    color: #5c6b67;
}
.meta-badge.prescription { background: #fdf3dd; color: #8a6d1d; }
.meta-badge.in-stock { background: #e7f2ec; color: #2e6e4e; }
.meta-badge.out-of-stock { background: #f9e8ea; color: #b23a48; }

.drug-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    text-align: left;
}
.footer-inner p { margin: 0.2rem 0; }
.footer-inner a { color: var(--teal); }

@media (max-width: 640px) {
    .nav-container { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .brand span { display: none; }
    .catalog-header { flex-direction: column; align-items: stretch; }
    .search-form input[type="search"] { flex: 1; min-width: 0; }
}

/* ---------- Professional footer ---------- */

.newsletter-strip {
    background: var(--teal);
    color: #fff;
    padding: 2.25rem 1.25rem;
}

.newsletter-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.newsletter-inner h2 {
    font-size: 1.4rem;
    margin: 0 0 0.25rem;
}

.newsletter-inner p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
}

.newsletter-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.newsletter-form input[type="email"] {
    padding: 0.7rem 0.95rem;
    border: none;
    border-radius: 8px;
    font: inherit;
    min-width: 240px;
    background: #fff;
}

.btn-newsletter {
    padding: 0.7rem 1.3rem;
    border: none;
    border-radius: 8px;
    background: var(--gold);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-newsletter:hover { background: #c8932f; }

.pro-footer {
    background: #082e2a;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.pro-footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.25rem 2rem;
    display: grid;
    gap: 2rem;
}

.footer-col h3 {
    color: #fff;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.05rem;
    margin: 0 0 1rem;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--gold); }

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    margin-bottom: 0.9rem;
}

.footer-logo { height: 44px; width: auto; }

.footer-logo-row strong {
    display: block;
    color: #fff;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.05rem;
}

.footer-logo-row em {
    font-style: normal;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.footer-brand p { margin: 0 0 1rem; line-height: 1.6; }

.footer-social { display: flex; gap: 0.5rem; }

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.footer-social a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
}

.footer-contact li span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 0.1rem;
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.footer-bottom p { margin: 0; }

.footer-legal a { color: rgba(255, 255, 255, 0.6); text-decoration: none; }
.footer-legal a:hover { color: var(--gold); }

@media (min-width: 900px) {
    .pro-footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}

/* ---------- Responsiveness & accessibility patch ---------- */

/* 1. Wide tables: scroll inside their card instead of breaking the page */
.panel { overflow-x: auto; }
.cart-table { min-width: 560px; }
@media (max-width: 640px) {
    .cart-table { font-size: 0.85rem; }
    .cart-table th, .cart-table td { padding: 0.5rem 0.4rem; }
}

/* 2. Let long dates wrap on very small screens instead of overflowing */
@media (max-width: 480px) {
    .item-list time { white-space: normal; text-align: right; }
    .item-list li { align-items: flex-start; }
}

/* 3. Trust strip: two-up on small phones, stacked on very narrow ones */
@media (max-width: 480px) {
    .trust-strip { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
    .trust-strip div { padding: 0.7rem 0.4rem; }
    .trust-strip strong { font-size: 1.15rem; }
    .trust-strip span { font-size: 0.68rem; }
}
@media (max-width: 360px) {
    .trust-strip { grid-template-columns: 1fr; }
}

/* 4. Visible keyboard focus (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2.5px solid var(--gold);
    outline-offset: 2px;
}

/* 5. Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* 6. Comfortable tap targets on mobile nav links */
@media (max-width: 767px) {
    .site-nav a { min-height: 44px; display: flex; align-items: center; }
    .footer-social a { width: 40px; height: 40px; }
}

/* pharmacy image cards: add-to-cart spacing */
.drug-card .add-form { margin-top: auto; }
.drug-card .qty-row { margin-top: 0.7rem; }
.drug-card-top { margin-top: 0.6rem; }

/* ---------- Footer v3: icon-driven contact list ---------- */

.footer-contact li {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
}

.footer-contact svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: var(--gold);
}

.footer-social a svg {
    width: 17px;
    height: 17px;
}

.footer-social a {
    border-radius: 50%;
    font-size: 0; /* hide any fallback text, icon-only buttons */
}

/* ---------- Dashboard: real SVG icons instead of emoji ---------- */

.action-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
    background: #e7f2ec;
    color: var(--teal);
    border-radius: 10px;
    font-size: 0; /* hide old emoji glyphs if any remain */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-icon svg {
    width: 100%;
    height: 100%;
}