/* =========================================================
   GLOBAL RESET & BASE STYLES
========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f8fc;
    color: #333;
    transition: background 0.3s, color 0.3s;
}

/* Dark mode */
body.dark {
    background: #121212;
    color: #eee;
}

/* =========================================================
   HEADER / TOP BAR
========================================================= */
.top-bar {
    background: #0d47a1;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* mobile friendly */
}

.top-bar span {
    font-size: 22px;
    font-weight: bold;
}

.login-btn,
.logout-btn {
    background: #b71c1c;
    color: white;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
}

.login-btn:hover,
.logout-btn:hover {
    background: #7f0000;
}

/* Dark mode header */
body.dark .top-bar {
    background: #000;
}

/* =========================================================
   CONTAINER
========================================================= */
.container {
    width: 95%;
    max-width: 1200px;
    margin: auto;
    padding: 20px 0;
}

/* =========================================================
   NOTIFICATIONS
========================================================= */
.notification {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    animation: fadein 0.5s;
}

.notification.success { background: #0d47a1; color: white; }
.notification.error   { background: #b71c1c; color: white; }
.notification.info    { background: #1976d2; color: white; }

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =========================================================
   CARDS & FORMS
========================================================= */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: background 0.3s;
}

body.dark .card {
    background: #1e1e1e;
}

.card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card input,
.card select,
.card textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card input:focus,
.card select:focus,
.card textarea:focus {
    outline: none;
    border-color: #0d47a1;
    box-shadow: 0 0 5px rgba(13,71,161,0.5);
}

.card textarea { resize: vertical; min-height: 80px; }

.card button {
    background: #0d47a1;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.card button:hover { background: #1976d2; }

/* =========================================================
   ADMIN DASHBOARD BUTTONS
========================================================= */
.dashboard-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dash-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 35px 25px;
    background: #0d47a1;
    color: #ffffff !important;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    position: relative;
    opacity: 0;
    animation: dashFade 0.5s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.dash-btn i {
    font-size: 36px;
    transition: transform 0.3s ease;
}

.dash-btn span {
    font-size: 15px;
    text-align: center;
}

/* Badge counter */
.dash-btn .badge {
    position: absolute;
    top: 12px;
    right: 14px;
    background: #ffffff;
    color: #0d47a1;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Hover effect */
.dash-btn:hover {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 6px 12px rgba(0,0,0,0.22);
}

.dash-btn:hover i {
    transform: rotate(-10deg) scale(1.1);
}

/* Staggered animation delays */
.dash-btn:nth-child(1) { animation-delay: 0.05s; }
.dash-btn:nth-child(2) { animation-delay: 0.10s; }
.dash-btn:nth-child(3) { animation-delay: 0.15s; }
.dash-btn:nth-child(4) { animation-delay: 0.20s; }
.dash-btn:nth-child(5) { animation-delay: 0.25s; }

@keyframes dashFade {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Dark mode for buttons */
body.dark .dash-btn {
    background: #1e1e1e;
}

body.dark .dash-btn:hover {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
}

body.dark .dash-btn .badge {
    background: #b71c1c;
    color: white;
}

/* =========================================================
   CATEGORY DASHBOARD
========================================================= */
.category-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.category-btn {
    background: #0d47a1;
    color: white;
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    flex: 1 1 180px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
    min-width: 150px;
}

.category-btn:hover {
    background: #b71c1c;
    transform: translateY(-5px);
}

.category-btn span {
    font-size: 18px;
    font-weight: bold;
}

.category-actions {
    margin-top: 10px;
}

.category-actions a {
    font-size: 12px;
    color: white;
    text-decoration: underline;
    margin: 0 5px;
}

.category-actions a:hover {
    color: #ffdddd;
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
    text-align: center;
    padding: 15px;
    background: #0d47a1;
    color: white;
    margin-top: 40px;
}

/* =========================================================
   RESPONSIVE ADJUSTMENTS
========================================================= */
@media (max-width: 768px) {
    .dash-btn {
        padding: 30px 15px;
        font-size: 15px;
    }

    .dash-btn i {
        font-size: 28px;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-btn,
    .logout-btn {
        margin-top: 10px;
    }

    .category-dashboard {
        justify-content: center;
    }

    .menu {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .item img {
        height: 120px;
    }
}
