/* ========== admin-style.css - ACERO SHOP Admin Panel ========== */

:root {
    --primary-color: #6f42c1;
    --secondary-color: #5a32a3;
    --accent-color: #0d6efd;
    --bg-light: #f8f9fa;
    --text-dark: #333;
}

* {
    box-sizing: border-box;
}

body { 
    font-family: 'Poppins', sans-serif; 
    background-color: var(--bg-light); 
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* ========== SIDEBAR ========== */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand .subtitle {
    font-size: 0.8rem;
    font-weight: 300;
    margin-top: 5px;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    border-left: 4px solid transparent;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid white;
}

.sidebar-menu .nav-link i {
    width: 25px;
    margin-right: 10px;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 250px;
    padding: 25px;
    min-height: 100vh;
}

/* ========== SECTION CARDS ========== */
.section-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.section-card h4 {
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* ========== STATS CARDS ========== */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 25px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
}

.stats-card .number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-card .label {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.stats-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* ========== TABLES ========== */
.admin-table {
    font-size: 0.9rem;
    width: 100%;
}

.admin-table th {
    background: var(--bg-light);
    font-weight: 600;
    white-space: nowrap;
}

.admin-table td {
    vertical-align: middle;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending { 
    background: #ffeaa7; 
    color: #2d3436; 
}

.status-approved { 
    background: #55efc4; 
    color: #2d3436; 
}

.status-rejected { 
    background: #ff7675; 
    color: white; 
}

/* ========== IMAGE PREVIEW ========== */
.img-preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

/* ========== COUPON BADGE ========== */
.coupon-used {
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ========== BUTTONS ========== */
.btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary-custom:hover { 
    background-color: var(--secondary-color); 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.3);
    color: white;
}

/* ========== SEARCH BOX ========== */
.search-box {
    max-width: 300px;
}

/* ========== ALERT INFO BOX ========== */
.alert-info {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 10px;
    padding: 20px;
}

/* ========== MODALS ========== */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #eee;
}

/* ========== MOBILE NAVBAR ========== */
.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stats-card .number {
        font-size: 1.5rem;
    }
    
    .stats-card i {
        font-size: 1.8rem;
    }
    
    .admin-table {
        font-size: 0.8rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
    }
    
    .section-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .section-card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .admin-table {
        font-size: 0.7rem;
    }
    
    .btn-sm {
        padding: 2px 6px;
        font-size: 0.7rem;
    }
    
    .stats-card {
        padding: 15px 10px;
    }
}

/* ========== LIST GROUP (Dashboard Recent Items) ========== */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

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

/* ========== FORM STYLES ========== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 4px;
}

/* ========== IMAGE PREVIEW CONTAINER ========== */
#imagePreview {
    border: 1px dashed #ddd;
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
}

#imagePreview img {
    max-height: 100px;
    border-radius: 8px;
}

/* ========== NAV PILLS (for mobile) ========== */
.nav-link {
    color: var(--text-dark);
}

.nav-link:hover {
    color: var(--primary-color);
}

/* ========== PAGE TITLE ========== */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.page-title i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 15px;
}

/* ========== BADGE COLORS ========== */
.badge.bg-primary {
    background-color: var(--accent-color) !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #333;
}

/* ========== HR DIVIDER ========== */
hr {
    border-color: #eee;
    margin: 20px 0;
}

/* ========== SCROLLBAR (for sidebar) ========== */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}