/* ================= ROLE BADGES ================= */
.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.role-admin {
    background: #fee2e2;
    color: #991b1b;
}

.role-manager {
    background: #fef3c7;
    color: #92400e;
}

.role-cashier {
    background: #dbeafe;
    color: #1e40af;
}

.role-default {
    background: #e5e7eb;
    color: #374151;
}

/* ================= GLOBAL BASE ================= */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f3f4f6;
    margin: 0;
    width: 100%;
}

a {
    text-decoration: none;
}

/* ================= BACK TO DASHBOARD ================= */
.back-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 14px;
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    font-size: 14px;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.back-dashboard-btn .icon {
    font-size: 18px;
    transition: transform .15s ease;
}

.back-dashboard-btn:hover {
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.back-dashboard-btn:hover .icon {
    transform: translateX(-3px);
}

/* ================= NAVBAR ================= */
/* ================= FIXED NAVBAR ================= */
.navbar-fixed {
    height: 56px;
    /* LOCK HEIGHT */
    padding: 0;
    /* REMOVE BOOTSTRAP PADDING */
}

/* Inner container */
.navbar-inner {
    height: 56px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 16px;
    /* FIXED HORIZONTAL PADDING */
}

/* LEFT */
.navbar-left {
    display: flex;
    align-items: center;
}

.dashboard-link {
    color: #ffffff;
    font-weight: 600;
    padding: 6px 12px;
    /* FIXED PADDING */
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #ffffff;
}

.dashboard-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* CENTER */
.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 56px;
    display: flex;
    align-items: center;
}

/* MARQUEE */
/* MARQUEE WRAPPER */
.brand-marquee {
    width: 460px;
    /* fixed width to allow scrolling */
    height: 24px;
    overflow: hidden;
    position: relative;
}

/* MOVING TEXT */
.brand-marquee span {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 12s linear infinite;
    font-size: 18px;
    line-height: 24px;
    color: #fff;
}


/* RIGHT */
.navbar-right {
    display: flex;
    align-items: center;
}

/* LOGOUT BUTTON */
.logout-btn {
    height: 32px;
    /* FIX BUTTON HEIGHT */
    padding: 0 12px;
    /* FIX BUTTON PADDING */
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;

    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #000;
}

/* PREVENT FORM FROM AFFECTING HEIGHT */
.navbar-right form {
    margin: 0;
}


/* ================= DASHBOARD ================= */
.dashboard-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Tablet */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 576px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .navbar .container-fluid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .navbar-left,
    .navbar-right {
        text-align: center;
    }

    .brand-marquee span {
        animation-duration: 8s;
    }
}

/* ================= CARDS ================= */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.card .icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.card .label {
    font-weight: 600;
    font-size: 16px;
}

.card .muted {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}

/* Admin-only emphasis */
.card.danger {
    border: 2px dashed #dc3545;
    color: #dc3545;
}

/* ================= DASHBOARD CARDS ================= */
.dashboard-card {
    border: 1px solid #3b82f6;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 210px;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

.dashboard-card .card-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 210px;
}

.dashboard-card h1 {
    width: 4.75rem;
    height: 4.75rem;
    line-height: 4.75rem;
    margin: 0 auto 1rem;
    font-size: 2rem;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}

.dashboard-card:hover h1 {
    background: rgba(14, 165, 233, 0.18);
    color: #0284c7;
}

.dashboard-card h5 {
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #111827;
}

.dashboard-card small {
    color: #4b5563;
}

.dashboard-card .text-warning {
    color: #b45309 !important;
}

.dashboard-card.border-warning {
    border: 1px solid #f59e0b;
}

.dashboard-card.waste-card h5,
.dashboard-card.waste-card .waste-title {
    color: #111827;
}

.dashboard-card.waste-card small {
    color: #111827;
}

.theme-warm .dashboard-card {
    border: 1px solid rgba(255, 183, 77, 0.3);
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #4b2d17 0%, #7d501f 100%);
    color: #fff7e6;
    box-shadow: 0 18px 48px rgba(80, 42, 18, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    min-height: 210px;
}

.theme-warm .dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 55px rgba(255, 183, 77, 0.28);
    border-color: rgba(255, 183, 77, 0.65);
}

.theme-warm .dashboard-card .card-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 210px;
}

.theme-warm .dashboard-card h1 {
    width: 4.75rem;
    height: 4.75rem;
    line-height: 4.75rem;
    margin: 0 auto 1rem;
    font-size: 2rem;
    border-radius: 50%;
    background: rgba(255, 183, 77, 0.22);
    color: #ffdfb5;
    transition: all 0.25s ease;
}

.theme-warm .dashboard-card:hover h1 {
    background: rgba(255, 183, 77, 0.32);
    color: #fff1d6;
}

.theme-warm .dashboard-card h5 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #fff8e6;
}

.theme-warm .dashboard-card small {
    color: #f0d8b8;
    font-weight: 500;
}

.theme-warm .dashboard-card .text-warning {
    color: #f59e0b !important;
}

.theme-warm .dashboard-card.border-warning {
    border: 2px solid #f59e0b;
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
}

html.theme-warm,
body.theme-warm {
    background-color: #24170f;
    color: #f8ede2;
}

.theme-warm .container {
    background-color: transparent;
}

.theme-warm h3,
.theme-warm .text-muted,
.theme-warm small,
.theme-warm .card-body h5 {
    color: #f8ede2;
}

.theme-warm .btn-outline-secondary,
.theme-warm .btn-outline-primary {
    color: #fff;
    border-color: #f59e0b;
}

.theme-warm .btn-outline-secondary:hover,
.theme-warm .btn-outline-primary:hover {
    background-color: #f59e0b;
    color: #1f1207;
    border-color: #f59e0b;
}

.theme-warm .dashboard-card.waste-card h5,
.theme-warm .dashboard-card.waste-card .waste-title {
    color: #7f1d1d;
}

.theme-warm .dashboard-card.waste-card small {
    color: #1f2937;
}

/* ================= ANIMATION ================= */
@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}