/* ============================================================
   Adm Cloud — Seguridad
   Componentes propios de la landing (reutiliza site.css)
   ============================================================ */

/* ---------- Hero: panel de seguridad ---------- */
.sec-window { transform: rotateY(-6deg) rotateX(2deg); }
.sec-window:hover { transform: rotateY(0) rotateX(0); }

.sec-body {
    padding: 1.2rem 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: .84rem;
    color: rgba(255, 255, 255, .9);
}

/* Bloque MFA verificado */
.sec-mfa {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1rem;
    background: rgba(40, 200, 64, .1);
    border: 1px solid rgba(40, 200, 64, .3);
    border-radius: 12px;
}
.sec-mfa .sec-shield {
    flex-shrink: 0;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: rgba(40, 200, 64, .15);
    color: #28C840;
}
.sec-mfa .sec-mfa-txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sec-mfa .sec-mfa-title { font-weight: 700; color: #fff; font-size: .86rem; }
.sec-mfa .sec-mfa-sub { font-size: .72rem; color: rgba(255, 255, 255, .6); font-family: var(--mono); }
.sec-mfa .sec-ok {
    margin-left: auto;
    flex-shrink: 0;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #28C840;
    border: 1px solid rgba(40, 200, 64, .5);
    border-radius: 999px;
    padding: .25rem .6rem;
}

/* Lista de accesos recientes */
.sec-log-title {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-top: .2rem;
}
.sec-log { display: flex; flex-direction: column; gap: .1rem; }
.sec-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .1);
}
.sec-row:last-child { border-bottom: 0; }
.sec-avatar {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}
.sec-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.sec-row-name { font-weight: 600; color: #fff; font-size: .82rem; }
.sec-row-meta {
    font-size: .7rem;
    color: rgba(255, 255, 255, .55);
    font-family: var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sec-tag {
    flex-shrink: 0;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 999px;
    padding: .22rem .55rem;
}
.sec-tag.ok    { color: #28C840; background: rgba(40, 200, 64, .12); border: 1px solid rgba(40, 200, 64, .35); }
.sec-tag.edit  { color: var(--cyan); background: rgba(37, 170, 225, .12); border: 1px solid rgba(37, 170, 225, .35); }
.sec-tag.block { color: #FF6B6B; background: rgba(255, 95, 87, .12); border: 1px solid rgba(255, 95, 87, .4); }

/* ---------- Matriz de privilegios ---------- */
.access-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    align-items: center;
}
.access-copy h3 { font-size: 1.25rem; margin-bottom: .8rem; }
.access-copy p { color: var(--muted); font-size: .95rem; margin-bottom: 1.2rem; }

.access-list { display: flex; flex-direction: column; gap: .9rem; }
.access-item { display: flex; gap: .8rem; align-items: flex-start; }
.access-item .ai-icon {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: rgba(37, 170, 225, .12);
    color: var(--cyan);
}
.access-item h4 { font-size: .92rem; margin-bottom: .15rem; }
.access-item p { font-size: .84rem; color: var(--muted); margin: 0; }

/* Tarjeta con la matriz */
.priv-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.priv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.3rem;
    background: linear-gradient(120deg, var(--blue), var(--navy));
    color: #fff;
}
.priv-head .ph-label { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.priv-head .ph-name { font-size: 1.02rem; font-weight: 700; }
.priv-head .ph-badge {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--yellow);
    border: 1px solid rgba(254, 205, 8, .5);
    border-radius: 999px;
    padding: .25rem .6rem;
}

.priv-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.priv-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.priv-table th, .priv-table td { padding: .55rem .3rem; text-align: center; }
.priv-table thead th {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}
.priv-table thead th:first-child, .priv-table tbody th { text-align: left; padding-left: 1.3rem; }
.priv-table tbody th {
    font-weight: 600;
    color: var(--ink);
    font-size: .8rem;
    white-space: nowrap;
}
.priv-table tbody tr:not(:last-child) td, .priv-table tbody tr:not(:last-child) th {
    border-bottom: 1px solid var(--bg-alt);
}
.priv-table td:last-child { padding-right: 1rem; }

.pv {
    display: inline-grid;
    place-items: center;
    width: 20px; height: 20px;
    border-radius: 6px;
}
.pv.yes { color: #fff; background: linear-gradient(135deg, #28C840, #1ea538); }
.pv.no { color: var(--line); }
.pv.no::before { content: "–"; font-weight: 700; color: #C3C8DA; }

/* ---------- Sección de políticas / autenticación ---------- */
.policy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}
.policy-card {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
    backdrop-filter: blur(8px);
    transition: transform .22s ease, border-color .22s ease;
}
.policy-card:hover { transform: translateY(-5px); border-color: rgba(37, 170, 225, .45); }
.policy-card .pc-icon {
    flex-shrink: 0;
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(44, 168, 255, .25), rgba(40, 54, 141, .35));
    color: var(--cyan);
}
.policy-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.policy-card p { font-size: .84rem; color: rgba(255, 255, 255, .66); margin-bottom: .7rem; }
.policy-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.policy-chips span {
    font-size: .68rem;
    font-weight: 600;
    color: var(--yellow);
    background: rgba(254, 205, 8, .08);
    border: 1px solid rgba(254, 205, 8, .22);
    border-radius: 6px;
    padding: .16rem .5rem;
    font-family: var(--mono);
}

/* ---------- Auditoría: entrada de bitácora ---------- */
.audit-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.audit-card {
    background: rgba(16, 20, 58, .72);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(37, 170, 225, .08), 0 0 60px rgba(37, 170, 225, .12);
    backdrop-filter: blur(12px);
    overflow: hidden;
    color: rgba(255, 255, 255, .9);
}
.audit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.2rem;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.audit-head .ah-title { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.audit-head .ah-id { font-size: .72rem; color: rgba(255, 255, 255, .5); font-family: var(--mono); }
.audit-tag-edit {
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--cyan);
    border: 1px solid rgba(37, 170, 225, .4);
    border-radius: 999px;
    padding: .2rem .55rem;
}
.audit-body { padding: 1.1rem 1.2rem 1.3rem; }
.audit-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.audit-meta .am-k { font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .45); display: block; }
.audit-meta .am-v { font-size: .84rem; color: #fff; font-weight: 600; }

.audit-changes-title {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin: 1rem 0 .6rem;
}
.audit-change {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 0;
    font-size: .8rem;
}
.audit-change .ac-field { color: rgba(255, 255, 255, .7); min-width: 5.5rem; }
.audit-change .ac-old {
    color: #FF9B9B;
    text-decoration: line-through;
    font-family: var(--mono);
    font-size: .76rem;
}
.audit-change .ac-arrow { color: rgba(255, 255, 255, .4); }
.audit-change .ac-new { color: #7BE495; font-family: var(--mono); font-size: .76rem; font-weight: 600; }

.audit-foot {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: .9rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .7rem;
    font-family: var(--mono);
    color: rgba(255, 255, 255, .55);
    flex-wrap: wrap;
}
.audit-foot svg { flex-shrink: 0; color: var(--cyan); }

.audit-copy h3 { font-size: 1.25rem; margin-bottom: .8rem; }
.audit-copy p { color: var(--muted); font-size: .95rem; margin-bottom: 1.2rem; }
.audit-capture { display: flex; flex-direction: column; gap: .65rem; }
.audit-capture li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .88rem;
    color: var(--ink);
}
.audit-capture li svg { flex-shrink: 0; color: #28C840; }
.section-dark .audit-copy h3 { color: #fff; }
.section-dark .audit-copy p { color: rgba(255, 255, 255, .68); }
.section-dark .audit-capture li { color: rgba(255, 255, 255, .85); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .access-layout, .audit-layout { grid-template-columns: 1fr; gap: 2.4rem; }
    .policy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .priv-table { font-size: .7rem; min-width: 340px; }
    .priv-table thead th:first-child, .priv-table tbody th { padding-left: .9rem; }
    .audit-meta { grid-template-columns: 1fr; }
}
