/* ========================================
   ADMIN PANEL - ESTILOS PRINCIPALES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #1a2332;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #1a2332;
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-img {
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.brand h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.brand p {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 500;
}

.sidebar-close {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border-left: 4px solid #667eea;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: flex-start;
    font-family: inherit;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-btn i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sidebar-btn:hover i {
    transform: scale(1.1);
}

.sidebar-btn.logout-btn:hover {
    background: rgba(255, 82, 82, 0.15);
    border-color: rgba(255, 82, 82, 0.4);
    color: #ff8a80;
}

.sidebar-footer .back-to-store {
    /* Override generic back-to-store styles for sidebar */
    justify-content: flex-start;
    margin-top: 0;
    background: transparent;
}





/* ========================================
   MOBILE HEADER
   ======================================== */

.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    align-items: center;
    padding: 0 20px;
    z-index: 999;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: #1a2332;
    cursor: pointer;
}

.mobile-brand {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-weight: 700;
    color: #1a2332;
}

.mobile-brand i {
    font-size: 20px;
    color: #667eea;
}

.mobile-user {
    font-size: 24px;
    color: #1a2332;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    margin-left: 260px;
    padding: 40px;
    min-height: 100vh;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a2332;
}

.subtitle {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-edit:hover {
    background: #bbdefb;
}

.btn-delete {
    background: #ffebee;
    color: #c62828;
}

.btn-delete:hover {
    background: #ffcdd2;
}

/* ========================================
   SEARCH & FILTERS
   ======================================== */

.search-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-bar-admin {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-bar-admin i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-bar-admin input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-bar-admin input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

/* ========================================
   TABLE
   ======================================== */

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-green {
    background: #d4edda;
    color: #155724;
}

.badge-orange {
    background: #fff3cd;
    color: #856404;
}

.badge-pink {
    background: #f8d7da;
    color: #721c24;
}

.badge-blue {
    background: #cfe2ff;
    color: #084298;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 24px;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e0e0e0;
}

/* ========================================
   FORMS
   ======================================== */

.product-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a2332;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ========================================
   TOGGLE SWITCH
   ======================================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #00bcd4;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(26px);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 80px 20px 20px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .search-section {
        flex-direction: column;
    }

    .search-bar-admin {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }
}

/* ========================================
   LOGIN
   ======================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2332 0%, #2d3e50 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: white;
    border-radius: 18px;
    padding: 40px 35px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 34px;
}

.login-card h1 {
    font-size: 26px;
    margin-bottom: 8px;
    color: #1a2332;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 42px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: #5568d3;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}


.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #2f855a;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.welcome-badge i {
    font-size: 16px;
}

.back-to-store {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    padding: 15px 25px;
    margin-top: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-to-store:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ========================================
   DASHBOARD
   ======================================== */


.welcome-badge {
    display: inline-flex;
    align-items: center;
}

/* ========================================
   IMAGE UPLOAD
   ======================================== */

.upload-area {
    position: relative;
    display: inline-block;
    width: 100%;
}

.upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    padding: 30px 20px;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.upload-placeholder:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.upload-placeholder i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 12px;
    display: block;
}

.upload-area.drag-over .upload-placeholder {
    border-color: #007bff;
    background: #e3f2fd;
    transform: scale(1.02);
}

.photo-preview {
    margin-top: 15px;
    text-align: center;
}

.photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    border: 2px solid #ddd;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-info {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.btn-remove-image {
    background: #ffebee;
    color: #c62828;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-remove-image:hover {
    background: #ffcdd2;
    transform: translateY(-1px);
}




.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.stat-card.pink .stat-icon {
    background: linear-gradient(135deg, #ed64a6 0%, #d53f8c 100%);
}

.stat-card.cyan .stat-icon {
    background: linear-gradient(135deg, #00bcd4 0%, #00a0b8 100%);
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.stat-info h3 {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 26px;
    font-weight: 700;
    color: #1a2332;
}

.info-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.info-banner i {
    font-size: 22px;
}

.info-banner strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.info-banner p {
    font-size: 14px;
    opacity: 0.95;
}

.content-section {
    background: white;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.content-section h2 {
    font-size: 20px;
    margin-bottom: 18px;
    color: #1a2332;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.action-card {
    border: 2px solid #e6e6e6;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.action-card:hover {
    border-color: #667eea;
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.15);
}

.action-card h3 {
    font-size: 17px;
    color: #1a2332;
    margin-bottom: 8px;
}

.action-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.btn-action {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.btn-action:hover {
    color: #5568d3;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px 18px;
}

.info-card h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #1a2332;
}

.info-card p {
    color: #666;
    font-size: 14px;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.btn-add {
    background: #e8f5e9;
    color: #2e7d32;
}

.btn-add:hover {
    background: #c8e6c9;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.gap-10 {
    gap: 10px;
}