﻿/* --- VARIABLES DE DISEÑO --- */
:root {
    --sidebar-bg: #1a252f;
    --sidebar-hover: #34495e;
    --accent: #3498db;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --sidebar-width: 260px;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    display: flex;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* --- BOTÓN DE CONTROL (TOGGLE) --- */
.toggle-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: var(--sidebar-bg);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

    .toggle-btn:hover {
        background: var(--accent);
    }

/* --- MENÚ LATERAL (SIDEBAR) --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--text-white);
    position: fixed;
    left: 0;
    top: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

    /* Clase para esconder el menú */
    .sidebar.hidden {
        transform: translateX(-100%);
    }

.sidebar-header {
    padding: 25px;
    padding-top: 70px;
    text-align: center;
    border-bottom: 1px solid #2c3e50;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

    .nav-links li a {
        display: block;
        padding: 15px 25px;
        color: #bdc3c7;
        text-decoration: none;
        transition: all 0.2s ease;
    }

        .nav-links li a:hover {
            background-color: var(--sidebar-hover);
            color: var(--text-white);
            padding-left: 35px;
        }

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    padding-top: 80px;
    width: 100%;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    /* Clase para expandir el contenido */
    .main-content.full-width {
        margin-left: 0;
    }

.content-header h1 {
    color: #2c3e50;
    margin: 0;
}

.content-header p {
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* --- ACCESOS RÁPIDOS (CARDS) --- */
.shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.btn-shortcut {
    background: white;
    text-decoration: none;
    color: #333;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s, border-color 0.2s;
    border: 2px solid transparent;
    min-width: 250px;
    flex: 1;
}

    .btn-shortcut:hover {
        transform: translateY(-5px);
        border-color: var(--accent);
    }

    .btn-shortcut .icon {
        font-size: 2.2rem;
    }

    .btn-shortcut .text strong {
        display: block;
        font-size: 1.1rem;
        color: #2c3e50;
    }

    .btn-shortcut .text span {
        font-size: 0.85rem;
        color: #95a5a6;
    }
/* ==========================================
   ADAPTACIÓN PARA MÓVILES (Media Queries)
   ========================================== */

@media (max-width: 768px) {
    /* El contenido principal ocupa todo el ancho en móviles siempre */
    .main-content {
        margin-left: 0 !important;
        padding: 20px;
        padding-top: 80px;
    }

    /* El menú por defecto estará oculto en móviles */
    .sidebar {
        transform: translateX(-100%);
        width: 80%; /* Ocupa casi toda la pantalla al abrirse */
        max-width: 300px;
    }

        /* Cuando se quita la clase hidden, se muestra */
        .sidebar:not(.hidden) {
            transform: translateX(0);
        }

        /* El botón siempre debe mostrar que el menú está "cerrado" al inicio en móviles */
        .sidebar.hidden {
            transform: translateX(-100%);
        }

    /* Las tarjetas de acceso rápido ocuparán el 100% en pantallas muy chicas */
    .btn-shortcut {
        flex: none;
        width: 100%;
    }
}



/* --- ESTILOS ADICIONALES PARA FORMULARIOS --- */
.form-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

    .form-section h3 {
        margin-top: 0;
        margin-bottom: 20px;
        color: var(--sidebar-bg);
        border-bottom: 2px solid var(--bg-light);
        padding-bottom: 10px;
    }

.grid-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #444;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
}

/* Checkboxes rápidos */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.check-item {
    background: #f1f3f5;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}

    .check-item:hover {
        background: #e9ecef;
    }

/* Botón de carga de fotos */
.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border: 2px dashed var(--accent);
    border-radius: 12px;
    cursor: pointer;
    background: #f0f7ff;
    transition: 0.3s;
}

    .upload-btn:hover {
        background: #e1effe;
    }

    .upload-btn span {
        font-weight: bold;
        color: var(--accent);
    }

/* Botones de acción */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-save {
    background-color: #27ae60;
    color: white;
}

.btn-wa {
    background-color: #25d366;
    color: white;
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}
/* --- GRUPO DE BÚSQUEDA --- */
.search-group {
    display: flex;
    gap: 5px;
}

    .search-group input {
        flex: 1;
    }

.btn-search {
    background-color: var(--sidebar-bg);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-search:hover {
        background-color: var(--accent);
    }

/* Ajuste para que el input y el botón tengan la misma altura */
.search-group input,
.btn-search {
    height: 45px;
}

@media (max-width: 600px) {
    .action-buttons {
        flex-direction: column;
    }
}


/* --- MEJORA DE TABLA --- */
.orders-table {
    width: 100%;
    border-collapse: separate; /* Cambiado de collapse a separate */
    border-spacing: 0 10px; /* Crea un pequeño espacio entre filas */
    margin-top: 20px;
}

    .orders-table th {
        padding: 12px 20px;
        text-align: left;
        color: #64748b;
        font-size: 0.85rem;
        border-bottom: 2px solid #edf2f7;
    }

    .orders-table td {
        padding: 15px 20px;
        background-color: white; /* Asegura que cada celda sea blanca */
        vertical-align: middle;
    }

/* --- COLORES DE ESTADO (Forzar visualización) --- */
.status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-repair {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

.status-ready {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

/* --- BOTONES DE ACCIÓN (Más grandes y limpios) --- */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-action:hover {
        background-color: #f1f5f9;
        border-color: var(--accent);
    }

