/* =====================================================
   VIIA GROUP — Intranet · estilos
   ===================================================== */
:root {
    --bg: #12151B;
    --bg-raised: #171B23;
    --bg-plate: #1C212B;
    --line: rgba(255,255,255,0.09);
    --line-strong: rgba(255,255,255,0.16);
    --red: #E64A4A;
    --red-bright: #FF6B5B;
    --green: #4CC38A;
    --amber: #F2B33D;
    --text: #F2F1EE;
    --text-2: #B9BEC7;
    --text-3: #838A96;
    --font: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    --mono: 'Consolas', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* ---- Login ---- */
.in-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(230,74,74,0.10), transparent 70%),
        var(--bg);
}
.in-login-card {
    width: 100%;
    max-width: 360px;
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 32px 28px;
}
.in-login-brand {
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 0.04em;
    color: var(--text);
    text-transform: uppercase;
}
.in-login-brand span { color: var(--red-bright); }
.in-login-sub { color: var(--text-3); font-size: 13px; margin: 4px 0 22px; }
.in-login-card label {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 14px;
}
.in-login-card input,
.in-form input,
.in-form select,
.in-form textarea {
    width: 100%;
    margin-top: 5px;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
    outline: none;
}
.in-login-card input:focus,
.in-form input:focus,
.in-form select:focus,
.in-form textarea:focus { border-color: var(--red); }
.in-login-card button,
.in-btn {
    display: inline-block;
    width: 100%;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    padding: 11px 16px;
    cursor: pointer;
    text-align: center;
}
.in-login-card button:hover { background: var(--red-bright); }
.in-login-error {
    background: rgba(230,74,74,0.14);
    border: 1px solid rgba(230,74,74,0.4);
    color: #ffd9d4;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.in-login-ok {
    background: rgba(76,195,138,0.12);
    border: 1px solid rgba(76,195,138,0.4);
    color: #cdeede;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ---- Barra superior ---- */
.in-top {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    height: 60px;
    background: var(--bg-plate);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.in-brand {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
    white-space: nowrap;
}
.in-brand span { color: var(--red-bright); font-weight: 600; }
.in-nav { display: flex; gap: 4px; margin-left: 10px; }
.in-nav a {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-2);
    font-weight: 500;
}
.in-nav a:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.in-nav a.is-active { background: var(--red); color: #fff; }
.in-user { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.in-user-name { color: var(--text-2); font-size: 13px; }
.in-logout { color: var(--text-3); font-size: 13px; }
.in-logout:hover { color: var(--red-bright); }
.in-burger { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* ---- Contenido ---- */
.in-main { max-width: 1120px; margin: 0 auto; padding: 26px 20px 60px; }
.in-h1 { font-size: 26px; color: var(--text); font-weight: 700; }
.in-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.in-flash {
    background: rgba(76,195,138,0.12);
    border: 1px solid rgba(76,195,138,0.35);
    color: #cdeede;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}
.in-empty { color: var(--text-3); padding: 30px 0; text-align: center; }

/* Botones */
.in-btn { width: auto; }
.in-btn:hover { background: var(--red-bright); }
.in-btn-sm {
    font-size: 13px;
    color: var(--red-bright);
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    padding: 6px 12px;
}
.in-btn-sm:hover { border-color: var(--red); }
.in-btn-ghost {
    display: inline-block;
    padding: 11px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text-2);
}
.in-btn-ghost:hover { border-color: var(--red); color: var(--text); }

/* KPIs */
.in-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 22px 0 30px;
}
.in-kpi {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.in-kpi-alert { border-color: rgba(230,74,74,0.4); }
.in-kpi-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.in-kpi-value { font-size: 24px; font-weight: 700; color: var(--text); }
.in-kpi-alert .in-kpi-value { color: var(--red-bright); }

/* Paneles y tablas */
.in-panel {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.in-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.in-panel-head h2 { font-size: 17px; color: var(--text); }
.in-table-wrap { overflow-x: auto; }
.in-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.in-table th {
    text-align: left;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-3);
    padding: 8px 12px;
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}
.in-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--text); }
.in-table tr:hover td { background: rgba(255,255,255,0.02); }
.in-row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.in-row-actions a { color: var(--red-bright); font-size: 13px; }
.in-row-actions form { display: inline; }
.in-link-danger { background: none; border: none; color: var(--text-3); cursor: pointer; font: inherit; font-size: 13px; }
.in-link-danger:hover { color: var(--red-bright); }

/* Etiquetas de estatus */
.in-tag {
    display: inline-block;
    font-size: 11.5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text-2);
    white-space: nowrap;
}
.in-tag-red { background: rgba(230,74,74,0.16); color: #ff9a8f; }
.in-tag-green { background: rgba(76,195,138,0.16); color: #8fe0bd; }
.in-st-en_proceso { background: rgba(91,155,213,0.16); color: #a9cef0; }
.in-st-terminado, .in-st-pagada { background: rgba(76,195,138,0.16); color: #8fe0bd; }
.in-st-cancelado, .in-st-cancelada { background: rgba(255,255,255,0.06); color: var(--text-3); }
.in-st-vencida { background: rgba(230,74,74,0.16); color: #ff9a8f; }

/* Filtros */
.in-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.in-filters a {
    font-size: 13px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-2);
}
.in-filters a.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* Formularios */
.in-form { max-width: 640px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.in-form label { display: block; font-size: 12.5px; color: var(--text-3); margin-bottom: 15px; }
.in-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 16px; }
.in-check { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.in-check input { width: auto; margin: 0; }
.in-form-actions { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.in-form-actions button {
    background: var(--red); color: #fff; border: none; border-radius: 8px;
    font: inherit; font-weight: 600; padding: 11px 22px; cursor: pointer;
}
.in-form-actions button:hover { background: var(--red-bright); }

/* Pie */
.in-foot { text-align: center; color: var(--text-3); font-size: 12px; padding: 24px; border-top: 1px solid var(--line); }

/* Móvil */
@media (max-width: 760px) {
    .in-burger { display: block; margin-left: auto; order: 3; }
    .in-user { order: 4; margin-left: 0; }
    .in-nav {
        order: 5;
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 2px;
        margin: 0;
        padding-top: 8px;
    }
    .in-nav.is-open { display: flex; }
    .in-top { flex-wrap: wrap; height: auto; padding: 12px 16px; }
    .in-user-name { display: none; }
}
