:root,
html,
html.pf-v5-theme-dark {
    color-scheme: light;
    --pf-v5-global--BackgroundColor--100: #ffffff;
    --pf-v5-global--BackgroundColor--150: #f7fbff;
    --pf-v5-global--BackgroundColor--200: #eef7ff;
    --pf-v5-global--BackgroundColor--300: #dbeefe;
    --pf-v5-global--BackgroundColor--light-100: #ffffff;
    --pf-v5-global--Color--100: #0f172a;
    --pf-v5-global--Color--200: #334155;
    --pf-v5-global--primary-color--100: #0284c7;
    --pf-v5-global--primary-color--200: #0369a1;
    --pf-v5-global--active-color--100: #0ea5e9;
    --pf-v5-global--link--Color: #0369a1;
    --pf-v5-global--link--Color--hover: #075985;
    --pf-v5-global--BorderColor--100: #d7eafe;
    --pf-v5-global--BorderColor--200: #bfdbfe;
}

@keyframes chiridev-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes chiridev-drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(18px, -12px, 0) scale(1.06); }
}

@keyframes chiridev-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

html,
body,
#shell-page,
.page,
#content,
.area-ct-content {
    background: linear-gradient(180deg, #f8fcff 0%, #eff7ff 100%) !important;
    color: #0f172a !important;
}

body.login-pf {
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 23, 42, 0.16), transparent 34%),
        radial-gradient(circle at top right, rgba(30, 41, 59, 0.18), transparent 30%),
        linear-gradient(180deg, #f3f7fb 0%, #dbe7f3 100%);
    background-size: cover;
    background-color: #e5edf5;
}

body.login-pf::before,
body.login-pf::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.55;
    pointer-events: none;
    animation: chiridev-drift 18s ease-in-out infinite alternate;
}

body.login-pf::before {
    inline-size: 240px;
    block-size: 240px;
    inset: 8vh auto auto 7vw;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), transparent 70%);
}

body.login-pf::after {
    inline-size: 280px;
    block-size: 280px;
    inset: auto 8vw 10vh auto;
    background: radial-gradient(circle, rgba(51, 65, 85, 0.20), transparent 70%);
    animation-direction: alternate-reverse;
}

body.login-pf #main {
    position: relative;
    max-inline-size: 520px;
    margin: 6vh auto;
    padding: 32px 30px 28px;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.40);
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(244,248,252,0.96) 100%);
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
    animation: chiridev-rise 0.45s ease;
}

body.login-pf #main::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(15,23,42,0.34), rgba(148,163,184,0.22));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

body.login-pf #badge {
    inline-size: 96px;
    block-size: 96px;
    margin: 0 auto 20px;
    background: transparent url("logo.png") center/contain no-repeat;
    filter: drop-shadow(0 18px 34px rgba(15, 23, 42, 0.18));
    animation: chiridev-float 6s ease-in-out infinite;
}

body.login-pf #badge::before {
    content: none;
}

body.login-pf #brand {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #0b1626;
    margin-bottom: 16px;
    text-transform: none;
}

body.login-pf #brand::before {
    content: "ChiriDev Server Panel";
}

body.login-pf #brand::after {
    content: "Panel corporativo, claro y preciso para operar tu infraestructura.";
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.45;
    color: #526273;
}

#index-brand {
    font-weight: 800;
    letter-spacing: -0.01em;
}

#index-brand::before {
    content: "ChiriDev Server Panel";
    color: #f8fbff !important;
}

#index-brand::after {
    content: "server control interface";
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.78);
}

.login-note,
.pf-v5-c-helper-text,
label,
.control-label,
#login-details,
#login-fatal,
#login-info-message,
#login-error-message,
#banner-message {
    color: #334155 !important;
}

.form-control,
#login-user-input,
#login-password-input,
#conversation-input,
#server-field {
    min-block-size: 46px;
    background: #ffffff !important;
    border: 1px solid #cfe7ff !important;
    color: #0f172a !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.form-control:hover,
#login-user-input:hover,
#login-password-input:hover,
#conversation-input:hover,
#server-field:hover {
    border-color: #93c5fd !important;
}

.form-control:focus,
#login-user-input:focus,
#login-password-input:focus,
#conversation-input:focus,
#server-field:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18) !important;
    transform: translateY(-1px);
}

.login-button,
.pf-v5-c-button.pf-m-primary {
    background: linear-gradient(135deg, #1f3b5c 0%, #2c5d8a 100%) !important;
    border: 0 !important;
    color: #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16) !important;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-button:hover,
.pf-v5-c-button.pf-m-primary:hover {
    background: linear-gradient(135deg, #182f48 0%, #244d73 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18) !important;
}

/* Shell styling handled by chiridev-shell.js for layout safety */

/* ChiriDev shell explicit v7 */
html#shell-page,
html#shell-page body {
    background: linear-gradient(180deg, #eef3f8 0%, #e4ebf2 100%) !important;
}

html#shell-page #chiridev-shell-ribbon {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 9999;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0d2236 0%, #21466a 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 12px 26px rgba(8, 24, 39, 0.18);
    border: 1px solid rgba(255,255,255,0.12);
}

html#shell-page #topnav,
html#shell-page .header,
html#shell-page .pf-v5-c-masthead,
html#shell-page .pf-v5-c-masthead__main,
html#shell-page .pf-v5-c-masthead__content {
    background: linear-gradient(90deg, #081827 0%, #0f2840 55%, #1e466d 100%) !important;
    color: #f8fbff !important;
    box-shadow: 0 16px 36px rgba(8, 24, 39, 0.20) !important;
}

html#shell-page #hosts-sel,
html#shell-page .navbar,
html#shell-page .sidebar,
html#shell-page #nav-system,
html#shell-page #nav-hosts,
html#shell-page .pf-v5-c-page__sidebar,
html#shell-page .pf-v5-c-page__sidebar-body {
    background: linear-gradient(180deg, #eef3f8 0%, #e4ebf2 100%) !important;
    border-right: 1px solid #ccd8e4 !important;
}

html#shell-page .pf-v5-c-nav__link,
html#shell-page .pf-v5-c-nav__button,
html#shell-page .pf-v5-c-nav__item,
html#shell-page .pf-v5-c-nav__link span {
    color: #24384b !important;
}

html#shell-page .pf-v5-c-nav__link {
    margin: 4px 8px !important;
    border-radius: 12px !important;
    transition: background-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

html#shell-page .pf-v5-c-nav__link:hover {
    background: rgba(33, 70, 106, 0.09) !important;
    color: #16344f !important;
    transform: translateX(2px);
}

html#shell-page .pf-v5-c-nav__link.pf-m-current,
html#shell-page .pf-v5-c-nav__link[aria-current="page"] {
    background: linear-gradient(135deg, #dce8f3 0%, #edf3f8 100%) !important;
    color: #16344f !important;
    box-shadow: inset 0 0 0 1px rgba(33, 70, 106, 0.18), 0 6px 14px rgba(33, 70, 106, 0.08);
}

html#shell-page .pf-v5-c-card,
html#shell-page .pf-v5-c-page__main-section,
html#shell-page .pf-v5-c-panel,
html#shell-page .pf-v5-c-toolbar,
html#shell-page .pf-v5-c-modal-box,
html#shell-page .pf-v5-c-drawer__panel,
html#shell-page .pf-v5-c-description-list,
html#shell-page .pf-v5-c-data-list,
html#shell-page .pf-v5-c-alert,
html#shell-page .pf-v5-c-empty-state {
    position: relative;
    background: rgba(255,255,255,0.96) !important;
    border: 1px solid #d7e1ea !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 32px rgba(8, 24, 39, 0.07) !important;
}

html#shell-page .pf-v5-c-card::before,
html#shell-page .pf-v5-c-page__main-section::before,
html#shell-page .pf-v5-c-panel::before,
html#shell-page .pf-v5-c-toolbar::before,
html#shell-page .pf-v5-c-modal-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, #21466a 0%, #3b82b8 100%);
}
