.login-container {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.brand-section {
    text-align: center;
    margin-bottom: 35px;
}

.brand-section__logo {
    width: 84px;
    height: 84px;
    object-fit: cover;
    display: block;
    margin: 0 auto 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.18);
    padding: 10px;
}

.brand-section__icon {
    background: linear-gradient(135deg, #4158D0 0%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.brand-section h2 {
    font-weight: 800;
    color: #1a1a1a;
    margin: 10px 0 5px 0;
    letter-spacing: -1px;
    font-size: 1.75rem;
}

.brand-section p {
    color: #71717a;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
}

.login-card .form-label,
.login-card label.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #3f3f46;
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    height: 54px;
    border-radius: 14px;
    border: 1.5px solid #e4e4e7;
    background-color: #f8fafc;
    padding: 0 18px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #18181b;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.login-credential-field {
    position: relative;
}

.login-credential-field .form-control {
    padding-right: 86px;
}

.login-field-affix {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.remember-username-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.remember-username-inline input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #6366f1;
    cursor: pointer;
}

.remember-username-inline input:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.35);
    outline-offset: 2px;
    border-radius: 4px;
}

.remember-username-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #64748b;
    padding: 0;
    cursor: help;
}

.remember-username-tooltip:hover,
.remember-username-tooltip:focus-visible {
    color: #6366f1;
    outline: none;
}

.remember-username-tooltip::before,
.remember-username-tooltip::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.remember-username-tooltip::before {
    content: attr(data-tooltip);
    right: 0;
    bottom: calc(100% + 10px);
    width: min(220px, calc(100vw - 72px));
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(24, 24, 27, 0.96);
    color: #f8fafc;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22);
    transform: translateY(6px);
    z-index: 5;
}

.remember-username-tooltip::after {
    content: '';
    right: 6px;
    bottom: calc(100% + 4px);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(24, 24, 27, 0.96) transparent transparent transparent;
    transform: translateY(6px);
    z-index: 5;
}

.remember-username-tooltip:hover::before,
.remember-username-tooltip:hover::after,
.remember-username-tooltip:focus-visible::before,
.remember-username-tooltip:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.btn-login {
    height: 54px;
    background: #18181b;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-login:active {
    transform: scale(0.98);
    background: #000000;
}

.error-msg {
    background-color: #fef2f2;
    color: #dc2626;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #fee2e2;
}

.footer-text {
    text-align: center;
    margin-top: 30px;
    color: #a1a1aa;
    font-size: 0.75rem;
    font-weight: 500;
}

.login-card select.form-control {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
