
/* =========================================
   GENERAL
========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
}

.dashboard-container {
    padding: 15px;
}

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

.sidebar {
    background: linear-gradient(180deg, #172554, #1e293b);
    color: #ffffff;
    min-height: calc(100vh - 30px);
    padding: 22px 14px;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.15);
}

.sidebar-title {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar nav a {
    display: block;
    padding: 11px 10px;
    border-radius: 7px;
    color: #e2e8f0;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    overflow-wrap: anywhere;
}

.sidebar nav a:hover {
    background: #2563eb;
    color: #ffffff;
    padding-left: 16px;
}

.logout-btn {
    display: block;
    background: #dc2626;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-top: 25px;
    font-weight: 600;
    transition: 0.25s;
}

.logout-btn:hover {
    background: #991b1b;
    color: #ffffff;
}

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

.main-content {
    padding: 22px;
}

.dashboard-header {
    background: linear-gradient(135deg, #2563eb, #4338ca);
    padding: 25px 15px;
    text-align: center;
    color: #ffffff;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.dashboard-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
}

.dashboard-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* =========================================
   DATE FILTER
========================================= */

.date-filter {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06);
}

.date-filter label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.date-filter .form-control {
    min-height: 43px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
}

.date-filter .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.filter-btn {
    width: 100%;
    min-height: 43px;
    border: none;
    border-radius: 7px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s;
}

.filter-btn:hover {
    background: #1d4ed8;
}

/* =========================================
   DASHBOARD TILES
========================================= */

.dashboard-tiles {
    margin-bottom: 20px;
}

.tile {
    position: relative;
    min-height: 155px;
    height: 100%;
    padding: 23px 12px;
    border-radius: 12px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-bottom: 4px solid #2563eb;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    overflow-wrap: anywhere;
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.tile-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 23px;
    font-weight: 800;
}

.tile h5 {
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.tile strong {
    display: block;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
}

/* =========================================
   INDIVIDUAL TILE COLORS
========================================= */

.tile-cash {
    border-bottom-color: #16a34a;
}

.tile-cash .tile-icon {
    background: #dcfce7;
    color: #15803d;
}

.tile-bank {
    border-bottom-color: #2563eb;
}

.tile-bank .tile-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.tile-received {
    border-bottom-color: #0891b2;
}

.tile-received .tile-icon {
    background: #cffafe;
    color: #0e7490;
}

.tile-payment {
    border-bottom-color: #ea580c;
}

.tile-payment .tile-icon {
    background: #ffedd5;
    color: #c2410c;
}

.tile-sales {
    border-bottom-color: #7c3aed;
}

.tile-sales .tile-icon {
    background: #ede9fe;
    color: #6d28d9;
}

.tile-due {
    border-bottom-color: #dc2626;
}

.tile-due .tile-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.tile-product {
    border-bottom-color: #0d9488;
}

.tile-product .tile-icon {
    background: #ccfbf1;
    color: #0f766e;
}

.tile-installments {
    border-bottom-color: #ca8a04;
}

.tile-installments .tile-icon {
    background: #fef9c3;
    color: #a16207;
}

.tile-profit {
    border-bottom-color: #db2777;
}

.tile-profit .tile-icon {
    background: #fce7f3;
    color: #be185d;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 991px) {
    .dashboard-container {
        padding: 10px;
    }

    .sidebar {
        padding: 15px 10px;
    }

    .sidebar nav a {
        font-size: 13px;
        padding: 10px 7px;
    }

    .main-content {
        padding: 15px;
    }

    .dashboard-header h2 {
        font-size: 23px;
    }

    .tile {
        min-height: 145px;
        padding: 20px 8px;
    }

    .tile strong {
        font-size: 17px;
    }
}

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

@media (max-width: 767px) {
    .dashboard-container {
        padding: 8px;
    }

    .sidebar {
        min-height: auto;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .sidebar-title {
        margin-bottom: 12px;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .sidebar nav a {
        background: rgba(255, 255, 255, 0.06);
        font-size: 12px;
        padding: 10px 7px;
    }

    .logout-btn {
        margin-top: 15px;
    }

    .main-content {
        padding: 8px 0;
    }

    .dashboard-header {
        padding: 22px 10px;
        margin-bottom: 15px;
    }

    .dashboard-header h2 {
        font-size: 22px;
    }

    .date-filter {
        padding: 15px;
        margin-bottom: 18px;
    }

    .tile {
        min-height: 140px;
        padding: 18px 5px;
    }

    .tile h5 {
        font-size: 13px;
    }

    .tile strong {
        font-size: 15px;
    }

    .tile-icon {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }
}