/* Admin Panel Specific Styles */
.admin-dashboard {
    min-height: 100vh;
    padding: 2rem 0;
    background: var(--bg-secondary);
}

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.auth-card h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.image-preview {
    width: 100%;
    height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.image-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.image-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.image-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.admin-welcome h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.admin-welcome p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

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

.stat-icon {
    background: var(--gradient-primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-info p {
    color: var(--text-secondary);
    font-weight: 500;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tab-header h2 {
    font-size: 2rem;
    font-weight: 600;
}

.order-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.order-filters select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 500;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.admin-table td {
    color: var(--text-secondary);
}

.admin-table tr:hover {
    background: var(--bg-secondary);
}

.products-table-container,
.orders-table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.product-image-small {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.product-placeholder {
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-available {
    background: #D5EDDA;
    color: #155724;
}

.status-unavailable {
    background: #F8D7DA;
    color: #721C24;
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
}

.status-confirmed {
    background: #CCE5FF;
    color: #004085;
}

.status-delivered {
    background: #D5EDDA;
    color: #155724;
}

.status-cancelled {
    background: #F8D7DA;
    color: #721C24;
}

[data-theme="dark"] .status-available {
    background: #1E4620;
    color: #5CB85C;
}

[data-theme="dark"] .status-unavailable {
    background: #4A1E20;
    color: #D9534F;
}

[data-theme="dark"] .status-pending {
    background: #4A3C1D;
    color: #F0AD4E;
}

[data-theme="dark"] .status-confirmed {
    background: #1E3A5F;
    color: #5BC0DE;
}

[data-theme="dark"] .status-delivered {
    background: #1E4620;
    color: #5CB85C;
}

[data-theme="dark"] .status-cancelled {
    background: #4A1E20;
    color: #D9534F;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #007BFF;
    color: white;
}

.btn-edit:hover {
    background: #0056B3;
}

.btn-delete {
    background: #DC3545;
    color: white;
}

.btn-delete:hover {
    background: #C82333;
}

.btn-view {
    background: #28A745;
    color: white;
}

.btn-view:hover {
    background: #1E7E34;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.analytics-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.analytics-card h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

#sales-chart {
    max-height: 300px;
}

.popular-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.popular-product-item:last-child {
    border-bottom: none;
}

.popular-product-info h4 {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.popular-product-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.popular-product-sales {
    font-weight: 600;
    color: var(--primary-color);
}

.order-details-content {
    display: grid;
    gap: 2rem;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.order-info-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 10px;
}

.order-info-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
}

.order-info-item p {
    font-weight: 500;
}

.order-items {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
}

.order-items h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-name {
    font-weight: 500;
}

.order-item-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.order-total {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.order-total h4 {
    color: var(--primary-color);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Responsive Admin Styles */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

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

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-tabs {
        flex-wrap: wrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .order-info {
        grid-template-columns: 1fr;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem;
        margin: 1rem;
    }

    .admin-welcome h1 {
        font-size: 2rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .tab-content {
        padding: 1rem;
    }

    .products-table-container,
    .orders-table-container {
        font-size: 0.7rem;
    }
}
