/* =============================================
   SOLISEL - DISEÑO PROFESIONAL
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    display: flex;
    min-height: 100vh;
}

/* ============================================
   MENÚ LATERAL
   ============================================ */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0a0e27 0%, #1a237e 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 4px 0 30px rgba(0,0,0,0.2);
}

.sidebar-brand {
    padding: 35px 25px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}

.sidebar-brand .logo-icon {
    font-size: 40px;
    background: linear-gradient(135deg, #e65100, #ff8f50);
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-weight: 900;
    box-shadow: 0 8px 25px rgba(230, 81, 0, 0.3);
}

.sidebar-brand h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
}

.sidebar-brand span {
    font-size: 11px;
    color: #ff8f50;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px 15px;
}

.sidebar-menu .menu-label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 15px 18px 8px;
    font-weight: 700;
    letter-spacing: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    border-radius: 12px;
    margin: 4px 0;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: translateX(4px);
}

.sidebar-menu a.active {
    background: rgba(255,255,255,0.12);
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.sidebar-menu a .icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.sidebar-menu a .badge {
    margin-left: auto;
    background: #e65100;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.main-content {
    margin-left: 280px;
    padding: 35px 45px;
    width: 100%;
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8ecf1;
}

.top-header .page-title h1 {
    font-size: 28px;
    font-weight: 800;
    color: #0a0e27;
    margin: 0;
}

.top-header .page-title p {
    font-size: 14px;
    color: #8a8a9e;
    margin: 4px 0 0;
}

.top-header .header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.btn-primary {
    background: linear-gradient(135deg, #0a0e27, #1a237e);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a237e, #283593);
}

.btn-success {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #2e7d32, #388e3c);
}

.btn-outline {
    background: transparent;
    color: #0a0e27;
    border: 2px solid #0a0e27;
}

.btn-outline:hover {
    background: #0a0e27;
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-danger {
    background: #c62828;
    color: white;
}

.btn-danger:hover {
    background: #b71c1c;
}

/* ============================================
   TARJETAS
   ============================================ */
.card {
    background: white;
    border-radius: 16px;
    padding: 28px 30px;
    margin-bottom: 28px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.card:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0a0e27;
    margin: 0;
}

.card-header .card-badge {
    font-size: 12px;
    color: #8a8a9e;
    background: #f0f2f5;
    padding: 4px 14px;
    border-radius: 20px;
}

/* ============================================
   ESTADÍSTICAS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 22px 25px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    border-left: 5px solid #0a0e27;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #8a8a9e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    color: #0a0e27;
    margin-top: 4px;
}

.stat-card.green { border-left-color: #2e7d32; }
.stat-card.orange { border-left-color: #e65100; }
.stat-card.purple { border-left-color: #6a1b9a; }
.stat-card.blue { border-left-color: #0d47a1; }

/* ============================================
   TABLAS
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e8ecf1;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: #f8f9fc;
}

.table thead th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5a5a7a;
    border-bottom: 2px solid #e8ecf1;
}

.table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f2f5;
    color: #1a1a2e;
}

.table tbody tr:hover {
    background: #f8f9fc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-borrador {
    background: #fff3e0;
    color: #e65100;
}
.badge-enviada {
    background: #e3f2fd;
    color: #0d47a1;
}
.badge-aprobada {
    background: #e8f5e9;
    color: #2e7d32;
}
.badge-rechazada {
    background: #ffebee;
    color: #c62828;
}

/* ============================================
   FORMULARIO - CREAR COTIZACIÓN
   ============================================ */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0a0e27;
    font-size: 14px;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8ecf1;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
    color: #1a1a2e;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    border-color: #1a237e;
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group .help-text {
    font-size: 12px;
    color: #8a8a9e;
    margin-top: 6px;
}

/* ============================================
   ITEMS - DISEÑO PROFESIONAL
   ============================================ */
.items-container {
    background: #fafbfc;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e8ecf1;
}

.items-header {
    display: grid;
    grid-template-columns: 40px 110px 1fr 75px 110px 40px;
    gap: 10px;
    padding: 12px 14px;
    background: #0a0e27;
    border-radius: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 11px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-header span {
    padding: 4px 0;
}

.item-row {
    display: grid;
    grid-template-columns: 40px 110px 1fr 75px 110px 40px;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    background: white;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #e8ecf1;
    transition: all 0.2s ease;
}

.item-row:hover {
    border-color: #1a237e;
    box-shadow: 0 2px 12px rgba(26, 35, 126, 0.08);
}

.item-row .item-numero {
    text-align: center;
    font-weight: 700;
    color: #0a0e27;
    font-size: 14px;
    background: #f0f2f5;
    padding: 4px 0;
    border-radius: 6px;
}

.item-row select,
.item-row input {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    width: 100%;
    background: white;
    font-family: 'Inter', sans-serif;
}

.item-row select:focus,
.item-row input:focus {
    border-color: #1a237e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.08);
}

/* DESCRIPCIÓN - MÁS GRANDE */
.item-row .descripcion-input {
    min-width: 200px;
    padding: 8px 12px;
    font-size: 13px;
}

.btn-eliminar-item {
    background: #ffebee;
    color: #c62828;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-eliminar-item:hover {
    background: #c62828;
    color: white;
}

.btn-agregar {
    background: #0a0e27;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-agregar:hover {
    background: #1a237e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 14, 39, 0.2);
}

/* ============================================
   BOTONES DE ACCIÓN
   ============================================ */
.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-guardar {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: white;
    padding: 14px 45px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-guardar:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(46, 125, 50, 0.3);
}

.btn-cancelar {
    background: #757575;
    color: white;
    padding: 14px 45px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.btn-cancelar:hover {
    background: #555;
    transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .items-header,
    .item-row {
        grid-template-columns: 35px 90px 1fr 65px 90px 35px;
        gap: 8px;
    }
    .main-content {
        padding: 25px 30px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-brand .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 28px;
    }
    .sidebar-brand h1 {
        font-size: 14px;
    }
    .sidebar-brand span,
    .sidebar-menu a span,
    .sidebar-menu .menu-label,
    .sidebar-footer {
        display: none;
    }
    .sidebar-menu a {
        padding: 14px;
        justify-content: center;
    }
    .sidebar-menu a .icon {
        font-size: 22px;
        width: auto;
    }
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .items-header {
        display: none;
    }
    .item-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 14px;
    }
    .item-row .item-numero {
        grid-column: span 2;
        text-align: center;
        background: #0a0e27;
        color: white;
        padding: 6px;
        border-radius: 6px;
    }
    .item-row select {
        grid-column: span 2;
    }
    .item-row .descripcion-input {
        grid-column: span 2;
        min-width: auto;
    }
    .item-row .btn-eliminar-item {
        grid-column: span 2;
        height: 40px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-actions {
        flex-direction: column;
    }
    .form-actions .btn,
    .form-actions a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
        margin-left: 60px;
    }
    .sidebar {
        width: 60px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 18px;
    }
}

/* ============================================
   IMPRESIÓN
   ============================================ */
@media print {
    .sidebar,
    .top-header,
    .btn,
    .stats-grid,
    .acciones,
    .form-actions {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 20px !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* ============================================
   ESTILOS PARA LOGO CORPORATIVO
   ============================================ */

/* Logo en el menú lateral */
.sidebar-brand .logo-img {
    width: 80px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    filter: brightness(0) invert(1);
}

/* Logo en la cotización impresa */
.logo-empresa .logo-img {
    max-height: 70px;
    width: auto;
    display: block;
    margin-bottom: 5px;
}

/* Logo en el encabezado de la cotización (impresión) */
.logo-cotizacion {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-cotizacion .logo-img {
    max-height: 60px;
    width: auto;
}

/* Para impresión */
@media print {
    .logo-empresa .logo-img {
        max-height: 50px;
    }
    .sidebar-brand .logo-img {
        filter: none;
    }
}




