:root {
    --ih-primary: #2f7a6f;
    --ih-primary-hover: #27695f;
    --ih-primary-soft: #eef6f3;
    --ih-border: #d8e3de;
    --ih-border-strong: rgba(35, 71, 62, 0.12);
    --ih-bg: #f4f7f5;
    --ih-panel: #ffffff;
    --ih-text: #1d2b26;
    --ih-muted: #5d746c;
    --ih-danger-bg: #fff4f4;
    --ih-danger-border: rgba(166, 56, 56, 0.2);
    --ih-danger-text: #8b3a3a;
    --ih-success-bg: #eef8f2;
    --ih-success-border: rgba(54, 134, 102, 0.18);
    --ih-success-text: #256552;
    --ih-shadow: 0 24px 60px rgba(24, 52, 45, 0.12);
    --ih-shadow-soft: 0 14px 34px rgba(47, 122, 111, 0.18);
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Noto Sans SC", Arial, sans-serif;
    color: var(--ih-text);
    background:
        radial-gradient(circle at top left, rgba(110, 160, 142, 0.22), transparent 32%),
        radial-gradient(circle at bottom right, rgba(47, 122, 111, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbf9 0%, var(--ih-bg) 100%);
}

#kc-header {
    display: none;
}

#kc-header-wrapper {
    color: var(--ih-text);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0;
}

.pf-v5-c-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.pf-v5-c-login__container {
    width: 100%;
    max-width: 560px;
}

.pf-v5-c-login__main {
    border-radius: 32px;
    background: transparent;
    box-shadow: none;
}

.pf-v5-c-login__main-header {
    padding: 0;
}

#kc-page-title {
    display: none;
}

.pf-v5-c-login__main-body {
    padding: 0;
}

.ih-login-shell {
    position: relative;
    overflow: hidden;
    background: var(--ih-panel);
    border: 1px solid var(--ih-border-strong);
    border-radius: 32px;
    padding: 30px 34px 30px;
    box-shadow: var(--ih-shadow);
}

.ih-login-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 90px;
    background: linear-gradient(180deg,
        rgba(31, 111, 99, 0.1) 0%,
        rgba(110, 160, 142, 0.06) 58%,
        rgba(110, 160, 142, 0) 100%);
    pointer-events: none;
}

.ih-brand,
.ih-shell-toolbar,
.pf-v5-c-alert,
.ih-field,
.ih-remember,
.ih-extra-links,
.ih-social {
    position: relative;
    z-index: 1;
}

.ih-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.ih-shell-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 22px;
}

.ih-locale-switcher {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.ih-locale-label {
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ih-muted);
}

.ih-locale-select-wrap {
    position: relative;
    min-width: 156px;
}

.ih-locale-select {
    width: 100%;
    min-height: 42px;
    padding: 0 42px 0 14px;
    border: 1px solid rgba(47, 122, 111, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--ih-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 10px 24px rgba(24, 52, 45, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ih-locale-select:focus {
    outline: none;
    border-color: var(--ih-primary);
    box-shadow: 0 0 0 4px rgba(47, 122, 111, 0.12);
    background: #ffffff;
}

.ih-locale-caret {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 12px;
    height: 8px;
    color: #687975;
    transform: translateY(-50%);
    pointer-events: none;
}

.ih-locale-caret svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ih-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f6f63, #6ea08e);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 14px 30px rgba(47, 122, 111, 0.18);
}

.ih-brand h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
    color: var(--ih-text);
    font-weight: 700;
}

.ih-brand p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ih-muted);
}

.ih-field {
    margin-bottom: 16px;
}

.ih-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #536962;
}

.ih-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--ih-border);
    border-radius: 14px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--ih-text);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ih-input::placeholder {
    color: #8ba098;
}

.ih-input:focus {
    outline: none;
    border-color: var(--ih-primary);
    box-shadow: 0 0 0 4px rgba(47, 122, 111, 0.12);
}

.ih-attempted-user-field {
    margin-bottom: 18px;
}

.ih-attempted-user-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ih-input-readonly {
    flex: 1 1 auto;
    min-width: 0;
    border-color: rgba(47, 122, 111, 0.16);
    background: linear-gradient(180deg, rgba(248, 251, 249, 0.98), rgba(240, 246, 243, 0.98));
    color: var(--ih-text);
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(24, 52, 45, 0.06);
    cursor: default;
}

.ih-input-readonly:focus {
    box-shadow: 0 10px 24px rgba(24, 52, 45, 0.06);
}

.ih-reset-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(47, 122, 111, 0.16);
    border-radius: 14px;
    background: #ffffff;
    color: var(--ih-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(24, 52, 45, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.ih-reset-login:hover {
    border-color: rgba(47, 122, 111, 0.28);
    background: var(--ih-primary-soft);
    color: var(--ih-primary-hover);
    box-shadow: 0 12px 26px rgba(24, 52, 45, 0.08);
}

.ih-reset-login:focus-visible {
    outline: none;
    border-color: var(--ih-primary);
    box-shadow: 0 0 0 4px rgba(47, 122, 111, 0.12);
}

.ih-reset-login-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ih-reset-login-icon svg {
    width: 100%;
    height: 100%;
}

.ih-reset-login-text {
    white-space: nowrap;
}

.ih-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
    color: var(--ih-muted);
    font-size: 14px;
}

.ih-remember input {
    accent-color: var(--ih-primary);
}

.ih-submit {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    background: var(--ih-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow: var(--ih-shadow-soft);
}

.ih-submit:hover {
    background: var(--ih-primary-hover);
    transform: translateY(-1px);
}

.ih-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ih-extra-links {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.ih-extra-links a {
    color: var(--ih-primary);
    text-decoration: none;
    font-weight: 600;
}

.ih-extra-links a:hover {
    color: #245f56;
}

.ih-social {
    margin-top: 22px;
    border-top: 1px solid rgba(35, 71, 62, 0.08);
    padding-top: 16px;
}

.ih-social-title {
    font-size: 12px;
    color: var(--ih-muted);
    margin-bottom: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ih-social-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ih-social-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border: 1px solid #d9dce1;
    border-radius: 999px;
    padding: 0 16px;
    font-size: 14px;
    color: #1f1f1f;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ih-social-btn:hover {
    border-color: #c7cbd1;
    background: #fafafa;
    box-shadow: 0 2px 8px rgba(31, 31, 31, 0.06);
}

.ih-social-btn:focus-visible {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.ih-social-btn__icon {
    position: absolute;
    left: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #eceef2;
    background: #ffffff;
    color: #5f6368;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ih-social-btn__text {
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #1f1f1f;
}

.ih-social-btn--google .ih-social-btn__icon {
    color: #4285f4;
}

.ih-social-btn--google .ih-social-btn__icon::before {
    content: "G";
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 700;
    background: conic-gradient(
        from -45deg,
        #4285f4 0deg 90deg,
        #34a853 90deg 180deg,
        #fbbc05 180deg 270deg,
        #ea4335 270deg 360deg
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ih-social-btn--google .ih-social-btn__icon {
    font-size: 0;
}

.pf-v5-c-alert {
    margin-bottom: 18px;
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid transparent;
    box-shadow: none;
}

.pf-v5-c-alert.pf-m-danger {
    background: var(--ih-danger-bg);
    border-color: var(--ih-danger-border);
    color: var(--ih-danger-text);
}

.pf-v5-c-alert.pf-m-success,
.pf-v5-c-alert.pf-m-info {
    background: var(--ih-success-bg);
    border-color: var(--ih-success-border);
    color: var(--ih-success-text);
}

.pf-v5-c-alert.pf-m-warning {
    background: #fff8ec;
    border-color: rgba(198, 145, 61, 0.22);
    color: #8c6325;
}

.pf-v5-c-alert__title,
.kc-feedback-text {
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .pf-v5-c-login {
        padding: 18px 12px;
    }

    .ih-login-shell {
        padding: 24px 18px 22px;
        border-radius: 26px;
    }

    .ih-login-shell::before {
        height: 72px;
    }

    .ih-brand {
        align-items: flex-start;
        margin-bottom: 22px;
    }

    .ih-shell-toolbar {
        justify-content: stretch;
        margin-bottom: 20px;
    }

    .ih-locale-switcher {
        width: 100%;
        align-items: stretch;
    }

    .ih-locale-select-wrap {
        width: 100%;
    }

    .ih-brand h1 {
        font-size: 26px;
    }

    .ih-extra-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .ih-attempted-user-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ih-reset-login {
        width: 100%;
    }
}
