/*
This file created by Health & Wellness Coach Sr. Developer: Yogesh Ahuja.
For issues contact: mallikawebworld@gmail.com
*/

/* ================= ROOT ================= */
:root {
    --primary: #4361ee;
    --sidebar-width: 260px;
    --pwa-nav-height: 70px;
    --bg-body: #f4f7fe;
    --dark: #0f172a;
    --muted: #94a3b8;
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg-body);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont;
}

/* ================= LAYOUT ================= */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    min-width: 0;
}

/* ================= SIDEBAR (DESKTOP) ================= */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--muted);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid #1e293b;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--muted);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary);
    color: #fff;
}

/* ================= HEADER ================= */
.app-header {
    background: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.04);
}

.app-header h1 {
    font-size: 18px;
    margin: 0;
}

/* ================= CONTENT ================= */
.app-content {
    padding: 20px;
}

/* ================= DASHBOARD CARDS ================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
    gap: 16px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,.03);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(67,97,238,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
}

/* ================= MOBILE ================= */
@media (max-width: 991px) {
    .app-sidebar { display: none; }

    .app-content {
        padding-bottom: calc(var(--pwa-nav-height) + 10px);
    }

    .pwa-bottom-nav {
        display: flex;
    }
}

/* ================= PWA BOTTOM NAV ================= */
.pwa-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: var(--pwa-nav-height);
    background: #fff;
    border-top: 1px solid #e5e7eb;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.pwa-nav-link {
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    color: #64748b;
}

.pwa-nav-link i {
    font-size: 20px;
    display: block;
}

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