@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primario:        #0A66C2;
    --primario-oscuro: #0B3D7A;
    --acento:          #10B981;
    --texto:           #1F2937;
    --texto-suave:     #6B7280;
    --borde:           #E5E7EB;
    --fondo:           #F9FAFB;
    --superficie:      #FFFFFF;
    --ok:              #10B981;
    --aviso:           #F59E0B;
    --error:           #EF4444;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: var(--texto);
    background: var(--fondo);
    min-height: 100vh;
}

/* ── Cabecera ───────────────────────────────── */
.po-header {
    background: var(--primario-oscuro);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.po-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.po-logo {
    display: flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .5px;
}
.po-logo-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--acento);
    border-radius: 3px;
    flex-shrink: 0;
}
.po-logo-sub {
    font-weight: 400;
    font-size: .75rem;
    opacity: .7;
    margin-left: .1rem;
}
.po-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.po-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: color .15s;
}
.po-nav a:hover { color: #fff; }
.po-nav a.active { color: var(--acento); }
.po-empresa {
    font-size: .8rem;
    opacity: .65;
}

/* ── Layout ─────────────────────────────────── */
.po-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.po-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primario-oscuro);
    margin-bottom: 1.5rem;
}

/* ── Tarjeta ─────────────────────────────────── */
.po-card {
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    margin-bottom: 1.25rem;
}

/* ── Tabla ───────────────────────────────────── */
.po-table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
thead th {
    text-align: left;
    padding: .65rem 1rem;
    background: var(--fondo);
    border-bottom: 2px solid var(--borde);
    font-weight: 600;
    color: var(--texto-suave);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
tbody td {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--borde);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f0f6ff; }

/* ── Badges ──────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-ok    { background: #d1fae5; color: #065f46; }
.badge-off   { background: #fee2e2; color: #991b1b; }
.badge-aviso { background: #fef3c7; color: #92400e; }

/* ── Botones ─────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: 6px;
    border: none;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s;
    white-space: nowrap;
}
.btn:hover { opacity: .88; }
.btn-primary   { background: var(--primario); color: #fff; }
.btn-secondary { background: var(--fondo); color: var(--texto); border: 1px solid var(--borde); }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }

/* ── Paginacion ──────────────────────────────── */
.po-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: .85rem;
    color: var(--texto-suave);
}
.po-pager-btns { display: flex; gap: .5rem; }

/* ── Login ───────────────────────────────────── */
.po-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--primario-oscuro) 0%, #1046a0 55%, var(--primario) 100%);
    position: relative;
    overflow: hidden;
}
.po-login-wrap::before,
.po-login-wrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.po-login-wrap::before {
    width: 500px; height: 500px;
    background: rgba(255,255,255,.03);
    bottom: -150px; right: -100px;
}
.po-login-wrap::after {
    width: 300px; height: 300px;
    background: rgba(255,255,255,.04);
    top: -80px; left: -60px;
}
.po-login-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}
.po-login-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    padding: 2.5rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}
.po-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
}
.po-login-icon {
    width: 88px;
    height: 88px;
    background: rgba(255,255,255,.12);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.2);
    box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.15);
}
.po-login-logo-img {
    height: 56px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}
.po-login-app-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.03em;
    margin: 0;
}
.po-login-app-sub {
    font-size: .7rem;
    color: rgba(255,255,255,.55);
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin: 0;
}
.po-login-form { width: 100%; }
.po-login-wrap .po-field { margin-bottom: .9rem; }
.po-login-wrap .po-field label { color: rgba(255,255,255,.75); }
.po-login-wrap .po-field input {
    background: rgba(255,255,255,.1);
    border: 1.5px solid rgba(255,255,255,.2);
    color: #fff;
}
.po-login-wrap .po-field input::placeholder { color: rgba(255,255,255,.3); }
.po-login-wrap .po-field input:focus {
    border-color: rgba(255,255,255,.55);
    background: rgba(255,255,255,.15);
    box-shadow: none;
}
.btn-login {
    width: 100%;
    justify-content: center;
    padding: .65rem;
    margin-top: .4rem;
    background: #fff;
    color: var(--primario-oscuro);
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(0,0,0,.2);
}
.btn-login:hover { opacity: .9; background: #fff; }
.po-login-wrap .po-alert-error {
    background: rgba(239,68,68,.15);
    border: 1px solid rgba(239,68,68,.35);
    color: #FCA5A5;
}

/* ── Campos ──────────────────────────────────── */
.po-field { display: flex; flex-direction: column; gap: .35rem; }
.po-field label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--texto-suave);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.po-field input {
    padding: .55rem .75rem;
    border: 1px solid var(--borde);
    border-radius: 6px;
    font-family: inherit;
    font-size: .9rem;
    color: var(--texto);
    background: var(--superficie);
    outline: none;
    transition: border-color .15s;
}
.po-field input:focus {
    border-color: var(--primario);
    box-shadow: 0 0 0 3px rgba(10,102,194,.12);
}
.po-token-row { display: flex; gap: .5rem; }
.po-token-row input { flex: 1; background: var(--fondo); color: var(--texto-suave); }

/* ── Alertas ─────────────────────────────────── */
.po-alert {
    padding: .8rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    font-weight: 500;
}
.po-alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Definicion dato/valor ───────────────────── */
.po-dl { display: grid; grid-template-columns: 160px 1fr; gap: .6rem 1rem; font-size: .9rem; }
.po-dt { color: var(--texto-suave); font-weight: 500; }
.po-dd { color: var(--texto); }

/* Logo imagen (cabecera — fondo oscuro) */
.logo-img { height: 28px; width: auto; display: block; filter: brightness(0) invert(1); }
