/* Identidad visual exclusiva de la pantalla de acceso */
body:has(.login-shell) {
    --login-ink: #262421;
    --login-muted: #8a8580;
    --login-rose: #a65f69;
    --login-rose-dark: #78444e;
    --login-line: #e9e3df;
    min-height: 100vh;
    background: #f8f6f3;
    color: var(--login-ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .92fr) 1.08fr; }
.login-showcase { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 48px clamp(38px, 6vw, 90px) 36px; color: #fffaf6; background: radial-gradient(ellipse at 75% 20%, rgba(211,163,133,.26), transparent 32%), linear-gradient(145deg, #594147 0%, #392e31 54%, #262326 100%); }
.showcase-topline, .mobile-brand { display: flex; align-items: center; gap: 13px; font-size: 13px; letter-spacing: 3px; font-weight: 500; }
.showcase-topline b, .mobile-brand b { font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(241,207,177,.65); border-radius: 50%; color: #e8c5a6; font-size: 16px; }
.showcase-copy { position: relative; z-index: 2; max-width: 520px; padding: 35px 0 65px; }
.eyebrow { display: block; color: #ae7776; font-size: 10px; font-weight: 800; letter-spacing: 2.1px; }
.showcase-copy .eyebrow { color: #e0b9a3; }
.showcase-copy h1 { margin: 24px 0 22px; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: clamp(43px, 5.2vw, 69px); line-height: 1.07; letter-spacing: -2px; }
.showcase-copy h1 em { color: #e7c2a7; font-weight: 400; }
.showcase-copy p { max-width: 380px; color: rgba(255,250,246,.72); font-size: 14px; line-height: 1.9; }
.showcase-footer { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; color: rgba(255,250,246,.55); font-size: 9px; letter-spacing: 1.8px; }
.footer-line { width: 34px; height: 1px; background: #d5ad96; }
.showcase-orbit { position: absolute; z-index: -1; border: 1px solid rgba(231,194,167,.12); border-radius: 50%; }
.orbit-one { width: 510px; height: 510px; right: -245px; top: 17%; }
.orbit-two { width: 390px; height: 390px; right: -185px; top: 23%; }
.login-panel { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding: 72px 9vw 88px; background: #fbfaf8; }
.login-panel-inner { width: 100%; max-width: 410px; margin: 0 auto; }
.mobile-brand { display: none; margin-bottom: 54px; color: var(--login-ink); }
.login-heading { margin-bottom: 30px; }
.login-heading h2 { margin: 13px 0 8px; font-size: 34px; line-height: 1.2; letter-spacing: -1.2px; font-weight: 700; }
.login-heading p { color: var(--login-muted); font-size: 14px; }
.account-shortcuts { display: block; margin: 0 0 25px; color: #655f5b; font-size: 12px; font-weight: 600; }
.account-list { display: flex; flex-wrap: wrap; gap: 13px 17px; }
.account-choice { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 65px; padding: 0; border: 0; background: transparent; color: #655f5b; font: inherit; cursor: pointer; }
.account-avatar { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid #e6d5cd; border-radius: 50%; background: linear-gradient(145deg, #f4e8e0, #ead6cc); box-shadow: 0 5px 14px rgba(72,47,43,.08); color: var(--login-rose-dark); font-size: 15px; font-weight: 700; transition: transform .18s, box-shadow .18s, border-color .18s; }
.account-choice:hover .account-avatar, .account-choice.selected .account-avatar { transform: translateY(-2px); border-color: #a65f69; box-shadow: 0 0 0 3px rgba(166,95,105,.13), 0 8px 18px rgba(72,47,43,.12); }
.account-name { max-width: 78px; overflow: hidden; color: #716a65; font-size: 10px; font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.maintenance-choice .account-avatar { border-color: #d5b386; background: linear-gradient(145deg, #f4eadb, #e8d6bd); color: #8a6231; }
.add-account .account-avatar { border-style: dashed; background: #fff; box-shadow: none; color: #9c7776; font-size: 14px; }
.add-account:hover .account-avatar { border-style: solid; }
.login-form { display: grid; gap: 20px; }
.field-group label { display: block; margin-bottom: 9px; color: #514c49; font-size: 12px; font-weight: 700; }
.field-control { height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 15px; border: 1px solid var(--login-line); border-radius: 10px; background: #fff; color: #a39a94; transition: border-color .2s, box-shadow .2s; }
.field-control:focus-within { border-color: #b77b7d; box-shadow: 0 0 0 3px rgba(166,95,105,.1); }
.field-control i { width: 16px; text-align: center; font-size: 13px; }
.field-control input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--login-ink); font: inherit; font-size: 13px; }
.field-control input::placeholder { color: #b3ada8; }
.login-submit { display: flex; align-items: center; justify-content: space-between; height: 53px; margin-top: 4px; padding: 0 19px; border: 0; border-radius: 10px; background: linear-gradient(105deg, #9d5b65, #79464f); box-shadow: 0 8px 18px rgba(121,70,79,.18); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 11px 22px rgba(121,70,79,.25); }
.login-submit i { font-size: 12px; }
.login-footnote { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 27px; color: #9b948f; font-size: 10px; }
.login-footnote i { color: #a66a70; }
.panel-bottom { position: absolute; right: 9vw; bottom: 30px; left: 9vw; display: flex; justify-content: space-between; color: #aaa39e; font-size: 9px; letter-spacing: .7px; }
.panel-bottom i { color: #b6777a; margin-left: 4px; }

/* Configuración inicial del administrador */
.setup-page { min-height: 100vh; background: #fbfaf8; }
.setup-shell { grid-template-columns: minmax(360px, .82fr) 1.18fr; }
.setup-showcase { background: radial-gradient(ellipse at 70% 22%, rgba(211,163,133,.24), transparent 34%), linear-gradient(145deg, #594147 0%, #392e31 54%, #262326 100%); }
.setup-panel { padding-top: 48px; padding-bottom: 76px; }
.setup-inner { max-width: 470px; }
.setup-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 27px; }
.setup-avatar { display: grid; place-items: center; flex: 0 0 62px; width: 62px; height: 62px; border: 1px solid #e6d5cd; border-radius: 50%; background: linear-gradient(145deg, #f4e8e0, #ead6cc); box-shadow: 0 5px 14px rgba(72,47,43,.08); color: var(--login-rose-dark); font-size: 19px; }
.setup-heading h2 { margin: 7px 0 5px; font-size: 29px; line-height: 1.15; letter-spacing: -1px; }
.setup-heading p { color: var(--login-muted); font-size: 13px; }
.setup-form { gap: 15px; }
.setup-form .field-control { height: 49px; }
.optional-label { margin-left: 5px; color: #a49b96; font-size: 9px; letter-spacing: .8px; }
.setup-form .login-submit { margin-top: 5px; }
.setup-panel .login-footnote { justify-content: flex-start; margin-top: 21px; }

@media (max-width: 800px) {
    .login-shell { display: block; min-height: 100vh; }
    .login-showcase { display: none; }
    .login-panel { min-height: 100vh; padding: 42px 25px 80px; }
    .mobile-brand { display: flex; margin-bottom: 58px; }
    .panel-bottom { right: 25px; left: 25px; }
    .setup-shell { display: block; }
    .setup-showcase { display: none; }
    .setup-panel { padding-top: 34px; }
    .setup-inner { max-width: 470px; }
    .setup-panel .mobile-brand { margin-bottom: 36px; }
}
@media (max-width: 420px) {
    .login-panel { padding-right: 21px; padding-left: 21px; }
    .mobile-brand { margin-bottom: 45px; }
    .login-heading h2 { font-size: 30px; }
    .panel-bottom { right: 21px; left: 21px; font-size: 8px; }
    .setup-heading { gap: 13px; }
    .setup-avatar { flex-basis: 54px; width: 54px; height: 54px; }
    .setup-heading h2 { font-size: 26px; }
}

/* Selector de perfiles y modales de acceso */
body.profile-page { --profile-primary: #89515d; --profile-primary-deep: #5b3540; min-height: 100vh; overflow-x: hidden; background: #f6f1ed; font-family: 'Plus Jakarta Sans', sans-serif; }
.profile-screen { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; overflow: hidden; color: #fffaf7; background: radial-gradient(ellipse at 50% 38%, rgba(184,128,116,.24), transparent 58%), linear-gradient(145deg, #503b40 0%, #382d31 55%, #292528 100%); }
.profile-screen::before, .profile-screen::after { position: absolute; width: 520px; height: 520px; border: 1px solid rgba(221,255,242,.055); border-radius: 50%; content: ''; pointer-events: none; }
.profile-screen::before { top: -300px; left: -220px; }.profile-screen::after { right: -300px; bottom: -340px; }
.profile-brand { position: absolute; top: clamp(34px, 10vh, 100px); display: flex; align-items: center; gap: 12px; }
.profile-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(234,215,195,.7); border-radius: 50%; color: #e8c5a6; font-size: 16px; }
.profile-brand-name { font-size: 14px; letter-spacing: 3px; }.profile-brand-name b { font-weight: 800; }
.profile-content { position: relative; z-index: 1; width: min(100% - 36px, 1060px); margin: 50px auto 30px; text-align: center; }
.profile-kicker { color: rgba(246,224,211,.73); font-size: 9px; font-weight: 700; letter-spacing: 2.2px; }
.profile-content h1 { margin: 12px 0 7px; color: #fff; font-family: 'Oswald', 'Arial Narrow', sans-serif; font-size: clamp(30px, 4vw, 43px); font-weight: 600; letter-spacing: .25px; text-transform: uppercase; }
.profile-subtitle { color: rgba(255,250,247,.75); font-size: 13px; }
.profile-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 34px; margin: 40px auto 0; }
.profile-choice { display: flex; flex-direction: column; align-items: center; width: 112px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; text-align: center; }
.profile-avatar { position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin-bottom: 11px; border: 3px solid rgba(255,255,255,.94); border-radius: 50%; background: linear-gradient(145deg, #f2e7df, #d7bcae); box-shadow: 0 0 0 2px rgba(239,210,191,.23), 0 10px 24px rgba(22,12,15,.23); color: #69434b; font-size: 23px; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.profile-choice:hover .profile-avatar, .profile-choice:focus-visible .profile-avatar { transform: translateY(-3px); box-shadow: 0 0 0 4px rgba(239,210,191,.28), 0 15px 28px rgba(22,12,15,.27); }
.profile-name { display: block; max-width: 112px; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-role { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; color: rgba(255,240,230,.72); font-size: 10px; }
.profile-role i { width: 12px; color: #e3c2a5; font-size: 10px; text-align: center; }
.profile-add .profile-avatar { border: 1px dashed rgba(246,220,204,.8); background: rgba(255,255,255,.035); box-shadow: none; color: #ecd2bf; font-size: 21px; }
.profile-footer { position: absolute; right: 32px; bottom: 22px; left: 32px; display: flex; justify-content: space-between; color: rgba(255,239,228,.48); font-size: 9px; letter-spacing: 1.3px; }
body.modal-open { overflow: hidden; }
.auth-modal { position: fixed; z-index: 3000; inset: 0; display: grid; place-items: center; padding: 18px; visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility .2s ease; }
.auth-modal.is-open { visibility: visible; opacity: 1; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(37,27,30,.58); backdrop-filter: blur(8px); }
.auth-dialog { position: relative; z-index: 1; width: min(100%, 470px); max-height: min(92vh, 760px); overflow: auto; border: 1px solid rgba(255,255,255,.8); border-radius: 19px; background: #fff; box-shadow: 0 30px 90px rgba(0,25,20,.3); transform: translateY(12px) scale(.985); transition: transform .22s ease; }
.auth-modal.is-open .auth-dialog { transform: translateY(0) scale(1); }
.auth-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px 18px; border-bottom: 1px solid #eee7e2; background: #fbf8f5; }
.auth-kicker { color: #a16c69; font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.auth-dialog-header h2 { margin-top: 4px; color: #3d3032; font-family: 'Oswald', 'Arial Narrow', sans-serif; font-size: 24px; font-weight: 500; text-transform: uppercase; }
.auth-close { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid #eee4dd; border-radius: 10px; background: #fff; color: #81565b; cursor: pointer; }
.auth-close:hover { background: #f6eeea; }
.auth-dialog-body { padding: 23px 26px 27px; }
.selected-profile { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; padding: 12px; border: 1px solid #eaded7; border-radius: 13px; background: #faf6f2; }
.selected-avatar { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border: 2px solid #fff; border-radius: 50%; background: #ead9ce; box-shadow: 0 0 0 1px #ddc7bb; color: #704950; font-size: 14px; font-weight: 800; }
.selected-profile strong, .selected-profile small { display: block; }.selected-profile strong { color: #443638; font-size: 14px; }.selected-profile small { margin-top: 2px; color: #897875; font-size: 10px; }
.auth-form { display: grid; gap: 16px; }.auth-form .field-group label { margin-bottom: 7px; color: #514344; }.auth-form .field-control { height: 48px; border-color: #e8ddd7; border-radius: 10px; background: #fff; }.auth-form .field-control:focus-within { border-color: #a96d76; box-shadow: 0 0 0 3px rgba(137,81,93,.11); }.auth-form .field-control input { color: #302a2c; }
.auth-submit { display: flex; align-items: center; justify-content: space-between; min-height: 47px; margin-top: 2px; padding: 0 17px; border: 0; border-radius: 999px; background: linear-gradient(110deg, #9d5b65, #79464f); box-shadow: 0 7px 17px rgba(121,70,79,.2); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }.auth-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.admin-dialog { width: min(100%, 520px); }.admin-dialog .auth-dialog-body { padding-top: 18px; }.admin-notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 11px 12px; border: 1px solid #eaded7; border-radius: 10px; background: #faf6f2; color: #756460; font-size: 11px; line-height: 1.55; }.admin-notice i { margin-top: 2px; color: #98656b; }
.auth-form .optional-label { color: #928681; }
@media (max-width: 600px) {
    .profile-screen { min-height: calc(100vh - 8px); justify-content: flex-start; padding-top: 116px; }
    .profile-brand { top: 30px; }.profile-content { margin-top: 15px; }.profile-grid { gap: 25px 20px; margin-top: 34px; }.profile-choice { width: 92px; }.profile-avatar { width: 78px; height: 78px; }.profile-name { max-width: 92px; font-size: 11px; }.profile-footer { right: 17px; bottom: 13px; left: 17px; font-size: 8px; }
    .auth-modal { padding: 12px; }.auth-dialog-header { padding: 19px 19px 15px; }.auth-dialog-body { padding: 19px; }.auth-dialog-header h2 { font-size: 21px; }
}
@media (max-width: 360px) { .profile-grid { gap: 23px 10px; }.profile-choice { width: 84px; }.profile-avatar { width: 72px; height: 72px; } }
