:root {
    --bg: #fff7ef;
    --panel: #ffffff;
    --panel-soft: #fff0d6;
    --text: #2e241d;
    --muted: #756150;
    --line: #ead9c2;
    --accent: #f7a81b;
    --accent-deep: #d97f00;
    --shadow: 0 18px 40px rgba(116, 82, 24, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'><g transform='translate(40,80) rotate(-20)'><ellipse cx='20' cy='38' rx='14' ry='10' fill='%23f7a81b' opacity='0.18'/><circle cx='4' cy='22' r='6' fill='%23f7a81b' opacity='0.18'/><circle cx='14' cy='13' r='6' fill='%23f7a81b' opacity='0.18'/><circle cx='26' cy='13' r='6' fill='%23f7a81b' opacity='0.18'/><circle cx='36' cy='22' r='6' fill='%23f7a81b' opacity='0.18'/></g><g transform='translate(110,30) rotate(15)'><ellipse cx='20' cy='38' rx='14' ry='10' fill='%23f7a81b' opacity='0.13'/><circle cx='4' cy='22' r='6' fill='%23f7a81b' opacity='0.13'/><circle cx='14' cy='13' r='6' fill='%23f7a81b' opacity='0.13'/><circle cx='26' cy='13' r='6' fill='%23f7a81b' opacity='0.13'/><circle cx='36' cy='22' r='6' fill='%23f7a81b' opacity='0.13'/></g></svg>") repeat,
        radial-gradient(circle at top left, rgba(247, 168, 27, 0.18), transparent 25%),
        linear-gradient(180deg, #fffaf4 0%, var(--bg) 100%);
    background-size: 160px 160px, auto, auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 18px;
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    font-family: "DM Serif Display", serif;
    font-size: 1.35rem;
}

.brand-logo {
    height: 58px;
    width: auto;
    display: block;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
}

.nav-notification {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    color: var(--text);
}

.nav-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.nav-links a.active,
.nav-links a:hover {
    background: rgba(247, 168, 27, 0.12);
    color: var(--accent-deep);
}

.user-menu {
    position: relative;
}

.umt-avatar {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.umt-avatar:hover {
    background: var(--accent-deep);
}

.user-dropdown {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(46, 36, 29, 0.18);
    min-width: 260px;
    flex-direction: column;
    overflow: hidden;
}

.udrop-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px 16px;
}

.udrop-header-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.udrop-header-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.udrop-header-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.udrop-header-role {
    font-size: 0.78rem;
    color: var(--muted);
}

.udrop-header-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-deep);
    margin-top: 4px;
    display: inline-block;
}

.udrop-header-link:hover {
    text-decoration: underline;
}

.udrop-divider {
    height: 1px;
    background: var(--line);
}

.udrop-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: background 0.12s;
}

.udrop-item:hover {
    background: var(--panel-soft);
}

.udrop-icon {
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
}

.udrop-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
}

.udrop-logout .udrop-icon {
    color: #b91c1c;
}

.udrop-logout {
    color: #b91c1c;
}

.udrop-logout:hover {
    background: rgba(220, 38, 38, 0.06);
}

.page-content {
    display: grid;
    gap: 24px;
}

.hero,
.split-section,
.dashboard-banner,
.panel,
.auth-card,
.sidebar-card,
.hero-pet-card,
.success-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    padding: 28px;
    background:
        linear-gradient(130deg, rgba(255, 238, 207, 0.9), rgba(255, 255, 255, 0.96)),
        var(--panel);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--accent-deep);
    font-weight: 800;
}

h1,
h2,
h3 {
    margin: 0 0 12px;
}

h1 {
    font-family: "DM Serif Display", serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
}

.hero-text,
.panel p,
.split-section p,
.empty-state {
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions,
.inline-actions,
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
}

.button:hover {
    background: var(--accent-deep);
}

.button-secondary {
    background: #fff;
    color: var(--accent-deep);
    border: 1px solid rgba(217, 127, 0, 0.25);
}

.button-google {
    background: #fff;
    color: #202124;
    border: 1px solid #dadce0;
    box-shadow: none;
}

.button-google:hover {
    background: #f8f9fa;
    color: #202124;
}

.button-small {
    padding: 9px 14px;
    font-size: 0.88rem;
}

.hero-card {
    display: flex;
    align-items: center;
}

.hero-pet-card {
    width: 100%;
    padding: 24px;
    background: linear-gradient(180deg, rgba(247, 168, 27, 0.14), rgba(255, 255, 255, 0.95));
}

.hero-badge,
.pill-muted,
.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-badge,
.status-pill {
    background: rgba(247, 168, 27, 0.14);
    color: var(--accent-deep);
}

.status-pill.status-pill-pending {
    background: rgba(117, 97, 80, 0.12);
    color: #6b5744;
}

.status-pill.status-pill-approved {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.status-pill.status-pill-checked-in {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

.status-pill.status-pill-completed {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.status-pill.status-pill-cancelled {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.status-pill.status-pill-low-stock {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

.pill-muted {
    background: var(--panel-soft);
    color: var(--muted);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.stat-grid.compact {
    min-width: min(420px, 100%);
}

.stat-grid > div {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.stat-grid strong,
.mini-card strong {
    display: block;
    font-size: 1.1rem;
}

.stat-grid span,
.mini-card span {
    color: var(--muted);
    font-size: 0.88rem;
}

.feature-strip,
.card-grid,
.booking-layout,
.dashboard-grid {
    display: grid;
    gap: 20px;
}

.feature-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-strip article,
.info-card {
    padding: 24px;
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.split-section {
    padding: 28px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}


.about-page {
    width: 100%;
}

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
    align-items: stretch;
}

.about-section-light {
    background: #f2f2f2;
}

.about-section-teal {
    background: linear-gradient(135deg, #3dbdad 0%, #1a9e8f 100%);
}

.about-img-side {
    overflow: hidden;
    min-height: 420px;
}

.about-img-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text-side {
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-sec-heading {
    font-family: "DM Serif Display", serif;
    font-size: 1.7rem;
    margin: 0 0 20px;
    color: #4a2c8a;
}

.about-section-teal .about-sec-heading {
    color: #fff;
}

.about-text-side p {
    font-size: 0.93rem;
    line-height: 1.8;
    color: #444;
    margin: 0 0 12px;
}

.about-section-teal .about-text-side p {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .about-section {
        grid-template-columns: 1fr;
    }
    .about-img-side {
        min-height: 260px;
    }
    .about-text-side {
        padding: 36px 24px;
    }
}

.plain-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}


.auth-wrap {
    min-height: 70vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(420px, 100%);
    padding: 28px;
}

.auth-card-login {
    display: grid;
    gap: 14px;
}

.auth-card-register {
    display: grid;
    gap: 14px;
}

.auth-intro {
    text-align: center;
    margin-bottom: 2px;
}

.auth-intro p {
    margin: 6px auto 0;
    max-width: 300px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.auth-card-register input {
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-card-register input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(247, 168, 27, 0.13);
}

.password-strength {
    margin-top: -2px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.password-strength.is-medium { color: #a16207; }
.password-strength.is-strong { color: #15803d; }

.auth-title-center {
    text-align: center;
    margin-bottom: 4px;
}

.auth-divider {
    position: relative;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid var(--line);
}

.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 12px;
    background: var(--panel);
}

.auth-card-login .inline-actions {
    justify-content: center;
}

.auth-register-actions {
    display: flex;
    justify-content: center;
}

.forgot-link {
    display: block;
    text-align: center;
    color: var(--accent-deep);
    font-size: 0.92rem;
    font-weight: 700;
}

.forgot-link:hover {
    text-decoration: underline;
}

.dashboard-grid {
    grid-template-columns: 280px 1fr;
    align-items: start;
}

.sidebar-card,
.panel {
    padding: 22px;
}

.side-nav {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.side-nav a,
.choice-card {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.side-nav a.active,
.choice-card.active {
    background: rgba(247, 168, 27, 0.14);
    color: var(--accent-deep);
}

.services-page-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.service-price-card {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.service-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 16px;
    background: #fff4e4;
}

.service-price-card .svc-card-desc {
    flex: 1;
    margin: 0;
}

.service-price-card .svc-card-actions {
    margin-top: 14px;
}

.service-price {
    margin: 6px 0 10px;
    color: var(--accent-deep);
    font-size: 1.35rem;
    font-weight: 800;
}

.svc-card-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.svc-card-actions .button {
    flex: 1;
    text-align: center;
    justify-content: center;
}

.service-supplies-list {
    margin: 10px 0 4px;
    padding: 10px 14px;
    background: #fff8ee;
    border-radius: 10px;
    border: 1px solid #f5ddb0;
}

.service-supplies-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #a07020;
    margin: 0 0 6px;
}

.service-supplies-list ul {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
}

.service-supplies-list ul li {
    font-size: 0.82rem;
    color: #5a4010;
    line-height: 1.6;
}

.dashboard-main {
    display: grid;
    gap: 20px;
}

.dashboard-banner {
    padding: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background:
        linear-gradient(120deg, rgba(247, 168, 27, 0.18), rgba(255, 255, 255, 0.96)),
        var(--panel);
}

.card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-summary-section {
    display: block;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.kpi-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 150px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(145deg, #fff, #fffaf1);
    box-shadow: 0 10px 26px rgba(79, 57, 35, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(79, 57, 35, 0.11);
}

.kpi-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.kpi-value {
    color: var(--text);
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1;
}

.kpi-note {
    color: var(--muted);
    font-size: 0.86rem;
}

.kpi-card-pending {
    background: linear-gradient(145deg, #fff, #fff7e8);
}

.kpi-card-stock {
    background: linear-gradient(145deg, #fff, #fff3ec);
}

.card-grid.two-column {
    grid-template-columns: 360px 1fr;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.view-all-link {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.product-grid::-webkit-scrollbar {
    width: 6px;
}
.product-grid::-webkit-scrollbar-track {
    background: #f3ede6;
    border-radius: 4px;
}
.product-grid::-webkit-scrollbar-thumb {
    background: #ead9c2;
    border-radius: 4px;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(247, 168, 27, 0.08), rgba(255, 255, 255, 0.96));
    border: 1px solid var(--line);
}

.product-card .status-pill {
    margin-top: auto;
}

.product-card h4 {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.3;
}

.product-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.product-card-desc {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f5f0;
    margin-bottom: 4px;
}

.product-card-icon {
    font-size: 2rem;
    text-align: center;
    padding: 8px 0 4px;
    line-height: 1;
}

/* ── Clickable product card ── */
.product-card-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}

.product-card-clickable:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

/* ── Product detail modal ── */
.product-detail-card {
    max-width: 480px;
    width: 92%;
}

.product-detail-icon {
    font-size: 3.5rem;
    text-align: center;
    padding: 16px 0 8px;
    line-height: 1;
}

.product-detail-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 4px;
}

.product-detail-desc {
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.6;
    background: #fdf6ee;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid var(--line);
}

.product-detail-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.product-detail-stat {
    flex: 1;
    min-width: 100px;
    background: #fdf6ee;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.product-detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* ── Inventory search bar ── */
.inv-search-bar {
    padding: 0;
}

.inv-search-bar input[type="search"] {
    width: 100%;
    max-width: 340px;
    padding: 9px 14px 9px 36px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    font-size: 0.88rem;
    font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23b0927a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;
    color: var(--text);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.inv-search-bar input[type="search"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 127, 0, 0.12);
}

/* ── Inventory filter bar ── */
.inv-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0 4px;
}

.inv-filter-pill {
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid var(--line);
    background: white;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.inv-filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.inv-filter-active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ── Inventory pagination ── */
.inv-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 18px 0 4px;
    flex-wrap: wrap;
}

.inv-page-btn {
    padding: 5px 13px;
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 600;
    border: 1.5px solid var(--line);
    background: white;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.inv-page-btn:hover {
    background: #fdf4e7;
    border-color: var(--accent);
    color: var(--accent);
}

.inv-page-active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.inv-page-disabled {
    color: var(--line);
    border-color: var(--line);
    cursor: default;
    pointer-events: none;
}

.mini-card {
    padding: 14px;
    border-radius: 18px;
    background: var(--panel-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stack-form,
.booking-form {
    display: grid;
    gap: 14px;
}

.form-note {
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.stack-form label,
.booking-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 13px 14px;
    font: inherit;
    background: #fffdfa;
    color: var(--text);
}

textarea {
    resize: vertical;
}

.form-row,
.inline-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.table-wrap {
    overflow-x: auto;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: rgba(247, 168, 27, 0.12);
    color: var(--accent-deep);
    font-size: 0.84rem;
    font-weight: 800;
    font-family: inherit;
}

.table-action:hover {
    background: rgba(247, 168, 27, 0.22);
}

.table-action-muted {
    background: rgba(117, 97, 80, 0.08);
    color: var(--muted);
}

.table-action-muted:hover {
    background: rgba(117, 97, 80, 0.16);
}

.table-action.table-action-pending {
    background: rgba(117, 97, 80, 0.12);
    color: #6b5744;
}
.table-action.table-action-pending:hover { background: rgba(117, 97, 80, 0.22); }

.table-action.table-action-approved {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}
.table-action.table-action-approved:hover { background: rgba(37, 99, 235, 0.22); }

.table-action.table-action-checked-in {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}
.table-action.table-action-checked-in:hover { background: rgba(124, 58, 237, 0.22); }

.table-action.table-action-completed {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}
.table-action.table-action-completed:hover { background: rgba(22, 163, 74, 0.26); }

.table-action.table-action-cancelled {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}
.table-action.table-action-cancelled:hover { background: rgba(220, 38, 38, 0.22); }

.table-actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.inventory-table td.inventory-action-cell {
    vertical-align: middle;
    white-space: nowrap;
}

.inventory-table td.inventory-action-cell .table-action {
    display: inline-flex;
    margin: 0 6px 0 0;
    vertical-align: middle;
}

.inventory-table td.inventory-action-cell .table-action:last-child {
    margin-right: 0;
}

.client-records-table {
    min-width: 1000px;
}

.client-records-wrap {
    container-type: inline-size;
}

.client-records-table th,
.client-records-table td {
    vertical-align: middle;
}

.client-records-table th:nth-child(1) { width: 18%; }
.client-records-table th:nth-child(2) { width: 22%; }
.client-records-table th:nth-child(3) { width: 14%; }
.client-records-table th:nth-child(4) { width: 20%; }
.client-records-table th:nth-child(5) { width: 14%; }
.client-records-table th:nth-child(6) { width: 12%; }

.client-records-table th,
.client-records-table td {
    padding-right: 16px;
    padding-left: 16px;
}

.client-records-table td.client-record-actions {
    white-space: nowrap;
}

.client-record-actions .table-action {
    margin-right: 10px;
}

.client-record-actions .table-action:last-child {
    margin-right: 0;
}

.client-details-card {
    width: min(480px, 100%);
    max-width: 480px;
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(46, 36, 29, 0.24);
}

.client-details-card .modal-header {
    position: relative;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-right: 32px;
}

.client-details-card .modal-header .eyebrow {
    margin: 0 0 8px;
    color: var(--accent-deep);
}

.client-details-card .modal-header h2 {
    font-size: 1.4rem;
    line-height: 1.25;
}

.client-details-card .modal-close {
    position: absolute;
    top: 2px;
    right: 0;
    padding: 2px 4px;
    font-size: 1.8rem;
}

.client-details-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.client-details-list > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 49px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.client-details-list dt {
    color: var(--muted);
    font-weight: 700;
}

.client-details-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.page-records .site-shell,
.page-medical-records .site-shell,
.page-manage-users .site-shell,
.page-dashboard .site-shell {
    width: min(1600px, calc(100% - 40px));
}

.page-service-supplies .site-shell {
    width: min(1500px, calc(100% - 40px));
}

.page-services .site-shell {
    width: min(1480px, calc(100% - 40px));
}

.page-service-supplies .dashboard-grid {
    grid-template-columns: 250px minmax(0, 1fr);
}

.page-inventory .site-shell {
    width: min(1600px, calc(100% - 48px));
}

.page-inventory .dashboard-grid {
    grid-template-columns: 260px minmax(0, 1fr);
}

.page-records .dashboard-grid,
.page-medical-records .dashboard-grid,
.page-manage-users .dashboard-grid,
.page-dashboard .dashboard-grid {
    grid-template-columns: 250px minmax(0, 1fr);
}

.inventory-panels-layout.has-alerts {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(320px, 0.9fr);
    align-items: start;
    gap: 20px;
}
.inventory-panels-layout > .panel { min-width: 0; }
@media (max-width: 1100px) {
    .inventory-panels-layout.has-alerts { grid-template-columns: minmax(0, 1fr); }
}


/* Customer medical history list */
.medical-records-header { align-items: center; }
.medical-records-count {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 999px;
    background: #fff0d6;
    color: var(--accent-deep);
    font-size: 0.82rem;
    font-weight: 800;
}
.medical-records-search { width: min(340px, 100%); margin: 0 0 6px; }
.medical-records-search input {
    width: 100%; min-height: 40px; padding: 9px 14px 9px 38px;
    border: 1px solid #ead9c2; border-radius: 999px; background: #fff;
    font: inherit; font-size: 0.88rem;
}
.medical-records-table { min-width: 760px; }
.medical-records-table th, .medical-records-table td { padding: 18px 10px; }
.medical-records-table th { color: #765943; }
.medical-record-pet, .medical-record-species { text-transform: lowercase; }
.medical-record-species {
    display: inline-flex; margin-left: 5px; padding: 5px 11px;
    border-radius: 999px; background: #fff0d6; color: #765943;
    font-size: 0.72rem; font-weight: 700;
}
.medical-record-view { text-decoration: none; padding: 9px 14px; }
@media (max-width: 600px) {
    .medical-records-header { align-items: flex-start; gap: 12px; }
    .medical-records-count { padding: 7px 10px; font-size: 0.74rem; }
}

th,
td {
    text-align: left;
    padding: 20px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}

th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.booking-layout {
    grid-template-columns: 260px 1fr;
    align-items: start;
}

.booking-menu {
    display: grid;
    gap: 12px;
}

.choice-card.static {
    background: var(--panel-soft);
}

.success-card {
    text-align: center;
    padding: 40px 24px;
    background:
        linear-gradient(180deg, rgba(247, 168, 27, 0.16), rgba(255, 255, 255, 1)),
        var(--panel);
}

.flash {
    padding: 14px 18px;
    border-radius: 18px;
    font-weight: 700;
}

.flash-success {
    background: #ecfff2;
    color: #157347;
    border: 1px solid #b9e2ca;
}

.field-error {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #dc2626;
    min-height: 1em;
}

input.input-error {
    border-color: #fca5a5 !important;
    background: #fff8f8 !important;
    outline-color: #fca5a5 !important;
}

.flash-error {
    background: #fff1f1;
    color: #b02a37;
    border: 1px solid #f1c0c4;
}

.flash-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #fffdfa;
}

.notification-card strong {
    display: block;
    margin-bottom: 6px;
}

.notification-card p {
    margin: 0;
}

.notification-card.notification-unread {
    border-color: var(--accent);
    background: #fffbf0;
}

.notification-time {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--muted);
}

.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 20px 0 10px;
}

.notification-warning {
    background: #fff8e7;
    border-color: #f1d08c;
}

.notification-error {
    background: #fff1f1;
    border-color: #f1c0c4;
}

a.notification-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}

a.notification-link:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.notification-go {
    display: block;
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(46, 36, 29, 0.45);
    z-index: 1000;
    place-items: center;
    padding: 20px;
}

.modal-overlay.modal-open {
    display: grid;
}

.modal-card {
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(46, 36, 29, 0.22);
    padding: 28px;
    width: min(480px, 100%);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
}

.modal-close:hover {
    background: var(--panel-soft);
    color: var(--text);
}

/* ── Pet Edit Modal ── */
.pet-edit-card {
    background: var(--panel);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(46,36,29,0.24);
    padding: 28px;
    width: min(460px, 100%);
    max-height: 90vh;
    overflow-y: auto;
}
.pet-edit-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.pet-edit-avatar {
    font-size: 2rem;
    background: rgba(217,127,0,0.1);
    border-radius: 14px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pet-edit-heading { flex: 1; }
.pet-edit-title {
    font-size: 1.3rem;
    margin: 0;
    color: var(--text);
}
.pet-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.pef-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pef-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.pef-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    padding: 11px 14px;
    font: inherit;
    background: #fffdfa;
    color: var(--text);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.pef-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217,127,0,0.1);
}
.pef-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.pef-save-btn {
    width: 100%;
    margin-top: 4px;
}
.pef-divider {
    height: 1px;
    background: var(--line);
    margin: 20px 0 16px;
}
.btn-remove-pet {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: rgba(217,60,50,0.06);
    border: 1.5px solid rgba(217,60,50,0.25);
    color: #c0392b;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.btn-remove-pet:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.appt-modal-card {
    width: min(440px, 100%);
}

.page-appointments .site-shell,
.page-booked .site-shell {
    width: min(1600px, calc(100% - 40px));
}

.page-appointments .dashboard-grid,
.page-booked .dashboard-grid {
    grid-template-columns: 220px 1fr;
}

.appointments-page-main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.appt-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.page-appointments .appt-split-grid th,
.page-appointments .appt-split-grid td {
    padding-top: 22px;
    padding-bottom: 22px;
}

.appointment-date-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffaf1;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.appointment-date-filter[hidden],
.appointment-date-empty[hidden] {
    display: none !important;
}

.appointment-date-empty {
    margin-top: 12px;
}


.appt-detail-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 8px;
}

.appt-detail-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    gap: 12px;
    align-items: center;
}

.appt-detail-row:nth-child(even) {
    background: var(--bg);
}

.appt-detail-row:last-child {
    border-bottom: none;
}

.appt-detail-notes {
    align-items: start;
}

.appt-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.appt-detail-value {
    font-size: 0.93rem;
    color: var(--text);
    font-weight: 500;
}

.med-history-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent-deep);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 4px 10px;
    border: 1px solid var(--accent-deep);
    border-radius: 20px;
}
.med-history-link:hover { background: #fff8ee; }

.service-agreement-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1.5px solid #f0c84a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(200,140,0,0.07);
}

.service-agreement-box {
    background: linear-gradient(135deg, #fffdf5 0%, #fff8e1 100%);
    padding: 16px 18px 14px;
    border-bottom: 1px solid #f0d878;
}

.service-agreement-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #b07c00;
    margin: 0 0 10px;
}

.service-agreement-title::before {
    content: '📋';
    font-size: 0.95rem;
}

.service-agreement-text {
    font-size: 0.83rem;
    color: #4a3300;
    line-height: 1.7;
    margin: 0;
}

.service-agreement-check {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    grid-template-columns: unset !important;
    background: #fff8e1;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 600;
    color: #6b4600;
    transition: background 0.15s;
}

.service-agreement-check:hover {
    background: #fff0c0;
}

.service-agreement-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #e09800;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
    border-radius: 4px;
}

@media (max-width: 1100px) {
    .page-records .dashboard-grid,
    .page-medical-records .dashboard-grid,
    .page-manage-users .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container (max-width: 1000px) {
    .client-records-wrap {
        overflow: visible;
    }

    .client-records-table,
    .client-records-table tbody {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .client-records-table thead {
        display: none;
    }

    .client-records-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 22px;
        padding: 18px;
        margin-bottom: 14px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #fff;
    }

    .client-records-table tbody td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        min-width: 0;
        padding: 4px 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .client-records-table tbody td::before {
        color: var(--muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .client-records-table tbody td:nth-child(1)::before { content: "Name"; }
    .client-records-table tbody td:nth-child(2)::before { content: "Email"; }
    .client-records-table tbody td:nth-child(3)::before { content: "Phone"; }
    .client-records-table tbody td:nth-child(4)::before { content: "Pets"; }
    .client-records-table tbody td:nth-child(5)::before { content: "Last visit"; }

    .client-records-table tbody td.client-record-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding-top: 4px;
    }

    .client-record-actions form {
        margin: 0;
    }
}

@media (max-width: 900px) {
    .hero,
    .split-section,
    .booking-layout,
    .card-grid.two-column,
    .feature-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-appointments .dashboard-grid,
    .page-booked .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-card {
        padding: 16px;
    }

    .side-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }

    .side-nav a {
        padding: 9px 14px;
        font-size: 0.88rem;
    }

    .dashboard-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .services-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .kpi-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: calc(100% - 20px);
    }

    .topbar {
        padding: 14px 0;
        gap: 10px;
        flex-wrap: wrap;
    }

    .nav-links {
        gap: 6px;
    }

    .nav-links a {
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    .hero,
    .split-section,
    .panel,
    .sidebar-card,
    .auth-card {
        padding: 16px;
        border-radius: 18px;
    }

    .form-row,
    .inline-form,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .panel-header .quick-actions,
    .panel-header .inline-actions {
        width: 100%;
    }

.services-page-grid {
        grid-template-columns: 1fr;
    }

    .appt-split-grid,
    .page-booked .appt-split-grid {
        grid-template-columns: 1fr;
    }

    .page-appointments .appt-split-grid th,
    .page-appointments .appt-split-grid td {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .card-grid.two-column {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 500px;
        font-size: 0.88rem;
    }

    th, td {
        padding: 10px 8px;
    }

    .button {
        padding: 11px 16px;
        font-size: 0.92rem;
    }

    h1 {
        font-size: clamp(1.6rem, 6vw, 2.4rem);
    }
}

.page-home body,
.page-home {
    background: #f7ad21;
}

.page-home .site-shell {
    width: 100%;
    padding-bottom: 0;
}

.page-home .page-content {
    gap: 0;
}

.page-home .topbar {
    width: 100%;
    margin: 0;
    padding: 18px 48px;
    background: #fff;
}

.page-home .brand {
    font-size: 0;
    gap: 12px;
}

.page-home .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.page-home .brand span:last-child {
    font-family: "DM Serif Display", serif;
    font-size: 1.2rem;
    color: #2c231d;
}

.page-home .nav-links {
    gap: 10px;
}

.page-home .nav-links a {
    padding: 11px 18px;
    border-radius: 999px;
    color: #6f5843;
    font-weight: 800;
    background: transparent;
}

.page-home .nav-links a.active,
.page-home .nav-links a:hover {
    background: transparent;
    color: #6f5843;
}

.page-home .nav-links .button {
    background: #f7a81b;
    color: #fff;
}

.page-home .nav-links .button:hover {
    background: #dd8d10;
}

.page-home .nav-links a[href="login.php"] {
    background: transparent;
    color: #cf7f00;
}

.home-showcase {
    min-height: calc(100vh - 60px);
    background:
        url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'><g transform='translate(40,80) rotate(-20)'><ellipse cx='20' cy='38' rx='14' ry='10' fill='%23f7a81b' opacity='0.15'/><circle cx='4' cy='22' r='6' fill='%23f7a81b' opacity='0.15'/><circle cx='14' cy='13' r='6' fill='%23f7a81b' opacity='0.15'/><circle cx='26' cy='13' r='6' fill='%23f7a81b' opacity='0.15'/><circle cx='36' cy='22' r='6' fill='%23f7a81b' opacity='0.15'/></g><g transform='translate(110,30) rotate(15)'><ellipse cx='20' cy='38' rx='14' ry='10' fill='%23f7a81b' opacity='0.10'/><circle cx='4' cy='22' r='6' fill='%23f7a81b' opacity='0.10'/><circle cx='14' cy='13' r='6' fill='%23f7a81b' opacity='0.10'/><circle cx='26' cy='13' r='6' fill='%23f7a81b' opacity='0.10'/><circle cx='36' cy='22' r='6' fill='%23f7a81b' opacity='0.10'/></g></svg>") repeat,
        #fff;
    background-size: 160px 160px, auto;
}

.home-showcase-top {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 56px 20px 170px;
    background:
        url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'><g transform='translate(40,80) rotate(-20)'><ellipse cx='20' cy='38' rx='14' ry='10' fill='%23ffffff' opacity='0.18'/><circle cx='4' cy='22' r='6' fill='%23ffffff' opacity='0.18'/><circle cx='14' cy='13' r='6' fill='%23ffffff' opacity='0.18'/><circle cx='26' cy='13' r='6' fill='%23ffffff' opacity='0.18'/><circle cx='36' cy='22' r='6' fill='%23ffffff' opacity='0.18'/></g><g transform='translate(110,30) rotate(15)'><ellipse cx='20' cy='38' rx='14' ry='10' fill='%23ffffff' opacity='0.12'/><circle cx='4' cy='22' r='6' fill='%23ffffff' opacity='0.12'/><circle cx='14' cy='13' r='6' fill='%23ffffff' opacity='0.12'/><circle cx='26' cy='13' r='6' fill='%23ffffff' opacity='0.12'/><circle cx='36' cy='22' r='6' fill='%23ffffff' opacity='0.12'/></g></svg>") repeat,
        #f7ad21;
    background-size: 160px 160px, auto;
    overflow: hidden;
}

.home-showcase-top::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -100px;
    width: 200vw;
    height: 420px;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 50%;
}

.home-branding {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 6px;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.home-branding h1 {
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    line-height: 0.95;
    color: #5b5755;
    text-shadow: 0 2px 0 rgba(255, 255, 255, 0.25);
}

.home-clinic-name {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #5b5755;
    font-weight: 600;
}

.pet-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 8px 0 2px;
    border-bottom: 2px solid rgba(52, 45, 40, 0.55);
}

.pet-face {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1;
}

.home-tagline {
    margin: 0;
    color: #5b5755;
    font-size: clamp(1rem, 1.8vw, 1.45rem);
    letter-spacing: 0.03em;
}

.home-logo-image {
    width: min(420px, 90vw);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(163, 96, 17, 0.2));
}

.home-book-button {
    margin-top: 4px;
    padding: 14px 28px;
    font-size: 1.05rem;
    box-shadow: 0 8px 0 rgba(209, 109, 0, 0.22), 0 14px 24px rgba(163, 96, 17, 0.18);
}

.home-showcase-bottom {
    position: relative;
    margin-top: -76px;
    padding: 0 24px 0;
}

.home-services-heading {
    text-align: center;
    font-family: "DM Serif Display", serif;
    font-size: 1.6rem;
    color: var(--text);
    margin: 2rem 0 1rem;
    position: relative;
    z-index: 1;
}

.home-service-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: min(1220px, 100%);
    margin: 0 auto;
    align-items: stretch;
}

.home-service-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 88px;
    padding: 20px 18px;
    background: #ffffff;
    border: 2px solid #d6d1cf;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-service-card:hover {
    transform: translateY(-4px);
    border-color: #f7ad21;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.home-service-icon {
    font-size: 1.6rem;
    line-height: 1;
    flex-shrink: 0;
}

.home-map-section {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.home-branches-section {
    background: var(--accent);
    padding: 48px 40px;
    margin-top: 2rem;
}

.branches-tagline {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: rgba(46,36,29,0.55);
    text-transform: uppercase;
    margin: 0 0 32px;
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.branch-card {
    background: transparent;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
    transition: opacity 0.2s;
}

.branch-card:hover {
    opacity: 0.8;
}

.branch-brand {
    font-family: "DM Serif Display", serif;
    font-size: 2rem;
    font-style: italic;
    color: #2e2d2d;
    line-height: 1.1;
}

.branch-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #2e2d2d;
    margin-top: -4px;
}

.branch-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #3a3a3a;
    line-height: 1.5;
}

.branch-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.home-map-wrap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 0 auto;
    max-width: min(1220px, 100%);
}

.location-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fff;
    border: 2px solid #ead9c2;
    border-radius: 20px;
    padding: 32px 40px;
    max-width: 600px;
    margin: 0 auto;
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    box-shadow: 0 4px 24px rgba(46,36,29,0.08);
    cursor: pointer;
}
.location-card:hover {
    box-shadow: 0 8px 40px rgba(46,36,29,0.16);
    border-color: var(--accent);
    transform: translateY(-2px);
}
.location-icon {
    font-size: 2.8rem;
    flex-shrink: 0;
}
.location-name {
    font-family: "DM Serif Display", serif;
    font-size: 1.2rem;
    color: var(--text);
    margin: 0 0 6px;
}
.location-address {
    font-size: 0.92rem;
    color: var(--muted);
    margin: 0 0 8px;
    line-height: 1.5;
}
.location-hint {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--accent-deep);
    margin: 0;
}

.home-footer {
    margin-top: 0;
    margin-left: -24px;
    margin-right: -24px;
    padding: 0;
    background: #fff1df;
    color: #1f1b19;
    border-top: 1px solid #ead9c2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 2fr 1fr 1fr;
    gap: 40px;
    padding: 56px 60px 40px;
}

.footer-brand-col { display: flex; flex-direction: column; gap: 0; }

.footer-brand-name {
    font-family: "DM Serif Display", serif;
    font-size: 1.7rem;
    color: #2e241d;
    margin: 0 0 2px;
}

.footer-brand-sub {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #d97f00;
    margin: 0 0 14px;
}

.footer-tagline {
    font-size: 0.84rem;
    color: #756150;
    margin: 0 0 22px;
    line-height: 1.6;
}

.footer-fb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1877f2;
    color: white;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    width: fit-content;
    transition: background 0.15s;
}

.footer-fb-btn:hover { background: #1456c0; }

.footer-col-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #d97f00;
    margin: 0 0 18px;
}

.footer-col { display: flex; flex-direction: column; }

.footer-branch { margin-bottom: 20px; }

.footer-branch strong {
    display: block;
    font-size: 0.85rem;
    color: #2e241d;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-branch p {
    font-size: 0.78rem;
    color: #756150;
    margin: 0 0 5px;
    line-height: 1.55;
}

.footer-branch a {
    font-size: 0.82rem;
    color: #d97f00;
    text-decoration: none;
    font-weight: 600;
}

.footer-branch a:hover { text-decoration: underline; }

.footer-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links-list li { font-size: 0.84rem; color: #756150; }

.footer-links-list a {
    color: #756150;
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links-list a:hover { color: #d97f00; }

.footer-bottom {
    border-top: 1px solid #ead9c2;
    padding: 18px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    color: #8b6f55;
}

.footer-bottom p { margin: 0; }

.footer-bottom a {
    color: #d97f00;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.76rem;
}

.footer-bottom a:hover { text-decoration: underline; }

/* ── AI Chat Widget ── */
.chat-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(247,168,27,0.45);
    z-index: 1000;
    transition: transform 0.2s, box-shadow 0.2s;
}
.chat-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 32px rgba(247,168,27,0.55);
}
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 340px;
    max-height: 480px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(46,36,29,0.18);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s;
    transform-origin: bottom right;
}
.chat-window.chat-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}
.chat-header {
    background: var(--accent);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-header-avatar {
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-header-info strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: #2e241d;
}
.chat-header-info span {
    font-size: 0.75rem;
    color: rgba(46,36,29,0.65);
}
.chat-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #2e241d;
    opacity: 0.6;
    line-height: 1;
}
.chat-close:hover { opacity: 1; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre-line;
    word-break: break-word;
}
.chat-msg-bot {
    background: #f5f0eb;
    color: #2e241d;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-msg-user {
    background: var(--accent);
    color: #2e241d;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 600;
}
.chat-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 10px 14px;
    background: #f5f0eb;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}
.chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-deep);
    animation: chat-bounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chat-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40%            { transform: translateY(-6px); opacity: 1; }
}
.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #ead9c2;
    background: #fff;
}
.chat-input {
    flex: 1;
    border: 1px solid #ead9c2;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    background: #fff8f0;
    color: #2e241d;
}
.chat-input:focus { border-color: var(--accent); }
.chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}
.chat-send:hover { background: var(--accent-deep); }

@media (max-width: 900px) {
    .page-home .topbar {
        padding: 16px 24px;
    }

    .home-showcase-top {
        padding-bottom: 140px;
    }

    .home-showcase-top::after {
        bottom: -80px;
        height: 300px;
        width: 200vw;
    }

    .home-service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        width: 100%;
    }

    .home-logo-image {
        width: min(320px, 85vw);
    }
}

@media (max-width: 640px) {
    .page-home .topbar {
        padding: 14px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .page-home .nav-links {
        justify-content: center;
        gap: 6px;
    }

    .page-home .nav-links a {
        padding: 8px 12px;
        font-size: 0.88rem;
    }

    .home-showcase-top {
        padding: 28px 16px 96px;
    }

    .home-showcase-top::after {
        bottom: -45px;
        height: 190px;
        width: 165vw;
    }

    .home-showcase-bottom {
        margin-top: -30px;
        padding: 0 12px;
    }

    .home-footer {
        margin-left: -12px;
        margin-right: -12px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        padding: 40px 28px 28px;
        gap: 28px;
    }

    .footer-bottom {
        padding: 16px 28px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .home-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .home-service-card {
        min-height: 70px;
        gap: 8px;
        padding: 14px 10px;
        font-size: 0.88rem;
    }

    .home-service-icon {
        font-size: 1.3rem;
    }

    .home-services-heading {
        font-size: 1.3rem;
        margin: 1.2rem 0 0.8rem;
    }

    .home-map-wrap iframe {
        height: 250px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        padding: 32px 20px 20px;
        gap: 24px;
    }

    .footer-bottom {
        padding: 14px 20px;
    }

    .home-logo-image {
        width: min(260px, 80vw);
    }
}

@media (max-width: 420px) {
    .home-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .home-service-card {
        flex-direction: column;
        text-align: center;
        min-height: 80px;
        gap: 4px;
        padding: 12px 8px;
        font-size: 0.78rem;
    }
}
