:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(15,23,42,.95), rgba(37,99,235,.85)),
        url("../img/photo-1.avif?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
}

.login-box {
    width: 400px;
    max-width: 92%;
    background: white;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.logo {
    text-align: center;
    margin-bottom: 25px;
}

.logo-icon {
    width: 65px;
    height: 65px;
    margin: auto;
    border-radius: 16px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 12px;
}

.logo h1 {
    font-size: 24px;
}

.logo p {
    color: var(--muted);
    margin-top: 5px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.btn {
    border: none;
    padding: 11px 17px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-light {
    background: #e2e8f0;
    color: #334155;
}

.full {
    width: 100%;
}

.demo-login {
    margin-top: 20px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    color: var(--muted);
}

/* APP */

.app {
    /*display: none;*/
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: var(--secondary);
    color: white;
    padding: 20px 15px;
    z-index: 100;
}

.sidebar-logo {
    padding: 10px;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
}

.sidebar-logo span {
    color: #60a5fa;
}

.nav-item {
    padding: 12px 14px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 14px;
}

.nav-item:hover,
.nav-item.active {
    background: var(--primary);
    color: white;
}

.logout {
    position: absolute;
    bottom: 20px;
    left: 15px;
    right: 15px;
}

.main {
    margin-left: 250px;
    min-height: 100vh;
}

.topbar {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.topbar h2 {
    font-size: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #dbeafe;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.content {
    padding: 30px;
}

.page {
    /*display: none;*/
}

.page.active {
    display: block;
}

/* CARDS */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-title {
    color: var(--muted);
    font-size: 13px;
}

.stat-value {
    font-size: 27px;
    font-weight: bold;
    margin-top: 8px;
}

.stat-icon {
    float: right;
    font-size: 25px;
}

/* ACCOUNT CARDS */

.account-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.account-card {
    background: white;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.account-card .icon {
    font-size: 25px;
}

.account-card h4 {
    margin-top: 10px;
}

.account-card .amount {
    font-size: 20px;
    font-weight: bold;
    margin-top: 5px;
    color: var(--success);
}

/* SECTION */

.section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
}

.section-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    font-size: 16px;
}

.section-body {
    padding: 20px;
}

/* TABLE */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th,
td {
    padding: 13px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    background: #f8fafc;
    color: #475569;
}

.badge {
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

/* TOOLBAR */

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.search {
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 220px;
}

/* MODAL */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.modal.show {
    display: flex;
}

.modal-box {
    background: white;
    width: 500px;
    max-width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 14px;
    padding: 25px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.close {
    cursor: pointer;
    font-size: 25px;
}

/* REPORT */

.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.report-box {
    padding: 20px;
    border-radius: 10px;
    background: #f8fafc;
}

.report-box h4 {
    margin-bottom: 12px;
}

.progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 10px;
}

.progress div {
    height: 100%;
    background: var(--primary);
}

/* MOBILE */

.mobile-menu {
    display: none;
    cursor: pointer;
    font-size: 25px;
}

@media(max-width: 1000px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .account-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 700px) {
    .sidebar {
        transform: translateX(-100%);
        transition: .3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .content {
        padding: 15px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .account-grid {
        grid-template-columns: 1fr 1fr;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}