
/* ============================================================
   OrtaLegal · UI Polish v1.1
   Ajuste fino: modal soporte, X SVG, iconos, alineaciones,
   botón login y botones superiores.
   ============================================================ */

/* ---------- Botones superiores ---------- */

.top-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

.pill.support-pill{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    padding:0!important;
    border-radius:999px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:19px!important;
    font-weight:900!important;
    line-height:1!important;
    color:#0b2845!important;
    border:1px solid rgba(189,146,80,.58)!important;
    background:
        radial-gradient(circle at 28% 20%,rgba(255,255,255,.82),transparent 21%),
        linear-gradient(135deg,#bd9250 0%,#d7bd7c 60%,#c99e58 100%)!important;
    box-shadow:
        0 12px 24px rgba(189,146,80,.24),
        inset 0 1px 0 rgba(255,255,255,.52)!important;
    text-shadow:0 1px 0 rgba(255,255,255,.28);
}

.pill.support-pill:hover{
    transform:translateY(-1px) scale(1.03)!important;
    box-shadow:
        0 16px 32px rgba(189,146,80,.31),
        0 0 0 5px rgba(189,146,80,.12),
        inset 0 1px 0 rgba(255,255,255,.55)!important;
}

.pill.ol-dark-toggle{
    min-height:42px!important;
    padding:0 16px 0 13px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    font-weight:800!important;
    border:1px solid rgba(189,146,80,.30)!important;
    background:
        linear-gradient(135deg,rgba(255,255,255,.94),rgba(255,253,248,.76))!important;
    color:#0b2845!important;
    box-shadow:
        0 10px 24px rgba(16,32,51,.07),
        inset 0 1px 0 rgba(255,255,255,.85)!important;
}

.pill.ol-dark-toggle::before{
    content:"";
    width:16px;
    height:16px;
    flex:0 0 16px;
    border-radius:999px;
    background:
        radial-gradient(circle at 62% 38%,transparent 0 38%,#0b2845 40% 100%);
    box-shadow:0 0 0 3px rgba(189,146,80,.11);
}

body.dark .pill.ol-dark-toggle{
    background:
        linear-gradient(135deg,rgba(255,255,255,.10),rgba(255,255,255,.035))!important;
    color:#fff!important;
    border-color:rgba(215,189,124,.28)!important;
}

body.dark .pill.ol-dark-toggle::before{
    background:
        radial-gradient(circle at 35% 35%,#fff 0 16%,transparent 18%),
        radial-gradient(circle at 66% 62%,#fff 0 10%,transparent 12%),
        radial-gradient(circle,#d7bd7c 0 100%);
}

/* ---------- Botón login perfectamente centrado ---------- */

.secure-form .btn,
.login-card .btn,
.secure-form .btn.gold,
.login-card .btn.gold{
    height:50px!important;
    min-height:50px!important;
    padding:0 18px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    line-height:1!important;
    border-radius:16px!important;
    font-size:14.5px!important;
    font-weight:900!important;
    letter-spacing:.01em;
    position:relative;
    overflow:hidden;
    isolation:isolate;
    border:1px solid rgba(189,146,80,.55)!important;
    background:
        radial-gradient(circle at 30% 10%,rgba(255,255,255,.55),transparent 19%),
        linear-gradient(135deg,#b88a43 0%,#d9bd76 54%,#caa15a 100%)!important;
    color:#0b2035!important;
    box-shadow:
        0 14px 28px rgba(189,146,80,.24),
        inset 0 1px 0 rgba(255,255,255,.50)!important;
    text-shadow:0 1px 0 rgba(255,255,255,.28);
}

.secure-form .btn::after,
.login-card .btn::after{
    content:"";
    position:absolute;
    inset:-45% auto -45% -70%;
    width:55%;
    transform:skewX(-18deg);
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.58),transparent);
    z-index:-1;
    opacity:0;
}

.secure-form .btn:hover:not(:disabled),
.login-card .btn:hover:not(:disabled){
    transform:translateY(-1px);
    box-shadow:
        0 18px 34px rgba(189,146,80,.30),
        0 0 0 5px rgba(189,146,80,.10),
        inset 0 1px 0 rgba(255,255,255,.52)!important;
}

.secure-form .btn:hover:not(:disabled)::after,
.login-card .btn:hover:not(:disabled)::after{
    animation:olButtonShine .75s ease;
    opacity:1;
}

.secure-form .btn:disabled,
.login-card .btn:disabled{
    opacity:.52!important;
    cursor:not-allowed!important;
    filter:saturate(.65) grayscale(.08)!important;
    box-shadow:none!important;
    transform:none!important;
}

/* ---------- Modal: caja, cierre y retícula ---------- */

.ol-support-dialog{
    width:min(560px,100%)!important;
    border-radius:32px!important;
    padding:34px!important;
}

/* anula cualquier X anterior generada por CSS */
.ol-support-close::before,
.ol-support-close::after{
    content:none!important;
    display:none!important;
}

.ol-support-close{
    position:absolute!important;
    top:16px!important;
    right:16px!important;
    width:40px!important;
    height:40px!important;
    padding:0!important;
    margin:0!important;
    border:1px solid rgba(189,146,80,.58)!important;
    border-radius:999px!important;
    background:
        radial-gradient(circle at 31% 22%,rgba(255,255,255,.88),transparent 22%),
        rgba(255,255,255,.84)!important;
    color:#0b2845!important;
    cursor:pointer!important;
    transition:.16s ease!important;
    appearance:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-shadow:
        0 8px 18px rgba(16,32,51,.08),
        inset 0 1px 0 rgba(255,255,255,.70)!important;
}

.ol-support-close svg{
    width:16px!important;
    height:16px!important;
    display:block!important;
    flex:0 0 16px!important;
    stroke:currentColor!important;
    stroke-width:2.25!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
    fill:none!important;
}

.ol-support-close:hover{
    transform:rotate(90deg) scale(1.03)!important;
    background:#fff!important;
    border-color:rgba(189,146,80,.88)!important;
}

body.dark .ol-support-close{
    background:rgba(255,255,255,.08)!important;
    color:#fff!important;
    border-color:rgba(215,189,124,.42)!important;
}

/* Tarjetas de contacto: retícula fija, elementos a la misma altura */
.ol-support-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    margin-top:18px!important;
}

.ol-support-action{
    min-height:74px!important;
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr)!important;
    align-items:center!important;
    column-gap:14px!important;
    padding:14px 16px!important;
    border-radius:18px!important;
}

.ol-support-action > span:not(.ol-support-icon){
    min-height:44px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-items:flex-start!important;
}

.ol-support-icon{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    border-radius:15px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    justify-self:center!important;
    align-self:center!important;
    background:
        radial-gradient(circle at 31% 20%,rgba(255,255,255,.45),transparent 22%),
        linear-gradient(135deg,#bd9250 0%,#d7bd7c 100%)!important;
    color:#0b2845!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.38)!important;
    overflow:hidden!important;
}

.ol-support-icon svg{
    width:22px!important;
    height:22px!important;
    display:block!important;
    overflow:visible!important;
}

.ol-support-icon svg,
.ol-support-icon svg *,
.ol-support-icon path,
.ol-support-icon rect,
.ol-support-icon line,
.ol-support-icon polyline{
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
}

.ol-support-action strong{
    display:block!important;
    font-size:14px!important;
    line-height:1.25!important;
    margin:0 0 4px!important;
}

.ol-support-action span span{
    display:block!important;
    font-size:14px!important;
    line-height:1.25!important;
}

.ol-support-note{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:48px!important;
    margin:22px 0 0!important;
    padding:11px 15px!important;
    border-radius:17px!important;
    text-align:center!important;
    white-space:nowrap!important;
}

@media(max-width:640px){
    .ol-support-dialog{
        padding:28px 22px!important;
        border-radius:26px!important;
    }

    .ol-support-close{
        top:14px!important;
        right:14px!important;
        width:38px!important;
        height:38px!important;
    }

    .ol-support-action{
        grid-template-columns:46px minmax(0,1fr)!important;
        min-height:72px!important;
    }

    .ol-support-note{
        white-space:normal!important;
        text-align:left!important;
        justify-content:flex-start!important;
    }
}

@keyframes olButtonShine{
    from{left:-70%}
    to{left:130%}
}

/* Etiqueta de sección documental en el portal del cliente */
.portal-document-group-label {
    display: inline-block;
    margin-bottom: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(201, 155, 55, .14);
    color: #805100;
    font-size: .72rem;
    font-weight: 800;
}

/* Reforma visual del panel del portal del cliente */
.portal-dashboard{
    display:grid;
    gap:18px;
}

.hero--portal{
    position:relative;
    display:flex;
    align-items:center;
    min-height:108px;
    padding-right:300px;
}

.hero--portal::after{
    display:none;
}

.hero--portal .hero-copy{
    position:relative;
    z-index:1;
    max-width:620px;
    min-width:0;
}

.hero--portal h1{
    margin:0 0 10px;
    max-width:none;
}

.hero--portal p{
    max-width:620px;
    color:#e2ebf3;
}

.hero-watermark{
    position:absolute;
    right:32px;
    top:50%;
    z-index:0;
    width:min(320px, 28%);
    height:auto;
    transform:translateY(-50%);
    opacity:.17;
    pointer-events:none;
    user-select:none;
    filter:grayscale(.05) saturate(.9) brightness(1.2);
}

.dashboard-grid{
    align-items:start;
}

.dashboard-card{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.dashboard-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}

.dashboard-card-head h3,
.dashboard-subsection h4{
    margin:0;
}

.dashboard-subsection{
    display:grid;
    gap:10px;
}

.dashboard-list{
    display:grid;
    gap:0;
}

.dashboard-list .timeline-line{
    padding:10px 0;
}

.dashboard-list .timeline-line:first-child{
    padding-top:0;
}

.dashboard-list .timeline-line:last-child{
    padding-bottom:0;
    border-bottom:0;
}

.dashboard-list--compact{
    border:1px solid rgba(221, 205, 178, .72);
    border-radius:18px;
    background:rgba(255,255,255,.3);
    padding:12px 14px;
}

.dashboard-profile-summary{
    display:grid;
    gap:10px;
}

.dashboard-profile-chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.profile-chip{
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:6px 12px;
    border-radius:999px;
    border:1px solid var(--linea);
    background:rgba(255,255,255,.65);
    font-size:.93rem;
}

.portal-form-stack{
    display:grid;
    gap:10px;
}

.portal-field-label{
    font-size:.87rem;
    font-weight:700;
    color:rgba(11, 40, 69, .7);
}

.portal-inline-actions{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.section-intro{
    margin:0;
}

.empty-state{
    display:grid;
    gap:6px;
    padding:15px 17px;
    border:1px dashed rgba(201,155,55,.28);
    border-radius:18px;
    background:rgba(201,155,55,.035);
}

.empty-state p{
    margin:0;
}

.empty-state--compact{
    padding:13px 15px;
}

.dashboard-table-wrap{
    overflow:auto;
}

.portal-upload-stack{
    min-width:220px;
}

.mini-scroll{
    max-height:220px;
    overflow:auto;
    scrollbar-width:thin;
}

.dashboard-card .btn[disabled],
.dashboard-card .btn[aria-disabled="true"]{
    opacity:.55;
    cursor:not-allowed;
    pointer-events:none;
}

body.dark .hero-watermark{
    opacity:.23;
    filter:grayscale(.02) brightness(1.5);
}

body.dark .dashboard-list--compact,
body.dark .profile-chip{
    background:rgba(10, 27, 44, .36);
}

body.dark .empty-state{
    background:rgba(201,155,55,.08);
    border-color:rgba(201,155,55,.22);
}

@media(max-width:980px){
    .hero--portal{
        min-height:auto;
        padding-right:28px;
        padding-bottom:110px;
    }

    .hero-watermark{
        top:auto;
        bottom:18px;
        right:24px;
        transform:none;
        width:220px;
    }
}

@media(max-width:640px){
    .dashboard-card-head,
    .portal-inline-actions{
        flex-direction:column;
        align-items:flex-start;
    }

    .hero--portal{
        padding-bottom:96px;
    }

    .hero-watermark{
        width:170px;
        right:18px;
        bottom:16px;
    }
}
