/* WIZGOO Admin Panel - Custom CSS */

/* CSS Variables */
:root {
    --wizgoo-orange: #ff6b35;
    --wizgoo-orange-dark: #e55a2b;
    --wizgoo-red: #e74c3c;
    --wizgoo-blue: #3498db;
    --wizgoo-success: #27ae60;
    --wizgoo-warning: #f39c12;
    --wizgoo-dark: #2c3e50;
    --wizgoo-dark-light: #34495e;
    --wizgoo-gray: #95a5a6;
    --wizgoo-light: #ecf0f1;
    --sidebar-width: 260px;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--wizgoo-orange) 0%, var(--wizgoo-red) 100%);
    padding: 20px;

}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.auth-card .auth-logo,
.auth-card .auth-subtitle,
.auth-card .text-center {
    text-align: center;
}

.auth-card .form-group label {
    text-align: left;
    display: block;
    width: 100%;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.wizgoo-fox {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--wizgoo-orange);
    letter-spacing: 2px;
}

.auth-subtitle {
    color: var(--wizgoo-gray);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Buttons */
.btn-wizgoo {
    background: linear-gradient(45deg, var(--wizgoo-orange), var(--wizgoo-red));
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 0.5rem;
}

.btn-wizgoo:hover {
    background: linear-gradient(45deg, var(--wizgoo-orange-dark), #c0392b);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-outline-wizgoo {
    border: 2px solid var(--wizgoo-orange);
    color: var(--wizgoo-orange);
    background: transparent;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-wizgoo:hover {
    background: var(--wizgoo-orange);
    color: white;
}

/* Smaller create buttons */
.btn-create {
    padding: 8px 16px !important;
    font-size: 0.875rem !important;
    width: auto !important;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--wizgoo-dark) 0%, var(--wizgoo-dark-light) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #415369;
}

.sidebar .wizgoo-fox {
    width: 50px;
    height: 50px;
    margin-bottom: 0.5rem;
}

.sidebar .brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.nav-menu {
    padding: 1rem 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.nav-link.active {
    color: white;
    background-color: rgba(255, 107, 53, 0.2);
    border-left-color: var(--wizgoo-orange);
}

.nav-link i {
    margin-right: 0.75rem;
    width: 18px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-body {
    padding: 1.5rem;
    flex: 1;
}

/* Cards and Tables */
.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--wizgoo-orange);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--wizgoo-dark);
}

.metric-label {
    color: var(--wizgoo-gray);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--wizgoo-gray);
}

.search-box input {
    padding-left: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: var(--wizgoo-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.1);
}

/* Product Images */
.product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* Stock Badges */
.badge-stock {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.badge-low {
    background-color: var(--wizgoo-warning);
    color: white;
}

.badge-medium {
    background-color: var(--wizgoo-blue);
    color: white;
}

.badge-high {
    background-color: var(--wizgoo-success);
    color: white;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--wizgoo-dark);
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: var(--wizgoo-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.1);
}

.form-select:focus {
    border-color: var(--wizgoo-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.1);
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.image-upload-area:hover {
    border-color: var(--wizgoo-orange);
    background-color: rgba(255, 107, 53, 0.05);
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

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

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--wizgoo-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
}

/* Modal Improvements */
.modal-header {
    background: linear-gradient(45deg, var(--wizgoo-orange), var(--wizgoo-red));
    color: white;
    border-bottom: none;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

/* Hamburger Menu */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--wizgoo-dark);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    line-height: 1;
}

.sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

/* Mobile Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: inline-block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .main-header .d-flex {
        flex-wrap: wrap;
    }
    
    .search-box {
        width: 100% !important;
        margin-bottom: 1rem;
        order: 3;
        flex-basis: 100%;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .table-header .d-flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-header .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .auth-card {
        margin: 10px;
        padding: 1.5rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    /* Mobile table responsiveness */
    .table-responsive {
        border: none;
    }
    
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        white-space: nowrap;
        min-width: 120px;
    }
    
    /* Mobile forms */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .form-row .col-md-6,
    .form-row .col-md-4,
    .form-row .col-md-8 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .auth-card {
        margin: 5px;
        padding: 1rem;
    }
    
    .main-body {
        padding: 1rem;
    }
    
    .metric-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-wizgoo {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .table-header .btn-create {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter {
    display: none; /* Hide default search */
}

.dataTables_wrapper .dataTables_length {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_info {
    color: var(--wizgoo-gray);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--wizgoo-orange) !important;
    border-color: var(--wizgoo-orange) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--wizgoo-orange-dark) !important;
    border-color: var(--wizgoo-orange-dark) !important;
    color: white !important;
}

/* Configuration Page Styles */
.config-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.config-section h5 {
    color: var(--wizgoo-dark);
    border-bottom: 2px solid var(--wizgoo-orange);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    margin-bottom: 1rem;
}

/* Utility Classes */
.text-wizgoo {
    color: var(--wizgoo-orange) !important;
}

.bg-wizgoo {
    background-color: var(--wizgoo-orange) !important;
}

.border-wizgoo {
    border-color: var(--wizgoo-orange) !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error States */
.alert-custom {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--wizgoo-success);
    border-left: 4px solid var(--wizgoo-success);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--wizgoo-red);
    border-left: 4px solid var(--wizgoo-red);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--wizgoo-blue);
    border-left: 4px solid var(--wizgoo-blue);
}