* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a4d2e;
    --secondary: #d4af37;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f7fa;
    color: var(--dark);
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #2d6a4f 100%);
    padding: 2rem;
}

.login-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 100%;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.login-form input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), #2d6a4f);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #2d6a4f, var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(26, 77, 46, 0.3);
}

/* Admin Dashboard */
.admin-dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--primary);
    color: var(--white);
    padding: 2rem 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 0.3rem;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--secondary);
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.2);
    border-left-color: var(--secondary);
    font-weight: 600;
}

.nav-item span {
    font-size: 1.3rem;
}

/* Main Content */
.main-content {
    overflow-y: auto;
}

.top-bar {
    background: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    font-size: 1.8rem;
    color: var(--primary);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.content-section {
    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(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.stat-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    padding: 0.8rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: #2d6a4f;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(26, 77, 46, 0.3);
}

.btn-secondary {
    padding: 0.6rem 1.2rem;
    background: var(--secondary);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger {
    padding: 0.6rem 1.2rem;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success {
    padding: 0.6rem 1.2rem;
    background: var(--success);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-block {
    width: 100%;
}

/* Products List */
.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-item-content {
    padding: 1.5rem;
}

.product-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.product-item h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.product-price {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.price-original {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
}

.price-sale {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Orders List */
.orders-list {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

.order-item {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.order-item:hover {
    background: #f8f9fa;
}

.order-item:last-child {
    border-bottom: none;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.order-status {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.status-confirmed {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
}

.status-shipped {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.status-delivered {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.order-detail {
    display: flex;
    flex-direction: column;
}

.order-detail-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.order-detail-value {
    font-weight: 600;
    color: var(--dark);
}

/* Customers List */
.customers-list {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
}

.customers-table th,
.customers-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.customers-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--primary);
}

.customers-table tbody tr:hover {
    background: #f8f9fa;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters select:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.close-modal:hover {
    background: var(--danger);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-content h2 {
    padding: 2rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 20px 20px 0 0;
    margin: 0;
}

/* Product Form */
.product-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-group input[type="file"] {
    border: 2px dashed #e0e0e0;
    padding: 1rem;
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.image-preview {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #f0f0f0;
}

/* Order Details Modal */
#orderDetails {
    padding: 2rem;
}

.order-info-section {
    margin-bottom: 2rem;
}

.order-info-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.info-value {
    font-weight: 600;
    color: var(--dark);
}

.status-update {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-update label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.status-update select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 3000;
    font-weight: 600;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: var(--white);
}

.notification.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: var(--white);
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: var(--white);
}

/* Responsive */
@media (max-width: 968px) {
    .admin-dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .products-list {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .top-bar {
        padding: 1rem;
    }

    .top-bar h1 {
        font-size: 1.3rem;
    }

    .content-section {
        padding: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .modal {
        padding: 1rem;
    }

    .order-details-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }
}
