/* ===== GLOBAL DESIGN SYSTEM ===== */
:root {
    /* Primary Palette */
    --plus-primary: #0a1e32;
    --plus-primary-light: #1a3a5c;
    --plus-secondary: #2d6da8;
    --plus-accent: #f4a261;
    --plus-gold: #e9c46a;
    --plus-success: #2a9d8f;
    --plus-danger: #e76f51;
    /* Neutrals */
    --plus-bg: #f8fafc;
    --plus-surface: #ffffff;
    --plus-text: #1a1a2e;
    --plus-text-muted: #6b7280;
    --plus-border: #e5e7eb;
    /* Shadows */
    --plus-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --plus-shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --plus-shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --plus-shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    /* Radius */
    --plus-radius-sm: 8px;
    --plus-radius-md: 12px;
    --plus-radius-lg: 20px;
    --plus-radius-xl: 28px;
    /* Transitions */
    --plus-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal-title {
    color: #f4a261;
}

.order-status-lost {
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
}
 
.order-status-instock {
    background: rgba(47, 174, 102, 0.15);
    color: #2fae66;
}

.order-status-sold {
    background: rgba(45, 109, 168, 0.15);
    color: #2d6da8;
}

.order-status-returned {
    background: rgba(242, 169, 59, 0.15);
    color: #b3781f;
}

.order-status-defective {
    background: rgba(214, 69, 69, 0.15);
    color: #d64545;
}


.order-status-draft {
    background: rgba(139, 147, 167, 0.2);
    color: #6b7280;
}
.order-status-onhold {
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
}
/* gray — inert, not yet active */
.order-status-scheduled {
    background: rgba(45, 109, 168, 0.15);
    color: #2d6da8;
}
/* blue — queued, waiting on a future time */
.order-status-sending {
    background: rgba(242, 169, 59, 0.15);
    color: #b3781f;
}
/* amber — actively happening right now */
.order-status-sent {
    background: rgba(47, 174, 102, 0.15);
    color: #2fae66;
}
/* green — completed successfully */
.order-status-failed {
    background: rgba(214, 69, 69, 0.15);
    color: #d64545;
}
/* red — needs attention */

/* ===== POLISHED ORDERS TABLE ===== */
.order-status-partiallypaid {
    background: rgba(242, 169, 59, 0.15);
    color: #b3781f;
}

.orders-table-polished tbody tr.order-row {
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    border-bottom: 1px solid var(--plus-border, #eef0f3); /* hairline divider, not a full grid */
}

    .orders-table-polished tbody tr.order-row:hover,
    .orders-table-polished tbody tr.order-row:focus-visible {
        background-color: rgba(45, 109, 168, 0.04);
    }

    .orders-table-polished tbody tr.order-row:last-child {
        border-bottom: none;
    }

    .orders-table-polished tbody tr.order-row td {
        padding-top: 1rem;
        padding-bottom: 1rem; /* more breathing room than the default table density */
    }

.order-number-pill {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    background: var(--plus-bg, #f4f6f8);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--plus-primary);
}

/* Small colored dot inside the status badge, matching the badge's own
   color via currentColor — no separate color mapping to keep in sync. */
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 5px;
    vertical-align: middle;
}

.orders-table-polished .fa-chevron-right {
    transition: transform 0.15s ease;
}

.orders-table-polished tr.order-row:hover .fa-chevron-right {
    transform: translateX(3px);
    color: var(--plus-secondary) !important;
}

    /* ===== STICKY WHATSAPP BUTTON ===== */
    .whatsapp-float {
        position: fixed;
        left: 1.25rem;
        bottom: 1.25rem;
        width: 56px;
        height: 56px;
        background: #25D366; /* WhatsApp's own brand green — instantly recognizable, not your site accent color */
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        box-shadow: var(--plus-shadow-lg);
        z-index: 1040;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        animation: whatsapp-pulse 2.5s ease-in-out infinite;
    }

        .whatsapp-float:hover,
        .whatsapp-float:focus-visible {
            transform: scale(1.08);
            color: #fff;
            box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
        }

    @keyframes whatsapp-pulse {
        0%, 100% {
            box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
        }

        50% {
            box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .whatsapp-float {
            animation: none;
        }
    }

    @media (max-width: 575.98px) {
        .whatsapp-float {
            left: 1rem;
            bottom: 1rem;
            width: 50px;
            height: 50px;
            font-size: 1.5rem;
        }
    }

.order-status-requested {
    background: rgba(242, 169, 59, 0.15);
    color: #b3781f;
}

.order-status-approved {
    background: rgba(45, 109, 168, 0.15);
    color: #2d6da8;
}

.order-status-rejected {
    background: rgba(214, 69, 69, 0.15);
    color: #d64545;
}

.order-status-itemreceived {
    background: rgba(14, 124, 123, 0.15);
    color: #0e7c7b;
}

.order-status-completed {
    background: rgba(47, 174, 102, 0.15);
    color: #2fae66;
}
 
    /* ===== ORDER STATUS BADGES ===== */
    .order-status-badge {
        font-size: 0.7rem;
        font-weight: 600;
        padding: 0.3rem 0.6rem;
        border-radius: 999px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .order-status-pending {
        background: rgba(242, 169, 59, 0.15);
        color: #b3781f;
    }

    .order-status-confirmed {
        background: rgba(45, 109, 168, 0.15);
        color: #2d6da8;
    }

    .order-status-processing {
        background: rgba(45, 109, 168, 0.15);
        color: #2d6da8;
    }

    .order-status-shipped {
        background: rgba(14, 124, 123, 0.15);
        color: #0e7c7b;
    }

    .order-status-outfordelivery {
        background: rgba(14, 124, 123, 0.15);
        color: #0e7c7b;
    }

    .order-status-delivered {
        background: rgba(47, 174, 102, 0.15);
        color: #2fae66;
    }

    .order-status-cancelled {
        background: rgba(214, 69, 69, 0.15);
        color: #d64545;
    }

    .order-status-refunded {
        background: rgba(139, 147, 167, 0.2);
        color: #6b7280;
    }

    .order-status-returned {
        background: rgba(139, 147, 167, 0.2);
        color: #6b7280;
    }

    /* ===== AUTH FORMS (Login, Register, etc.) ===== */
    .form-floating > .form-control:focus {
        border-color: var(--plus-secondary);
        box-shadow: 0 0 0 0.2rem rgba(45, 109, 168, 0.15);
    }

    .form-floating > label {
        color: var(--plus-text-muted);
    }

    #account a {
        color: var(--plus-secondary);
        text-decoration: none;
    }

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

    /* ===== Password visibility toggle ===== */
    .password-field-wrapper {
        position: relative;
    }

        .password-field-wrapper input.form-control {
            padding-right: 2.75rem; /* room for the toggle icon, avoids overlapping typed text */
        }

    .password-toggle-btn {
        position: absolute;
        top: 50%;
        right: 0.75rem;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: var(--plus-text-muted);
        cursor: pointer;
        padding: 0.25rem;
        z-index: 5;
        transition: color 0.15s ease;
    }

        .password-toggle-btn:hover,
        .password-toggle-btn:focus-visible {
            color: var(--plus-secondary);
        }


    /* ===== ADMIN / ACCOUNT DROPDOWN MENUS ===== */
    .admin-dropdown {
        min-width: 230px;
        border: none;
        border-radius: var(--plus-radius-md);
        padding: 0.5rem 0;
        max-height: 80vh; /* NEW */
        overflow-y: auto; /* NEW */
    }

        .admin-dropdown .dropdown-header {
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--plus-secondary);
            padding: 0.5rem 1rem 0.25rem;
        }

        .admin-dropdown .dropdown-item {
            padding: 0.5rem 1rem;
            font-size: 0.9rem;
            transition: var(--plus-transition);
        }

            .admin-dropdown .dropdown-item:hover,
            .admin-dropdown .dropdown-item:focus {
                background: rgba(45, 109, 168, 0.08);
                color: var(--plus-primary);
            }

        .admin-dropdown .dropdown-divider {
            margin: 0.4rem 0;
        }

        /* The Logout button lives inside a <form> for CSRF safety, but should
       look and behave exactly like the other dropdown-item links. */
        .admin-dropdown form .dropdown-item {
            width: 100%;
            text-align: left;
            border: none;
            background: none;
        }

    html {
        scroll-behavior: smooth;
    }

    .receipt-export-clone table tr,
    .receipt-export-clone .row,
    .receipt-export-clone hr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    @media (prefers-reduced-motion: reduce) {
        html {
            scroll-behavior: auto;
        }

        * {
            animation-duration: 0.001ms !important;
            transition-duration: 0.001ms !important;
        }
    }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        background-color: var(--plus-bg);
        color: var(--plus-text);
        line-height: 1.6;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    /* ===== ACCESSIBILITY: skip link + visible focus ring ===== */

    .skip-link {
        position: absolute;
        left: -999px;
        top: 0;
        background: var(--plus-primary);
        color: #fff;
        padding: 0.6rem 1.2rem;
        border-radius: 0 0 var(--plus-radius-sm) 0;
        z-index: 1060;
        font-weight: 600;
        text-decoration: none;
    }

        .skip-link:focus {
            left: 0;
        }

    :focus-visible {
        outline: 2px solid var(--plus-secondary);
        outline-offset: 2px;
    }

    /* ===== NAVBAR ===== */
    .navbar-plus {
        background: linear-gradient(135deg, var(--plus-primary) 0%, var(--plus-primary-light) 100%);
        padding: 0.75rem 0;
        box-shadow: var(--plus-shadow-lg);
        border-bottom: 3px solid var(--plus-accent);
        position: fixed; /* was: sticky */
        top: 0;
        left: 0;
        width: 100%; /* fixed elements don't inherit container width automatically */
        z-index: 1050;
        backdrop-filter: blur(10px);
        transition: var(--plus-transition);
    }
        /*.main-wrapper {
    padding-top: var(--navbar-height, 80px);
}*/
        /*.navbar-plus {
    background: linear-gradient(135deg, var(--plus-primary) 0%, var(--plus-primary-light) 100%);
    padding: 0.75rem 0;
    box-shadow: var(--plus-shadow-lg);
    border-bottom: 3px solid var(--plus-accent);
    position: sticky;
    top: 0;
    z-index: 1050;
    backdrop-filter: blur(10px);
    transition: var(--plus-transition);
}*/

        .navbar-plus .navbar-brand {
            font-weight: 800;
            font-size: 1.5rem;
            letter-spacing: -0.5px;
            color: white !important;
            transition: var(--plus-transition);
        }

            .navbar-plus .navbar-brand i {
                color: var(--plus-accent);
                margin-right: 0.5rem;
                font-size: 1.4rem;
            }

            .navbar-plus .navbar-brand span {
                color: var(--plus-accent);
                font-weight: 300;
            }

        .navbar-plus .nav-link {
            color: rgba(255,255,255,0.85) !important;
            font-weight: 500;
            font-size: 0.95rem;
            padding: 0.5rem 1.2rem;
            border-radius: 50px;
            transition: var(--plus-transition);
            position: relative;
        }

            .navbar-plus .nav-link:hover {
                color: white !important;
                background: rgba(255,255,255,0.1);
                transform: translateY(-1px);
            }

            .navbar-plus .nav-link.active {
                background: var(--plus-accent);
                color: var(--plus-primary) !important;
                font-weight: 600;
                box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
            }

            .navbar-plus .nav-link .nav-icon {
                margin-right: 0.4rem;
            }

        .navbar-plus .navbar-toggler {
            border-color: rgba(255,255,255,0.2);
            padding: 0.4rem 0.6rem;
        }

        .navbar-plus .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }

    /* Cart buttons (converted from <a href="#"> to real <button> elements) */
    .cart-trigger-btn {
        background: none;
        border: none;
        cursor: pointer;
        font: inherit;
    }

    /* ===== MAIN CONTENT ===== */
    .main-wrapper {
        flex: 1 0 auto;
        padding-top: var(--navbar-height, 80px);
        padding: 2rem 0 3rem;
    }

    /* ===== FOOTER ===== */
    .footer-plus {
        background: linear-gradient(135deg, var(--plus-primary) 0%, var(--plus-primary-light) 100%);
        color: rgba(255,255,255,.85);
        border-top: 3px solid var(--plus-accent);
        padding: 4rem 0 1.5rem;
        margin-top: auto;
    }



        .footer-plus h5::after {
            content: "";
            /*display: block;*/
            width: 45px;
            height: 3px;
            background: var(--plus-accent);
            border-radius: 30px;
            margin-top: .6rem;
        }

        .footer-plus p,
        .footer-plus span,
        .footer-plus li {
            color: rgba(255,255,255,.75);
        }

        .footer-plus ul {
            padding: 0;
            margin: 0;
        }

    /* additional polish for social icons & links */
    .social-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255,255,255,0.08);
        color: #fff;
        margin-right: 6px;
        transition: 0.2s;
        text-decoration: none;
    }

        .social-icon:hover {
            background: rgba(255,255,255,0.2);
            color: #f8b84a; /* orange accent */
        }

    .footer-links-grid a, .contact-item a {
        color: rgba(255,255,255,0.8);
        text-decoration: none;
        transition: 0.2s;
    }

        .footer-links-grid a:hover, .contact-item a:hover {
            color: #f8b84a;
            text-decoration: underline;
        }

    .contact-item {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
        color: rgba(255,255,255,0.8);
    }

        .contact-item i {
            width: 20px;
            text-align: center;
        }

    .footer-divider {
        border-color: rgba(255,255,255,0.15);
        margin: 1.2rem 0;
    }

    .footer-bottom {
        color: rgba(255,255,255,0.7);
        font-size: 0.9rem;
    }

        .footer-bottom strong {
            color: #fff;
        }

    .text-accent {
        color: #f8b84a !important;
    }
    /* small screen overrides: contact info inline with semicolon */
    @media (max-width: 767.98px) {
        .contact-info-inline {
            display: flex !important;
            flex-wrap: wrap;
            justify-content: center;
            column-gap: 0.5rem;
            row-gap: 0.25rem;
            font-size: 0.9rem;
        }

            .contact-info-inline .contact-item {
                display: inline-flex;
                margin-bottom: 0;
                white-space: nowrap;
            }


        /* override column stacking: everything above quick links = col-md-12, quick+products = 6 each */
        .footer-grid-small .col-md-6:first-of-type {
            flex: 0 0 100% !important;
            max-width: 100% !important;
        }

        .footer-grid-small .col-md-6:nth-child(2),
        .footer-grid-small .col-md-6:nth-child(3) {
            flex: 0 0 50% !important;
            max-width: 50% !important;
        }
        /* contact column becomes full width, but we handle inline inside */
        .footer-grid-small .col-md-6:last-child {
            flex: 0 0 100% !important;
            max-width: 100% !important;
        }
        /* remove default list style from contact inline */
        .contact-info-inline ul {
            padding-left: 0;
            margin-bottom: 0;
            list-style: none;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.25rem 0.75rem;
        }

            .contact-info-inline ul li {
                display: inline-flex;
                align-items: center;
            }
    }
    /* small extra: ensure h5 stay visible */
    h5 {
        color: #fff;
        font-weight: 600;
    }

    .footer-plus {
        padding: 2.5rem 0 1.5rem;
    }

        .footer-plus li {
            list-style: none;
            margin-bottom: .7rem;
        }

        .footer-plus a {
            color: rgba(255,255,255,.75);
            text-decoration: none;
            transition: .3s;
        }

            .footer-plus a:hover {
                color: var(--plus-accent);
                padding-left: 5px;
            }

        .footer-plus .social-icon {
            display: inline-flex;
            justify-content: center;
            align-items: center;
            width: 44px;
            height: 44px;
            margin-right: .5rem;
            border-radius: 50%;
            background: rgba(255,255,255,.08);
            color: #fff;
            transition: .3s;
        }

            .footer-plus .social-icon:hover {
                background: var(--plus-accent);
                color: var(--plus-primary);
                transform: translateY(-4px);
                box-shadow: 0 8px 20px rgba(244,162,97,.35);
            }

        .footer-plus .contact-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin-bottom: 12px;
        }

            .footer-plus .contact-item i {
                margin-top: 4px;
                min-width: 18px;
            }

    .footer-divider {
        border-color: rgba(255,255,255,.12);
        margin: 2rem 0 1rem;
    }

    .footer-bottom {
        color: rgba(255,255,255,.55);
        font-size: .92rem;
    }

    /*=========================
        MOBILE
=========================*/

    @media (max-width: 991.98px) {
        .footer-plus {
            padding-top: 3rem;
        }

            .footer-plus .col-lg-4,
            .footer-plus .col-lg-3,
            .footer-plus .col-lg-2 {
                text-align: center;
                margin-bottom: 2rem;
            }

            .footer-plus h5::after {
                margin-left: auto;
                margin-right: auto;
            }

            .footer-plus .contact-item {
                justify-content: center;
                text-align: left;
            }

            .footer-plus .social-icon {
                width: 46px;
                height: 46px;
                margin: .25rem;
            }

        .footer-bottom {
            text-align: center !important;
            margin-top: .75rem;
        }

        .navbar .nav-link.position-relative {
            color: #fff;
            font-size: 1.25rem;
            padding: .35rem .5rem;
        }

        .navbar .badge {
            font-size: .65rem;
            padding: .3em .45em;
        }

        .navbar-toggler {
            margin-left: .25rem;
        }
    }

    @media (max-width: 768px) {
        .navbar-plus .navbar-brand {
            font-size: 1.2rem;
        }

        .footer-plus {
            text-align: center;
        }

            .footer-plus h5::after {
                margin: 0.5rem auto;
            }
    }

    @media (max-width: 575.98px) {
        .footer-plus {
            padding: 2.5rem 0 1rem;
        }

            .footer-plus h5 {
                font-size: 1.15rem;
            }

            .footer-plus p,
            .footer-plus a,
            .footer-plus span {
                font-size: .95rem;
            }

            .footer-plus li {
                margin-bottom: .85rem;
            }

            .footer-plus .social-icon {
                width: 48px;
                height: 48px;
                font-size: 1.1rem;
            }

        .footer-divider {
            margin: 1.5rem 0;
        }
    }

    /* ===== UTILITY CLASSES ===== */
    .text-accent {
        color: var(--plus-accent);
    }

    .text-gold {
        color: var(--plus-gold);
    }

    .bg-accent {
        background-color: var(--plus-accent);
    }

    .bg-primary-dark {
        background-color: var(--plus-primary);
    }

    .card-plus {
        background: var(--plus-surface);
        border: none;
        border-radius: var(--plus-radius-md);
        box-shadow: var(--plus-shadow-sm);
        transition: var(--plus-transition);
        padding: 1.8rem;
    }

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

    .btn-plus-primary {
        background: var(--plus-secondary);
        color: white;
        font-weight: 600;
        padding: 0.6rem 1.8rem;
        border-radius: 50px;
        border: none;
        transition: var(--plus-transition);
        box-shadow: 0 4px 12px rgba(45, 109, 168, 0.3);
    }

        .btn-plus-primary:hover {
            background: var(--plus-primary);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(45, 109, 168, 0.4);
        }

    .btn-plus-accent {
        background: var(--plus-accent);
        color: var(--plus-primary);
        font-weight: 700;
        padding: 0.6rem 2rem;
        border-radius: 50px;
        border: none;
        transition: var(--plus-transition);
        box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
    }

        .btn-plus-accent:hover {
            background: #e08a4a;
            color: var(--plus-primary);
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(244, 162, 97, 0.4);
        }

    /* ===== ANIMATIONS ===== */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .animate-fade-in-up {
        animation: fadeInUp 0.6s ease-out;
    }

    /* ===== SCROLLBAR STYLING ===== */
    ::-webkit-scrollbar {
        width: 10px;
    }

    ::-webkit-scrollbar-track {
        background: var(--plus-bg);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--plus-secondary);
        border-radius: 10px;
    }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--plus-primary);
        }

    /* ===== BACK TO TOP BUTTON ===== */
    .back-to-top {
        position: fixed;
        right: 1.25rem;
        bottom: 1.25rem;
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: var(--plus-primary);
        color: #fff;
        border: 2px solid var(--plus-accent);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        box-shadow: var(--plus-shadow-lg);
        cursor: pointer;
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transform: translateY(12px);
        transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
    }

        .back-to-top.is-visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .back-to-top:hover {
            background: var(--plus-secondary);
        }

    @media (max-width: 575.98px) {
        .back-to-top {
            right: 1rem;
            bottom: 1rem;
            width: 42px;
            height: 42px;
        }
    }
