/*  
 * ============================================================
 *  KARDEX UI — Diseño Moderno Tipo Stripe / Linear / Notion
 *  Sistema visual completo para dashboards & formularios
 * ============================================================
*/

/* Reset Profesional */
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: #f7f8fa;
    color: #222;
}

/* ---------------------------
   CONTENEDORES
----------------------------*/
.kardex-dashboard {
    max-width: 1150px;
    margin: 40px auto;
    padding: 10px 25px;
}

/* ---------------------------
   TITULOS
----------------------------*/
.kardex-dashboard h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
}

/* ---------------------------
   METRICS (Stripe style)
----------------------------*/
.kf-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}
.kf-metric-card {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e4e6eb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}
.kf-metric-card .value {
    font-size: 22px;
    font-weight: 700;
}
.kf-metric-card .label {
    font-size: 13px;
    opacity: .7;
}

/* PENDIENTE */
.kf-metric-card.pendiente {
    background: #fff6f6;
    border-color: #ffe1e1;
}

/* ---------------------------
   INPUTS (ESTILO LINEAR)
----------------------------*/
.kardex-filtros input,
.kardex-filtros select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid #d3d5da;
    background: #fff;
    font-size: 14px;
    transition: all .2s;
}
.kardex-filtros input:focus,
.kardex-filtros select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.2);
    outline: none;
}

/* GRID filtros */
.kardex-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

/* ---------------------------
   BOTONES PREMIUM (STRIPE)
----------------------------*/
.kf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 15px;
    font-size: 14px;
    background: #6366f1;
    border-radius: 8px;
    color: white !important;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
    box-shadow: 0 2px 4px rgba(99,102,241,.25);
}
.kf-btn:hover {
    background: #4f46e5;
    box-shadow: 0 4px 10px rgba(99,102,241,.35);
}

.kf-btn.small {
    padding: 7px 12px;
    font-size: 13px;
}

.kf-btn.danger {
    background: #ef4444;
}
.kf-btn.danger:hover {
    background: #dc2626;
}

/* Icono dentro del botón */
.kf-btn svg {
    width: 16px;
    height: 16px;
}

/* ---------------------------
   TABLAS PREMIUM
----------------------------*/
.kardex-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.kardex-tabla th {
    text-align: left;
    padding: 14px;
    background: #f3f4f6;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.kardex-tabla td {
    padding: 15px 14px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 14px;
}

.kardex-tabla tr:last-child td {
    border-bottom: none;
}

/* ---------------------------
   MODAL PROFESIONAL
----------------------------*/
.kardex-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.kardex-modal .modal-content {
    background: white;
    padding: 25px;
    max-width: 480px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    position: relative;
}

.kardex-modal .close {
    position: absolute;
    right: 14px;
    top: 10px;
    font-size: 22px;
    cursor: pointer;
    opacity: .7;
}
.kardex-modal .close:hover {
    opacity: 1;
}

/* ---------------------------
   PAGINACIÓN TIPO GOOGLE
----------------------------*/
.kardex-paginacion {
    margin-top: 18px;
    display: flex;
    gap: 6px;
}
.kardex-paginacion a {
    padding: 8px 12px;
    background: #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}
.kardex-paginacion a.activo {
    background: #6366f1;
    color: white;
}

/* ---------------------------
   RESPONSIVE MOBILE
----------------------------*/
@media (max-width: 768px) {
    .kardex-tabla thead {
        display: none;
    }
    .kardex-tabla tr {
        display: block;
        background: white;
        margin-bottom: 12px;
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 2px 5px rgba(0,0,0,.08);
    }
    .kardex-tabla td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: none !important;
    }
    .kardex-tabla td::before {
        content: attr(data-label);
        font-weight: 600;
        opacity: .7;
    }
}
