﻿/* ============================
   GLOBAL / BASE
============================ */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background: #f4f7fb;
    color: #1e293b;
}

a {
    color: #2563eb;
}

    a:hover {
        color: #1d4ed8;
    }


/* ============================
   BOOTSTRAP BUTTON POLISH
============================ */

.btn-primary {
    color: #ffffff;
    background-color: #2563eb;
    border-color: #1d4ed8;
}

    .btn-primary:hover {
        color: #ffffff;
        background-color: #1d4ed8;
        border-color: #1e40af;
    }

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #ffffff;
    background-color: #2563eb;
    border-color: #1d4ed8;
}


/* ============================
   COMMON HELPERS
============================ */

.border-top {
    border-top: 1px solid #e5e7eb;
}

.border-bottom {
    border-bottom: 1px solid #e5e7eb;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(15, 23, 42, .05);
}


/* ============================
   FOOTER
============================ */

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}


/* ============================
   PROFESSIONAL DASHBOARD
============================ */

.dashboard-page {
    padding: 4px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.dashboard-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.dashboard-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.dashboard-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


/* ============================
   DASHBOARD SUMMARY CARDS
============================ */

.dashboard-summary-row {
    margin-bottom: 2px;
}

.summary-card {
    background: #ffffff;
    border-radius: 11px;
    padding: 14px 14px 12px;
    min-height: 145px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .summary-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 4px;
        width: 100%;
        background: #2563eb;
    }

/* Card top color strips */
.summary-sale::before {
    background: #2563eb;
}

.summary-purchase::before {
    background: #7c3aed;
}

.summary-receipt::before {
    background: #059669;
}

.summary-payment::before {
    background: #dc2626;
}

.summary-fuel::before {
    background: #ea580c;
}

.summary-present::before {
    background: #0891b2;
}

.summary-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.summary-label {
    min-height: 34px;
    display: flex;
    align-items: flex-end;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.summary-value {
    font-size: 17px;
    line-height: 1.15;
    white-space: nowrap;
    letter-spacing: -0.3px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 6px;
    margin-bottom: 8px;
}

.summary-link {
    margin-top: auto;
    white-space: nowrap;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

    .summary-link:hover {
        text-decoration: underline;
    }


/* ============================
   DASHBOARD CARDS
============================ */

.dashboard-card {
    background: #ffffff;
    border-radius: 11px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    height: 100%;
}

.dashboard-card-header {
    padding: 11px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

    .dashboard-card-header a {
        font-size: 12px;
        font-weight: 600;
        color: #2563eb;
        text-decoration: none;
    }

        .dashboard-card-header a:hover {
            text-decoration: underline;
        }


/* ============================
   QUICK ACTIONS
============================ */

.quick-action-grid {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.quick-action {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 10px;
    padding: 13px 8px;
    text-align: center;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
}

    .quick-action i {
        display: block;
        font-size: 20px;
        color: #2563eb;
        margin-bottom: 7px;
    }

    .quick-action span {
        font-size: 13px;
        font-weight: 700;
    }

    .quick-action:hover {
        background: #eff6ff;
        border-color: #93c5fd;
        color: #1e293b;
        text-decoration: none;
        transform: translateY(-1px);
    }


/* ============================
   ALERTS
============================ */

.alert-list {
    padding: 10px 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid #eef2f7;
    text-decoration: none;
    color: #1e293b;
}

    .alert-item:last-child {
        border-bottom: none;
    }

    .alert-item strong {
        display: block;
        font-size: 13px;
    }

    .alert-item small {
        display: block;
        color: #64748b;
        margin-top: 2px;
        font-size: 12px;
    }

    .alert-item:hover {
        text-decoration: none;
        color: #0f172a;
    }

.alert-count {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.alert-danger-count {
    background: #fee2e2;
    color: #dc2626;
}

.alert-warning-count {
    background: #fef3c7;
    color: #b45309;
}


/* ============================
   RESPONSIVE DASHBOARD
============================ */

@media (max-width: 1400px) {
    .summary-value {
        font-size: 16px;
    }
}

@media (max-width: 1200px) {
    .summary-value {
        font-size: 18px;
    }
}

@media (max-width: 992px) {
    .quick-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .quick-action-grid {
        grid-template-columns: 1fr;
    }

    .summary-value {
        font-size: 18px;
    }

    .dashboard-header-actions {
        width: 100%;
    }

        .dashboard-header-actions .btn {
            flex: 1;
        }
}
