:root {
    --primary: #4f46e5;
    --background: #f7f8fc;
    --surface: #ffffff;
    --text: #171923;
    --muted: #8a8f9d;
    --border: #eceef3;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont,
                 "Segoe UI", sans-serif;
}

.app {
    min-height: 100vh;
    padding-bottom: 80px;
}


/* ===============================
   TOP BAR
================================ */

.app-header {
    height: 64px;
    background: var(--surface);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    border-bottom: 1px solid var(--border);
}

.app-header-left,
.app-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 9px;

    font-weight: 700;
}

.brand-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--primary);
    color: white;
}

.icon-btn {
    width: 38px;
    height: 38px;

    border: 0;
    background: transparent;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.icon-btn:hover {
    background: #f1f2f6;
}

.profile-btn {
    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 50%;

    background: #e9e7ff;
    color: var(--primary);

    font-weight: 600;
}


/* ===============================
   MAIN CONTENT
================================ */

.app-content {
    max-width: 1200px;
    margin: auto;
    /* padding: 28px 20px; */
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

   /* margin-bottom: 28px; */
}

.page-label {
    margin: 0;

    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.page-header h1 {
    margin: 4px 0;

    font-size: 28px;
    font-weight: 750;
}

.page-description {
    margin: 0;
    color: var(--muted);
}


/* ===============================
   CARDS
================================ */

.app-card {
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 16px;

    padding: 20px;

    box-shadow:
        0 2px 8px rgba(20, 20, 40, 0.03);
}

.stat-card {
    min-height: 170px;
}

.stat-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    margin-bottom: 18px;
}

.blue {
    background: #e9edff;
    color: #4f46e5;
}

.green {
    background: #e5f8ef;
    color: #16a05d;
}

.orange {
    background: #fff1df;
    color: #ed8a16;
}

.purple {
    background: #f0e8ff;
    color: #8b5cf6;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
}

.stat-value {
    margin-top: 3px;

    font-size: 25px;
    font-weight: 700;
}

.stat-change {
    margin-top: 8px;
    font-size: 12px;
}

.positive {
    color: #16a05d;
}

.negative {
    color: #e5484d;
}


/* ===============================
   ACTIVITY
================================ */

.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 15px;
}

.card-header-custom h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.card-header-custom p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.activity-item {
    display: flex;
    align-items: center;

    padding: 14px 0;

    border-top: 1px solid var(--border);
}

.activity-avatar {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 12px;
    font-weight: 700;
}

.activity-info {
    display: flex;
    flex-direction: column;

    margin-left: 12px;

    flex: 1;
}

.activity-info strong {
    font-size: 14px;
}

.activity-info span {
    color: var(--muted);
    font-size: 12px;
}

.activity-item time {
    color: var(--muted);
    font-size: 11px;
}


/* ===============================
   BOTTOM NAV
================================ */

.bottom-nav {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    height: 72px;

    background: rgba(255, 255, 255, 0.96);

    border-top: 1px solid var(--border);

    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 1000;

    backdrop-filter: blur(15px);
}

.nav-item {
    position: relative;

    width: 20%;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 4px;

    color: var(--muted);

    text-decoration: none;

    font-size: 11px;
}

.nav-item i {
    font-size: 21px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-action {
    margin-top: -25px;
}

.nav-add {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 17px;

    background: var(--primary);
    color: white;

    font-size: 22px;

    box-shadow:
        0 6px 18px rgba(79, 70, 229, 0.35);
}


/* ===============================
   MOBILE
================================ */

@media (max-width: 576px) {

    .app-content {
        padding: 20px 15px;
    }

    .page-header {
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .page-header .btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .stat-card {
        min-height: 150px;
        padding: 16px;
    }

    .stat-value {
        font-size: 22px;
    }

    .brand-name {
        font-size: 15px;
    }
}

/* Side Navigation */
.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
}

.side-nav.open {
    transform: translateX(0);
}

/* Header inside side nav */
.side-nav-header {
    height: 70px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

/* Menu links */
.side-nav-menu {
    padding: 20px 12px;
}

.side-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    margin-bottom: 5px;
    color: #555;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.2s ease;
}

.side-nav-item i {
    font-size: 20px;
}

.side-nav-item:hover,
.side-nav-item.active {
    color: #0d6efd;
    background: #eef5ff;
}

/* Dark overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Prevent page scrolling while menu is open */
body.menu-open {
    overflow: hidden;
}

/* ==========================================
   LOGIN PAGE
========================================== */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 20px;

    background: #f7f9fc;
}


.login-container {
    width: 100%;
    max-width: 420px;
}


/* ==========================================
   LOGO
========================================== */

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    color: #ffffff;
    background: #0d6efd;

    font-size: 28px;

    box-shadow:
        0 10px 25px rgba(13, 110, 253, 0.25);
}


/* ==========================================
   HEADING
========================================== */

.login-heading {
    text-align: center;
    margin-bottom: 32px;
}

.login-heading h1 {
    margin: 0 0 8px;

    color: #172033;

    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-heading p {
    margin: 0;

    color: #7a8495;
    font-size: 15px;
}


/* ==========================================
   FORM
========================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #30394a;

    font-size: 14px;
    font-weight: 600;
}


.password-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.password-label label {
    margin-bottom: 8px;
}

.password-label a {
    margin-bottom: 8px;

    color: #0d6efd;

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;
}


/* ==========================================
   INPUT
========================================== */

.input-wrapper {
    position: relative;

    display: flex;
    align-items: center;
}

.input-wrapper > i {
    position: absolute;
    left: 16px;

    color: #9aa4b2;

    font-size: 18px;

    pointer-events: none;
}

.input-wrapper input {
    width: 100%;

    height: 54px;

    padding: 0 48px;

    border: 1px solid #dfe4ec;
    border-radius: 12px;

    outline: none;

    color: #202938;
    background: #ffffff;

    font-size: 15px;

    transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #a5adba;
}

.input-wrapper input:focus {
    border-color: #0d6efd;

    box-shadow:
        0 0 0 3px rgba(13, 110, 253, 0.10);
}


/* ==========================================
   PASSWORD TOGGLE
========================================== */

.password-toggle {
    position: absolute;
    right: 8px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;

    color: #7d8795;
    background: transparent;

    font-size: 18px;
}

.password-toggle:active {
    background: #f1f3f6;
}


/* ==========================================
   REMEMBER ME
========================================== */

.remember-row {
    margin-bottom: 20px;
}

.remember-check {
    display: flex !important;
    align-items: center;

    gap: 9px;

    margin: 0 !important;

    color: #687386 !important;

    font-size: 13px !important;
    font-weight: 400 !important;
}

.remember-check input {
    width: 17px;
    height: 17px;

    accent-color: #0d6efd;
}


/* ==========================================
   LOGIN BUTTON
========================================== */

.login-button {
    width: 100%;
    height: 54px;

    border: 0;
    border-radius: 12px;

    color: #ffffff;
    background: #0d6efd;

    font-size: 15px;
    font-weight: 600;

    transition: all 0.2s ease;
}

.login-button:active {
    transform: scale(0.98);
}

.login-button:disabled {
    opacity: 0.7;
}


/* ==========================================
   DIVIDER
========================================== */

.login-divider {
    display: flex;
    align-items: center;

    gap: 15px;

    margin: 25px 0;

    color: #a0a8b5;

    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #e3e7ed;
}


/* ==========================================
   BIOMETRIC BUTTON
========================================== */

.biometric-button {
    width: 100%;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 1px solid #dfe4ec;
    border-radius: 12px;

    color: #263244;
    background: #ffffff;

    font-size: 15px;
    font-weight: 600;

    transition: all 0.2s ease;
}

.biometric-button:active {
    transform: scale(0.98);
    background: #f7f9fc;
}

.biometric-icon {
    color: #0d6efd;
    font-size: 22px;
}


/* ==========================================
   REGISTER
========================================== */

.register-text {
    margin-top: 28px;

    text-align: center;

    color: #7a8495;

    font-size: 14px;
}

.register-text a {
    color: #0d6efd;

    font-weight: 600;

    text-decoration: none;
}


/* ==========================================
   FOOTER
========================================== */

.login-footer {
    display: flex;
    justify-content: center;

    gap: 7px;

    margin-top: 30px;

    color: #a1a9b6;

    font-size: 11px;
}
