/* Modern Navigation Bar */
.modern-navbar {
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .modern-navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modern Nav Links */
.modern-nav .nav-link {
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.modern-nav .nav-link:hover {
    background-color: rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

/* User Display - Modern Card Style */
.user-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(247, 147, 30, 0.1));
    border-radius: 50px;
    margin-left: 1rem;
    border: 1px solid rgba(255, 107, 53, 0.2);
    transition: all 0.3s ease;
}

[data-theme="dark"] .user-display {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(247, 147, 30, 0.15));
    border-color: rgba(255, 107, 53, 0.3);
}

.user-display:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    transform: translateY(-2px);
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* User Name */
.user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Settings and Sign Out Buttons */
.modern-nav-link {
    position: relative;
    overflow: hidden;
}

.modern-nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: transform 0.3s ease;
}

.modern-nav-link:hover::before {
    transform: translateX(-50%) scaleX(1);
}

/* Navbar Brand Enhancement */
.modern-brand {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.modern-brand:hover {
    transform: scale(1.05);
}

.modern-brand .fa-paw {
    transition: all 0.3s ease;
}

.modern-brand:hover .fa-paw {
    transform: rotate(20deg) scale(1.1);
}

/* Right side navigation spacing */
.navbar-nav:last-child {
    align-items: center;
}

/* Dark Mode Toggle Enhancement */
#authenticatedDarkModeToggle,
#guestDarkModeToggle {
    background-color: transparent;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

#authenticatedDarkModeToggle:hover,
#guestDarkModeToggle:hover {
    background-color: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
    transform: scale(1.1) rotate(15deg);
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .user-display {
        margin-left: 0;
        margin-top: 0.5rem;
        width: fit-content;
    }

    .modern-nav .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem !important; /* Increased touch target */
        font-size: 1rem;
    }

    .navbar-nav:last-child {
        align-items: flex-start;
    }
}

/* Extra small screens - iPhone 12/13/14, standard phones */
@media (max-width: 428px) {
    .user-display {
        margin-left: 0;
        margin-top: 0.5rem;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .user-name {
        font-size: 0.875rem;
        max-width: 120px;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .modern-brand .fa-paw {
        font-size: 1.125rem;
    }

    .modern-nav .nav-link {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.9rem;
    }

    .modern-nav .nav-link i {
        font-size: 0.875rem;
        margin-right: 0.5rem;
    }
}

/* Footer mobile optimization */
@media (max-width: 428px) {
    footer {
        padding: 2rem 0 1.5rem !important;
    }

    footer .row {
        gap: 1.5rem;
    }

    footer .col-md-6,
    footer .col-md-3 {
        margin-bottom: 1rem;
    }

    footer h5 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }

    footer h6 {
        font-size: 1rem;
        margin-bottom: 0.625rem;
    }

    footer p,
    footer .list-unstyled li {
        font-size: 0.875rem;
    }

    footer hr {
        margin-top: 2rem !important;
        margin-bottom: 1rem !important;
    }
}

/* Add subtle animation for nav items */
@keyframes navFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-nav .nav-item {
    animation: navFadeIn 0.3s ease forwards;
}

.navbar-nav .nav-item:nth-child(1) { animation-delay: 0.05s; }
.navbar-nav .nav-item:nth-child(2) { animation-delay: 0.1s; }
.navbar-nav .nav-item:nth-child(3) { animation-delay: 0.15s; }
.navbar-nav .nav-item:nth-child(4) { animation-delay: 0.2s; }
.navbar-nav .nav-item:nth-child(5) { animation-delay: 0.25s; }
.navbar-nav .nav-item:nth-child(6) { animation-delay: 0.3s; }

/* ================================================================
   SHARED DASHBOARD COMPONENTS - used across every partner/clinic/
   employee management page, so headers, buttons, modals, and status
   badges look and behave the same everywhere instead of each page
   reinventing its own near-identical copy. Page-specific <style>
   blocks should only contain things genuinely unique to that page.
   ================================================================ */

/* Top-level dashboard hero (partner_dashboard.html, clinic_dashboard.html
   only - the gradient banner is reserved for "home base" pages; every
   other management page below it uses .page-header instead). */
.dashboard-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.dashboard-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: white;
    margin-bottom: 0.4rem;
}

.dashboard-subtitle {
    font-size: 1.05rem;
    opacity: 0.95;
    margin: 0;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
}

.btn-hero-action {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-hero-action:hover {
    background: rgba(255, 255, 255, 0.28);
    color: white;
    transform: translateY(-2px);
}

.btn-hero-action.btn-hero-light {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.btn-hero-action.btn-hero-light:hover {
    color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.btn-hero-action.btn-hero-solid {
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(0, 0, 0, 0.15);
}

.btn-hero-action.btn-hero-solid:hover {
    background: rgba(0, 0, 0, 0.32);
}

.dashboard-hero-dropdown .dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dashboard-hero-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.dashboard-hero-dropdown .dropdown-item:hover {
    background: rgba(255, 107, 53, 0.12);
    color: var(--primary-color);
}

/* Sub-page header (every management page below the hero: employees,
   services, analytics, settings, vets, clients, leave requests,
   performance reviews, etc.) - simple title/subtitle/badge, no
   gradient banner. */
.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dash-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.35rem 0;
}

.dash-subtitle {
    color: var(--text-muted);
    margin: 0;
}

/* Shared pill buttons - primary/outline actions on sub-pages */
.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-pill-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-pill-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid rgba(255, 107, 53, 0.4);
}

.btn-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #fff;
}

.btn-pill-outline:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

/* Shared branded modal (Add/Edit/Import dialogs across every
   management page) */
.modal-content-custom {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    background: var(--card-bg);
}

.modal-header-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 1.5rem 1.75rem;
}

.modal-header-custom .modal-title {
    color: white;
    font-weight: 700;
}

.modal-header-custom .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body-custom {
    padding: 1.75rem;
    background: var(--card-bg);
}

.modal-footer-custom {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.75rem;
}

.info-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(56, 189, 248, 0.08));
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 10px;
    margin-bottom: 1.25rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.info-note i {
    color: #0ea5e9;
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.form-label-modal {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-control-modal {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--section-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control-modal:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
    background: var(--card-bg);
}

.field-help-modal {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.btn-modal-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
    color: white;
}

.btn-modal-secondary {
    background: var(--section-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-modal-secondary:hover {
    background: var(--border-color);
}

/* Shared status badges (bookings, leave requests, invoices, etc.) */
.status-pill {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-scheduled, .status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.status-completed, .status-active, .status-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.status-cancelled, .status-rejected, .status-inactive {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.status-default {
    background: rgba(108, 117, 125, 0.15);
    color: var(--text-muted);
}

[data-theme="dark"] .status-scheduled, [data-theme="dark"] .status-pending {
    color: #fbbf24;
}

[data-theme="dark"] .status-completed, [data-theme="dark"] .status-active, [data-theme="dark"] .status-approved {
    color: #4ade80;
}

[data-theme="dark"] .status-cancelled, [data-theme="dark"] .status-rejected, [data-theme="dark"] .status-inactive {
    color: #f87171;
}

/* ============================================================
   APP SIDEBAR - role-specific navigation for signed-in users.
   The top navbar stays global-only (brand, home, dark mode,
   sign out); every role-specific link lives here instead.
   ============================================================ */
:root {
    --navbar-height: 70px;
}

.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1.25rem;
    margin-right: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-toggle-btn:hover,
.sidebar-toggle-btn[aria-expanded="true"] {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

.sidebar-toggle-btn i {
    transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sidebar-toggle-btn[aria-expanded="true"] i {
    transform: rotate(90deg);
}

@media (min-width: 992px) {
    .sidebar-toggle-btn {
        display: none;
    }
}

.app-sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--navbar-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 1035;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 1.25rem 0;
}

.app-sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .app-sidebar.sidebar-open {
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.5);
}

@media (min-width: 992px) {
    .app-sidebar {
        transform: translateX(0);
        box-shadow: none;
    }

    .app-content-wrapper {
        margin-left: 260px;
    }
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1030;
}

.sidebar-backdrop.show {
    display: block;
}

@media (min-width: 992px) {
    .sidebar-backdrop {
        display: none !important;
    }
}

.sidebar-section-label {
    display: block;
    padding: 0 1.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.sidebar-nav-bottom {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.15rem 0.5rem;
    padding: 0.7rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 107, 53, 0.08);
    color: var(--primary-color);
}

.sidebar-link:hover i {
    color: var(--primary-color);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.16), rgba(247, 147, 30, 0.16));
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.15);
}

.sidebar-link.active i {
    color: var(--primary-color);
}
