:root {
    /* --- Color Palette --- */
    --bg: #f4f7fb;
    --primary: #1e1b4b;
    /* Deep Indigo */
    --accent: #4f46e5;
    /* Vibrant Indigo */
    --success: #10b981;
    /* Emerald Green */
    --danger: #ef4444;
    /* Rose Red */
    --warning: #f59e0b;
    /* Amber Gold */
    --text: #0f172a;
    /* Slate Black */
    --text-light: #64748b;
    /* Slate Gray */
    --card-bg: #ffffff;

    /* --- Design Tokens --- */
    --radius: 24px;
    --radius-sm: 12px;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px rgba(30, 27, 75, 0.1);
}

/* --- Global Reset & Base Styles --- */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.5;
}

/* --- Header: Mobile Sticky Header --- */
header {
    background: var(--card-bg);
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
    flex-shrink: 0;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-text p {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 4px;
}

/* --- Navigation: Fixed Bottom Bar --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
    z-index: 1000;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    padding: 10px 5px;
    border-radius: 16px;
}

.nav-tab i {
    font-size: 1.6rem;
    transition: 0.2s;
}

.nav-tab.active {
    color: var(--accent);
    background: rgba(79, 70, 229, 0.05);
}

.nav-tab.active i {
    transform: translateY(-2px);
}

/* --- Main Content Layout --- */
main {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    padding-bottom: 120px;
    /* Space for Nav + FAB */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

main::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.view {
    display: none;
    animation: viewEnter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
    display: block;
}

@keyframes viewEnter {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* --- UI Building Blocks --- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.glass-stat {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 2.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(30, 27, 75, 0.25);
}

.glass-stat i {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    opacity: 0.12;
    transform: rotate(-15deg);
}

/* GLASS CSS SNIPPET */

.staff-glass-card {
    padding: 20px;
    border-radius: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    z-index: 1;

    /* THE SIGNATURE 7-LAYER SHADOW STACK */
    box-shadow:
        0 0 .3rem #0000003a,
        5px 5px .5rem #ffffffe6,
        5px 5px .6rem #0000003a,
        inset 1px 1px #fff,
        inset -1px -1px #fff,
        inset 4px 4px .2rem #00000010,
        inset 0 0 .0rem #a6adb3;
}

.h-main-label {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: normal;
}

.h-main-val {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: normal;
}

.h-label {
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    text-align: center;
}

.h-val {
    font-size: 1.6rem;
    text-align: center;
    font-weight: 900;
    margin-top: 8px;
    letter-spacing: -1.5px;
}

.target-tag {
    font-size: .7em;
    text-align: center;
}

/* Updated Investor Value Styling */
.h-val,
[id^="dash-usd-"],
[id^="dash-zar-"] {
    text-align: center;
    width: 100%;
    display: block;
}

/* Ensure the USD value stays bold and large */
[id^="dash-usd-"] {
    font-size: 1.6rem;
    font-weight: 900;
    margin-top: 8px;
    letter-spacing: -1px;
}

/* Ensure the ZAR value stays centered and slightly smaller */
[id^="dash-zar-"] {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.8;
}

/* Updated List Item Styles for User Request */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.list-item:active {
    background: #f8fafc;
}

.list-item:last-child {
    border: none;
}

.item-info {
    flex: 1;
}

.item-info p {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.2;
}

.item-info .sub-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
}

.item-info .stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.bg-low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.bg-ok {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.item-meta {
    text-align: right;
    margin-left: 15px;
}

.item-meta .price {
    font-weight: 900;
    color: var(--primary);
    font-size: 1.15rem;
    display: block;
}

.item-meta .time {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 600;
    margin-top: 4px;
}

/* --- POS Grid System --- */
.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 0 15px 0;
    margin-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.chip {
    background: var(--card-bg);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: 0.2s;
}

.chip.active {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.2);
}

.grid-pos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 14px;
}

.product-tile {
    background: var(--card-bg);
    padding: 1.6rem 1rem;
    border-radius: 22px;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 2px solid transparent;
}

.product-tile:active {
    transform: scale(0.94);
}

.product-tile i {
    font-size: 2.2rem;
    color: var(--accent);
    display: block;
    margin-bottom: 12px;
}

.product-tile h4 {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-tile .p-price {
    color: var(--success);
    font-weight: 900;
    font-size: 1.2rem;
}

.product-tile .p-stock {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 8px;
    font-weight: 700;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.tile-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 900;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

/* Base Shared Styles for all FABs */
.fab-cart,
.fab-add {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 68px;
    height: 68px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(30, 27, 75, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    &:hover {
        transform: scale(1.1);
        background: #2d2a6e;
    }

    &:active {
        transform: scale(0.85) rotate(-10deg);
    }

    i {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Specific styling for the Cart FAB to handle the counter badge */
.fab-cart {
    .cart-count {
        position: absolute;
        top: 0;
        right: 0;
        background: var(--danger);
        width: 24px;
        height: 24px;
        border-radius: 50%;
        font-size: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
        border: 3px solid var(--card-bg);
        transform: rotate(0deg);
    }
}

/* Specific styling for the Add FAB */
.fab-add {
    display: none;

    i {
        font-size: 2.2rem;
    }
}

/* --- Modals & Interaction Layers --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: flex-end;
    padding: 10px;
}

.sheet {
    background: white;
    width: 100%;
    max-width: 550px;
    border-radius: 32px 32px 20px 20px;
    padding: 2.2rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* --- Form Elements --- */
label.h-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.7rem;
}

input,
select {
    width: 100%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 18px;
    border-radius: 18px;
    margin-bottom: 22px;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: 0.2s;
    appearance: none;
}

input:focus,
select:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn {
    width: 100%;
    padding: 20px;
    border-radius: 22px;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.btn-primary:active {
    transform: scale(0.97);
    filter: brightness(1.1);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.btn-success:active {
    transform: scale(0.97);
}

.btn-outline {
    background: #f1f5f9;
    color: var(--text-light);
    margin-top: 12px;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.3rem;
}

.search-box input {
    margin: 0;
    padding-left: 52px;
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
    border: none;
    height: 60px;
}

/* --- Utilities --- */
.text-red {
    color: var(--danger);
}

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

.text-amber {
    color: var(--warning);
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
}

.p-price {
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    line-height: 1;
}

.convert-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.convert-btn:hover {
    color: var(--primary);
}

.convert-btn i {
    font-size: 1.1rem;
    display: inline-block;
    vertical-align: middle;
    margin-top: 11px;
}

/*========== OPERATIONS ==========*/

#view-alerts.view {
    padding: 1.5rem;

    .hq-card {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 24px;
        padding: 25px;
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;

        .hq-icon-box {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            background: rgba(99, 102, 241, 0.1);
            color: #6366f1;
        }

        .hq-card-content {
            margin-top: 15px;

            h3 {
                font-weight: 900;
                color: var(--text-main);
                margin: 0;
            }

            p {
                font-size: 0.75rem;
                color: var(--text-light);
                margin-top: 4px;
            }
        }

        .hq-arrow {
            position: absolute;
            right: 20px;
            top: 25px;
            opacity: 0.2;
            color: var(--text-light);
        }

        &:hover {
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(99, 102, 241, 0.3);

            .hq-arrow {
                opacity: 1;
                transform: translateX(5px);
                color: #6366f1;
            }
        }
    }
}

/*========== TREASURY ==========*/

.treasury-module {
    .treasury-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;

        h2 {
            font-weight: 900;
            font-size: 1.6rem;
            letter-spacing: -1px;
            margin: 0;
        }

        p {
            color: var(--text-light);
            font-size: 0.8rem;
            font-weight: 600;
            opacity: 0.7;
        }

        .ledger-badge {
            background: rgba(99, 102, 241, 0.1);
            color: #6366f1;
            padding: 6px 14px;
            border-radius: 50px;
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
        }
    }

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

        .stat-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 1.5rem;
            position: relative;
            overflow: hidden;

            &.primary-accent {
                background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
                border: none;
                color: white;

                .label {
                    color: rgba(255, 255, 255, 0.7);
                }

                h4,
                p {
                    color: white;
                }
            }

            &.balance-card {
                background: rgba(16, 185, 129, 0.05);
                border-color: rgba(16, 185, 129, 0.1);

                .label,
                h4,
                p {
                    color: #10b981;
                }
            }

            .card-bg-icon {
                position: absolute;
                right: -10px;
                bottom: -10px;
                font-size: 5rem;
                opacity: 0.1;
            }

            .label {
                font-size: 0.65rem;
                font-weight: 800;
                text-transform: uppercase;
                display: block;
                margin-bottom: 10px;
            }

            h4 {
                font-size: 1.8rem;
                font-weight: 900;
                margin: 0;
            }

            p {
                font-size: 1rem;
                font-weight: 700;
                margin: 0;
                opacity: 0.8;
            }

            .negative {
                color: #ef4444;
            }
        }
    }

    .treasury-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;

        .hq-card-static {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 24px;
            padding: 1.5rem;
            border: 1px solid rgba(255, 255, 255, 0.05);

            .card-title {
                display: flex;
                align-items: center;
                gap: 12px;
                margin-bottom: 1.5rem;

                h3 {
                    font-weight: 900;
                    font-size: 1.1rem;
                    margin: 0;
                }

                &.justify {
                    justify-content: space-between;
                }

                .flex-align {
                    display: flex;
                    align-items: center;
                    gap: 12px;
                }
            }

            .icon-box {
                width: 40px;
                height: 40px;
                border-radius: 12px;
                background: rgba(255, 255, 255, 0.05);
                display: flex;
                align-items: center;
                justify-content: center;

                &.red {
                    background: rgba(239, 68, 68, 0.1);
                    color: #ef4444;
                }
            }

            .input-group {
                margin-bottom: 1rem;

                label {
                    display: block;
                    font-size: 0.65rem;
                    font-weight: 800;
                    color: var(--text-light);
                    text-transform: uppercase;
                    margin: 0 0 5px 5px;
                }

                input {
                    width: 100%;
                    background: rgba(255, 255, 255, 0.03);
                    border: 1px solid rgba(255, 255, 255, 0.08);
                    padding: 12px;
                    border-radius: 12px;
                    color: white;
                    outline: none;

                    &:focus {
                        border-color: #6366f1;
                    }
                }
            }

            .input-row {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }

            .action-btn {
                width: 100%;
                padding: 16px;
                border-radius: 15px;
                background: #6366f1;
                color: white;
                border: none;
                font-weight: 900;
                font-size: 0.75rem;
                text-transform: uppercase;
                cursor: pointer;
                transition: 0.3s;
                margin-top: 10px;

                &:hover {
                    background: #4f46e5;
                    transform: translateY(-2px);
                }
            }

            .history-scroll {
                height: 250px;
                overflow-y: auto;

                .transaction-item {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    padding: 12px 0;
                    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

                    &:last-child {
                        border: none;
                    }

                    .info h5 {
                        margin: 0;
                        font-size: 0.85rem;
                        font-weight: 800;
                    }

                    .info span {
                        font-size: 0.65rem;
                        color: var(--text-light);
                        font-weight: 600;
                    }

                    .amount {
                        text-align: right;

                        h5 {
                            color: #ef4444;
                            margin: 0;
                            font-size: 0.85rem;
                        }

                        p {
                            font-size: 0.7rem;
                            margin: 0;
                            color: var(--text-light);
                        }
                    }
                }
            }

            .clear-btn {
                background: none;
                border: none;
                color: var(--text-light);
                font-size: 0.65rem;
                font-weight: 800;
                text-transform: uppercase;
                cursor: pointer;
            }
        }
    }
}

.sidebar-desktop {
    display: none;
}

.header-desktop {
    display: none;
}

/*========== HUB DIRECTORY (The Grid) ==========*/
#hub-directory-container {
    .hub-header {
        margin-bottom: 32px;

        .hub-main-title {
            font-size: 1.8rem;
            font-weight: 800;
            color: #1f2937;
            margin-bottom: 4px;
        }

        .hub-subtitle {
            color: #9ca3af;
            font-size: 0.95rem;
        }
    }

    .hub-modules-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;

        .hub-card {
            background: #ffffff;
            border: 1px solid rgba(0, 0, 0, 0.05);
            border-radius: 16px;
            padding: 24px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;

            &:hover {
                transform: translateY(-5px);
                box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
                border-color: #6366f1;
            }

            .module-icon-box {
                width: 48px;
                height: 48px;
                border-radius: 12px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.5rem;
                margin-bottom: 16px;

                &.expense-icon {
                    background: #fee2e2;
                    color: #ef4444;
                }

                &.flow-icon {
                    background: #dcfce7;
                    color: #10b981;
                }

                &.equity-icon {
                    background: #e0e7ff;
                    color: #6366f1;
                }

                &.vault-icon {
                    background: #fef3c7;
                    color: #f59e0b;
                }
            }

            .module-title {
                font-size: 1.1rem;
                font-weight: 700;
                color: #1f2937;
                margin-bottom: 8px;
            }

            .module-desc {
                font-size: 0.85rem;
                color: #6b7280;
                line-height: 1.4;
            }
        }
    }
}

/*========== MODULE VIEWPORT (The Sub-Module Container) ==========*/
#financial-module-viewport {
    animation: fadeIn 0.3s ease-out;

    .module-nav-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);

        .nav-top-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;

            .back-btn {
                display: flex;
                align-items: center;
                gap: 8px;
                background: #f3f4f6;
                border: 1px solid #e5e7eb;
                padding: 8px 16px;
                border-radius: 8px;
                color: #4b5563;
                font-weight: 600;
                font-size: 0.85rem;
                cursor: pointer;
                transition: all 0.2s ease;

                &:hover {
                    background: #fff;
                    border-color: #6366f1;
                    color: #6366f1;
                }
            }

            .module-status-pill {
                display: flex;
                align-items: center;
                gap: 6px;
                background: #ecfdf5;
                color: #065f46;
                padding: 6px 12px;
                border-radius: 20px;
                font-size: 0.75rem;
                font-weight: 700;

                .status-dot {
                    width: 8px;
                    height: 8px;
                    background: #10b981;
                    border-radius: 50%;
                    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
                }
            }
        }

        .module-title-section {
            .active-module-name {
                font-size: 1.8rem;
                font-weight: 800;
                color: #111827;
                margin: 0;
            }

            .module-breadcrumb {
                font-size: 0.75rem;
                color: #9ca3af;
                text-transform: uppercase;
                letter-spacing: 1px;
                margin-top: 4px;

                #breadcrumb-sub {
                    color: #6366f1;
                    font-weight: 700;
                }
            }
        }
    }

    .persistent-balance-card {
        background: #1f2937;
        color: white;
        padding: 24px;
        border-radius: 16px;
        margin-bottom: 24px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

        .balance-label {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            opacity: 0.7;
            margin-bottom: 8px;
        }

        .balance-value {
            font-size: 2.2rem;
            font-weight: 800;
            margin: 0;
        }
    }

    .action-btn-main {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        background: #6366f1;
        color: white;
        border: none;
        padding: 14px;
        border-radius: 12px;
        font-weight: 700;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
            background: #4f46e5;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
        }
    }

    .hub-log-container {
        background: white;
        border-radius: 16px;
        border: 1px solid rgba(0, 0, 0, 0.05);

        .log-header {
            padding: 20px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;

            .log-title {
                font-size: 1rem;
                font-weight: 700;
                color: #374151;
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }
        }

        .log-content {
            padding: 40px 20px;
            text-align: center;

            .empty-log-state {
                i {
                    font-size: 3rem;
                    color: #d1d5db;
                    margin-bottom: 12px;
                    display: block;
                }

                p {
                    color: #9ca3af;
                    font-size: 0.9rem;
                }
            }
        }
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/*==========Sub Module: Expense Manager Specific==========*/
.internal-balance {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
}

#expense-log-list {
    .log-item {
        display: flex;
        justify-content: space-between;
        padding: 12px 16px;
        border-bottom: 1px solid #f3f4f6;
        text-align: left;

        .log-item-info {
            .log-reason {
                font-weight: 600;
                color: #1f2937;
            }

            .log-meta {
                font-size: 0.75rem;
                color: #9ca3af;
            }
        }

        .log-amount {
            color: #ef4444;
            font-weight: 700;
        }
    }
}


/* =====================================================================
   MASTERHUB — LANDING GRID
   ===================================================================== */

/* The two-card grid on the landing page */
.masterhub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Individual feature card */
.hub-feature-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.6rem 1.8rem;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow);
    border: 1.5px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hub-feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.04), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hub-feature-card:hover::before,
.hub-feature-card:active::before {
    opacity: 1;
}

.hub-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.2);
}

.hub-feature-card:active {
    transform: scale(0.98);
}

/* Locked / coming-soon variant */
.hub-feature-card--locked {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.hub-feature-card--locked:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: rgba(0, 0, 0, 0.04);
}

/* Icon bubble inside the card */
.hub-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hub-feature-card:hover .hub-feature-icon {
    transform: scale(1.1) rotate(-4deg);
}

/* Color variants for the icon bubble */
.expenses-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.locked-icon {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-light);
}

/* Text block */
.hub-feature-body {
    flex: 1;
}

.hub-feature-body h3 {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 5px;
    letter-spacing: -0.3px;
}

.hub-feature-body p {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
}

/* Arrow chevron on the right */
.hub-feature-arrow {
    color: var(--text-light);
    font-size: 1.3rem;
    opacity: 0.35;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.hub-feature-card:hover .hub-feature-arrow {
    opacity: 1;
    color: var(--accent);
    transform: translateX(4px);
}


/* =====================================================================
   MASTERHUB — MODULE TOPBAR (Back button + LIVE badge)
   ===================================================================== */

.module-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* Back button */
.module-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1.5px solid #e2e8f0;
    padding: 10px 18px;
    border-radius: 14px;
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.module-back-btn i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.module-back-btn:hover {
    background: white;
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.module-back-btn:hover i {
    transform: translateX(-3px);
}

.module-back-btn:active {
    transform: scale(0.97);
}

/* LIVE badge */
.module-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Pulsing green dot inside the LIVE badge */
.live-dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}


/* =====================================================================
   MASTERHUB — EXPENSES: STAT CARDS ROW
   ===================================================================== */

.expenses-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 1.5rem;
}

/* Base stat card */
.exp-stat-card {
    border-radius: 20px;
    padding: 1.4rem 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exp-stat-card::after {
    content: '';
    position: absolute;
    right: -18px;
    bottom: -18px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.exp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* Revenue card — deep indigo */
.exp-stat-revenue {
    background: linear-gradient(135deg, var(--primary) 0%, #2d2a6e 100%);
}

/* Expenses card — rose red */
.exp-stat-expenses {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Net balance card — emerald (overridden to red via JS when negative) */
.exp-stat-balance {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    transition: background 0.5s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Label row (icon + text) */
.exp-stat-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.exp-stat-label i {
    font-size: 1rem;
}

/* Main value */
.exp-stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 4px;
}

/* Sub value (ZAR line) */
.exp-stat-sub {
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.7;
    min-height: 1rem;
    /* reserve space even when empty */
}


/* =====================================================================
   MASTERHUB — EXPENSES: TWO-COLUMN LAYOUT
   ===================================================================== */

.expenses-two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

/* Both columns share the .card base — only minor overrides needed */
.expenses-form-card,
.expenses-history-card {
    margin-bottom: 0;
    /* grid handles spacing */
}


/* =====================================================================
   MASTERHUB — EXPENSES: INPUT GROUP (form fields)
   ===================================================================== */

.input-group {
    margin-bottom: 1.1rem;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 7px;
    padding-left: 4px;
}

/* Inputs and selects inside .input-group inherit the global styles but
   we tighten the padding and remove the large bottom margin so the
   .input-group's own margin controls vertical rhythm */
.input-group input,
.input-group select {
    margin-bottom: 0;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: var(--text);
    font-weight: 600;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08);
}

/* The btn inside the form card */
.expenses-form-card .btn {
    padding: 16px;
    font-size: 1rem;
    border-radius: 16px;
}

/* Day-end auto-fill notice — ensure it doesn't fight with display:none from JS */
#dayend-notice {
    background: rgba(79, 70, 229, 0.07);
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 1.1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    align-items: center;
    gap: 10px;
    /* display controlled by JS */
}

#dayend-notice i {
    font-size: 1.1rem;
    flex-shrink: 0;
}


/* =====================================================================
   MASTERHUB — DOWNLOAD / EXPORT BUTTONS
   ===================================================================== */

.hub-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(79, 70, 229, 0.08);
    border: 1.5px solid rgba(79, 70, 229, 0.15);
    color: var(--accent);
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hub-download-btn i {
    font-size: 1rem;
}

.hub-download-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transform: translateY(-1px);
}

.hub-download-btn:active {
    transform: scale(0.96);
}

/* Green variant — used on the Sales History section */
.hub-download-btn--green {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.hub-download-btn--green:hover {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}


/* =====================================================================
   DESKTOP — ADJUSTMENTS FOR NEW COMPONENTS
   ===================================================================== */

@media (min-width: 1024px) {
    body {
        display: block;
    }

    /* Hide Mobile Navigation elements */
    header:not(.header-desktop),
    .bottom-nav {
        display: none !important;
    }

    /* ========== DESKTOP SIDEBAR ========== */
    .sidebar-desktop {
        display: flex;
        width: 280px;
        background: var(--primary);
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        flex-direction: column;
        padding: 2.5rem 1.5rem;
        z-index: 1100;
        color: white;
        border-right: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 3.5rem;
        width: 100%;
    }

    .sidebar-brand .brand-logo {
        background: var(--accent);
        width: 45px;
        height: 45px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    }

    .sidebar-brand h1 {
        font-size: 1.25rem;
        font-weight: 900;
        letter-spacing: -0.5px;
        line-height: 1.2;
        margin: 0;
        color: white;
    }

    .sidebar-brand p {
        font-size: 0.7rem;
        opacity: 0.6;
        text-transform: uppercase;
        font-weight: 700;
        margin: 0;
        color: white;
    }

    .sidebar-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
    }

    .sidebar-desktop .nav-tab {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 14px;
        padding: 14px 18px;
        border-radius: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 600;
        width: 100%;
        height: auto;
        flex: none;
    }

    .sidebar-desktop .nav-tab i {
        font-size: 1.4rem;
    }

    .sidebar-desktop .nav-tab span {
        font-size: 0.95rem;
    }

    .sidebar-desktop .nav-tab:hover {
        background: rgba(255, 255, 255, 0.05);
        color: white;
        transform: translateX(4px);
    }

    .sidebar-desktop .nav-tab.active {
        background: var(--accent);
        color: white;
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    }

    .sidebar-desktop .nav-tab.active i {
        transform: translateY(0);
        color: white;
    }

    .sidebar-footer {
        margin-top: auto;
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }

    .sidebar-footer #desktop-date {
        font-size: 0.75rem;
        font-weight: 800;
        color: rgba(255, 255, 255, 0.4);
        letter-spacing: 1px;
        text-transform: uppercase;
    }

    /* ========== DESKTOP HEADER ========== */
    .header-desktop {
        display: flex;
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        height: 80px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        align-items: center;
        justify-content: space-between;
        padding: 0 3rem;
        border-bottom: 1px solid #eef2f6;
        z-index: 900;
    }

    .header-left h2 {
        font-weight: 900;
        font-size: 1.5rem;
        letter-spacing: -0.8px;
        color: var(--primary);
        margin: 0;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 25px;
    }

    .header-desktop .status-pill {
        background: #f1f5f9;
        padding: 8px 18px;
        border-radius: 30px;
        font-size: 0.75rem;
        font-weight: 800;
        color: var(--text-light);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .header-desktop .status-pill span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--success);
        box-shadow: 0 0 10px var(--success);
        animation: pulse-dot 2s infinite;
    }

    .header-desktop .user-profile {
        display: flex;
        align-items: center;
        gap: 15px;
        padding-left: 25px;
        border-left: 1px solid #e2e8f0;
    }

    .header-desktop .user-info {
        text-align: right;
    }

    .header-desktop .user-info p:first-child {
        font-size: 0.85rem;
        font-weight: 800;
        color: var(--primary);
        margin: 0;
    }

    .header-desktop .user-info p:last-child {
        font-size: 0.65rem;
        color: var(--text-light);
        font-weight: 600;
        margin: 0;
    }

    .header-desktop .avatar {
        width: 42px;
        height: 42px;
        background: var(--bg);
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 900;
        color: var(--primary);
        border: 1px solid #e2e8f0;
    }

    /* ========== ADJUSTMENTS FOR DESKTOP ========== */
    .fab-cart {
        right: 50px;
        bottom: 50px;
        width: 85px;
        height: 85px;
        font-size: 2.4rem;
    }

    main {
        padding: calc(80px + 3rem) 3rem 3rem 3rem;
        margin-left: 280px;
        max-width: 100%;
        height: 100vh;
        overflow-y: auto;
    }

    .sheet {
        border-radius: 35px;
        margin-bottom: 0;
        max-height: 85vh;
        width: 500px;
    }

    .overlay {
        align-items: center;
        justify-content: center;
    }

    .grid-pos {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }

    /* MasterHub: two-column card grid on desktop */
    .masterhub-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Expenses stats: keep three columns comfortably */
    .expenses-stats-row {
        gap: 20px;
    }

    .exp-stat-value {
        font-size: 1.7rem;
    }

    /* Expenses two-column layout: side-by-side on desktop */
    .expenses-two-col {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}


/* =====================================================================
   MOBILE — RESPONSIVE ADJUSTMENTS FOR NEW COMPONENTS
   ===================================================================== */

@media (max-width: 768px) {
    #view-alerts {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .treasury-row {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Stat cards: stack to single column on small phones */
    .expenses-stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .exp-stat-card {
        padding: 1.2rem 1.4rem;
    }

    .exp-stat-value {
        font-size: 1.4rem;
    }

    /* Module topbar: tighten on narrow screens */
    .module-back-btn {
        padding: 9px 13px;
        font-size: 0.8rem;
    }

    .module-status-badge {
        font-size: 0.65rem;
        padding: 7px 11px;
    }

    /* Hub feature cards: full width, no side-by-side */
    .masterhub-grid {
        grid-template-columns: 1fr;
    }

    .hub-feature-card {
        padding: 1.3rem 1.4rem;
    }

    .hub-feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    /* Download buttons: slightly more compact */
    .hub-download-btn {
        padding: 8px 12px;
        font-size: 0.72rem;
    }
}

/* Very small phones (iPhone SE etc.) */
@media (max-width: 380px) {
    .expenses-stats-row {
        grid-template-columns: 1fr;
    }

    .exp-stat-value {
        font-size: 1.25rem;
    }

    .hub-feature-body h3 {
        font-size: 0.95rem;
    }

    .hub-feature-body p {
        font-size: 0.75rem;
    }
}


@keyframes pulse-dot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Mobile-First Refinement */
@media (max-width: 768px) {
    #view-alerts {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .treasury-row {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .stat-card {
        .stat-value {
            font-size: 1.5rem;
        }

        .stat-sub-value {
            font-size: 0.9rem;
        }
    }

    .hq-input {
        padding: 16px;
        font-size: 1rem;
    }
}

/* =====================================================================
   MASTERHUB — PROFIT INTELLIGENCE MODULE
   Drop this at the bottom of style.css
   ===================================================================== */

/* Profit Intelligence hub card icon */
.profits-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* ── Always-live stock valuation banner ── */
.profit-live-card {
    background: linear-gradient(135deg, var(--primary) 0%, #2d2a6e 100%);
    border-radius: 20px;
    padding: 1.6rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(30, 27, 75, 0.2);
    flex-wrap: wrap;

    .profit-live-left {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .profit-live-icon {
        width: 52px;
        height: 52px;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.6rem;
        color: white;
        flex-shrink: 0;
    }

    .profit-live-label {
        font-size: 0.95rem;
        font-weight: 800;
        color: white;
        margin-bottom: 3px;
    }

    .profit-live-sub {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.6);
        font-weight: 600;
    }

    .profit-live-value {
        font-size: 2rem;
        font-weight: 900;
        color: white;
        letter-spacing: -1px;
        white-space: nowrap;
    }
}

/* ── Period filter bar ── */
.profit-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1rem;

    .profit-filter-btn {
        padding: 10px 18px;
        border-radius: 25px;
        border: 1.5px solid #e2e8f0;
        background: var(--card-bg);
        color: var(--text-light);
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        box-shadow: var(--shadow);

        &:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        &.active {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
            box-shadow: 0 6px 15px rgba(79, 70, 229, 0.25);
        }
    }
}

/* ── Custom date range inputs ── */
.profit-custom-range {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    border: 1.5px solid rgba(79, 70, 229, 0.15);

    .input-group {
        flex: 1;
        min-width: 130px;
        margin-bottom: 0;
    }

    .btn {
        width: auto;
        flex-shrink: 0;
        border-radius: 14px;
    }
}

/* ── 4 filtered stat cards grid ── */
.profit-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 1.5rem;

    .profit-card {
        background: var(--card-bg);
        border-radius: 20px;
        padding: 1.4rem 1.5rem;
        box-shadow: var(--shadow);
        border: 1.5px solid rgba(0, 0, 0, 0.04);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        position: relative;
        overflow: hidden;

        &::after {
            content: '';
            position: absolute;
            right: -15px;
            bottom: -15px;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.03);
        }

        &:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        /* Invested — amber tint */
        &.profit-card--invested {
            border-color: rgba(245, 158, 11, 0.2);
            background: linear-gradient(135deg, #fffbeb, white);

            .profit-card-icon {
                background: rgba(245, 158, 11, 0.1);
                color: var(--warning);
            }

            .profit-card-value {
                color: var(--warning);
            }
        }

        /* Revenue — indigo tint */
        &.profit-card--revenue {
            border-color: rgba(79, 70, 229, 0.15);
            background: linear-gradient(135deg, #eef2ff, white);

            .profit-card-icon {
                background: rgba(79, 70, 229, 0.1);
                color: var(--accent);
            }

            .profit-card-value {
                color: var(--accent);
            }
        }

        /* Positive state (gross/net profit) */
        &.profit-card--positive {
            border-color: rgba(16, 185, 129, 0.2);
            background: linear-gradient(135deg, #ecfdf5, white);

            .profit-card-icon {
                background: rgba(16, 185, 129, 0.1);
                color: var(--success);
            }

            .profit-card-value {
                color: var(--success);
            }
        }

        /* Negative state (loss) */
        &.profit-card--negative {
            border-color: rgba(239, 68, 68, 0.2);
            background: linear-gradient(135deg, #fef2f2, white);

            .profit-card-icon {
                background: rgba(239, 68, 68, 0.1);
                color: var(--danger);
            }

            .profit-card-value {
                color: var(--danger);
            }
        }

        .profit-card-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: rgba(30, 27, 75, 0.06);
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            margin-bottom: 12px;
            transition: background 0.3s, color 0.3s;
        }

        .profit-card-label {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--text-light);
            margin-bottom: 6px;
        }

        .profit-card-value {
            font-size: 1.4rem;
            font-weight: 900;
            letter-spacing: -0.5px;
            color: var(--primary);
            margin-bottom: 4px;
            transition: color 0.3s;
        }

        .profit-card-sub {
            font-size: 0.72rem;
            color: var(--text-light);
            font-weight: 600;
        }
    }
}

/* ── Product performance table ── */
.profit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;

    thead tr {
        border-bottom: 2px solid #f1f5f9;
    }

    th {
        padding: 10px 14px;
        text-align: left;
        font-size: 0.68rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: var(--text-light);
        white-space: nowrap;

        &.sortable {
            cursor: pointer;
            transition: color 0.2s;
            user-select: none;

            i {
                font-size: 0.75rem;
                opacity: 0.5;
                margin-left: 4px;
            }

            &:hover {
                color: var(--accent);

                i {
                    opacity: 1;
                }
            }
        }
    }

    tbody tr {
        border-bottom: 1px solid #f8fafc;
        transition: background 0.15s;

        &:last-child {
            border: none;
        }

        &:hover {
            background: #f8fafc;
        }
    }

    td {
        padding: 12px 14px;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;

        &.td-profit-pos {
            color: var(--success);
        }

        &.td-profit-neg {
            color: var(--danger);
        }

        &.td-muted {
            color: var(--text-light);
            font-weight: 600;
        }

        .owner-tag {
            font-size: 0.6rem;
            background: rgba(99, 102, 241, 0.1);
            color: var(--accent);
            padding: 2px 7px;
            border-radius: 5px;
            font-weight: 900;
            text-transform: uppercase;
            margin-left: 6px;
        }

        .margin-bar {
            display: flex;
            align-items: center;
            gap: 8px;

            .bar-track {
                flex: 1;
                height: 6px;
                background: #f1f5f9;
                border-radius: 3px;
                overflow: hidden;
                min-width: 50px;

                .bar-fill {
                    height: 100%;
                    border-radius: 3px;
                    background: var(--success);
                    transition: width 0.4s ease;

                    &.bar-warn {
                        background: var(--warning);
                    }

                    &.bar-danger {
                        background: var(--danger);
                    }
                }
            }
        }
    }
}

/* ── Seasonal trend chart container ── */
.profit-trend-wrap {
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;

    svg.trend-svg {
        width: 100%;
        overflow: visible;

        .trend-bar {
            fill: var(--accent);
            opacity: 0.85;
            rx: 4;
            transition: opacity 0.2s;
            cursor: pointer;

            &:hover {
                opacity: 1;
            }
        }

        .trend-bar-zero {
            fill: #f1f5f9;
        }

        .trend-label {
            font-size: 11px;
            fill: var(--text-light);
            font-weight: 700;
            text-anchor: middle;
            font-family: 'Inter', sans-serif;
        }

        .trend-value {
            font-size: 10px;
            fill: var(--accent);
            font-weight: 800;
            text-anchor: middle;
            font-family: 'Inter', sans-serif;
        }
    }
}

/* ── Restock log list items ── */
#profit-restock-log {
    .restock-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 13px 0;
        border-bottom: 1px solid #f1f5f9;

        &:last-child {
            border: none;
        }

        .restock-info {
            p {
                font-weight: 800;
                font-size: 0.9rem;
                color: var(--text);
                margin-bottom: 3px;
            }

            span {
                font-size: 0.72rem;
                color: var(--text-light);
                font-weight: 600;
            }
        }

        .restock-value {
            text-align: right;

            .restock-cost {
                font-weight: 900;
                font-size: 1rem;
                color: var(--warning);
                display: block;
            }

            .restock-qty {
                font-size: 0.7rem;
                color: var(--text-light);
                font-weight: 600;
            }
        }
    }
}

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

@media (min-width: 1024px) {
    .profit-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .profit-live-card .profit-live-value {
        font-size: 2.4rem;
    }

    .profit-filter-bar {
        flex-wrap: nowrap;
    }

    .profit-custom-range {
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .profit-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;

        .profit-card {
            padding: 1.1rem 1.1rem;

            .profit-card-value {
                font-size: 1.15rem;
            }
        }
    }

    .profit-live-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;

        .profit-live-value {
            font-size: 1.6rem;
        }
    }

    .profit-filter-bar .profit-filter-btn {
        padding: 8px 13px;
        font-size: 0.76rem;
    }
}

/* ================================================================
   MSIKA POS — OWNER DRAWINGS MODULE
   Nested SCSS-style CSS | 60/30/10 rule | Glass + Neumorphism
   60% = neutral backgrounds (white/light grey)
   30% = primary brand (indigo #6366f1 / #1e1b4b)
   10% = accent states (green success, red danger, amber warning)
   ================================================================ */

/* ── CARD WRAPPER ──────────────────────────────────────────────── */
.drawings-module-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1.5rem;

    /* Neumorphism outer shell */
    box-shadow:
        8px 8px 20px rgba(99, 102, 241, 0.08),
        -4px -4px 12px rgba(255, 255, 255, 0.9),
        0 2px 8px rgba(0, 0, 0, 0.04);

    /* ── MODULE HEADER ─────────────────────────────────────────── */
    .drawings-header {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 1.5rem;

        .drawings-header-icon {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow:
                0 4px 12px rgba(99, 102, 241, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);

            i {
                font-size: 1.3rem;
                color: white;
            }
        }

        .drawings-header-text {
            h3 {
                font-weight: 900;
                font-size: 1.1rem;
                color: #1e1b4b;
                margin: 0 0 4px;
                letter-spacing: -0.3px;
            }

            p {
                color: var(--text-light, #94a3b8);
                font-size: 0.82rem;
                font-weight: 600;
                margin: 0;
                line-height: 1.4;
            }
        }
    }

    /* ── HEALTH BANNER ─────────────────────────────────────────── */
    #drawings-health-banner {
        border-radius: 16px;
        padding: 1.2rem 1.5rem;
        margin-bottom: 1.5rem;
        display: flex;
        align-items: center;
        gap: 16px;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

        /* Glassmorphism base */
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.3);

        &.banner--locked {
            background: linear-gradient(135deg,
                    rgba(239, 68, 68, 0.08),
                    rgba(185, 28, 28, 0.05));
            border-color: rgba(239, 68, 68, 0.2);
            box-shadow:
                0 4px 16px rgba(239, 68, 68, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);

            .banner-icon-wrap {
                background: rgba(239, 68, 68, 0.12);
                border: 1.5px solid rgba(239, 68, 68, 0.25);

                i {
                    color: #ef4444;
                }
            }

            .banner-title {
                color: #b91c1c;
            }

            .banner-sub {
                color: #ef4444;
            }
        }

        &.banner--caution {
            background: linear-gradient(135deg,
                    rgba(245, 158, 11, 0.08),
                    rgba(217, 119, 6, 0.05));
            border-color: rgba(245, 158, 11, 0.2);
            box-shadow:
                0 4px 16px rgba(245, 158, 11, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);

            .banner-icon-wrap {
                background: rgba(245, 158, 11, 0.12);
                border: 1.5px solid rgba(245, 158, 11, 0.3);

                i {
                    color: #f59e0b;
                }
            }

            .banner-title {
                color: #92400e;
            }

            .banner-sub {
                color: #d97706;
            }
        }

        &.banner--unlocked {
            background: linear-gradient(135deg,
                    rgba(16, 185, 129, 0.08),
                    rgba(5, 150, 105, 0.05));
            border-color: rgba(16, 185, 129, 0.25);
            box-shadow:
                0 4px 16px rgba(16, 185, 129, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);

            .banner-icon-wrap {
                background: rgba(16, 185, 129, 0.12);
                border: 1.5px solid rgba(16, 185, 129, 0.3);

                i {
                    color: #10b981;
                }
            }

            .banner-title {
                color: #065f46;
            }

            .banner-sub {
                color: #10b981;
            }
        }

        .banner-icon-wrap {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.3s ease;

            i {
                font-size: 1.6rem;
            }
        }

        .banner-content {
            flex: 1;

            .banner-title {
                font-weight: 900;
                font-size: 1rem;
                margin: 0 0 3px;
                letter-spacing: -0.2px;
            }

            .banner-sub {
                font-size: 0.78rem;
                font-weight: 700;
                margin: 0;
                opacity: 0.85;
            }
        }

        .banner-amount-pill {
            background: rgba(255, 255, 255, 0.7);
            border: 1px solid rgba(16, 185, 129, 0.2);
            border-radius: 12px;
            padding: 8px 14px;
            text-align: right;
            flex-shrink: 0;

            .pill-label {
                font-size: 0.62rem;
                font-weight: 800;
                color: #94a3b8;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                display: block;
                margin-bottom: 2px;
            }

            .pill-value {
                font-size: 1.05rem;
                font-weight: 900;
                color: #10b981;
                display: block;
            }
        }
    }

    /* ── CONDITIONS CHECKLIST ──────────────────────────────────── */
    #drawings-conditions-list {
        margin-bottom: 1.5rem;

        .conditions-title {
            font-size: 0.72rem;
            font-weight: 800;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin-bottom: 10px;
        }

        .conditions-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;

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

        .condition-chip {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            border-radius: 12px;
            transition: all 0.3s ease;

            /* Neumorphism chip */
            background: #f8fafc;
            box-shadow:
                3px 3px 8px rgba(0, 0, 0, 0.05),
                -2px -2px 6px rgba(255, 255, 255, 0.9);

            &.condition--pass {
                background: rgba(16, 185, 129, 0.05);
                box-shadow:
                    3px 3px 8px rgba(16, 185, 129, 0.08),
                    -2px -2px 6px rgba(255, 255, 255, 0.9),
                    inset 0 0 0 1px rgba(16, 185, 129, 0.15);

                .condition-dot {
                    background: #10b981;
                }

                .condition-icon i {
                    color: #10b981;
                }

                .condition-label {
                    color: #065f46;
                }
            }

            &.condition--fail {
                background: rgba(239, 68, 68, 0.04);
                box-shadow:
                    3px 3px 8px rgba(239, 68, 68, 0.06),
                    -2px -2px 6px rgba(255, 255, 255, 0.9),
                    inset 0 0 0 1px rgba(239, 68, 68, 0.12);

                .condition-dot {
                    background: #ef4444;
                }

                .condition-icon i {
                    color: #ef4444;
                }

                .condition-label {
                    color: #b91c1c;
                }
            }

            .condition-dot {
                width: 7px;
                height: 7px;
                border-radius: 50%;
                flex-shrink: 0;
                transition: background 0.3s ease;
            }

            .condition-icon {
                width: 28px;
                height: 28px;
                border-radius: 8px;
                background: rgba(255, 255, 255, 0.7);
                display: flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;

                i {
                    font-size: 0.9rem;
                }
            }

            .condition-text {
                flex: 1;
                min-width: 0;

                .condition-label {
                    font-size: 0.78rem;
                    font-weight: 800;
                    display: block;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }

                .condition-value {
                    font-size: 0.68rem;
                    font-weight: 600;
                    color: #94a3b8;
                    display: block;
                    margin-top: 1px;
                }
            }
        }
    }

    /* ── PERIOD FILTER BAR ─────────────────────────────────────── */
    #drawings-filter-bar {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 1.2rem;

        .drawings-filter-btn {
            padding: 8px 16px;
            border: none;
            border-radius: 20px;
            font-weight: 700;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            font-family: inherit;

            &.filter-inactive {
                background: white;
                color: #94a3b8;
                box-shadow:
                    3px 3px 8px rgba(0, 0, 0, 0.06),
                    -2px -2px 6px rgba(255, 255, 255, 0.9);

                &:hover {
                    color: #6366f1;
                    box-shadow:
                        4px 4px 10px rgba(99, 102, 241, 0.1),
                        -2px -2px 6px rgba(255, 255, 255, 0.9);
                }
            }

            &.filter-active {
                background: linear-gradient(135deg, #6366f1, #4f46e5);
                color: white;
                box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
                transform: translateY(-1px);
            }
        }

        /* Custom date range inputs */
        .drawings-custom-range {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
            width: 100%;
            margin-top: 4px;
            padding: 12px;
            background: #f8fafc;
            border-radius: 14px;
            border: 1px dashed #e2e8f0;

            label {
                font-size: 0.72rem;
                font-weight: 800;
                color: #94a3b8;
                text-transform: uppercase;
                letter-spacing: 0.4px;
            }

            input[type="date"] {
                padding: 8px 12px;
                border: 1.5px solid #e2e8f0;
                border-radius: 10px;
                font-family: inherit;
                font-size: 0.82rem;
                font-weight: 700;
                color: #1e1b4b;
                background: white;
                outline: none;
                cursor: pointer;
                transition: border-color 0.2s;

                &:focus {
                    border-color: #6366f1;
                }
            }

            .drawings-apply-btn {
                padding: 8px 16px;
                background: linear-gradient(135deg, #6366f1, #4f46e5);
                color: white;
                border: none;
                border-radius: 10px;
                font-weight: 800;
                font-size: 0.82rem;
                cursor: pointer;
                font-family: inherit;
                display: flex;
                align-items: center;
                gap: 6px;
                box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
                transition: all 0.2s;

                &:hover {
                    transform: translateY(-1px);
                }
            }
        }
    }

    /* ── FORM WRAPPER ──────────────────────────────────────────── */
    #drawings-form-wrapper {

        /* LOCKED STATE */
        .drawings-lock-screen {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2.5rem 1.5rem;
            text-align: center;

            /* Glass panel */
            background: linear-gradient(135deg,
                    rgba(248, 250, 252, 0.8),
                    rgba(241, 245, 249, 0.6));
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            border-radius: 18px;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                0 4px 20px rgba(0, 0, 0, 0.04);

            .lock-icon-wrap {
                width: 72px;
                height: 72px;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                margin-bottom: 1.2rem;

                /* Neumorphism circle */
                background: #f0f0f5;
                box-shadow:
                    8px 8px 16px rgba(99, 102, 241, 0.1),
                    -6px -6px 14px rgba(255, 255, 255, 0.95),
                    inset 0 0 0 1.5px rgba(99, 102, 241, 0.08);

                i {
                    font-size: 2.2rem;
                    color: #cbd5e1;
                }
            }

            .lock-title {
                font-weight: 900;
                font-size: 1.1rem;
                color: #1e1b4b;
                margin: 0 0 8px;
            }

            .lock-sub {
                font-size: 0.82rem;
                font-weight: 600;
                color: #94a3b8;
                margin: 0;
                line-height: 1.5;
                max-width: 260px;
            }

            .lock-reasons {
                margin-top: 1.2rem;
                display: flex;
                flex-direction: column;
                gap: 6px;
                width: 100%;
                max-width: 320px;

                .lock-reason-item {
                    display: flex;
                    align-items: center;
                    gap: 8px;
                    padding: 8px 12px;
                    background: rgba(239, 68, 68, 0.05);
                    border-radius: 10px;
                    border: 1px solid rgba(239, 68, 68, 0.1);

                    i {
                        color: #ef4444;
                        font-size: 0.9rem;
                        flex-shrink: 0;
                    }

                    span {
                        font-size: 0.78rem;
                        font-weight: 700;
                        color: #b91c1c;
                        text-align: left;
                    }
                }
            }
        }

        /* UNLOCKED FORM */
        .drawings-form {
            background: linear-gradient(135deg,
                    rgba(16, 185, 129, 0.03),
                    rgba(5, 150, 105, 0.02));
            border: 1.5px solid rgba(16, 185, 129, 0.15);
            border-radius: 18px;
            padding: 1.5rem;
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                0 4px 16px rgba(16, 185, 129, 0.06);

            .drawings-safe-pill {
                display: flex;
                justify-content: space-between;
                align-items: center;
                background: rgba(16, 185, 129, 0.08);
                border: 1px solid rgba(16, 185, 129, 0.2);
                border-radius: 12px;
                padding: 12px 16px;
                margin-bottom: 1.2rem;

                .safe-pill-label {
                    font-size: 0.72rem;
                    font-weight: 800;
                    color: #059669;
                    text-transform: uppercase;
                    letter-spacing: 0.5px;
                }

                .safe-pill-value {
                    font-size: 1.1rem;
                    font-weight: 900;
                    color: #065f46;
                }
            }

            .drawings-input-group {
                margin-bottom: 1rem;

                label {
                    display: block;
                    font-size: 0.72rem;
                    font-weight: 800;
                    color: #64748b;
                    text-transform: uppercase;
                    letter-spacing: 0.5px;
                    margin-bottom: 8px;
                }

                .drawings-input {
                    width: 100%;
                    padding: 14px 16px;
                    border: 2px solid #e2e8f0;
                    border-radius: 12px;
                    font-size: 1rem;
                    font-weight: 800;
                    font-family: inherit;
                    color: #1e1b4b;
                    background: white;
                    outline: none;
                    transition: all 0.2s;
                    box-sizing: border-box;

                    /* Neumorphism inset */
                    box-shadow:
                        inset 3px 3px 8px rgba(0, 0, 0, 0.04),
                        inset -2px -2px 6px rgba(255, 255, 255, 0.9);

                    &:focus {
                        border-color: #6366f1;
                        box-shadow:
                            inset 3px 3px 8px rgba(99, 102, 241, 0.06),
                            inset -2px -2px 6px rgba(255, 255, 255, 0.9),
                            0 0 0 3px rgba(99, 102, 241, 0.08);
                    }

                    &::placeholder {
                        color: #cbd5e1;
                        font-weight: 600;
                    }

                    &.input--over-limit {
                        border-color: #ef4444;
                        background: rgba(239, 68, 68, 0.02);
                    }
                }

                select.drawings-input {
                    cursor: pointer;
                    appearance: none;
                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236366f1' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
                    background-repeat: no-repeat;
                    background-position: right 14px center;
                    padding-right: 40px;
                }

                .input-hint {
                    font-size: 0.7rem;
                    font-weight: 700;
                    color: #94a3b8;
                    margin-top: 5px;
                    display: flex;
                    align-items: center;
                    gap: 4px;

                    &.hint--warn {
                        color: #ef4444;
                    }

                    i {
                        font-size: 0.8rem;
                    }
                }
            }

            .drawings-submit-btn {
                width: 100%;
                padding: 16px;
                background: linear-gradient(135deg, #10b981, #059669);
                color: white;
                border: none;
                border-radius: 14px;
                font-weight: 900;
                font-size: 1rem;
                cursor: pointer;
                font-family: inherit;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 10px;
                box-shadow:
                    0 6px 20px rgba(16, 185, 129, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.2);
                transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
                letter-spacing: -0.2px;

                i {
                    font-size: 1.2rem;
                }

                &:hover {
                    transform: translateY(-2px);
                    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.35);
                }

                &:active {
                    transform: translateY(0);
                }
            }
        }
    }

    /* ── DRAWINGS HISTORY ──────────────────────────────────────── */
    .drawings-history-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;

        h4 {
            font-weight: 800;
            font-size: 0.82rem;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            margin: 0;
        }

        .drawings-history-total {
            font-size: 0.8rem;
            font-weight: 900;
            color: #6366f1;
            background: rgba(99, 102, 241, 0.08);
            padding: 4px 12px;
            border-radius: 20px;
        }
    }

    #drawings-history-list {
        .drawings-history-empty {
            text-align: center;
            padding: 2.5rem 1rem;
            opacity: 0.5;

            i {
                font-size: 2.5rem;
                color: #cbd5e1;
                display: block;
                margin-bottom: 10px;
            }

            p {
                font-size: 0.85rem;
                font-weight: 700;
                color: #94a3b8;
                margin: 0;
            }
        }

        .drawings-history-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 0;
            border-bottom: 1px solid #f1f5f9;
            transition: all 0.2s;

            &:last-child {
                border-bottom: none;
            }

            &:hover {
                padding-left: 6px;
                padding-right: 6px;
                background: #f8fafc;
                border-radius: 10px;
                border-bottom-color: transparent;
            }

            .history-item-left {
                display: flex;
                align-items: center;
                gap: 12px;

                .history-item-icon {
                    width: 36px;
                    height: 36px;
                    border-radius: 10px;
                    background: rgba(99, 102, 241, 0.08);
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    flex-shrink: 0;

                    i {
                        font-size: 1rem;
                        color: #6366f1;
                    }
                }

                .history-item-meta {
                    .history-item-note {
                        font-weight: 800;
                        font-size: 0.9rem;
                        color: #1e1b4b;
                        display: block;
                        margin-bottom: 2px;
                    }

                    .history-item-date {
                        font-size: 0.72rem;
                        font-weight: 600;
                        color: #94a3b8;
                        display: block;
                    }
                }
            }

            .history-item-amount {
                font-size: 1rem;
                font-weight: 900;
                color: #6366f1;
                white-space: nowrap;
                margin-left: 12px;
            }
        }
    }
}

/* ── RESPONSIVE OVERRIDES ──────────────────────────────────────── */
@media (max-width: 640px) {
    .drawings-module-card {
        padding: 1.2rem;
        border-radius: 16px;

        #drawings-health-banner {
            flex-wrap: wrap;
            padding: 1rem;

            .banner-amount-pill {
                width: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-radius: 10px;
            }
        }

        #drawings-form-wrapper {
            .drawings-form {
                padding: 1.2rem;
            }

            .drawings-lock-screen {
                padding: 2rem 1rem;
            }
        }
    }
}

@media (max-width: 380px) {
    .drawings-module-card {
        #drawings-conditions-list {
            .conditions-grid {
                grid-template-columns: 1fr;
            }
        }

        #drawings-filter-bar {
            .drawings-filter-btn {
                padding: 7px 12px;
                font-size: 0.75rem;
            }
        }
    }
}