/* =============================================================
   B tec Solution POS - Premium Light Theme Stylesheet
   Design Paradigm: Apple/Stripe-Style Slate Light
   Dark Contrast Sidebar & Elegant Glassmorphism Cards
   Housed under orders/style.css
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Main Layout Colors (Stripe/Apple Light Theme) */
    --bg: #f8fafc;
    --bg-glow: radial-gradient(circle at 50% 0%, #e2e8f0 0%, #f8fafc 100%);
    --card: rgba(255, 255, 255, 0.9);
    --card-hover: rgba(255, 255, 255, 1);
    --border: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.14);
    
    /* Text Color Matrix */
    --text-main: #0f172a;        /* Deep Slate (High contrast) */
    --text-secondary: #334155;   /* Medium Slate */
    --text-muted: #64748b;       /* Cool Gray */
    
    /* Curated Accent Colors */
    --neon-blue: #0284c7;        /* Refined Cyan/Sky Blue */
    --neon-blue-glow: rgba(2, 132, 199, 0.1);
    --neon-green: #10b981;       /* Refined Emerald Green */
    --neon-green-glow: rgba(16, 185, 129, 0.1);
    --neon-pink: #f43f5e;        /* Refined Rose Red */
    --neon-pink-glow: rgba(244, 63, 94, 0.1);
    --neon-yellow: #f59e0b;      /* Refined Amber Yellow */
    --neon-yellow-glow: rgba(245, 158, 11, 0.1);
    
    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #0284c7, #3b82f6);
    --gradient-green: linear-gradient(135deg, #10b981, #059669);
    --gradient-pink: linear-gradient(135deg, #f43f5e, #e11d48);
    --gradient-dark: linear-gradient(135deg, #ffffff, #f1f5f9);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    background-image: var(--bg-glow);
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.5;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 1px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =============================================================
   1. AUTHORIZATION SCREEN (Login Gate)
   ============================================================= */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #f1f5f9 0%, #cbd5e1 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1.5rem;
    transition: opacity 0.5s ease;
}

.login-card {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    text-align: center;
    animation: loginFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.logo-icon-pos {
    background: var(--gradient-blue);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.75rem;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.logo-brand-pos {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.85rem;
    background: linear-gradient(to right, #0f172a, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.25rem;
}

.form-group-pos {
    text-align: left;
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group-pos label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-pos, .select-pos, .textarea-pos {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-pos:focus, .select-pos:focus, .textarea-pos:focus {
    outline: none;
    border-color: var(--neon-blue);
    background: #ffffff;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.12);
}

.input-pos::placeholder {
    color: #94a3b8;
}

.btn-pos-primary {
    background: var(--gradient-blue);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
    margin-top: 0.5rem;
}

.btn-pos-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(2, 132, 199, 0.5);
}

.btn-pos-primary:active {
    transform: translateY(0);
}

/* =============================================================
   2. SPA APP LAYOUT SYSTEM
   ============================================================= */
.app-workspace {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* 2A. CONTRAST SIDEBAR COMPONENT (Professional Dark) */
.sidebar {
    background: #0f172a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
    padding-left: 0.5rem;
}

.sidebar-header .logo-icon-pos {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.35rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.25);
}

.sidebar-header .logo-brand-pos {
    font-size: 1.4rem;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-profile {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.profile-avatar {
    background: var(--gradient-blue);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.15rem;
}

.profile-info {
    overflow: hidden;
}

.profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-role {
    font-size: 0.72rem;
    color: #38bdf8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-top: 0.1rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.02);
}

.menu-item.active {
    background: rgba(2, 132, 199, 0.15);
    color: #38bdf8;
    border-color: rgba(2, 132, 199, 0.25);
    font-weight: 600;
}

.menu-icon {
    font-size: 1.2rem;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
}

/* 2B. MAIN VIEWPORT SYSTEM */
.main-viewport {
    padding: 2.5rem 3rem;
    overflow-y: auto;
    max-height: 100vh;
}

.viewport-panel {
    display: none;
    animation: panelSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.viewport-panel.active {
    display: block;
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.panel-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.panel-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Glass Cards (Apple/Stripe Light Glass) */
.glass-card {
    background: var(--card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.03);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
}

/* =============================================================
   3. PANEL A: DASHBOARD ANALYTICS WIDGETS
   ============================================================= */
.stats-deck {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.25rem;
}

.stat-widget {
    background: var(--card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.02);
}

.stat-widget:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.stat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--text-muted);
}

.stat-widget.blue::before { background: var(--neon-blue); }
.stat-widget.green::before { background: var(--neon-green); }
.stat-widget.yellow::before { background: var(--neon-yellow); }
.stat-widget.pink::before { background: var(--neon-pink); }

.stat-icon {
    font-size: 1.75rem;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.stat-widget.blue .stat-icon { color: var(--neon-blue); background: var(--neon-blue-glow); border-color: rgba(2, 132, 199, 0.15); }
.stat-widget.green .stat-icon { color: var(--neon-green); background: var(--neon-green-glow); border-color: rgba(16, 185, 129, 0.15); }
.stat-widget.yellow .stat-icon { color: var(--neon-yellow); background: var(--neon-yellow-glow); border-color: rgba(245, 158, 11, 0.15); }
.stat-widget.pink .stat-icon { color: var(--neon-pink); background: var(--neon-pink-glow); border-color: rgba(244, 63, 94, 0.15); }

.stat-details {
    overflow: hidden;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.15rem;
    color: var(--text-main);
    white-space: nowrap;
}

.dashboard-visual-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.chart-card {
    min-height: 380px;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-top: 1rem;
}

.source-row {
    background: rgba(15, 23, 42, 0.01);
    border: 1px solid rgba(15, 23, 42, 0.04);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.source-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.source-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.source-dot.wa { color: #10b981; background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.source-dot.direct { color: var(--neon-blue); background: var(--neon-blue); box-shadow: 0 0 8px rgba(2, 132, 199, 0.4); }
.source-dot.pos { color: var(--neon-yellow); background: var(--neon-yellow); box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }

.source-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.source-badge {
    font-family: 'Outfit', sans-serif;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.05);
    color: var(--text-main);
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
}

/* =============================================================
   4. PANEL B: ORDERS LEDGER TABLE LIST
   ============================================================= */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.search-desk {
    position: relative;
    flex-grow: 1;
    max-width: 480px;
}

.search-icon-pos {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.search-desk .input-pos {
    padding-left: 2.75rem;
}

.status-pills {
    display: flex;
    gap: 0.5rem;
}

.pill-filter {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.05);
    color: var(--text-secondary);
    padding: 0.65rem 1.15rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pill-filter:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
}

.pill-filter.active {
    background: rgba(2, 132, 199, 0.1);
    color: var(--neon-blue);
    border-color: rgba(2, 132, 199, 0.2);
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.08);
}

/* Ledger Data Table (Stripe Style) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.pos-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.pos-table th {
    background: #f1f5f9;
    padding: 1.15rem 1.5rem;
    font-weight: 600;
    color: #475569;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.pos-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: var(--text-secondary);
    vertical-align: middle;
}

.pos-table tr:last-child td {
    border-bottom: none;
}

.pos-table tr {
    transition: var(--transition);
}

.pos-table tr:hover td {
    background: #f8fafc;
    color: var(--text-main);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.pending { background: rgba(245, 158, 11, 0.08); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.15); }
.status-badge.shipped { background: rgba(2, 132, 199, 0.08); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.15); }
.status-badge.completed { background: rgba(16, 185, 129, 0.08); color: #059669; border: 1px solid rgba(16, 185, 129, 0.15); }
.status-badge.cancelled { background: rgba(244, 63, 94, 0.08); color: #e11d48; border: 1px solid rgba(244, 63, 94, 0.15); }

.source-badge-cell {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.06);
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-action-trigger {
    background: none;
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: var(--text-secondary);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action-trigger:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    background: var(--neon-blue-glow);
}

.shim-loader {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

/* =============================================================
   5. PANEL C: MANUAL BILLING DESK (POS)
   ============================================================= */
.billing-desk-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.autocomplete-desk {
    position: relative;
    margin-bottom: 2rem;
}

.autocomplete-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    z-index: 500;
    max-height: 320px;
    overflow-y: auto;
    display: none;
}

.autocomplete-results.active {
    display: block;
}

.autocomplete-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.autocomplete-row:last-child {
    border-bottom: none;
}

.autocomplete-row:hover {
    background: #f8fafc;
}

.autocomplete-row-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.autocomplete-img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.autocomplete-row-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.autocomplete-row-price {
    font-family: 'Outfit', sans-serif;
    color: var(--neon-blue);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Billing Ledger Cart list */
.billing-ledger-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
    margin-bottom: 2rem;
}

.billing-item-row {
    background: rgba(15, 23, 42, 0.01);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr 120px 100px 40px;
    gap: 1.25rem;
    align-items: center;
}

.billing-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-item-price {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    text-align: right;
}

.billing-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 50px;
    padding: 0.35rem 0.65rem;
}

.billing-qty-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.billing-qty-btn:hover {
    color: var(--neon-blue);
    background: rgba(2, 132, 199, 0.1);
}

.billing-qty-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.btn-remove-billing-item {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-remove-billing-item:hover {
    color: var(--neon-pink);
}

/* Order Summary Card */
.order-summary-card {
    position: sticky;
    top: 2rem;
}

.summary-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.summary-row.total {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-main);
    margin-top: 0.5rem;
}

.summary-row.total .val {
    color: var(--neon-blue);
}

.form-row-pos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* =============================================================
   6. POPUP DETAIL DRAWERS / MODALS
   ============================================================= */
.details-modal {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--border);
    z-index: 1000;
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.08);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.details-modal.active {
    right: 0;
}

.modal-header {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close-modal:hover {
    color: var(--neon-pink);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-file-card {
    background: rgba(15, 23, 42, 0.015);
    border: 1px solid rgba(15, 23, 42, 0.04);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-file-title {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.modal-action-card {
    border: 1px solid rgba(2, 132, 199, 0.2);
    background: rgba(2, 132, 199, 0.02);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-action-card h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* =============================================================
   7. UTILITY CLASSES
   ============================================================= */
.hidden {
    display: none !important;
}

.btn-pos-danger {
    background: var(--gradient-pink);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.35);
}

.btn-pos-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
}

/* Settings Form elements styling override */
.btn-pos-secondary {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 12px;
    padding: 0.85rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-pos-secondary:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .stats-deck {
        grid-template-columns: repeat(2, 1fr);
    }
    .billing-desk-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-visual-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-workspace {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .stats-deck {
        grid-template-columns: 1fr;
    }
}