/* Admin Panel Styles */
:root {
    --primary-red: #E21B1B;
    --dark-red: #C41E3A;
    --pure-white: #FFFFFF;
    --off-white: #F8F9FA;
    --text-dark: #1A1A1A;
    --text-gray: #6C757D;
    --border-color: #E9ECEF;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--off-white);
    color: var(--text-dark);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.login-card {
    background: var(--pure-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(226, 27, 27, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: var(--primary-red);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
    min-height: 20px;
}

.btn-login,
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--pure-white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(226, 27, 27, 0.3);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--pure-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    text-align: center;
}

.login-footer a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--primary-red);
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--pure-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header .logo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--pure-white);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 600;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-item .icon {
    font-size: 1.25rem;
}

.sidebar-footer {
    padding: 1.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.2);
    color: var(--pure-white);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.topbar {
    background: var(--pure-white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
}

.user-info {
    font-weight: 600;
    color: var(--text-gray);
}

.content {
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--pure-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 3rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(226, 27, 27, 0.1) 0%, rgba(196, 30, 58, 0.1) 100%);
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-red);
}

.stat-info p {
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Welcome Card */
.welcome-card {
    background: var(--pure-white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.welcome-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.welcome-card p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.quick-link {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--pure-white);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.quick-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(226, 27, 27, 0.3);
}

/* Data Table */
.data-table {
    background: var(--pure-white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
}

.btn-add {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--pure-white);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(226, 27, 27, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    border-bottom: 2px solid var(--border-color);
}

th {
    text-align: left;
    padding: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.9rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-gray);
}

tr:hover {
    background: var(--off-white);
}

.table-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-edit {
    background: #FFC107;
    color: var(--text-dark);
}

.btn-edit:hover {
    background: #FFB300;
    transform: translateY(-2px);
}

.btn-delete {
    background: var(--primary-red);
    color: var(--pure-white);
}

.btn-delete:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--pure-white);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-dark);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--border-color);
    color: var(--text-dark);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #DEE2E6;
}

/* Image Preview */
.image-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 1rem;
    display: none;
}

.image-preview.show {
    display: block;
}

/* Responsive */
@media (max-width: 968px) {
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-actions {
        flex-direction: column;
    }
}