:root {
    --primary: #4361ee;
    --success: #38b000;
    --dark: #1a1a1a;
    --light-bg: #f8fafc;
    --danger: #e63946;
    --warning: #f4a261;
}

body {
    background-color: var(--light-bg);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--dark);
    margin: 0;
    padding: 0;
    padding-bottom: 90px;
    -webkit-tap-highlight-color: transparent;
}

/* App Bar / Top Bar */
.mobile-top-bar {
    background: white;
    padding: calc(15px + env(safe-area-inset-top)) 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.brand-title {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Views */
.mobile-view {
    padding: 20px;
    animation: fadeIn 0.3s ease;
    min-height: calc(100vh + 1px);
}

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

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(0,0,0,0.03);
}

.kpi-card .kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.kpi-card .kpi-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}

/* Nav Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 5px 10px 10px 10px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.06);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    z-index: 5000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 10px;
    font-weight: 700;
    gap: 5px;
    padding: 5px;
    width: 60px;
    transition: all 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 20px;
    transition: transform 0.2s;
}

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

.nav-fab {
    background: var(--primary);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    transform: translateY(-10px);
}

/* Lists */
.mobile-list-item {
    background: white;
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* Charts Card */
.chart-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 25px;
}

.chart-card h5 {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 15px;
}

/* List Menu for MORE tab */
.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-card {
    background: white;
    padding: 15px 20px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 15px;
    color: var(--dark);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-card i {
    font-size: 18px;
    color: var(--primary);
    background: rgba(67, 97, 238, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.logout-btn {
    width: 100%;
    background: rgba(230, 57, 70, 0.1);
    color: var(--danger);
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 16px;
    margin-top: 30px;
}
/* Stock Correction Buttons */
input[type="radio"]:checked + .sc-type-btn {
    border-color: var(--primary) !important;
    background: rgba(67, 97, 238, 0.05) !important;
    color: var(--primary) !important;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.1);
}
.sc-type-btn {
    transition: all 0.2s ease;
}

/* Ensure SweetAlert goes over our fullscreen views */
.swal2-container {
    z-index: 9999 !important;
}
