/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px 30px 0 0;
    z-index: 100;
    padding: 8px 16px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

[data-theme="dark"] .bottom-nav {
    background: rgba(20, 20, 20, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.nav-item .material-symbols-rounded {
    font-size: 24px;
}

.nav-item span:last-child {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary-color, #3b82f6);
}

.nav-item:hover:not(.active) {
    color: var(--text-main);
}

/* View Containers */
.view-container {
    display: none;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    background: transparent;
}

.view-container.active {
    display: flex;
}

.view-container>header {
    flex-shrink: 0;
}

.view-container>main {
    flex: 1;
    overflow-y: auto;
    /* header is now fixed, just need padding */
    padding-top: 100px;
    padding-bottom: 80px;
    /* Space for bottom nav */
}

/* Dashboard Content */
.dashboard-content {
    padding: 16px 16px 100px 16px;
}

.stats-section {
    margin-bottom: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

@media (min-width: 480px) {
    .stats-section {
        padding: 20px;
        margin-bottom: 20px;
    }
}

.stats-section h2 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-line {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

/* 2 columns on small mobile (360px+) */
@media (min-width: 360px) {
    .stat-line {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3 columns on larger mobile (480px+) */
@media (min-width: 480px) {
    .stat-line {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Always 3 columns for detailed status */
.stat-line-3col {
    grid-template-columns: 1fr;
}

@media (min-width: 360px) {
    .stat-line-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 480px) {
    .stat-line-3col {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-line:last-child {
    margin-bottom: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-item .material-symbols-rounded {
    font-size: 20px;
    margin-bottom: 2px;
}

.stat-item::before {
    content: attr(data-label);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
}

.stat-item strong {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

/* Larger sizes on bigger screens */
@media (min-width: 480px) {
    .stat-item {
        padding: 14px 10px;
        gap: 8px;
    }

    .stat-item .material-symbols-rounded {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .stat-item::before {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .stat-item strong {
        font-size: 2rem;
    }
}

/* Status Colors - Clean */
.stat-clean .material-symbols-rounded,
.stat-clean strong,
.status-VC .material-symbols-rounded,
.status-VC strong {
    color: var(--color-vc);
}

.status-OC .material-symbols-rounded,
.status-OC strong {
    color: var(--color-oc);
}

/* Status Colors - Dirty */
.stat-dirty .material-symbols-rounded,
.stat-dirty strong,
.status-VD .material-symbols-rounded,
.status-VD strong {
    color: var(--color-vd);
}

.status-OD .material-symbols-rounded,
.status-OD strong {
    color: var(--color-od);
}

/* Status Colors - Ready */
.stat-ready .material-symbols-rounded,
.stat-ready strong,
.status-VR .material-symbols-rounded,
.status-VR strong {
    color: var(--color-vr);
}

.status-OR .material-symbols-rounded,
.status-OR strong {
    color: var(--color-or);
}

/* Status Colors - Occupied */
.stat-occupied .material-symbols-rounded,
.stat-occupied strong {
    color: #f59e0b;
}

/* Status Colors - Vacant */
.stat-vacant .material-symbols-rounded,
.stat-vacant strong {
    color: #64748b;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}