/* NN-127 · Hoja Fase 12 extraída sin cambiar reglas ni especificidad. */
:root{
        --cond-space-1:4px;--cond-space-2:8px;--cond-space-3:12px;--cond-space-4:16px;
        --cond-space-5:20px;--cond-space-6:24px;--cond-space-8:32px;
        --cond-radius-sm:10px;--cond-radius-md:14px;--cond-radius-lg:18px;
        --cond-shadow-card:0 8px 28px rgba(15,23,42,.07);
        --cond-focus:#2563eb;
    }
    body.cond-ui-phase12{overflow-x:hidden}
    body.cond-ui-phase12 .site-content,
    body.cond-ui-phase12 main,
    body.cond-ui-phase12 .entry-content{min-width:0}
    body.cond-ui-phase12 .entry-content{overflow-wrap:anywhere}

    .cond-skip-link{
        position:fixed;left:12px;top:8px;z-index:100000;
        transform:translateY(-160%);background:#0f172a;color:#fff!important;
        padding:10px 14px;border-radius:10px;font-weight:800;text-decoration:none;
        box-shadow:0 8px 25px rgba(0,0,0,.2)
    }
    .cond-skip-link:focus{transform:translateY(0)}

    body.cond-ui-phase12 :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
        outline:3px solid var(--cond-focus)!important;
        outline-offset:2px!important;
        box-shadow:none
    }

    body.cond-ui-phase12 :where(button,.button,.btn,.btn-submit,.cond-ui-nav-pill,input[type="submit"],input[type="button"]){
        min-height:44px
    }
    body.cond-ui-phase12 :where(button,.button,.btn,.btn-submit,input[type="submit"],input[type="button"]){
        touch-action:manipulation
    }

    body.cond-ui-phase12 :where(.op-box,.fin-card,.finance-card,.sa-card,.muro-card,.cond-card,.dashboard-card){
        border-radius:var(--cond-radius-md);
    }
    body.cond-ui-phase12 :where(.op-box,.fin-card,.finance-card,.sa-card,.cond-card){
        box-shadow:var(--cond-shadow-card)
    }

    body.cond-ui-phase12 .cond-ui-topbar{
        gap:var(--cond-space-3);
        min-width:0
    }
    body.cond-ui-phase12 .cond-ui-topbar-title,
    body.cond-ui-phase12 .cond-ui-top-actions{min-width:0}
    body.cond-ui-phase12 .cond-ui-topbar-title strong,
    body.cond-ui-phase12 .cond-ui-topbar-title small{
        overflow:hidden;text-overflow:ellipsis;white-space:nowrap
    }

    /* ===== Dashboard SuperAdmin Pro ===== */
    body.cond-phase12-superadmin .cond-sa-pro{
        display:grid;
        gap:20px;
    }
    body.cond-phase12-superadmin .cond-sa-hero{
        position:relative;
        overflow:hidden;
        display:grid;
        grid-template-columns:minmax(0,1fr) minmax(280px,360px);
        gap:22px;
        align-items:end;
        padding:24px!important;
        background:
            radial-gradient(circle at 92% 0%,rgba(37,99,235,.10),transparent 34%),
            linear-gradient(135deg,#ffffff 0%,#f8fbff 58%,#f1f6fa 100%)!important;
        border:1px solid #d7e4f0!important;
        border-radius:20px!important;
        box-shadow:0 14px 36px rgba(15,23,42,.08)!important
    }
    body.cond-phase12-superadmin .cond-sa-hero::after{
        content:"";
        position:absolute;
        width:180px;height:180px;
        right:-70px;bottom:-100px;
        border-radius:50%;
        background:rgba(11,45,79,.05);
        pointer-events:none
    }
    body.cond-phase12-superadmin .cond-sa-kicker,
    body.cond-phase12-superadmin .cond-sa-section-eyebrow{
        display:block;
        color:#64748b;
        font-size:11px;
        font-weight:800;
        letter-spacing:.08em;
        text-transform:uppercase
    }
    body.cond-phase12-superadmin .cond-sa-title-row{
        display:flex;
        justify-content:space-between;
        align-items:flex-end;
        gap:18px;
        margin-top:5px
    }
    body.cond-phase12-superadmin .cond-sa-title-row h1{
        margin:0;
        color:#0f172a;
        font-size:clamp(28px,3vw,38px);
        letter-spacing:-.035em;
        line-height:1.05
    }
    body.cond-phase12-superadmin .cond-sa-title-row p{
        margin:8px 0 0;
        color:#64748b;
        font-size:14px;
        line-height:1.55
    }
    body.cond-phase12-superadmin .cond-sa-scope-chip{
        flex:0 0 auto;
        display:flex;
        align-items:center;
        gap:10px;
        min-width:190px;
        padding:10px 12px;
        background:rgba(255,255,255,.78);
        border:1px solid #dbe4f0;
        border-radius:14px;
        backdrop-filter:blur(10px)
    }
    body.cond-phase12-superadmin .cond-sa-scope-chip small,
    body.cond-phase12-superadmin .cond-sa-scope-chip strong{
        display:block
    }
    body.cond-phase12-superadmin .cond-sa-scope-chip small{
        color:#94a3b8;
        font-size:10px;
        text-transform:uppercase;
        letter-spacing:.06em;
        font-weight:800
    }
    body.cond-phase12-superadmin .cond-sa-scope-chip strong{
        margin-top:2px;
        color:#0f172a;
        font-size:13px
    }
    body.cond-phase12-superadmin .cond-sa-scope-icon{
        display:grid;
        place-items:center;
        width:34px;height:34px;
        border-radius:10px;
        background:#eaf2f8;
        color:#0B2D4F
    }
    body.cond-phase12-superadmin .cond-sa-scope-form{
        position:relative;
        z-index:1;
        display:grid;
        gap:7px
    }
    body.cond-phase12-superadmin .cond-sa-scope-form label{
        color:#475569;
        font-size:11px;
        font-weight:800;
        text-transform:uppercase;
        letter-spacing:.06em
    }
    body.cond-phase12-superadmin .cond-sa-scope-controls{
        display:grid;
        grid-template-columns:minmax(0,1fr) auto;
        gap:8px
    }
    body.cond-phase12-superadmin .cond-sa-scope-controls select{
        min-width:0;
        width:100%;
        min-height:46px;
        border:1px solid #cbd5e1;
        border-radius:12px;
        background:#fff;
        padding:0 38px 0 12px;
        color:#0f172a;
        font-weight:700
    }
    body.cond-phase12-superadmin .cond-sa-apply{
        min-height:46px!important;
        padding:0 18px!important;
        border:0!important;
        border-radius:12px!important;
        background:#0B2D4F!important;
        color:#fff!important;
        box-shadow:0 8px 18px rgba(11,45,79,.16)!important
    }

    body.cond-phase12-superadmin .cond-sa-section-heading{
        display:flex;
        justify-content:space-between;
        align-items:flex-end;
        gap:16px;
        margin-top:2px
    }
    body.cond-phase12-superadmin .cond-sa-section-heading h2{
        margin:2px 0 0;
        color:#0f172a;
        font-size:18px;
        letter-spacing:-.02em
    }
    body.cond-phase12-superadmin .cond-sa-section-note{
        color:#94a3b8;
        font-size:12px
    }

    body.cond-phase12-superadmin .cond-sa-metrics{
        display:grid!important;
        grid-template-columns:repeat(4,minmax(0,1fr))!important;
        gap:12px!important
    }
    body.cond-phase12-superadmin .cond-sa-metric{
        position:relative;
        display:flex;
        gap:13px;
        min-width:0;
        padding:17px;
        overflow:hidden;
        border:1px solid #e2e8f0;
        border-radius:16px;
        background:#fff;
        box-shadow:0 8px 24px rgba(15,23,42,.055)
    }
    body.cond-phase12-superadmin .cond-sa-metric::after{
        content:"";
        position:absolute;
        left:0;right:0;bottom:0;height:3px;
        background:#0B2D4F
    }
    body.cond-phase12-superadmin .cond-sa-metric.has-attention::after{background:#d97706}
    body.cond-phase12-superadmin .cond-sa-metric.has-info::after{background:#0284c7}
    body.cond-phase12-superadmin .cond-sa-metric-icon{
        flex:0 0 auto;
        display:grid;
        place-items:center;
        width:42px;height:42px;
        border-radius:12px;
        background:#f1f6fa;
        color:#0B2D4F
    }
    body.cond-phase12-superadmin .cond-sa-metric.has-attention .cond-sa-metric-icon{
        background:#fff7ed;color:#c2410c
    }
    body.cond-phase12-superadmin .cond-sa-metric.has-info .cond-sa-metric-icon{
        background:#eff6ff;color:#0369a1
    }
    body.cond-phase12-superadmin .cond-sa-metric-content{
        min-width:0
    }
    body.cond-phase12-superadmin .cond-sa-metric-label{
        display:block;
        color:#64748b;
        font-size:11px;
        font-weight:800;
        text-transform:uppercase;
        letter-spacing:.04em
    }
    body.cond-phase12-superadmin .cond-sa-metric strong{
        display:block;
        margin-top:3px;
        overflow:hidden;
        color:#0f172a;
        font-size:clamp(22px,2vw,30px);
        line-height:1.05;
        letter-spacing:-.03em;
        text-overflow:ellipsis
    }
    body.cond-phase12-superadmin .cond-sa-metric small{
        display:block;
        margin-top:5px;
        color:#94a3b8;
        font-size:11px;
        line-height:1.4
    }

    body.cond-phase12-superadmin .cond-sa-actions{
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:12px!important
    }
    body.cond-phase12-superadmin .cond-sa-action-card{
        display:grid!important;
        grid-template-columns:auto minmax(0,1fr) auto;
        align-items:center;
        gap:14px;
        min-height:108px;
        padding:18px!important;
        color:inherit!important;
        text-decoration:none!important;
        border:1px solid #e2e8f0!important;
        border-radius:16px!important;
        background:#fff!important;
        box-shadow:0 8px 22px rgba(15,23,42,.05)!important;
        transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease!important
    }
    body.cond-phase12-superadmin .cond-sa-action-card:hover,
    body.cond-phase12-superadmin .cond-sa-action-card:focus-visible{
        transform:translateY(-2px);
        border-color:#bfdbfe!important;
        box-shadow:0 14px 32px rgba(15,23,42,.09)!important
    }
    body.cond-phase12-superadmin .cond-sa-action-icon{
        display:grid;
        place-items:center;
        width:48px;height:48px;
        border-radius:14px;
        background:#eef5fa;
        color:#0B2D4F
    }
    body.cond-phase12-superadmin .cond-sa-action-copy{
        min-width:0
    }
    body.cond-phase12-superadmin .cond-sa-action-copy strong{
        display:block;
        color:#0f172a;
        font-size:15px;
        line-height:1.25
    }
    body.cond-phase12-superadmin .cond-sa-action-copy small{
        display:block;
        margin-top:5px;
        color:#64748b;
        font-size:12px;
        line-height:1.5
    }
    body.cond-phase12-superadmin .cond-sa-action-arrow{
        display:grid;
        place-items:center;
        width:28px;height:28px;
        color:#94a3b8
    }
    body.cond-phase12-superadmin .cond-sa-action-card:hover .cond-sa-action-arrow{
        color:#0B2D4F;
        transform:translateX(2px)
    }
    body.cond-phase12-superadmin .cond-sa-svg{
        width:20px;height:20px;
        fill:currentColor
    }
    body.cond-phase12-superadmin .cond-sa-action-icon .cond-sa-svg{
        width:22px;height:22px
    }

    body.cond-ui-phase12 .cond-ui-admin-nav{
        padding:12px 10px 14px!important;
        border:1px solid #e2e8f0;
        border-radius:18px;
        background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
        box-shadow:0 12px 30px rgba(15,23,42,.055)
    }
    body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-brand{
        padding:4px 6px 14px;
        margin-bottom:6px;
        border-bottom:1px solid #e2e8f0
    }
    body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-nav-pill{
        width:100%;
        justify-content:flex-start;
        gap:10px;
        border-color:transparent;
        box-shadow:none;
        background:transparent;
        color:#334155!important
    }
    body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-nav-pill:hover{
        background:#f1f6fa;
        border-color:#e2e8f0
    }
    body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-nav-pill.is-active{
        background:#eaf2f8;
        border-color:#cadbea;
        color:#0B2D4F!important;
        box-shadow:inset 3px 0 0 #0B2D4F
    }
    body.cond-ui-phase12 .cond-ui-admin-nav .cond-sa-nav-icon{
        display:grid;
        place-items:center;
        width:28px;height:28px;
        flex:0 0 28px;
        border-radius:8px;
        background:#f8fafc;
        color:#64748b
    }
    body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-nav-pill.is-active .cond-sa-nav-icon{
        background:#fff;
        color:#0B2D4F
    }
    /* NN-066: todos los enlaces administrativos usan una sola columna.
       Si el viewport es bajo, se desplaza la lista sin perder opciones. */
    @media(min-width:901px){
        body.cond-ui-phase12 .cond-ui-v27 > .cond-ui-admin-nav{
            box-sizing:border-box;
            max-height:calc(100vh - 36px);
            overflow-x:hidden;
            overflow-y:auto;
            /* NN-111: al llegar al final del menú, continuar el scroll de la página. */
            overscroll-behavior-y:auto;
            scrollbar-width:thin
        }
        body.cond-ui-phase12 .cond-ui-v27 > .cond-ui-admin-nav > .cond-ui-nav-pill{
            flex-shrink:0
        }
    }

    body.cond-ui-phase12 .cond-sa-hero{
        background:linear-gradient(135deg,#fff,#f8fbff)!important;
        border-color:#dbeafe!important;
        box-shadow:var(--cond-shadow-card)
    }
    body.cond-ui-phase12 .cond-sa-hero h1{
        letter-spacing:-.02em;
        line-height:1.15
    }
    body.cond-ui-phase12 .cond-sa-metrics .op-box{
        position:relative;
        overflow:hidden;
        border:1px solid #e2e8f0!important;
        background:#fff
    }
    body.cond-ui-phase12 .cond-sa-metrics .op-box::before{
        content:"";
        position:absolute;left:0;top:0;bottom:0;width:4px;
        background:#0B2D4F
    }
    body.cond-ui-phase12 .cond-sa-action-card{
        display:block;
        transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
        border:1px solid #e2e8f0!important
    }
    body.cond-ui-phase12 .cond-sa-action-card:hover,
    body.cond-ui-phase12 .cond-sa-action-card:focus-visible{
        transform:translateY(-2px);
        border-color:#bfdbfe!important;
        box-shadow:0 12px 30px rgba(15,23,42,.10)
    }
    body.cond-ui-phase12 .cond-sa-action-card p{
        margin-bottom:0;color:#64748b;line-height:1.5
    }

    body.cond-ui-phase12 .cond-ui-resident-nav{
        overscroll-behavior-x:contain;
        scrollbar-width:thin;
        scroll-snap-type:x proximity
    }
    body.cond-ui-phase12 .cond-ui-nav-pill{scroll-snap-align:start}
    body.cond-ui-phase12 .cond-ui-nav-pill[aria-current="page"]{
        box-shadow:inset 0 0 0 1px rgba(11,45,79,.16)
    }

    .cond-ui-table-scroll{
        width:100%;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        border-radius:var(--cond-radius-sm);
        scrollbar-width:thin
    }
    .cond-ui-table-scroll>table{min-width:680px;margin-bottom:0!important}
    .cond-ui-table-scroll:focus-visible{outline:3px solid var(--cond-focus);outline-offset:2px}

    body.cond-ui-phase12 .cond-empty-state{
        padding:clamp(20px,5vw,40px);
        text-align:center;
        border:1px dashed #cbd5e1;
        border-radius:var(--cond-radius-md);
        background:#f8fafc;
        color:#64748b
    }
    body.cond-ui-phase12 .cond-empty-state strong{
        display:block;color:#0f172a;font-size:15px;margin-bottom:4px
    }

    body.cond-ui-phase12 img,
    body.cond-ui-phase12 video,
    body.cond-ui-phase12 canvas{max-width:100%}

    /* ===== Tanda 3: Finanzas / Operación / Caseta ===== */
    body.cond-ui-phase12 :where(details){
        border-radius:var(--cond-radius-sm)
    }
    body.cond-ui-phase12 :where(details > summary){
        min-height:44px;
        display:flex;
        align-items:center;
        cursor:pointer;
        touch-action:manipulation
    }
    body.cond-ui-phase12 :where(fieldset){
        min-width:0;
        max-width:100%
    }

    body.cond-phase12-finanzas :where(table){
        border-collapse:separate;
        border-spacing:0;
        width:100%
    }
    body.cond-phase12-finanzas :where(th,td){
        vertical-align:middle
    }
    body.cond-phase12-finanzas :where(th){
        white-space:nowrap;
        font-size:12px;
        letter-spacing:.01em
    }
    body.cond-phase12-finanzas :where(.op-box,.fin-card,.finance-card){
        overflow:hidden
    }

    body.cond-phase12-operativo :where(.op-box){
        border:1px solid #e2e8f0!important;
        background:#fff
    }
    body.cond-phase12-operativo :where(.op-title,h2,h3){
        text-wrap:balance
    }
    body.cond-phase12-operativo :where(details > summary){
        font-weight:700
    }

    body.cond-phase12-caseta{
        background:#f8fafc!important
    }
    body.cond-phase12-caseta :where(button,.button,input[type="submit"],input[type="button"]){
        min-height:48px
    }
    body.cond-phase12-caseta :where(.op-box,.caseta-card,.card){
        border-radius:var(--cond-radius-md)
    }
    body.cond-phase12-caseta :where(table){
        width:100%
    }

    /* ===== Tanda 4: mensajes, acciones y cierre visual ===== */
    body.cond-ui-phase12 :where(
        .notice,.updated,.error,.success,.warning,.alert,
        .op-message,.op-msg,.fin-message,.fin-msg,.cond-message
    ){
        border-radius:var(--cond-radius-sm);
        padding:12px 14px;
        line-height:1.5;
        overflow-wrap:anywhere
    }
    body.cond-ui-phase12 :where(.notice-success,.updated,.success,.is-success){
        border-color:#86efac!important;
        background:#f0fdf4!important;
        color:#166534!important
    }
    body.cond-ui-phase12 :where(.notice-error,.error,.is-error){
        border-color:#fecaca!important;
        background:#fef2f2!important;
        color:#991b1b!important
    }
    body.cond-ui-phase12 :where(.notice-warning,.warning,.is-warning){
        border-color:#fde68a!important;
        background:#fffbeb!important;
        color:#92400e!important
    }
    body.cond-ui-phase12 :where(.notice-info,.is-info){
        border-color:#bfdbfe!important;
        background:#eff6ff!important;
        color:#1e40af!important
    }

    body.cond-ui-phase12 :where(
        button,.button,.btn,.btn-submit,input[type="submit"],input[type="button"]
    ){
        border-radius:10px;
        font-weight:700;
        line-height:1.2
    }
    body.cond-ui-phase12 :where(
        button:disabled,.button[aria-disabled="true"],.btn[aria-disabled="true"],
        input:disabled,select:disabled,textarea:disabled
    ){
        cursor:not-allowed!important;
        opacity:.62!important
    }

    body.cond-ui-phase12 :where(.cond-ui-action-row,.op-actions,.fin-actions,.form-actions){
        display:flex;
        gap:8px;
        flex-wrap:wrap;
        align-items:center
    }
    body.cond-ui-phase12 :where(.cond-ui-meta,.op-meta,.fin-meta){
        color:#64748b;
        font-size:12px;
        line-height:1.5
    }

    body.cond-ui-phase12 .cond-empty-state{
        min-height:120px;
        display:grid;
        place-content:center
    }
    body.cond-ui-phase12 .cond-empty-state[role="status"]{
        outline:0
    }

    /* ===== Modal operativo reutilizable ===== */
    body.cond-ui-phase12.cond-modal-open{overflow:hidden!important}
    body.cond-ui-phase12 .cond-modal-backdrop{
        position:fixed;inset:0;z-index:99990;
        display:none;align-items:center;justify-content:center;
        padding:24px;background:rgba(2,6,23,.68);
        backdrop-filter:blur(3px)
    }
    body.cond-ui-phase12 .cond-modal-backdrop.is-open{display:flex}
    body.cond-ui-phase12 .cond-modal-dialog{
        width:min(900px,calc(100vw - 32px));
        max-height:min(88vh,920px);
        display:flex;flex-direction:column;
        overflow:hidden;
        border:1px solid #334155;border-radius:18px;
        background:#0f172a;color:#e2e8f0;
        box-shadow:0 30px 90px rgba(2,6,23,.45)
    }
    body.cond-ui-phase12 .cond-modal-header{
        flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;
        gap:16px;padding:15px 18px;border-bottom:1px solid #334155;
        background:#111c30
    }
    body.cond-ui-phase12 .cond-modal-title{
        margin:0;color:#f8fafc;font-size:18px;line-height:1.25
    }
    body.cond-ui-phase12 .cond-modal-close{
        width:44px;height:44px;min-height:44px!important;flex:0 0 44px;
        display:grid;place-items:center;border:1px solid #475569!important;
        border-radius:12px!important;background:#1e293b!important;color:#fff!important;
        font-size:22px!important;line-height:1!important;cursor:pointer
    }
    body.cond-ui-phase12 .cond-modal-body{
        min-height:0;overflow:auto;padding:18px;
        overscroll-behavior:contain
    }
    body.cond-ui-phase12 .cond-modal-body :where(form,.op-accordion-body,.mc-body){
        max-width:none!important
    }
    body.cond-ui-phase12 .cond-modal-body :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
        width:100%;max-width:100%;box-sizing:border-box
    }
    body.cond-ui-phase12 .cond-modal-body :where(.op-actions){
        display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important
    }
    body.cond-ui-phase12 .cond-modal-body :where(.op-actions>*){
        width:100%;min-width:0
    }
    body.cond-ui-phase12 .cond-modal-body :where(.op-actions a,.op-actions button){
        width:100%;box-sizing:border-box;text-align:center;justify-content:center
    }
    body.cond-ui-phase12 .cond-modal-launch{
        min-height:40px!important;padding:7px 11px!important;
        border:0!important;border-radius:9px!important;
        background:#2563eb!important;color:#fff!important;
        font-size:12px!important;font-weight:800!important;cursor:pointer
    }
    body.cond-ui-phase12 .cond-modal-launch.is-warning{background:#d97706!important;color:#fff!important}
    body.cond-ui-phase12 .cond-modal-launch.is-manage{background:#0f766e!important;color:#fff!important}
    body.cond-ui-phase12 details.cond-modalized>summary{
        list-style:none
    }
    body.cond-ui-phase12 details.cond-modalized>summary::-webkit-details-marker{display:none}
    body.cond-ui-phase12 details.cond-modalized>summary{
        min-height:40px;padding:7px 10px;border-radius:8px;
        background:#1e293b;color:#38bdf8!important
    }
    @media(max-width:700px){
        body.cond-ui-phase12 .cond-modal-backdrop{padding:8px;align-items:flex-end}
        body.cond-ui-phase12 .cond-modal-dialog{
            width:100%;max-height:94vh;border-radius:18px 18px 10px 10px
        }
        body.cond-ui-phase12 .cond-modal-header{padding:12px 14px}
        body.cond-ui-phase12 .cond-modal-body{padding:14px}
        body.cond-ui-phase12 .cond-modal-body :where(.op-actions){
            grid-template-columns:1fr!important
        }
    }

    @media(max-width:900px){
        body.cond-phase12-superadmin .cond-sa-hero{
            grid-template-columns:1fr
        }
        body.cond-phase12-superadmin .cond-sa-title-row{
            align-items:flex-start;
            flex-direction:column
        }
        body.cond-phase12-superadmin .cond-sa-scope-chip{
            width:100%
        }
        body.cond-phase12-superadmin .cond-sa-metrics{
            grid-template-columns:repeat(2,minmax(0,1fr))!important; /* superadmin tablet */
        }
        body.cond-ui-phase12 .cond-ui-topbar{flex-wrap:wrap}
        body.cond-ui-phase12 .cond-ui-top-actions{width:100%;justify-content:space-between}
    }

    @media(max-width:700px){
        /* SuperAdmin móvil: misma densidad visual que Mi Casa/Residentes.
           Antes el menú administrativo se convertía en una tarjeta vertical
           enorme y el hero consumía casi toda la primera pantalla. */
        body.cond-phase12-superadmin .cond-sa-pro{gap:12px}
        body.cond-phase12-superadmin .cond-sa-hero{
            padding:13px!important;
            gap:12px!important;
            border-radius:14px!important
        }
        body.cond-phase12-superadmin .cond-sa-kicker{
            font-size:9px;
            letter-spacing:.06em
        }
        body.cond-phase12-superadmin .cond-sa-title-row{
            gap:8px!important;
            margin-top:3px
        }
        body.cond-phase12-superadmin .cond-sa-title-row h1{
            font-size:22px!important;
            line-height:1.1
        }
        body.cond-phase12-superadmin .cond-sa-title-row p{
            margin-top:4px;
            font-size:12px;
            line-height:1.35
        }
        body.cond-phase12-superadmin .cond-sa-scope-chip{
            width:auto!important;
            min-width:0!important;
            padding:7px 9px!important;
            gap:7px!important;
            border-radius:10px!important
        }
        body.cond-phase12-superadmin .cond-sa-scope-icon{
            width:28px;height:28px;border-radius:8px
        }
        body.cond-phase12-superadmin .cond-sa-scope-chip small{font-size:8px}
        body.cond-phase12-superadmin .cond-sa-scope-chip strong{font-size:12px}
        body.cond-phase12-superadmin .cond-sa-scope-form{gap:4px}
        body.cond-phase12-superadmin .cond-sa-scope-form label{font-size:9px}
        body.cond-phase12-superadmin .cond-sa-scope-controls{
            grid-template-columns:minmax(0,1fr) auto
        }
        body.cond-phase12-superadmin .cond-sa-scope-controls select{
            min-height:38px;
            border-radius:9px;
            font-size:13px
        }
        body.cond-phase12-superadmin .cond-sa-apply{
            min-height:38px!important;
            padding:0 12px!important;
            border-radius:9px!important;
            font-size:12px!important
        }
        body.cond-phase12-superadmin .cond-sa-section-heading{margin-top:0}
        body.cond-phase12-superadmin .cond-sa-section-heading h2{font-size:15px}
        body.cond-phase12-superadmin .cond-sa-section-eyebrow{font-size:9px}
        body.cond-phase12-superadmin .cond-sa-metrics{
            grid-template-columns:repeat(2,minmax(0,1fr))!important;
            gap:8px!important
        }
        body.cond-phase12-superadmin .cond-sa-metric{
            gap:8px;
            padding:10px;
            border-radius:12px
        }
        body.cond-phase12-superadmin .cond-sa-metric-icon{
            width:32px;height:32px;border-radius:9px
        }
        body.cond-phase12-superadmin .cond-sa-metric strong{font-size:19px}
        body.cond-phase12-superadmin .cond-sa-metric small{font-size:9px;margin-top:3px}
        body.cond-phase12-superadmin .cond-sa-metric-label{font-size:9px}
        body.cond-phase12-superadmin .cond-sa-actions{
            grid-template-columns:1fr!important;
            gap:8px!important
        }
        body.cond-phase12-superadmin .cond-sa-action-card{
            min-height:0!important;
            padding:10px 12px!important;
            gap:10px!important;
            border-radius:12px!important
        }
        body.cond-phase12-superadmin .cond-sa-action-icon{
            width:36px;height:36px;border-radius:10px
        }
        body.cond-phase12-superadmin .cond-sa-action-copy strong{font-size:13px}
        body.cond-phase12-superadmin .cond-sa-action-copy small{
            margin-top:2px;
            font-size:10px;
            line-height:1.3
        }

        /* SuperAdmin usa exactamente el patrón de navegación tipo app
           del residente: barra inferior fija, compacta y con scroll lateral. */
        body.cond-ui-phase12 .cond-ui-admin-nav{
            position:fixed!important;
            z-index:9999!important;
            left:8px!important;
            right:8px!important;
            bottom:max(8px,env(safe-area-inset-bottom))!important;
            top:auto!important;
            width:auto!important;
            max-width:none!important;
            min-height:0!important;
            margin:0!important;
            padding:7px!important;
            display:flex!important;
            flex-direction:row!important;
            flex-wrap:nowrap!important;
            align-items:center!important;
            gap:5px!important;
            overflow-x:auto!important;
            overflow-y:hidden!important;
            border:1px solid #e5e7eb!important;
            border-radius:17px!important;
            background:rgba(255,255,255,.96)!important;
            box-shadow:0 14px 40px rgba(15,23,42,.18)!important;
            /* NN-111: evita repintados pesados de la barra fija en móvil. */
            backdrop-filter:none!important;
            -webkit-backdrop-filter:none!important;
            -webkit-overflow-scrolling:touch;
            overscroll-behavior-x:contain;
            scrollbar-width:thin
        }
        body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-brand{
            display:none!important
        }
        body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-nav-pill{
            width:auto!important;
            min-width:76px!important;
            min-height:54px!important;
            padding:6px 8px!important;
            flex:0 0 auto!important;
            flex-direction:column!important;
            justify-content:center!important;
            align-items:center!important;
            gap:2px!important;
            font-size:10px!important;
            line-height:1.1!important;
            text-align:center!important;
            writing-mode:horizontal-tb!important;
            white-space:normal!important;
            word-break:normal!important;
            border:0!important;
            border-radius:10px!important;
            background:transparent!important;
            box-shadow:none!important;
            color:#334155!important
        }
        body.cond-ui-phase12 .cond-ui-admin-nav .cond-ui-nav-pill.is-active{
            background:#eaf2f8!important;
            color:#0B2D4F!important;
            box-shadow:inset 0 0 0 1px #cadbea!important
        }
        body.cond-ui-phase12 .cond-ui-admin-nav .cond-sa-nav-icon{
            width:22px!important;
            height:22px!important;
            flex:0 0 22px!important;
            border-radius:6px!important;
            background:transparent!important;
            color:inherit!important
        }
        body.cond-ui-phase12 .cond-ui-admin-nav .cond-sa-nav-icon .cond-sa-svg{
            width:20px!important;
            height:20px!important
        }
        body.cond-phase12-superadmin{
            padding-bottom:90px!important
        }
        body.cond-phase12-superadmin .cond-sa-section-note{display:none}
        body.cond-ui-phase12 .cond-ui-v27,
        body.cond-ui-phase12 .op-container,
        body.cond-ui-phase12 .finance-container,
        body.cond-ui-phase12 .sa-wrap{
            padding-left:12px!important;
            padding-right:12px!important
        }
        body.cond-ui-phase12 .cond-ui-topbar{padding:10px 12px}
        body.cond-ui-phase12 .cond-ui-user span{display:none}
        body.cond-ui-phase12 :where(.op-grid,.dashboard-grid,.sa-grid,.fin-grid){
            grid-template-columns:1fr!important
        }
        body.cond-ui-phase12 :where(
            .op-container,.finance-container,.cond-ui-v27,.sa-wrap
        ) :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
            max-width:100%
        }
        body.cond-ui-phase12 dialog,
        body.cond-ui-phase12 [role="dialog"]{
            max-width:calc(100vw - 24px)!important;
            max-height:calc(100vh - 24px)!important
        }
    }

    @media(max-width:420px){
        body.cond-ui-phase12 .cond-ui-top-actions{gap:8px}
        body.cond-ui-phase12 .cond-ui-global-link{font-size:11px;padding:8px}
        body.cond-ui-phase12 .cond-ui-resident-nav{gap:6px}
        body.cond-ui-phase12 .cond-ui-nav-pill{padding:9px 10px;font-size:12px}
        body.cond-ui-phase12 :where(.button,.btn,.btn-submit,button[type="submit"],input[type="submit"]){
            max-width:100%
        }
    }

    @media(prefers-reduced-motion:reduce){
        body.cond-ui-phase12 *,
        body.cond-ui-phase12 *::before,
        body.cond-ui-phase12 *::after{
            scroll-behavior:auto!important;
            animation-duration:.01ms!important;
            animation-iteration-count:1!important;
            transition-duration:.01ms!important
        }
    }
    /* NN-062 · Modo Legendario: solo preferencia de la cuenta SuperAdmin.
       Iconos PNG independientes con transparencia. Ningún estilo afecta
       a otro usuario, página residente o flujo administrativo. */
    body.cond-sa-legendario .cond-ui-admin-nav{
        border-color:#b7c0ce!important;
        background:linear-gradient(180deg,#f9fafb 0%,#eef1f5 100%)!important;
    }
    body.cond-sa-legendario .cond-ui-admin-nav .cond-ui-nav-pill.is-active{
        background:#e2e7ed!important;
        border-color:#9ca9b7!important;
        color:#101827!important;
    }
    body.cond-sa-legendario .cond-ui-admin-nav .cond-sa-nav-icon{
        background:#fff;
        border:1px solid #d4dae3;
    }
    body.cond-sa-legendario .cond-sa-gamer-icon{
        display:block!important;
        width:25px;
        height:25px;
        min-width:0;
        max-width:100%;
        object-fit:contain;
        flex-shrink:0;
        vertical-align:middle;
    }
    body.cond-sa-legendario .cond-ui-admin-nav .cond-sa-nav-icon .cond-sa-gamer-icon{
        width:23px!important;height:23px!important;
    }
    body.cond-sa-legendario .cond-ui-admin-nav .cond-ui-brand-logo{
        object-fit:contain;
        padding:5px;
        background:#fff;
        border:1px solid #d1d5db;
    }
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-hero{
        border-color:#b5beca!important;
        background:linear-gradient(135deg,#fff 0%,#eef1f5 100%)!important;
        box-shadow:inset 0 3px 0 #121923,0 14px 35px rgba(15,23,42,.09)!important;
    }
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-metric-icon,
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-action-icon,
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-scope-icon{
        background:#fff!important;
        border:1px solid #cdd4df;
        color:#111827!important;
    }
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-action-card:hover,
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-action-card:focus-visible{
        border-color:#64748b!important;
    }
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-action-icon .cond-sa-gamer-icon{
        width:30px;height:30px;
    }
    body.cond-phase12-superadmin.cond-sa-legendario .cond-sa-metric-icon .cond-sa-gamer-icon{
        width:27px;height:27px;
    }
    body.cond-phase12-superadmin .cond-sa-legend-control{
        display:flex;
        align-items:center;
        gap:10px;
        flex-wrap:wrap;
        margin-top:15px;
        position:relative;
        z-index:1;
    }
    body.cond-phase12-superadmin .cond-sa-legend-label{
        font-size:11px;
        color:#536173;
        font-weight:750;
    }
    body.cond-phase12-superadmin .cond-sa-legend-toggle{
        min-height:40px;
        padding:8px 13px;
        border-radius:10px;
        background:#fff;
        color:#17202d;
        border:1px solid #b6c1cf;
        font-size:12px;
        font-weight:750;
        cursor:pointer;
    }
    body.cond-phase12-superadmin .cond-sa-legend-toggle:hover{
        background:#f1f5f9;
        border-color:#64748b;
    }
    body.cond-phase12-superadmin .cond-sa-legend-toggle:focus-visible{
        outline:3px solid #0ea5e9;
        outline-offset:3px;
    }
    @media(max-width:900px){
        body.cond-sa-legendario .cond-ui-admin-nav .cond-sa-nav-icon .cond-sa-gamer-icon{
            width:20px!important;height:20px!important;
        }
        body.cond-phase12-superadmin .cond-sa-legend-control{
            align-items:flex-start;
            gap:7px;
        }
    }
