:root {
    --dav-primary: #0a2e5c;
    --dav-primary-2: #154a8a;
    --dav-blue: #0d6efd;
    --dav-bg: #f5f7fb;
    --dav-text: #172033;
    --dav-muted: #737b8c;
    --dav-border: #e7eaf0;
    --dav-danger: #dc3545;
    --dav-success: #198754;
    --dav-warning: #f59f00;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--dav-bg);
    color: var(--dav-text);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    padding-bottom: 86px;
}

/* =========================================================
   MOBILE APP CONTAINER
   ========================================================= */

.mobile-app {
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--dav-bg);
}

/* =========================================================
   GLOBAL NAVBAR
   ========================================================= */

.dav-navbar {
    height: 64px;
    background:
        linear-gradient(
            135deg,
            var(--dav-primary),
            var(--dav-primary-2)
        );

    color: #fff;

    display: flex;
    align-items: center;

    padding:
        0 14px;

    position: sticky;
    top: 0;

    z-index: 1030;

    box-shadow:
        0 2px 12px
        rgba(10, 46, 92, .22);
}

.nav-menu-button {
    width: 42px;
    height: 42px;

    border: 0;
    background: transparent;

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 24px;
}

.nav-menu-button:active {
    background: rgba(255,255,255,.15);
}

.nav-brand {
    min-width: 0;
    flex: 1;

    display: flex;
    align-items: center;

    margin-left: 4px;
}

.nav-brand-icon {
    width: 38px;
    height: 38px;

    border-radius: 11px;

    background: rgba(255,255,255,.15);

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 9px;

    font-size: 21px;
}

.nav-brand-text {
    min-width: 0;
}

.nav-brand-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-brand-subtitle {
    font-size: 11px;
    opacity: .75;
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #fff;
}

.nav-avatar {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: #fff;
    color: var(--dav-primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
}

.nav-user-name {
    max-width: 70px;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   OFFCANVAS SIDEBAR
   ========================================================= */

.dav-sidebar {
    width: 300px !important;
    max-width: 86vw;

    border: 0 !important;

    background: #fff;
}

.dav-sidebar-header {
    background:
        linear-gradient(
            135deg,
            var(--dav-primary),
            var(--dav-primary-2)
        );

    color: #fff;

    padding: 24px 20px 22px;
}

.sidebar-user {
    display: flex;
    align-items: center;
}

.sidebar-avatar {
    width: 52px;
    height: 52px;

    border-radius: 50%;

    background: #fff;
    color: var(--dav-primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    font-weight: 800;

    margin-right: 13px;
}

.sidebar-name {
    font-size: 17px;
    font-weight: 700;
}

.sidebar-role {
    font-size: 12px;
    opacity: .8;
}

.sidebar-online {
    font-size: 11px;
    margin-top: 4px;

    display: flex;
    align-items: center;
}

.sidebar-online-dot {
    width: 7px;
    height: 7px;

    background: #35d07f;

    border-radius: 50%;

    margin-right: 5px;
}

.sidebar-body {
    padding: 18px 14px 30px;
}

.sidebar-section {
    font-size: 11px;
    font-weight: 800;

    color: #89909f;

    letter-spacing: .08em;

    margin:
        8px 8px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;

    min-height: 48px;

    padding: 10px 13px;

    margin-bottom: 4px;

    border-radius: 12px;

    color: #3e4758;

    text-decoration: none;

    font-size: 14px;
    font-weight: 500;
}

.sidebar-link i {
    width: 30px;

    font-size: 18px;

    color: #697487;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--dav-blue);
    background: #eaf2ff;
}

.sidebar-link.active i {
    color: var(--dav-blue);
}

.sidebar-divider {
    height: 1px;
    background: var(--dav-border);
    margin: 12px 0;
}

.sidebar-logout {
    display: flex;
    align-items: center;

    min-height: 48px;

    padding: 10px 13px;

    border-radius: 12px;

    color: var(--dav-danger);

    text-decoration: none;

    font-weight: 600;

    border: 1px solid #f5c2c7;

    background: #fff8f8;
}

.sidebar-logout i {
    width: 30px;
    font-size: 18px;
}

/* =========================================================
   MAIN
   ========================================================= */

.dav-main {
    padding:
        18px
        14px
        100px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;
}

.page-title {
    margin: 0;

    font-size: 22px;
    font-weight: 800;
}

.page-subtitle {
    color: var(--dav-muted);
    font-size: 12px;
    margin-top: 3px;
}

/* =========================================================
   STAT CARD
   ========================================================= */

.stat-card {
    border: 0;

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 4px 18px
        rgba(24, 39, 75, .06);

    overflow: hidden;
}

.stat-card-body {
    padding: 16px;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 48px;
    height: 48px;

    border-radius: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;
}

.stat-label {
    color: var(--dav-muted);

    font-size: 12px;

    margin-bottom: 5px;
}

.stat-value {
    font-size: 21px;
    font-weight: 800;

    line-height: 1.2;
}

.stat-description {
    color: var(--dav-muted);

    font-size: 10px;

    margin-top: 4px;
}

.icon-blue {
    background: #e7f0ff;
    color: #0d6efd;
}

.icon-orange {
    background: #fff1d6;
    color: #f59f00;
}

.icon-green {
    background: #e2f8ed;
    color: #198754;
}

.icon-red {
    background: #ffe5e7;
    color: #dc3545;
}

/* =========================================================
   QUICK ACTION
   ========================================================= */

.quick-card {
    background: #fff;

    border: 0;

    border-radius: 18px;

    padding: 15px;

    box-shadow:
        0 4px 18px
        rgba(24, 39, 75, .06);
}

.quick-item {
    text-decoration: none;

    color: var(--dav-text);

    text-align: center;

    display: block;
}

.quick-icon {
    width: 46px;
    height: 46px;

    border-radius: 14px;

    background: #eef4ff;

    color: var(--dav-blue);

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 7px;

    font-size: 19px;
}

.quick-label {
    font-size: 10px;
    font-weight: 600;
}

/* =========================================================
   CONTENT CARD
   ========================================================= */

.content-card {
    border: 0;

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 4px 18px
        rgba(24, 39, 75, .06);
}

.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 16px 8px;
}

.content-card-title {
    font-size: 15px;
    font-weight: 800;
}

.content-card-link {
    color: var(--dav-blue);

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;
}

.empty-state {
    text-align: center;

    padding:
        28px
        18px
        30px;

    color: var(--dav-muted);
}

.empty-icon {
    width: 60px;
    height: 60px;

    border-radius: 50%;

    background: #f1f4f8;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 12px;

    font-size: 25px;
}

/* =========================================================
   BOTTOM NAVBAR
   ========================================================= */

.dav-bottom {
    position: fixed;

    left: 50%;
    bottom: 0;

    transform: translateX(-50%);

    width: 100%;
    max-width: 520px;

    height: 76px;

    background:
        linear-gradient(
            135deg,
            var(--dav-primary),
            var(--dav-primary-2)
        );

    z-index: 1040;

    border-radius:
        20px
        20px
        0
        0;

    box-shadow:
        0 -5px 22px
        rgba(10, 46, 92, .2);

    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr
        1fr
        1fr;

    padding:
        6px 7px
        env(safe-area-inset-bottom);
}

.bottom-item {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    color: rgba(255,255,255,.72);

    text-decoration: none;

    font-size: 9px;
    font-weight: 500;
}

.bottom-item i {
    font-size: 20px;

    margin-bottom: 3px;
}

.bottom-item.active {
    color: #fff;
}

.bottom-add {
    position: relative;
}

.bottom-add-button {
    width: 58px;
    height: 58px;

    border-radius: 50%;

    background: #fff;

    color: var(--dav-primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;

    box-shadow:
        0 5px 18px
        rgba(0,0,0,.2);

    margin-top: -30px;

    border: 4px solid var(--dav-bg);
}

.bottom-add-label {
    margin-top: 2px;

    font-size: 9px;
}

/* =========================================================
   MOBILE ONLY
   ========================================================= */

@media (min-width: 768px) {

    body {
        background: #e9edf3;
    }

    .mobile-app {
        max-width: 520px;

        box-shadow:
            0 0 35px
            rgba(0,0,0,.08);
    }

    .dav-navbar {
        position: sticky;
    }

    .dav-bottom {
        max-width: 520px;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .nav-user-name {
        display: none;
    }

    .dav-main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .stat-value {
        font-size: 18px;
    }

    .page-title {
        font-size: 20px;
    }
}
