/**
 * Admin Panel Styles for Aziz Phone Hub
 */

/* Login Page */
.login-page {
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-box {
    border-radius: 10px;
    background-color: #fff;
}

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

.sidebar {
    width: 250px;
    background-color: #343a40;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h3 {
    padding: 0 20px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.sidebar a {
    display: block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar a:hover, .sidebar a.active {
    background-color: #495057;
}

.sidebar .logout-btn {
    position: absolute;
    bottom: 20px;
    width: 85%;
    margin: 0 20px;
}

.content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

/* Product Management */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 15px;
}

.product-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.product-card p {
    margin-bottom: 10px;
    color: #28a745;
    font-weight: bold;
}

.product-card .actions {
    display: flex;
    justify-content: space-between;
}



.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.image-preview {
    width: 100%;
    height: 200px;
    border: 1px dashed #ddd;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
}

/* Order Management */
.order-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-processing {
    background-color: #17a2b8;
    color: #fff;
}

.status-shipped {
    background-color: #007bff;
    color: #fff;
}

.status-delivered {
    background-color: #28a745;
    color: #fff;
}

.status-cancelled {
    background-color: #dc3545;
    color: #fff;
}

/* Content Area Improvements */
.content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    min-width: 0; /* Allow content to shrink */
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.container-fluid {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Card Improvements */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Button Improvements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }
    
    .content {
        margin-left: 220px;
        padding: 15px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    .content {
        margin-left: 200px;
        padding: 15px;
    }
    
    .sidebar h3 {
        font-size: 1.3rem;
    }
    
    .sidebar a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 10px 0;
    }
    
    .sidebar h3 {
        flex: 1;
        margin-bottom: 0;
        padding: 0 15px;
    }
    
    .sidebar a {
        flex: none;
        padding: 8px 15px;
        margin: 2px;
        border-radius: 0.25rem;
        font-size: 0.85rem;
    }
    
    .sidebar .logout-btn {
        position: relative;
        bottom: auto;
        margin: 5px 15px;
        width: auto;
        flex: none;
    }
    
    .content {
        margin-left: 0;
        padding: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .sidebar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sidebar h3 {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .sidebar a {
        margin: 1px 10px;
        text-align: center;
    }
    
    .sidebar .logout-btn {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .content {
        padding: 8px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}
