/* ============================================================
   Nori & Panko Veterinary Clinic — Global Stylesheet
   Color System (updated):
   Primary:   #957DAD (Muted Purple)
   Secondary: #D291BC (Mauve Rose)
   Accent:    #FEC8D8 (Soft Pink)
   BG:        #FFF8F6 (Warm Blush White)
   Cards:     #FFFFFF
   Text:      #2C2C2C / #6C757D
============================================================ */

/* ─── CSS Variables ─── */
:root {
    --primary:      #957DAD;
    --primary-dark: #7A5F92;
    --primary-light:#D291BC;
    --secondary:    #D291BC;
    --accent:       #FEC8D8;
    --accent-light: #FFDFD3;
    --bg:           #FFF8F6;
    --card:         #FFFFFF;
    --text-dark:    #2C2C2C;
    --text-muted:   #6C757D;
    --border:       #F0E4EC;
    --shadow-sm:    0 2px 8px rgba(149,125,173,.08);
    --shadow-md:    0 4px 20px rgba(149,125,173,.12);
    --shadow-lg:    0 8px 32px rgba(149,125,173,.16);
    --radius-sm:    10px;
    --radius-md:    14px;
    --radius-lg:    20px;
    --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Base Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}
.text-primary-brand { color: var(--primary) !important; }
.text-accent { color: var(--secondary) !important; }

/* ─── Navbar ─── */
.navbar-brand-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.navbar-main {
    background: linear-gradient(135deg, var(--primary) 0%, #7A5F92 100%);
    box-shadow: 0 2px 20px rgba(149,125,173,.25);
    padding: 0.75rem 0;
}

.navbar-main .navbar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-main .navbar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.navbar-main .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.15);
}

.navbar-main .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-main .nav-link.active::after,
.navbar-main .nav-link:hover::after { transform: translateX(-50%) scaleX(1); }

/* ─── Buttons ─── */
.btn-primary-brand {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(149,125,173,.3);
}

.btn-primary-brand:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149,125,173,.4);
    color: #fff;
}

.btn-primary-brand:active { transform: translateY(0); }

.btn-accent {
    background: linear-gradient(135deg, var(--secondary) 0%, #c07aa8 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.5rem;
    transition: var(--transition);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(210,145,188,.4);
    color: #fff;
}

.btn-outline-brand {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.5rem;
    transition: var(--transition);
    background: transparent;
}

.btn-outline-brand:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ─── Cards ─── */
.card-custom {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.card-header-brand {
    background: linear-gradient(135deg, var(--primary) 0%, #7A5F92 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
}

.card-header-brand h5, .card-header-brand h6 {
    color: #fff;
    margin: 0;
    font-weight: 700;
}

/* ─── Avatars & Placeholders ─── */
.avatar-placeholder {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.85rem;
    flex-shrink: 0; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 2px 6px rgba(149,125,173,0.2);
    text-transform: uppercase;
}
.avatar-placeholder.sm { width: 30px; height: 30px; font-size: 0.75rem; }
.avatar-placeholder.lg { width: 44px; height: 44px; font-size: 1rem; }
.avatar-placeholder i { font-size: 1.1rem; }

.avatar-initial {
    background: linear-gradient(135deg, #957DAD, #7A5F92);
}
.av-0 { background: linear-gradient(135deg, #957DAD, #7A5F92); }
.av-1 { background: linear-gradient(135deg, #D291BC, #C06EA3); }
.av-2 { background: linear-gradient(135deg, #6DAEDB, #4A90C4); }
.av-3 { background: linear-gradient(135deg, #77C77E, #4CAF50); }
.av-4 { background: linear-gradient(135deg, #FFB347, #FF8C00); }
.av-5 { background: linear-gradient(135deg, #FF6B6B, #E53935); }

.avatar-img {
    width: 36px; height: 36px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.avatar-img.sm { width: 30px; height: 30px; }
.avatar-img.lg { width: 44px; height: 44px; }
.stat-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: linear-gradient(135deg, rgba(149,125,173,.1), rgba(210,145,188,.15));
    color: var(--primary);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.stat-card .stat-change.up   { color: #28a745; }
.stat-card .stat-change.down { color: #dc3545; }

/* ─── Forms ─── */
.form-control-brand {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: #fff;
    transition: var(--transition);
}

.form-control-brand:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(210,145,188,.2);
    outline: none;
}

/* ─── Date / time inputs: fix native picker popup interaction ─────────────
   transition:all on .form-control-brand fires on :focus changes. When you
   click a date inside the native popup, Chrome/Edge briefly blurs the input,
   triggering the transition repaint — which closes the popup before the click
   registers. Limiting to only safe properties fixes this across all pages.   */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.form-label-brand {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.form-select-brand {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    background: #fff;
    transition: var(--transition);
}

.form-select-brand:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(210,145,188,.2);
}

/* ─── Badges / Status Pills ─── */
.badge-pending   { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }
.badge-confirmed { background: #d1e7ff; color: #0a58ca; border: 1px solid #0d6efd; }
.badge-completed { background: #d1e7dd; color: #0a3622; border: 1px solid #28a745; }
.badge-cancelled { background: #f8d7da; color: #58151c; border: 1px solid #dc3545; }
.badge-paid      { background: #d1e7dd; color: #0a3622; border: 1px solid #28a745; }
.badge-unpaid    { background: #fff3cd; color: #856404; border: 1px solid #ffc107; }

.status-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-block;
}

/* ─── Tables ─── */
.table-brand {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-brand thead th {
    background: linear-gradient(135deg, var(--primary) 0%, #7A5F92 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    padding: 1rem 1.25rem;
}

.table-brand tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.table-brand tbody tr:hover {
    background: rgba(149,125,173,.04);
}

.table-brand tbody td {
    padding: 0.9rem 1.25rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

/* ─── Sidebar (Dashboard) ─── */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary) 0%, #7A5F92 100%);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    /* Only transition transform — NOT "all" which breaks mobile toggle */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-brand .brand-text {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
}

.sidebar-brand .brand-sub {
    font-size: 0.75rem;
    color: rgba(255,255,255,.6);
}

.sidebar-nav { padding: 1rem 0; }

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,.4);
    padding: 1rem 1.25rem 0.4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1.25rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: rgba(255,255,255,.1);
    border-left-color: var(--accent);
}

.sidebar-link .link-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-link .badge-notif {
    margin-left: auto;
    background: var(--secondary);
    color: #fff;
    border-radius: 50px;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

/* ─── Hero Section ─── */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #B08CC0 50%, #7A5F92 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    top: -200px; right: -100px;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(254,200,216,.08);
    border-radius: 50%;
    bottom: -100px; left: -100px;
}

.hero-content { position: relative; z-index: 2; }
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.04em;
}
.hero-title .accent-word { color: var(--accent-light); }
.hero-subtitle { color: rgba(255,255,255,.8); font-size: 1.15rem; max-width: 520px; }

.hero-card {
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* ─── Service Cards ─── */
.service-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.service-card .service-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, rgba(149,125,173,.1), rgba(210,145,188,.15));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.service-card .price-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 50px;
    padding: 0.35rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

/* ─── Steps / How It Works ─── */
.step-item {
    text-align: center;
    padding: 1.5rem 1rem;
    position: relative;
}

.step-number {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(149,125,173,.3);
}

/* ─── Modals ─── */
.modal-brand .modal-header {
    background: linear-gradient(135deg, var(--primary), #7A5F92);
    color: #fff;
    border-bottom: none;
}

.modal-brand .modal-header .modal-title { color: #fff; font-weight: 700; }
.modal-brand .modal-header .btn-close { filter: invert(1); }
.modal-brand .modal-content { border-radius: var(--radius-md); overflow: hidden; border: none; box-shadow: var(--shadow-lg); }

/* ─── Alerts ─── */
.alert-brand-success {
    background: #d1e7dd;
    border: 1px solid #28a745;
    border-left: 4px solid #28a745;
    border-radius: var(--radius-sm);
    color: #0a3622;
}

.alert-brand-danger {
    background: #f8d7da;
    border: 1px solid #dc3545;
    border-left: 4px solid #dc3545;
    border-radius: var(--radius-sm);
    color: #58151c;
}

/* ─── Footer ─── */
.footer-main {
    background: linear-gradient(135deg, #3d2450 0%, #5c3a70 100%);
    color: rgba(255,255,255,.75);
    padding: 3.5rem 0 1.5rem;
}

.footer-main h5, .footer-main h6 { color: #fff; font-weight: 700; }
.footer-main a { color: rgba(255,255,255,.6); text-decoration: none; transition: var(--transition); }
.footer-main a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.5rem; }

/* ─── Loader / Skeleton ─── */
.skeleton {
    background: linear-gradient(90deg, #f5eef8 25%, #eddff5 50%, #f5eef8 75%);
    background-size: 200% 100%;
    animation: skeleton-load 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-load {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Utilities ─── */
.bg-brand-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #7A5F92 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider-brand {
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    border: none;
    border-radius: 3px;
    opacity: 1;
}

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, #7A5F92 100%);
    padding: 2.5rem 0;
    margin-bottom: 2.5rem;
}

.page-header h1 { color: #fff; font-size: 1.75rem; font-weight: 800; margin: 0; }
.page-header .breadcrumb-item { color: rgba(255,255,255,.6); font-size: 0.875rem; }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,.9); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ─── Appointment timeline ─── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot {
    position: absolute;
    left: -1.65rem;
    top: 0.25rem;
    width: 14px; height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-dot.completed { background: #28a745; box-shadow: 0 0 0 2px #28a745; }
.timeline-dot.pending   { background: #ffc107; box-shadow: 0 0 0 2px #ffc107; }
.timeline-dot.cancelled { background: #dc3545; box-shadow: 0 0 0 2px #dc3545; }

/* ─── Responsive ─── */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    }
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .hero-title { font-size: 2rem; }
    .stat-value  { font-size: 1.5rem; }
}

/* ─── Appointments Panel Design System ─── */
.appt-panel {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.appt-panel-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    gap: 1rem;
    flex-wrap: wrap;
}
.appt-panel-title { display: flex; align-items: center; gap: .6rem; }
.appt-panel-title .title-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #957DAD, #7A5F92);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .95rem;
}
.appt-panel-title h5 {
    font-weight: 800; font-size: 1rem; margin: 0;
    color: var(--text-dark); letter-spacing: -.02em;
}
.appt-panel-title .subtitle {
    font-size: .73rem; color: var(--text-muted);
    font-weight: 500; margin-top: 1px;
}
.appt-panel-actions { display: flex; align-items: center; gap: .6rem; }
.appt-search { position: relative; }
.appt-search i {
    position: absolute; left: 10px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: .85rem; pointer-events: none;
}
.appt-search input {
    padding: .45rem .75rem .45rem 2.1rem;
    font-size: .8rem; border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg); color: var(--text-dark);
    outline: none; width: 190px;
    transition: border-color .2s, box-shadow .2s;
}
.appt-search input::placeholder { color: var(--text-muted); }
.appt-search input:focus {
    border-color: #957DAD;
    box-shadow: 0 0 0 3px rgba(149,125,173,.1);
}
.btn-view-all {
    padding: .45rem 1rem; font-size: .8rem; font-weight: 600;
    border-radius: 10px; border: 1.5px solid var(--border);
    color: var(--primary); background: rgba(149,125,173,.06);
    text-decoration: none; white-space: nowrap;
    transition: all .2s;
    display: inline-flex; align-items: center; gap: .35rem;
}
.btn-view-all:hover { background: #957DAD; color: #fff; border-color: #957DAD; }

/* Filter Tabs */
.appt-filters {
    display: flex; align-items: center; gap: .4rem;
    padding: .75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg); overflow-x: auto;
}
.filter-tab {
    padding: .3rem .85rem; border-radius: 50px;
    font-size: .75rem; font-weight: 600;
    border: 1.5px solid transparent; cursor: pointer;
    white-space: nowrap; transition: all .18s;
    background: transparent; color: var(--text-muted);
}
.filter-tab:hover { background: rgba(149,125,173,.08); color: var(--primary); }
.filter-tab.active { background: #7A5F92; color: #fff; border-color: #7A5F92; }
.filter-tab .tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    font-size: .68rem; background: rgba(255,255,255,.25); margin-left: .3rem;
}
.filter-tab:not(.active) .tab-count { background: rgba(149,125,173,.15); color: #7A5F92; }

/* Table */
.appt-table-wrap { overflow-x: auto; }
.table-brand,
.appt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .845rem;
}
.table-brand thead tr,
.appt-table thead tr {
    background: var(--card);
    border-bottom: 1.5px solid var(--border);
}
.table-brand thead th,
.appt-table thead th {
    padding: .75rem 1rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    white-space: nowrap;
    border: none;
}
.table-brand tbody tr,
.appt-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.table-brand tbody tr:last-child,
.appt-table tbody tr:last-child {
    border-bottom: none;
}
.table-brand tbody tr:hover,
.appt-table tbody tr:hover {
    background: rgba(149,125,173,.04);
}
.table-brand td,
.appt-table td {
    padding: .9rem 1rem;
    vertical-align: middle;
    border: none;
    color: var(--text-dark);
    font-size: .845rem;
}

/* Empty state */
.appt-empty { text-align: center; padding: 4rem 2rem; }
.appt-empty .empty-icon-wrap {
    width: 72px; height: 72px; border-radius: 20px;
    background: rgba(149,125,173,.08);
    border: 1.5px dashed rgba(149,125,173,.25);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem; font-size: 1.75rem;
}
.appt-empty h6 { font-weight: 700; color: var(--text-dark); margin-bottom: .4rem; }
.appt-empty p  { font-size: .85rem; color: var(--text-muted); margin: 0; }

/* Status pills (reusable across all admin pages) */
.s-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .75rem;
    border-radius: 50px;
    font-size: .74rem;
    font-weight: 700;
    white-space: nowrap;
}
.s-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
}
.s-pending   { background: #fff8e1; color: #b07d00; border: 1px solid rgba(255,193,7,.3); }
.s-confirmed { background: #e8f5e9; color: #1a7340; border: 1px solid rgba(40,167,69,.25); }
.s-completed { background: #e8eaf6; color: #3949ab; border: 1px solid rgba(57,73,171,.2); }
.s-cancelled { background: #fce4ec; color: #b71c1c; border: 1px solid rgba(183,28,28,.2); }
.s-no_show   { background: #f3e5f5; color: #6a1b9a; border: 1px solid rgba(106,27,154,.2); }
.s-paid      { background: #e8f5e9; color: #1a7340; border: 1px solid rgba(40,167,69,.25); }
.s-failed    { background: #fce4ec; color: #b71c1c; border: 1px solid rgba(183,28,28,.2); }
.s-refunded  { background: #efebe9; color: #5d4037; border: 1px solid rgba(93,64,55,.2); }
.s-active    { background: #e8f5e9; color: #1a7340; border: 1px solid rgba(40,167,69,.25); }
.s-inactive  { background: #f5f5f5; color: #6c757d; border: 1px solid rgba(108,117,125,.2); }

/* Type badges */
.type-home   { display:inline-flex;align-items:center;gap:.3rem;padding:.22rem .65rem;border-radius:50px;font-size:.74rem;font-weight:700;background:rgba(40,167,69,.1);color:#1a7340;border:1px solid rgba(40,167,69,.2); }
.type-clinic { display:inline-flex;align-items:center;gap:.3rem;padding:.22rem .65rem;border-radius:50px;font-size:.74rem;font-weight:700;background:rgba(13,110,253,.08);color:#084298;border:1px solid rgba(13,110,253,.15); }

/* Action buttons (reusable) */
.action-btns { display: flex; align-items: center; gap: .35rem; }
.act-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
}
.act-edit    { background: rgba(149,125,173,.1); color: var(--primary); }
.act-edit:hover    { background: #7A5F92; color: #fff; }
.act-confirm { background: rgba(40,167,69,.1); color: #1a7340; }
.act-confirm:hover { background: #28a745; color: #fff; }
.act-cancel  { background: rgba(220,53,69,.08); color: #b71c1c; }
.act-cancel:hover  { background: #dc3545; color: #fff; }
.act-view    { background: rgba(13,110,253,.08); color: #084298; }
.act-view:hover    { background: #0d6efd; color: #fff; }

/* Service badge (table cell) */
.service-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .7rem;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 600;
    background: rgba(149,125,173,.08);
    color: var(--primary);
    border: 1px solid rgba(149,125,173,.15);
    white-space: nowrap;
}

/* Count badge (table cell) */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: .2rem .6rem;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 700;
    background: rgba(149,125,173,.08);
    color: var(--primary);
    border: 1px solid rgba(149,125,173,.15);
}

/* Client cell pattern */
.client-cell   { display: flex; align-items: center; gap: .65rem; }
.client-avatar {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .8rem; flex-shrink: 0; color: #fff;
}
.client-name { font-weight: 700; font-size: .855rem; color: var(--text-dark); line-height: 1.2; }
.client-id   { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }

/* Avatar gradient palette */
.av-0{background:linear-gradient(135deg,#957DAD,#7A5F92);}
.av-1{background:linear-gradient(135deg,#D291BC,#C06EA3);}
.av-2{background:linear-gradient(135deg,#6DAEDB,#4A90C4);}
.av-3{background:linear-gradient(135deg,#77C77E,#4CAF50);}
.av-4{background:linear-gradient(135deg,#FFB347,#FF8C00);}
.av-5{background:linear-gradient(135deg,#FF6B6B,#E53935);}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── Print Styles ─── */
@media print {
    /* Hide non-printable UI elements */
    .sidebar, .navbar-main, .btn, .act-btn, .theme-toggle-fab, .appt-panel-actions, .appt-search, .appt-filters { 
        display: none !important; 
    }
    
    .main-content { 
        margin: 0 !important; 
        padding: 0 !important; 
    }

    /* Force light mode variables, overriding dark mode if active */
    :root, [data-theme="dark"] {
        --bg: #ffffff !important;
        --card: #ffffff !important;
        --card-alt: #ffffff !important;
        --text-dark: #000000 !important;
        --text-muted: #333333 !important;
        --border: #dddddd !important;
        --border-md: #cccccc !important;
        --primary: #000000 !important;
        --primary-dark: #000000 !important;
        --primary-light: #000000 !important;
        --secondary: #000000 !important;
        --accent: #000000 !important;
        --shadow-sm: none !important;
        --shadow-md: none !important;
        --shadow-lg: none !important;
    }

    /* Force white backgrounds and black text on all major containers */
    body, .main-content, .card-custom, .appt-panel, .appt-panel-header, 
    .table, .table-brand, th, td, tr, .stat-card, .modal-content, .modal-brand {
        background-color: #ffffff !important;
        color: #000000 !important;
        border-color: #aaaaaa !important;
        box-shadow: none !important;
    }

    /* Ensure text elements are strictly black */
    h1, h2, h3, h4, h5, h6, p, span, div, td, th, 
    .appt-panel-title h5, .stat-value, .stat-label, 
    .text-muted, .subtitle, .client-name, .pet-name {
        color: #000000 !important;
        text-shadow: none !important;
    }

    /* Maintain borders for tables and cards to ensure structure is readable */
    table, th, td, .card-custom, .stat-card, .appt-panel {
        border: 1px solid #999999 !important;
    }

    /* Remove backgrounds from badges to save ink, keep borders */
    .s-pill, .badge, .status-pill, .type-clinic, .type-home, .service-badge {
        background: transparent !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
    }

    /* Fix for cut off / incomplete printing */
    body, html, .main-content, .appt-table-wrap, .table-responsive, .card-custom, .appt-panel, .table-brand {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }

    /* Proper Page breaks for tables */
    table { page-break-inside: auto !important; }
    tr    { page-break-inside: avoid !important; page-break-after: auto !important; }
    thead { display: table-header-group !important; }
    tfoot { display: table-footer-group !important; }
    
    @page { margin: 1cm; size: auto; }
}