* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   PANTALLA DE LOGIN
   ============================================ */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-card h1 {
    text-align: center;
    color: #dc2626;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-card h2 {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 30px;
}

.login-hint {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #999;
    text-align: center;
}

/* ============================================
   PANEL DE ADMINISTRACIÓN
   ============================================ */

.admin-panel {
    min-height: 100vh;
}

.admin-header {
    background: #dc2626;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    border-bottom: 2px solid #e5e5e5;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #dc2626;
}

.tab-btn.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   SECCIÓN DE PRODUCTOS
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
}

.search-box input,
.filter-box select {
    padding: 10px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    width: 250px;
    transition: border-color 0.3s;
}

.search-box input:focus,
.filter-box select:focus {
    outline: none;
    border-color: #dc2626;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.product-category {
    font-size: 0.85rem;
    color: #999;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 12px;
}

.product-info {
    margin-bottom: 15px;
}

.product-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.product-info-label {
    color: #666;
}

.product-info-value {
    font-weight: 600;
    color: #333;
}

.product-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.product-status.available {
    background: #d1fae5;
    color: #065f46;
}

.product-status.unavailable {
    background: #fee2e2;
    color: #991b1b;
}

.product-status.low-stock {
    background: #fef3c7;
    color: #92400e;
}

.product-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   SECCIÓN DE PEDIDOS
   ============================================ */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.order-id {
    font-size: 0.9rem;
    color: #999;
}

.order-date {
    font-size: 0.9rem;
    color: #666;
}

.order-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.order-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.order-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.order-items-count {
    color: #666;
    font-size: 0.9rem;
}

.order-total {
    font-size: 1.2rem;
    font-weight: 600;
    color: #dc2626;
}

/* ============================================
   SECCIÓN DE CONFIGURACIÓN
   ============================================ */

.settings-content {
    max-width: 600px;
}

.setting-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.setting-card h3 {
    margin-bottom: 20px;
    color: #333;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   MODAL
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-content form {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px 30px;
    border-top: 1px solid #e5e5e5;
}

.order-details {
    padding: 30px;
}

.order-details-section {
    margin-bottom: 25px;
}

.order-details-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
}

.order-details-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.order-details-label {
    color: #666;
}

.order-details-value {
    font-weight: 600;
    color: #333;
}

.order-items-list {
    list-style: none;
}

.order-items-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #dc2626;
    color: white;
}

.btn-primary:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #dc2626;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .admin-header .container {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box input,
    .filter-box select {
        width: 100%;
    }

    .products-list {
        grid-template-columns: 1fr;
    }

    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}



