﻿:root {
    --portal-brand: #00685d;
    --portal-brand-dark: #004f47;
    --portal-page: #f3f6f5;
    --portal-border: #dbe4e2;
    --portal-text: #20332f;
    --portal-muted: #667a75;
}

.portal-body {
    display: block;
    height: auto;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--portal-page);
    color: var(--portal-text);
}
.portal-header { min-height: 68px; padding: .65rem clamp(1rem, 3vw, 2.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--portal-brand); color: #fff; }
.portal-brand { display: flex; align-items: center; gap: .85rem; color: #fff; text-decoration: none; min-width: 0; }
.portal-brand img { width: auto; height: 38px; max-width: 190px; object-fit: contain; }
.portal-brand-text { font-size: 1.2rem; font-weight: 800; letter-spacing: .04em; }
.portal-brand-text small { font-size: .7rem; font-weight: 500; }
.portal-brand-product { padding-left: .85rem; border-left: 1px solid rgba(255,255,255,.35); font-size: .82rem; opacity: .88; }
.portal-session { display: flex; align-items: center; gap: 1rem; text-align: right; font-size: .82rem; }
.portal-session div { display: grid; }
.portal-session span { opacity: .78; }
.portal-nav { display: flex; gap: .25rem; padding: .45rem clamp(1rem, 3vw, 2.5rem); background: #fff; border-bottom: 1px solid var(--portal-border); overflow-x: auto; }
.portal-nav a { padding: .48rem .72rem; border-radius: .45rem; color: #405c56; text-decoration: none; white-space: nowrap; font-size: .88rem; font-weight: 650; }
.portal-nav a:hover, .portal-nav a.is-active { background: #e5f2ef; color: var(--portal-brand-dark); }
.portal-main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.2rem 0 2.5rem; }
.portal-main-auth { width: min(480px, calc(100% - 2rem)); display: grid; place-items: center; min-height: calc(100vh - 68px); padding: 2rem 0; }
.portal-main-auth-wide { width: min(1180px, calc(100% - 2rem)); }
.portal-auth-card, .portal-card { background: #fff; border: 1px solid var(--portal-border); border-radius: .85rem; box-shadow: 0 8px 28px rgba(25,59,52,.06); }
.portal-auth-card { width: 100%; max-width: 480px; padding: clamp(1.15rem, 4vw, 2rem); }
.portal-auth-card h1 { margin: 0 0 .4rem; font-size: 1.45rem; }
.portal-auth-card > p { color: var(--portal-muted); margin-bottom: 1.25rem; }
.portal-field { display: grid; gap: .32rem; margin-bottom: .85rem; font-size: .84rem; font-weight: 650; }
.portal-auth-links { margin-top: 1rem; text-align: center; font-size: .88rem; }
.portal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.portal-heading h1 { margin: .08rem 0 .2rem; font-size: clamp(1.35rem, 3vw, 1.9rem); }
.portal-heading p { margin: 0; color: var(--portal-muted); }
.portal-kicker { color: var(--portal-brand); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-scope { display: inline-flex; align-items: center; padding: .35rem .58rem; border-radius: 999px; background: #e5f2ef; color: var(--portal-brand-dark); font-size: .75rem; font-weight: 750; }
.portal-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; margin-bottom: .9rem; }
.portal-summary-card { display: grid; gap: .1rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--portal-border); border-radius: .75rem; color: inherit; text-decoration: none; }
.portal-summary-card:hover { border-color: #99c2ba; box-shadow: 0 6px 18px rgba(25,59,52,.06); }
.portal-summary-card span { color: var(--portal-muted); font-size: .8rem; font-weight: 700; }
.portal-summary-card strong { font-size: 1.6rem; color: var(--portal-brand-dark); }
.portal-summary-card small { color: var(--portal-muted); }
.portal-card { padding: .85rem 1rem; }
.portal-card-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; }
.portal-card-heading h2 { margin: .05rem 0 0; font-size: 1.05rem; }
.portal-permission-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .45rem .8rem; }
.portal-permission-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .48rem .55rem; border-radius: .45rem; background: #f7f9f8; font-size: .82rem; }
.portal-permission-list strong { color: #34534c; text-align: right; }
.portal-list { display: grid; gap: .15rem; }
.portal-list-item { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: .9rem; padding: .75rem .2rem; border-bottom: 1px solid #edf1f0; }
.portal-list-item:last-child { border-bottom: 0; }
.portal-list-date { display: grid; align-content: start; color: var(--portal-muted); font-size: .78rem; }
.portal-list-content { min-width: 0; display: grid; gap: .2rem; }
.portal-list-title { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.portal-list-content small { color: var(--portal-muted); }
.portal-list-content p { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-chip { padding: .18rem .42rem; border-radius: 999px; font-size: .67rem; font-weight: 800; white-space: nowrap; }
.portal-chip.is-open { background: #e4f2ef; color: var(--portal-brand-dark); }
.portal-chip.is-muted { background: #edf0ef; color: #66736f; }
.portal-note { margin-top: .35rem; padding: .45rem .55rem; border-left: 3px solid #9bc6bd; background: #f4f9f8; font-size: .82rem; }
.portal-empty { padding: 1.6rem; text-align: center; color: var(--portal-muted); }

@media (max-width: 760px) {
    .portal-header { align-items: flex-start; }
    .portal-brand-product { display: none; }
    .portal-session { align-items: flex-end; flex-direction: column; gap: .4rem; }
    .portal-card-grid { grid-template-columns: 1fr; }
    .portal-permission-list { grid-template-columns: 1fr; }
    .portal-list-item { grid-template-columns: 1fr; gap: .25rem; }
    .portal-list-date { display: flex; gap: .45rem; }
}

.portal-inline-action { margin-top: .55rem; }
.portal-inline-action .btn { white-space: nowrap; }

/* Acceso de clientes */
.portal-login-shell { width: 100%; min-height: min(680px, calc(100vh - 112px)); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); overflow: hidden; border: 1px solid rgba(0, 79, 71, .14); border-radius: 24px; background: #fff; box-shadow: 0 24px 70px rgba(20, 62, 54, .14); }
.portal-login-hero { position: relative; display: flex; align-items: center; overflow: hidden; padding: clamp(2rem, 5vw, 4.8rem); color: #fff; background: linear-gradient(145deg, #004f47 0%, #00685d 56%, #0b7b6f 100%); }
.portal-login-hero::after { content: "K"; position: absolute; right: -1.4rem; bottom: -5rem; color: rgba(255,255,255,.055); font-size: clamp(18rem, 32vw, 31rem); font-weight: 900; line-height: .8; pointer-events: none; }
.portal-login-orbit { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; pointer-events: none; }
.portal-login-orbit-one { width: 330px; height: 330px; top: -180px; left: -120px; }
.portal-login-orbit-two { width: 210px; height: 210px; right: 8%; top: 8%; }
.portal-login-hero-content { position: relative; z-index: 1; width: min(540px, 100%); }
.portal-login-kicker { display: inline-flex; padding: .38rem .7rem; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #d9f3ed; background: rgba(255,255,255,.08); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-login-hero h1 { max-width: 520px; margin: 1.15rem 0 .8rem; font-size: clamp(2.25rem, 4.5vw, 4rem); font-weight: 790; letter-spacing: -.045em; line-height: 1.02; }
.portal-login-hero > .portal-login-hero-content > p { max-width: 510px; margin: 0; color: rgba(255,255,255,.82); font-size: 1.02rem; line-height: 1.65; }
.portal-login-features { display: grid; gap: .75rem; margin-top: clamp(2rem, 4vw, 3.1rem); }
.portal-login-features > div { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: .8rem; padding: .72rem .8rem; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.065); backdrop-filter: blur(5px); }
.portal-login-feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; color: #004f47; background: #dff5ef; }
.portal-login-feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-login-features span:last-child { display: grid; gap: .08rem; }
.portal-login-features strong { font-size: .92rem; }
.portal-login-features small { color: rgba(255,255,255,.7); font-size: .76rem; line-height: 1.4; }
.portal-login-security { display: flex; align-items: center; gap: .55rem; margin-top: 1.25rem; color: rgba(255,255,255,.72); font-size: .74rem; }
.portal-login-security svg { flex: 0 0 auto; width: 19px; height: 19px; fill: none; stroke: #bfe9df; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-login-panel { display: grid; place-items: center; padding: clamp(1.5rem, 5vw, 4rem); background: linear-gradient(155deg, #fff 0%, #f7faf9 100%); }
.portal-login-card { max-width: 440px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.portal-login-card-heading { margin-bottom: 1.65rem; }
.portal-login-access-badge { display: inline-flex; margin-bottom: .85rem; color: var(--portal-brand); font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.portal-login-card-heading h2 { margin: 0 0 .55rem; color: #173b34; font-size: clamp(1.55rem, 3vw, 2.05rem); font-weight: 790; letter-spacing: -.025em; }
.portal-login-card-heading p { margin: 0; color: var(--portal-muted); font-size: .92rem; line-height: 1.55; }
.portal-login-form { display: grid; gap: .9rem; }
.portal-login-validation:empty, .portal-login-validation.validation-summary-valid { display: none; }
.portal-login-form .portal-field { margin: 0; }
.portal-login-input { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; min-height: 50px; border: 1px solid #cedbd8; border-radius: 11px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.portal-login-input:focus-within { border-color: #168274; box-shadow: 0 0 0 4px rgba(0,104,93,.09); }
.portal-login-input svg { width: 20px; height: 20px; margin-left: .9rem; color: #41756c; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.portal-login-input input { width: 100%; min-width: 0; height: 48px; padding: .65rem .85rem; border: 0; outline: 0; color: #173b34; background: transparent; }
.portal-login-input input::placeholder { color: #98aaa6; }
.portal-login-options { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .05rem 0 .2rem; font-size: .79rem; }
.portal-login-options a { color: var(--portal-brand-dark); font-weight: 700; text-decoration: none; }
.portal-login-options a:hover { text-decoration: underline; }
.portal-login-remember { display: inline-flex; align-items: center; gap: .5rem; color: #526c66; cursor: pointer; }
.portal-login-remember input { width: 16px; height: 16px; accent-color: var(--portal-brand); }
.portal-login-submit { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 52px; padding: .8rem 1rem; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #00685d, #00544c); box-shadow: 0 10px 22px rgba(0,104,93,.2); font-size: .92rem; font-weight: 780; transition: transform .15s ease, box-shadow .15s ease; }
.portal-login-submit:hover { transform: translateY(-1px); box-shadow: 0 13px 26px rgba(0,104,93,.25); }
.portal-login-submit:focus-visible { outline: 3px solid rgba(0,104,93,.24); outline-offset: 3px; }
.portal-login-submit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.portal-login-help { display: grid; gap: .1rem; margin-top: 1.45rem; padding-top: 1.15rem; border-top: 1px solid #e5ecea; color: #526c66; text-align: center; }
.portal-login-help span { font-size: .78rem; font-weight: 750; }
.portal-login-help small { color: #82938f; font-size: .72rem; line-height: 1.45; }

@media (max-width: 940px) {
    .portal-main-auth-wide { width: min(760px, calc(100% - 2rem)); }
    .portal-login-shell { grid-template-columns: 1fr; }
    .portal-login-hero { min-height: auto; padding: 2.2rem; }
    .portal-login-hero h1 { max-width: 620px; font-size: clamp(2rem, 7vw, 3.2rem); }
    .portal-login-features { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .portal-login-features > div { grid-template-columns: 1fr; align-content: start; }
    .portal-login-panel { padding: 2.2rem; }
}

@media (max-width: 620px) {
    .portal-main-auth-wide { width: min(100% - 1rem, 520px); padding: .75rem 0 1.5rem; }
    .portal-login-shell { border-radius: 18px; }
    .portal-login-hero { padding: 1.6rem 1.35rem; }
    .portal-login-hero h1 { margin-top: .9rem; }
    .portal-login-features { grid-template-columns: 1fr; margin-top: 1.5rem; }
    .portal-login-panel { padding: 1.65rem 1.25rem; }
    .portal-login-options { align-items: flex-start; flex-direction: column; gap: .65rem; }
}

/* BusinessGest2.0 v3.2.33c - reservas operativas desde el portal */
.portal-heading-actions { align-items: center; }
.portal-alert { margin-bottom: .8rem; }
.portal-reservation-form { display: grid; gap: .72rem; }
.portal-validation-summary:empty, .portal-validation-summary.validation-summary-valid { display: none; }
.portal-form-grid { display: grid; gap: .65rem .8rem; }
.portal-form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.portal-form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal-field-span-2 { grid-column: span 2; }
.portal-field small { color: var(--portal-muted); font-weight: 450; }
.portal-section-separator { margin-top: .3rem; padding-top: .75rem; border-top: 1px solid #edf1f0; }
.portal-availability { display: grid; gap: .4rem; }
.portal-availability-state { padding: .55rem .65rem; border-radius: .5rem; background: #f3f6f5; color: #546762; font-size: .84rem; font-weight: 700; }
.portal-availability-state.is-loading { background: #eef3f8; color: #385a76; }
.portal-availability-state.is-success { background: #e6f5ec; color: #22633b; }
.portal-availability-state.is-error { background: #fff0ed; color: #8b3024; }
.portal-availability-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.portal-availability-detail > div { display: grid; gap: .08rem; padding: .45rem .55rem; border: 1px solid #e2eae8; border-radius: .45rem; background: #fbfcfc; font-size: .8rem; }
.portal-availability-detail strong { color: #34534c; }
.portal-availability-detail span { color: var(--portal-muted); }
.portal-availability-detail ul { grid-column: 1 / -1; margin: 0; padding-left: 1.2rem; color: #8b3024; font-size: .82rem; }
.portal-person-fixed { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem .65rem; border: 1px solid var(--portal-border); border-radius: .5rem; background: #f8faf9; font-size: .84rem; }
.portal-person-fixed span { color: var(--portal-muted); }
.portal-reservation-options { display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; padding: .55rem .65rem; border-radius: .5rem; background: #f7f9f8; }
.portal-option { margin: 0; font-size: .84rem; }
.portal-option.is-disabled { opacity: .55; }
.portal-form-actions { display: flex; justify-content: flex-end; gap: .55rem; padding-top: .2rem; }
.portal-form-footnote { margin: -.25rem 0 0; color: var(--portal-muted); text-align: right; font-size: .76rem; }
.portal-list-item.is-new { margin: 0 -.55rem; padding-left: .75rem; padding-right: .75rem; border-radius: .55rem; background: #eef8f5; border: 1px solid #b9dacf; }
.portal-permission-list a { color: var(--portal-brand-dark); text-decoration: none; }
.portal-permission-list a:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .portal-form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-availability-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .portal-heading-actions { align-items: stretch; flex-direction: column; }
    .portal-heading-actions > .btn { align-self: flex-start; }
    .portal-form-grid-4, .portal-form-grid-2 { grid-template-columns: 1fr; }
    .portal-field-span-2 { grid-column: auto; }
    .portal-availability-detail { grid-template-columns: 1fr; }
    .portal-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .portal-form-actions .btn { width: 100%; }
    .portal-form-footnote { text-align: left; }
}
