:root {
    --primary: #E77003;
    --primary-hover: #c45e02;
    --bg-dark: #121E24;
    /* Deep tone matching original split background */
    --card-bg: transparent;
    --border: rgba(255, 255, 255, 0.1);
    /* Original clean, subtle border */
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;
    --font-family: 'Inter', sans-serif;
    /* --heading-font: 'Outfit', sans-serif; */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family) !important;
}


body {

    background: url('../img/login-bg.webp') no-repeat right center fixed;
    background-size: contain;
    /* Matches original layout split */
    background-color: var(--bg-dark);
    font-family: var(--font-family);
    color: var(--text-main);
    display: flex;
    align-items: center;
    /* Center vertically */
    justify-content: flex-start;
    /* Align left but controlled by container margins */
    min-height: 100vh;
    overflow-x: hidden;
    width: 100vw;
    background-size: cover;
    background-repeat: no-repeat;
}

body::before {
    display: none;
    /* No heavy glassmorphism blur overlays */
}

.login-container {
    width: 100%;
    max-width: 450px;
    /* Restored to original layout width */
    padding: 20px;
    margin-left: 15%;
    /* Reduced from 20% to remove that extra black area on the left */
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.header {
    text-align: left;
    margin-bottom: 30px;
}

.login-logo {
    /* Restored to original smaller size */
    height: 46px;
    margin-bottom: 20px;
    filter: none;
    display: block;
}

.page-title {
    font-family: var(--font-family);
    font-size: 20px;
    /* Restored original text size */
    font-weight: 600;
    color: var(--text-main);
    margin-top: 8px;
    margin-bottom: 0;
    text-align: left;
}

/* Form Styles */
.kcFormGroupClass,
.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #D5D6D7;
    text-align: left;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    height: 42px;
    border: 1px solid #64707D;
    background: #30353C;
    /* Restored original background styling */
    border-radius: 4px;
    /* Restored original border-radius curves */
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    font-weight: 500 !important;
}

.pf-c-form-control:focus {
    box-shadow: none;
    border: 1px solid #E77003;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="text"]:hover,
input[type="password"]:hover {
    outline: none;
    /* background: rgba(255, 255, 255, 0.07); */
    border-color: var(--primary);
    /* Tight orange active border edge */
}

.login-footer {
    display: flex;
    align-items: center;
}

.login-footer a {
    font-weight: 700;
    font-size: 14px;
    line-height: 22px;
    color: #FFFFFF;
    margin-right: 16px;
    text-decoration: none;
    transition: 0.2s;
}

.login-footer span {
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #FFFFFF;
    display: block;
    margin-right: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.checkbox input {
    margin-right: 8px;
    accent-color: var(--primary);
}

#kc-form-options {
    margin-bottom: 25px;
}

#kc-form-options a,
.login-card a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

#kc-form-options a:hover,
.login-card a:hover {
    color: var(--primary);
}

/* Primary Action Button */
#kc-login,
input[type="submit"] {
    width: 100%;
    height: 50px;
    font-size: 18px;
    font-weight: 700;
    background: var(--primary);
    /* Crisp orange action background fill */
    border: none;
    border-radius: 4px;
    color: #1e272e;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: none;
    margin-bottom: 2px;
}

#kc-login:hover,
input[type="submit"]:hover {
    background-color: var(--primary-hover);
}

/* Social Providers Configuration */
#kc-social-providers hr {
    display: none;
    /* Form line below submit removed entirely */
}

#kc-social-providers h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    text-align: left;
}

.login-footer {
    text-align: left;
    margin-top: 30px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsiveness Adaptability Rules */
@media (max-width: 992px) {
    .login-container {
        margin-left: 5%;
    }
}

@media (max-width: 768px) {
    body {
        background: var(--bg-dark);
        justify-content: center;
    }

    .login-container {
        margin-left: 0;
        max-width: 400px;
    }
}

/* Required field star */
.kc-required {
    color: #fafafa;
    margin-left: 6px;
    font-weight: 600;
}

.acc-act-link {
    display: flex;
    align-items: center;
    margin: 10px 0px 20px 0px;
}

.acc-act-link a {
    font-weight: 700;
    font-size: 16px;
    line-height: 26px;
    text-decoration: none;
    color: #FFFFFF;
    transition: 0.2s;
}

.acc-act-link img {
    margin-right: .5rem !important;
}


/* Container for the error text */
#input-error,
.error-message-container {
    color: #FF7C73;
    /* Modern Tailwind-style destructive red */
    font-size: 14px;
    font-weight: 400;
    margin-top: 8px;
    text-align: left;
    display: block;
}

/* Style for the migration reset credentials link underneath the error */
.error-reset-link {
    margin-top: 6px;
    text-align: left;
}

.error-reset-link a {
    color: var(--primary) !important;
    /* Highlights your orange brand accent color */
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.error-reset-link a:hover {
    text-decoration: underline !important;
    color: var(--primary-hover) !important;
}

/* Red border wrapper when an input is invalid */
input[aria-invalid="true"] {
    border-color: #EF4444 !important;
}

.error-sec {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #2B343B;
    border: 1px solid #FF7C73;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 10px 21px 15px 18px;
}

.error-icon {
    width: 25px;
    height: 25px;
    margin-top: 7px;
    flex-shrink: 0;
}

.error-content {
    flex: 1;
}

.error-msg {
    color: #FF7C73;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.error-reset-link {
    margin-top: 8px;
}

.error-sec a {
    font-weight: 400;
}

.error-reset-link a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.error-reset-link a:hover {
    text-decoration: underline;
}


/* Success Alert */
.alert-success,
.pf-v5-c-alert.pf-m-success {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    background: #2B343B !important;
    border: 1px solid #0CE58A;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;

    color: #0CE58A;
}

/* Left icon */
.alert-success::before,
.pf-v5-c-alert.pf-m-success::before {
    content: "";
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;

    background: url("../img/check-circle-green.svg") no-repeat center;
    background-size: 20px 20px;
}

/* Text */
.alert-success .kc-feedback-text,
.pf-v5-c-alert.pf-m-success .pf-v5-c-alert__title,
.pf-v5-c-alert.pf-m-success {
    color: #0CE58A !important;
    font-size: 14px;
    line-height: 1.5;
}


/* Info/Success Alert */
.alert-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    background: #2B343B;
    border: 1px solid #4EA8DE;
    border-radius: 8px;

    padding: 18px;
    margin-bottom: 20px;

    color: #D6F0FF;
    font-size: 14px;
    line-height: 1.5;
}

/* Info icon */
.alert-info::before {
    content: "";
    width: 20px;
    height: 20px;
    flex-shrink: 0;

    background: url("../img/info-circle.svg") no-repeat center;
    background-size: contain;
}

/* Paragraph */
.alert-info p,
.alert-info span {
    margin: 0;
    color: inherit;
}

/* Links inside the alert */
.alert-info a {
    color: var(--primary) !important;
    font-weight: 600;
    text-decoration: none;
}

.alert-info a:hover {
    text-decoration: underline;
}

.alert.alert-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    background: #2B343B;
    border: 1px solid #4EA8DE;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;

    color: #D6F0FF;
}

.login-card .alert.alert-warning {
    margin-bottom: 10px;
    font-size: 14px;
}

p.instruction {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.2;
}