:root {
    --shop-primary: #099CF4;
    --shop-primary-hover: #2cabf7;
    --shop-primary-deep: #077dc3;
    --shop-text: #333333;
    --shop-muted: #777777;
    --shop-surface: #ffffff;
    --shop-surface-soft: #f7f7f7;
    --shop-border: #e8e8e8;
    --shop-accent: var(--shop-primary);
}

.btn {
    border-radius: 999px;
}

.btn-primary {
    --bs-btn-bg: var(--shop-primary);
    --bs-btn-border-color: var(--shop-primary);
    --bs-btn-hover-bg: var(--shop-primary-hover);
    --bs-btn-hover-border-color: var(--shop-primary-hover);
    --bs-btn-active-bg: var(--shop-primary-deep);
    --bs-btn-active-border-color: var(--shop-primary-deep);
    background-color: var(--shop-primary);
    border-color: var(--shop-primary) var(--shop-primary) var(--shop-primary-deep);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--shop-primary-hover);
    border-color: var(--shop-primary-hover) var(--shop-primary-hover) var(--shop-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--shop-primary);
    --bs-btn-border-color: var(--shop-primary);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--shop-primary);
    --bs-btn-hover-border-color: var(--shop-primary);
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: var(--shop-primary-deep);
    --bs-btn-active-border-color: var(--shop-primary-deep);
    color: var(--shop-primary);
    border-color: var(--shop-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--shop-primary);
    border-color: var(--shop-primary);
    color: #fff;
}

/* ===== SHOP HEADER - Matches Main Website ===== */
.shop-header {
    background: var(--shop-surface);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

/* Top Bar */
.shop-header__topbar {
    background: var(--shop-primary);
    border-bottom: 0;
}

.shop-header__topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 16px;
}

.shop-header__topbar-nav {
    display: flex;
    gap: 20px;
}

.shop-header__topbar-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-header__topbar-link:hover {
    color: #ffffff;
    text-decoration: none;
}

.shop-header__topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-header__quote-btn {
    background: #ffffff;
    color: #212529;
    border: 0;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 6px 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.shop-header__quote-btn:hover {
    background: #f8f9fa;
    color: #000;
    transform: translateY(-1px);
}

.shop-header__social {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.shop-header__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.shop-header__social a:hover {
    background: #ffffff;
    color: var(--shop-primary);
    border-color: #ffffff;
    text-decoration: none;
}

/* Main Header */
.shop-header__main {
    border-bottom: 1px solid var(--shop-border);
}

.shop-header__main-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
}

.shop-header__left {
    display: flex;
    align-items: center;
}

.shop-header__home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--shop-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-header__home-link:hover {
    color: var(--shop-primary);
    text-decoration: none;
}

.shop-header__home-link i {
    font-size: 0.75rem;
}

.shop-header__center {
    display: flex;
    justify-content: center;
}

.shop-header__logo {
    display: inline-block;
}

.shop-header__logo-img {
    max-height: 56px;
    width: auto;
    display: block;
}

.shop-header__logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--shop-text);
}

.shop-header__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.shop-header__utility-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--shop-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

.shop-header__utility-link:hover {
    color: var(--shop-primary);
    text-decoration: none;
}

.shop-header__cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--shop-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
}

.shop-header__account-btn {
    cursor: pointer;
}

.shop-header__account-btn::after {
    margin-left: 6px;
    font-size: 0.7rem;
}

/* Navigation Bar */
.shop-header__nav {
    background: #f8f9fa;
    border-bottom: 1px solid var(--shop-border);
}

.shop-header__nav-inner {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
}

.shop-header__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.shop-header__nav-link:hover {
    color: #111827;
    background: rgba(9, 156, 244, 0.08);
    text-decoration: none;
}

.shop-header__nav-link.is-active {
    color: #fff;
    background: var(--shop-primary);
    box-shadow: 0 2px 4px rgba(9, 156, 244, 0.25);
}

.shop-header__nav-link.is-active:hover {
    background: var(--shop-primary-hover);
}

.shop-header__nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--shop-primary);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    margin-left: 2px;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .shop-header__topbar-inner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 6px 0;
    }
    
    .shop-header__topbar-nav {
        gap: 12px;
    }
    
    .shop-header__topbar-link {
        font-size: 0.7rem;
    }
    
    .shop-header__quote-btn {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
    
    .shop-header__social {
        display: none;
    }
    
    .shop-header__main-inner {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        padding: 12px 0;
    }
    
    .shop-header__home-link span {
        display: none;
    }
    
    .shop-header__logo-img {
        max-height: 44px;
    }
    
    .shop-header__utility-link span:not(.shop-header__cart-count) {
        display: none;
    }
    
    .shop-header__nav-inner {
        gap: 4px;
        padding: 6px 0;
    }
    
    .shop-header__nav-link {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .shop-header__nav-link span {
        display: none;
    }
}

.shop-card > a.d-block {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 252px;
    padding: 12px;
    background:
        radial-gradient(circle at 50% 18%, rgba(9, 156, 244, 0.08), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

/* Cards */
.shop-card img {
    object-fit: contain;
    object-position: center center;
    background: transparent;
    padding: 0;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 228px;
}

.shop-card {
    border-color: var(--shop-border);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.shop-card .card-title {
    color: var(--shop-text);
}

.shop-card .btn-outline-primary {
    border-color: var(--shop-primary);
    color: var(--shop-primary);
}

.shop-card .btn-outline-primary:hover,
.shop-card .btn-outline-primary:focus {
    background: var(--shop-primary);
    border-color: var(--shop-primary);
    color: #fff;
}

.shop-card .card-body {
    min-height: 220px;
}

/* Admin Styles */
.admin-body {
    background: #f8fafc;
    margin: 0;
}

.admin-body .btn {
    border-radius: 0.4rem;
}

.admin-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(248, 250, 252, 0.66);
    backdrop-filter: blur(1px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.admin-loading-overlay.is-active {
    display: flex;
}

.admin-loading-overlay__panel {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid #dbe3ed;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.table td,
.table th {
    vertical-align: middle;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
}

.admin-shell--guest {
    grid-template-columns: 1fr;
}

.admin-sidebar {
    background: #111827;
    color: #e5e7eb;
    border-right: 1px solid #1f2937;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
}

.admin-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-sidebar__brand {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    padding: 4px 8px 10px;
    border-bottom: 1px solid #1f2937;
    flex: 1;
}

.admin-sidebar__toggle {
    display: none;
    border: 1px solid #334155;
    background: #1f2937;
    color: #e5e7eb;
    border-radius: 0.4rem;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.admin-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar__group {
    border-radius: 8px;
    overflow: hidden;
}

.admin-sidebar__summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 8px 10px 4px;
}

.admin-sidebar__summary::-webkit-details-marker {
    display: none;
}

.admin-sidebar__summary::after {
    content: '+';
    float: right;
    color: #6b7280;
}

.admin-sidebar__group[open] .admin-sidebar__summary::after {
    content: '-';
}

.admin-sidebar__subgroup {
    margin: 2px 0;
}

.admin-sidebar__summary-link {
    list-style: none;
    cursor: pointer;
}

.admin-sidebar__summary-link::-webkit-details-marker {
    display: none;
}

.admin-sidebar__summary-link::after {
    content: '+';
    margin-left: auto;
    color: #94a3b8;
    font-weight: 700;
}

.admin-sidebar__subgroup[open] .admin-sidebar__summary-link::after {
    content: '-';
}

.admin-sidebar__sublinks {
    padding-left: 10px;
}

.admin-sidebar__link {
    color: #d1d5db;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background-color 120ms ease, color 120ms ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-sidebar__badge {
    margin-left: auto;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.38rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35rem;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.admin-sidebar__icon {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: #1f2937;
    border: 1px solid #374151;
    color: #cbd5e1;
    font-size: 0.68rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-sidebar__link:hover {
    color: #fff;
    background: #1f2937;
}

.admin-sidebar__link.is-active {
    color: #fff;
    background: #2563eb;
}

.admin-sidebar__link.is-active .admin-sidebar__icon {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.admin-sidebar__link--sub {
    margin-left: 10px;
    width: calc(100% - 10px);
}

.admin-sidebar__link--muted {
    opacity: 0.58;
    cursor: not-allowed;
    pointer-events: none;
}

.admin-sidebar__logout {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #1f2937;
}

.admin-content-wrap {
    min-width: 0;
}

.admin-sidebar__backdrop {
    display: none;
}

.admin-mobile-menu-btn {
    display: none;
}

.admin-content-topbar {
    height: 58px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.admin-content {
    padding: 22px;
}

.admin-home__topbar .form-control-lg,
.admin-home__topbar .form-select-lg {
    font-size: 1rem;
}

.admin-home__search {
    border: 1px solid #d0d7e2;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-home__action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.admin-home__action-card {
    display: block;
    text-decoration: none;
    color: #111827;
    border: 1px solid #dbe3ed;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.admin-home__action-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.admin-home__action-card--fulfill {
    border-left: 4px solid #d97706;
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 70%);
}

.admin-home__action-card--invoice {
    border-left: 4px solid #dc2626;
    background: linear-gradient(180deg, #fff5f5 0%, #ffffff 70%);
}

.admin-home__action-card--today {
    border-left: 4px solid #2563eb;
    background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 70%);
}

.admin-home__action-label {
    font-size: 0.84rem;
    color: #475569;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-home__action-value {
    margin-top: 3px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
}

.admin-home__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.admin-home__dot--ok {
    background: #16a34a;
}

.admin-home__dot--warn {
    background: #d97706;
}

.admin-home__dot--alert {
    background: #dc2626;
}

.admin-home__action-state {
    margin-top: 2px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-home__action-state--ok {
    color: #15803d;
}

.admin-home__action-state--warn {
    color: #b45309;
}

.admin-home__action-state--alert {
    color: #b91c1c;
}

.admin-home__action-help {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
}

.admin-home__metric {
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.admin-home__metric-tools {
    padding: 2px 2px 0;
}

.admin-home__metric-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.admin-home__metric-label {
    color: #475569;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.admin-home__metric-select {
    width: auto;
    min-width: 122px;
    max-width: 170px;
    font-size: 0.77rem;
    background-color: #fff;
}

.admin-home__metric--sales {
    border-top: 4px solid #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 32%);
}

.admin-home__metric--paid {
    border-top: 4px solid #16a34a;
    background: linear-gradient(180deg, #effdf5 0%, #ffffff 32%);
}

.admin-home__metric--unpaid {
    border-top: 4px solid #dc2626;
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 32%);
}

.admin-home__metric--orders {
    border-top: 4px solid #0891b2;
    background: linear-gradient(180deg, #ecfeff 0%, #ffffff 32%);
}

.admin-home__metric--amber {
    border-top: 4px solid #d97706;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 32%);
}

.admin-home__metric--blue {
    border-top: 4px solid #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 32%);
}

.admin-home__metric--violet {
    border-top: 4px solid #7c3aed;
    background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 32%);
}

.admin-home__metric--cyan {
    border-top: 4px solid #0e7490;
    background: linear-gradient(180deg, #ecfeff 0%, #ffffff 32%);
}

.admin-home__metric--green {
    border-top: 4px solid #15803d;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 32%);
}

.admin-home__metric--slate {
    border-top: 4px solid #475569;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 32%);
}

.admin-home__metric .h4 {
    letter-spacing: 0.01em;
}

.admin-home__metric-chart {
    height: 26px;
    display: flex;
    align-items: flex-end;
}

.admin-home__status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 0.84rem;
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid transparent;
    color: #111827;
    transition: filter 120ms ease, transform 120ms ease;
}

.admin-home__status-pill strong {
    font-weight: 700;
}

.admin-home__status-pill:hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.admin-home__status-pill--slate {
    background: #f1f5f9;
    border-color: #dbe5ee;
}

.admin-home__status-pill--amber {
    background: #fef3c7;
    border-color: #f4d47a;
}

.admin-home__status-pill--red {
    background: #fee2e2;
    border-color: #f7b5b5;
}

.admin-home__status-pill--blue {
    background: #dbeafe;
    border-color: #b8d5fb;
}

.admin-home__status-pill--violet {
    background: #ede9fe;
    border-color: #cdc4fa;
}

.admin-home__status-pill--cyan {
    background: #cffafe;
    border-color: #9cebf2;
}

.admin-home__status-pill--green {
    background: #dcfce7;
    border-color: #b4efc8;
}

@media (max-width: 1199.98px) {
    .admin-home__action-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        grid-template-columns: 1fr;
        position: relative;
    }

    .admin-sidebar {
        border-right: 1px solid #1f2937;
        border-bottom: 0;
        padding: 10px;
        gap: 8px;
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 320px);
        height: 100vh;
        z-index: 1040;
        transform: translateX(-102%);
        transition: transform 180ms ease;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
        overflow-y: auto;
    }

    .admin-sidebar__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-sidebar__brand {
        border-bottom: 0;
        padding: 2px 6px;
        min-height: 34px;
        display: flex;
        align-items: center;
    }

    .admin-sidebar__nav {
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .admin-sidebar__summary {
        width: 100%;
        padding: 4px 2px 0;
    }

    .admin-sidebar__link {
        padding: 6px 10px;
        font-size: 0.92rem;
    }

    .admin-sidebar__logout {
        margin-top: 0;
        border-top: 0;
        padding-top: 0;
        display: none;
    }

    .admin-sidebar.is-open .admin-sidebar__nav {
        display: flex;
    }

    .admin-sidebar.is-open .admin-sidebar__logout {
        display: block;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-sidebar__backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.42);
        z-index: 1030;
        display: block;
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .admin-sidebar__backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-mobile-menu-btn {
        display: inline-flex;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1050;
        border: 1px solid #d1d5db;
        background: #ffffff;
        color: #111827;
        border-radius: 0.4rem;
        padding: 6px 12px;
        font-size: 0.86rem;
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
    }

    body.admin-menu-open .admin-mobile-menu-btn {
        display: none;
    }

    body.admin-menu-open {
        overflow: hidden;
    }

    .admin-content-topbar {
        height: auto;
        min-height: 44px;
        padding: 10px 14px;
    }

    .admin-content {
        padding: 52px 14px 14px;
    }
}
