/* ==========================================
   COLOR SCHEME & VARIABLES
   ========================================== */

:root {
    --primary-color: #1f4d3a;
    --primary-hover: #2f6b52;
    --primary-dark: #24302a;
    --secondary-color: #24302a;
    --success-color: #2f6b52;
    --danger-color: #c2413b;
    --warning-color: #c9a95c;
    --accent-blue: #3b6e8f;
    --accent-copper: #a66a43;
    --light-bg: #f4f7f5;
    --surface-bg: #ffffff;
    --light-border: #e7ece8;
    --border-color: #e7ece8;
    --text-primary: #24302a;
    --text-secondary: #4a5650;
    --text-light: #aab4ae;
    --shadow-sm: 0 2px 10px rgba(24, 50, 39, 0.06);
    --shadow-md: 0 10px 24px rgba(24, 50, 39, 0.08);
    --shadow-lg: 0 18px 36px rgba(24, 50, 39, 0.12);
    --shadow-xl: 0 24px 56px rgba(24, 50, 39, 0.14);
    --border-radius: 14px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;
    --transition: all 0.3s ease;
    --app-mist: linear-gradient(180deg, rgba(244, 247, 245, 0.96) 0%, rgba(235, 242, 238, 0.96) 100%);
    --hero-gradient: linear-gradient(135deg, #205e47 0%, #3f816a 54%, #4f88a4 100%);
    --surface-glass: rgba(255, 255, 255, 0.72);
}

/* ==========================================
   BASE STYLES
   ========================================== */

html, body {
    font-family: Aptos, "Segoe UI", "Trebuchet MS", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background:
        radial-gradient(circle at top left, rgba(78, 138, 111, 0.15), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 110, 143, 0.13), transparent 26%),
        linear-gradient(180deg, #f7faf8 0%, #edf4f0 100%);
    color: var(--text-primary);
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.5), transparent 22%),
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.4), transparent 18%);
    z-index: -1;
}

/* ==========================================
   PAGE CONSISTENCY PATTERNS
   ========================================== */

.products-page,
.services-page,
.packages-page,
.booking-page,
.orders-page,
.order-detail-page,
.quotes-page,
.appointments-page,
.cart-page,
.checkout-page {
    background:
        radial-gradient(circle at 10% 8%, rgba(59, 110, 143, 0.08), transparent 34%),
        radial-gradient(circle at 90% 2%, rgba(47, 107, 82, 0.09), transparent 30%),
        var(--light-bg);
}

.products-header-inner,
.services-header-inner,
.packages-header-inner,
.booking-hero-content {
    border-radius: var(--border-radius-lg) !important;
    background: linear-gradient(145deg, rgba(47, 107, 82, 0.96), rgba(31, 77, 58, 0.98)) !important;
    box-shadow: var(--shadow-lg) !important;
}

.products-eyebrow,
.services-eyebrow,
.packages-eyebrow,
.booking-eyebrow {
    color: #eff8f3 !important;
}

.products-metric,
.packages-metric,
.filter-section,
.empty-state,
.cart-items-section,
.order-summary,
.order-summary-card,
.order-items-card,
.customer-info-card,
.quote-card,
.appointment-card,
.booking-card,
.product-card,
.service-card,
.package-card {
    border-color: var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-md) !important;
}

.category-item.active,
.package-card:hover,
.product-card:hover,
.service-card:hover {
    border-color: var(--primary-color) !important;
}

.package-card .bundle-price,
.package-items li.more-items,
.btn-outline,
.status-badge.paid,
.status-badge.shipped {
    color: var(--primary-color) !important;
}

.btn-outline {
    border-color: var(--primary-color) !important;
}

.btn-outline:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 2.5rem;
}

.page-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 251, 250, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(24, 50, 39, 0.10);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.page-card + .page-card {
    margin-top: 1rem;
}

.page-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

@media (max-width: 900px) {
    .admin-editor-page .grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   CATALOG PAGES (Products, Services, Packages)
   Shared hero header + sidebar/filter patterns
   ========================================== */

.catalog-page {
    padding: 2rem 0 2.5rem;
    background:
        radial-gradient(circle at 10% 8%, rgba(58, 157, 109, 0.12), transparent 35%),
        radial-gradient(circle at 90% 0%, rgba(26, 93, 58, 0.10), transparent 28%),
        #f7faf8;
}

.catalog-header {
    margin: 0 auto 2rem;
    max-width: 1400px;
    padding: 0 1rem;
}

.catalog-header-inner {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background:
        linear-gradient(145deg, rgba(46, 128, 88, 0.94), rgba(23, 78, 49, 0.97)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    color: white;
    box-shadow: 0 18px 40px rgba(16, 58, 37, 0.28);
}

.catalog-eyebrow {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #d7ffe9;
    background: rgba(255, 255, 255, 0.15);
}

.catalog-header-inner h1 {
    margin: 0 0 0.5rem 0;
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.catalog-header-inner p {
    margin: 0 auto;
    max-width: 760px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ffffff;
}

.catalog-header-badges {
    margin-top: 1.3rem;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.catalog-metric {
    min-width: 160px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.24);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.catalog-metric-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.catalog-metric-label {
    font-size: 0.79rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #d7ffe9;
}

.catalog-pill {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.13);
    color: #effff7;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.catalog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.catalog-container.has-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.catalog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-bottom: 2rem;
    position: sticky;
    top: 76px;
    align-self: start;
}

.catalog-sidebar .filter-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e6efe9;
    box-shadow: 0 12px 28px rgba(22, 68, 48, 0.08);
}

.catalog-sidebar .filter-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.catalog-sidebar .search-box .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d8e7df;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #fcfefd;
}

.catalog-sidebar .search-box .form-control:focus {
    outline: none;
    border-color: #2e8058;
    box-shadow: 0 0 0 3px rgba(46, 128, 88, 0.14);
}

.catalog-sidebar .btn {
    border-radius: 11px;
    border-color: #d8e7df;
    background: #ffffff;
    color: #355747;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(22, 68, 48, 0.06);
}

.catalog-sidebar .btn:hover {
    background: #f7fbf9;
    border-color: #bdd8ca;
}

.catalog-main {
    display: flex;
    flex-direction: column;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.35rem;
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e6efe9;
    box-shadow: 0 12px 28px rgba(22, 68, 48, 0.08);
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.empty-state p {
    margin: 0;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .catalog-page {
        padding: 1.25rem 0 2rem;
    }

    .catalog-header {
        margin-bottom: 1.4rem;
    }

    .catalog-header-inner {
        border-radius: 16px;
        padding: 1.7rem 1rem;
    }

    .catalog-header-inner h1 {
        font-size: 1.75rem;
    }

    .catalog-header-inner p {
        font-size: 1rem;
    }

    .catalog-container.has-sidebar {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        order: 2;
        margin-top: 1.1rem;
        position: static;
    }

    .catalog-main {
        order: 1;
    }

    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .catalog-header-badges {
        gap: 0.65rem;
    }

    .catalog-metric {
        min-width: 135px;
        padding: 0.65rem 0.8rem;
    }

    .catalog-pill {
        font-size: 0.72rem;
        padding: 0.4rem 0.68rem;
    }
}

/* ==========================================
   CART & CHECKOUT PAGES
   ========================================== */

.cart-page,
.checkout-page {
    padding: 2rem 0;
    min-height: 100vh;
    background: var(--light-bg);
}

.cart-header,
.checkout-header {
    background: linear-gradient(135deg, #3a9d6d 0%, #1a5d3a 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.cart-header h1,
.checkout-header h1 {
    margin: 0;
    font-size: 2rem;
}

.cart-container,
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.checkout-container {
    max-width: 1000px;
}

/* ==========================================
   AUTH PAGES
   ========================================== */

.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(circle at 12% 8%, rgba(59, 110, 143, 0.08), transparent 32%),
        radial-gradient(circle at 88% 4%, rgba(47, 107, 82, 0.09), transparent 28%),
        var(--light-bg);
}

.auth-card {
    background: var(--surface-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 2.25rem;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h2 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-header p {
    margin: 0;
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 1.1rem;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-footer {
    margin-top: 1.2rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--light-border);
}

.auth-footer p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

.btn-block {
    width: 100%;
}

.auth-card .alert {
    margin-bottom: 1.2rem;
}

.auth-card .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

@media (max-width: 640px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.35rem;
        border-radius: var(--border-radius);
    }
}

/* ==========================================
   DETAIL PAGES
   ========================================== */

.detail-page {
    padding: 1.25rem 0;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.crumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.summary {
    display: grid;
    gap: 0.75rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.price {
    font-size: 2rem;
    color: var(--primary-color);
}

.meta {
    margin: 0;
    color: var(--text-secondary);
}

.feedback {
    margin-top: 0.5rem;
    font-weight: 600;
}

.summary button:focus-visible,
.summary input:focus-visible,
.crumbs a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   LOADING SCREEN
   ========================================== */

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.35em;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* ==========================================
   ERROR SCREEN
   ========================================== */

#blazor-error-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

#blazor-error-ui.show {
    display: flex;
}

.error-container {
    width: 100%;
    max-width: 500px;
    padding: 0 1.25rem;
}

.error-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
}

.error-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.error-actions .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.error-actions .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.error-actions .btn-secondary {
    background-color: var(--light-bg);
    border-color: var(--light-border);
    color: var(--text-secondary);
}

.error-actions .btn-secondary:hover {
    background-color: var(--light-border);
}

/* ==========================================
   APP SHELL LAYOUT
   ========================================== */

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

/* ==========================================
   TOP BAR
   ========================================== */

.app-top-bar {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    min-height: 74px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: 0 16px 38px rgba(24, 50, 39, 0.12);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    z-index: 1000;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .app-top-bar {
        left: 278px;
    }
}

.hamburger-button {
    background: rgba(31, 77, 58, 0.08);
    border: 1px solid rgba(31, 77, 58, 0.12);
    font-size: 1.35rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    transition: var(--transition);
}

.hamburger-button:hover {
    background-color: rgba(31, 77, 58, 0.14);
    color: var(--primary-color);
}

.hamburger-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.top-bar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-right: auto;
    text-decoration: none;
}

.top-bar-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.top-bar-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar-brand-title {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-primary);
}

.top-bar-brand-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-shrink: 0;
    max-width: 52%;
}

.top-bar-user-name {
    font-size: 0.83rem;
    color: var(--text-primary);
    text-align: right;
    line-height: 1.2;
    word-break: break-word;
    padding: 0.55rem 0.8rem;
    border-radius: 16px;
    background: rgba(244, 247, 245, 0.95);
    border: 1px solid rgba(31, 77, 58, 0.08);
}

.top-bar-user-label {
    font-weight: 600;
    margin-right: 0.35rem;
    display: inline-block;
}

.top-bar-user-value {
    font-weight: 700;
}

.top-bar-cta {
    white-space: nowrap;
    padding-inline: 1.35rem;
    border-radius: 18px;
}

/* Mobile adjustments for top bar */
@media (max-width: 640px) {
    .app-top-bar {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        min-height: 64px;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .top-bar-logo {
        height: 34px;
    }

    .top-bar-brand-copy {
        display: none;
    }
    
    .top-bar-user-name {
        font-size: 0.75rem;
        padding: 0.35rem 0.55rem;
    }
    
    .top-bar-user-label {
        display: none; /* Hide "Logged In User:" label on mobile */
    }
    
    .top-bar-actions {
        max-width: 68%;
    }

    .top-bar-cta {
        display: none;
    }
}

/* ==========================================
   SIDEBAR NAVIGATION
   ========================================== */

.app-sidebar {
    position: fixed;
    top: 1rem;
    left: 1rem;
    bottom: 1rem;
    width: 260px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: 0 18px 42px rgba(24, 50, 39, 0.12);
    backdrop-filter: blur(18px);
    z-index: 999;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.app-sidebar.open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .app-sidebar {
        transform: translateX(0);
    }
}

.sidebar-content {
    padding: 5.5rem 0.75rem 1rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Navigation Section */
.nav-section {
    padding: 0 0.2rem;
    margin-bottom: 0.85rem;
}

.nav-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7a73;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.8rem;
    margin: 0 0 0.35rem 0;
}

.nav-section-items {
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
}

/* Navigation Item */
.nav-item-link {
    display: flex;
    align-items: center;
    gap: 0.68rem;
    padding: 0.72rem 0.85rem;
    border-radius: 18px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-item-link:hover {
    background-color: rgba(31, 77, 58, 0.08);
    color: var(--primary-color);
}

.nav-item-link.active {
    background: linear-gradient(135deg, rgba(31, 77, 58, 0.12), rgba(59, 110, 143, 0.10));
    border: 1px solid rgba(31, 77, 58, 0.12);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nav-item-label {
    flex: 1;
}

/* ==========================================
   MOBILE DRAWER OVERLAY
   ========================================== */

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 48, 40, 0.28);
    backdrop-filter: blur(4px);
    z-index: 998;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (min-width: 1024px) {
    .drawer-overlay {
        display: none;
    }
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.app-content {
    margin-top: 92px;
    padding: 1rem;
    flex: 1;
    transition: margin-left 0.3s ease;
}

@media (min-width: 1024px) {
    .app-content {
        margin-left: 278px;
    }
}

.content-inner {
    max-width: 1320px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .app-content {
        padding: 1.5rem;
    }
}

/* ==========================================
   LAYOUT & STRUCTURE (Legacy Compatibility)
   ========================================== */

.page-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    flex: 1;
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .page-content {
        padding: 3rem 2rem;
    }
}

main {
    flex: 1;
}

/* ==========================================
   FOOTER
   ========================================== */

footer {
    background: linear-gradient(180deg, rgba(35, 48, 42, 0.96), rgba(31, 41, 36, 0.98));
    color: #f3f4f6;
    padding: 2.5rem 1.5rem 1.25rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px 28px 0 0;
    margin-left: 1rem;
    margin-right: 1rem;
    margin-bottom: 0;
    box-shadow: 0 18px 44px rgba(24, 50, 39, 0.18);
}

@media (min-width: 1024px) {
    footer {
        margin-left: 294px;
    }
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h5 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-section p {
    color: #e5e7eb;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #d1d5db;
}

.footer-copy {
    margin: 0;
    color: #d1d5db;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    border-radius: 18px;
    font-weight: 600;
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn:focus {
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-color: rgba(31, 77, 58, 0.18);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #427a64);
    border-color: rgba(31, 77, 58, 0.24);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.78);
    color: var(--text-secondary);
    border-color: rgba(31, 77, 58, 0.10);
}

.btn-secondary:hover {
    background-color: #ffffff;
    border-color: rgba(31, 77, 58, 0.18);
}

.btn-light {
    background: #fbfaf8;
    color: var(--primary-dark);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 24px rgba(18, 33, 28, 0.12);
}

.btn-light:hover {
    background: #ffffff;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.34);
}

.btn-accent {
    background: linear-gradient(135deg, #b7743f, var(--accent-copper));
    color: #ffffff;
    border-color: rgba(166, 106, 67, 0.28);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #c07f49, #b16d40);
    color: #ffffff;
}

/* ==========================================
   HOME HERO
   ========================================== */

.home-page {
    padding: 0.5rem 0 2rem;
}

.home-hero {
    min-height: calc(100vh - 160px);
    border-radius: var(--border-radius-xl);
    background: var(--hero-gradient);
    padding: clamp(2rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 3.5rem);
    box-shadow: 0 28px 60px rgba(26, 59, 46, 0.22);
    overflow: hidden;
    position: relative;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.14), transparent 28%),
        radial-gradient(circle at 86% 22%, rgba(255, 255, 255, 0.12), transparent 24%);
    pointer-events: none;
}

.home-hero-copy,
.home-feature-card {
    position: relative;
    z-index: 1;
}

.home-hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.home-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #eef8f2;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.home-hero-copy h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.home-hero-copy p {
    margin: 0;
    max-width: 720px;
    font-size: clamp(1.08rem, 2vw, 1.45rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
}

.home-hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 2.2rem;
}

.home-feature-shell {
    padding: 1.45rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(235, 245, 240, 0.18), rgba(104, 158, 184, 0.20));
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.home-feature-card-inner {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 1.4rem;
    box-shadow: 0 16px 30px rgba(24, 50, 39, 0.12);
}

.home-feature-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.home-feature-kicker {
    margin: 0 0 0.25rem;
    color: #7d8d86;
    font-size: 0.95rem;
}

.home-feature-header h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    color: var(--text-primary);
}

.home-feature-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: #efe7d3;
    color: #9a7330;
    font-weight: 700;
}

.home-feature-includes {
    margin-top: 1.35rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: #eef3f0;
}

.home-feature-includes span {
    display: block;
    color: #7d8d86;
    margin-bottom: 0.5rem;
}

.home-feature-includes p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.home-feature-pricing {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.home-feature-pricing span {
    display: block;
    color: #7d8d86;
    margin-bottom: 0.2rem;
}

.home-feature-pricing strong {
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1;
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .home-page {
        padding-top: 0;
    }

    .home-hero {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .home-hero-actions {
        flex-direction: column;
    }

    .home-hero-actions .btn,
    .home-feature-pricing .btn {
        width: 100%;
    }

    .home-feature-pricing {
        flex-direction: column;
        align-items: stretch;
    }
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    border: 2px solid var(--danger-color);
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    border: 2px solid var(--success-color);
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================
   FORMS
   ========================================== */

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 2px solid var(--light-border);
    border-radius: var(--border-radius);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text-primary);
}

.form-control::placeholder,
.form-select {
    color: var(--text-light);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ==========================================
   CARDS
   ========================================== */

.card {
    border: 1px solid var(--light-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

.card-header {
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--light-border);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-footer {
    background-color: var(--light-bg);
    border-top: 1px solid var(--light-border);
    padding: 1rem 1.5rem;
}

/* ==========================================
   ALERTS & BADGES
   ========================================== */

.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-color);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #78350f;
    border-left: 4px solid var(--warning-color);
}

.badge {
    border-radius: 0.25rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-primary {
    background-color: rgba(59, 130, 246, 0.2);
    color: var(--primary-dark);
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #7f1d1d;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

code {
    background-color: var(--light-bg);
    color: #e11d48;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

/* ==========================================
   TABLES
   ========================================== */

.table {
    border-collapse: collapse;
    width: 100%;
}

.table thead th {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--light-border);
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-border);
}

.table tbody tr:hover {
    background-color: var(--light-bg);
}

/* ==========================================
   UTILITIES
   ========================================== */

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-light) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.border {
    border: 1px solid var(--light-border) !important;
}

.border-top {
    border-top: 1px solid var(--light-border) !important;
}

.border-bottom {
    border-bottom: 1px solid var(--light-border) !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.rounded-lg {
    border-radius: calc(var(--border-radius) * 2) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.opacity-50 {
    opacity: 0.5 !important;
}

.opacity-75 {
    opacity: 0.75 !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.transition {
    transition: var(--transition) !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .page-content {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .navbar, footer {
        display: none;
    }

    body {
        background-color: white;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: none;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   ADMIN NAVIGATION STYLES
   ========================================== */

.nav-divider {
    height: 1px;
    background-color: var(--light-border);
    margin: 1rem 0;
}

.admin-link {
    opacity: 0.85;
    font-size: 0.9rem;
}

.admin-link i {
    opacity: 0.7;
}

.admin-link:hover {
    opacity: 1;
}

.admin-link:hover i {
    opacity: 1;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.625rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    width: 100%;
}

.btn-logout:hover {
    color: var(--danger-color) !important;
    background-color: rgba(239, 68, 68, 0.1);
}

.btn-logout i {
    font-size: 1.1rem;
}

/* ==========================================
   ADMIN DROPDOWN - HOVER FUNCTIONALITY
   ========================================== */

.admin-dropdown {
    position: relative;
}

.admin-dropdown .dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.admin-dropdown .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.25rem;
    vertical-align: 0.1em;
    content: "";
    border-top: 0.35em solid;
    border-right: 0.35em solid transparent;
    border-bottom: 0;
    border-left: 0.35em solid transparent;
}

.admin-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--light-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* Show dropdown on hover */
.admin-dropdown:hover .dropdown-menu,
.admin-dropdown:focus-within .dropdown-menu {
    display: block;
    animation: fadeInDown 0.2s ease;
}

/* Show dropdown when toggle is clicked (aria-expanded) */
.admin-dropdown .dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    display: block;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: var(--transition);
}

.admin-dropdown .dropdown-item:hover,
.admin-dropdown .dropdown-item:focus {
    color: var(--primary-color);
    background-color: var(--light-bg);
    text-decoration: none;
}

.admin-dropdown .dropdown-item.active {
    color: var(--primary-color);
    background-color: rgba(45, 106, 80, 0.1);
    border-left: 3px solid var(--primary-color);
}

.admin-dropdown .dropdown-item i {
    font-size: 1.1rem;
    opacity: 0.7;
}

.admin-dropdown .dropdown-item:hover i,
.admin-dropdown .dropdown-item.active i {
    opacity: 1;
}

/* Responsive adjustments for mobile */
@media (max-width: 992px) {
    .admin-dropdown .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        box-shadow: none;
        border: none;
        background-color: var(--light-bg);
        border-left: 3px solid var(--primary-color);
    }
    
    .admin-dropdown:hover .dropdown-menu,
    .admin-dropdown:focus-within .dropdown-menu {
        display: none;
    }
    
    /* Use click-based toggle on mobile */
    .admin-dropdown .dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
        display: block;
    }
}

