* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f4f7fb;
    color: #182230;
}

.auth-body {
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e5eaf0;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 18px 55px rgba(18, 38, 63, 0.08);
}

.branch-card {
    max-width: 620px;
}

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

.auth-logo {
    min-width: 52px;
    height: 52px;
    padding: 0 10px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #172b4d;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.auth-brand h1 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    line-height: 1.2;
}

.auth-brand p {
    margin: 0;
    color: #687386;
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field label {
    font-size: 0.86rem;
    font-weight: 650;
}

.auth-input {
    width: 100%;
    height: 44px;
    border: 1px solid #ccd5df;
    border-radius: 10px;
    padding: 0 12px;
    outline: none;
    font: inherit;
    background: #ffffff;
}

.auth-input:focus {
    border-color: #4c6fff;
    box-shadow: 0 0 0 3px rgba(76, 111, 255, 0.12);
}

.password-wrap {
    position: relative;
}

.password-wrap .auth-input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #4c6fff;
    font-weight: 650;
    cursor: pointer;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: #566274;
}

.auth-check {
    width: 16px;
    height: 16px;
}

.auth-submit {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #172b4d;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit:hover {
    filter: brightness(1.08);
}

.auth-alert {
    margin-bottom: 16px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #fff4e5;
    border: 1px solid #ffd7a3;
    color: #7a4700;
    font-size: 0.86rem;
}

.auth-alert.error {
    background: #fff0f0;
    border-color: #ffc5c5;
    color: #9b1c1c;
}

.auth-error {
    color: #b42318;
    font-size: 0.8rem;
}

.auth-footnote {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #edf0f4;
    color: #778293;
    font-size: 0.8rem;
    line-height: 1.5;
}

.branch-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.branch-option {
    display: block;
    cursor: pointer;
}

.branch-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.branch-content {
    display: grid;
    gap: 3px;
    padding: 14px 15px;
    border: 1px solid #dce2e9;
    border-radius: 12px;
    background: #ffffff;
    transition: 0.15s ease;
}

.branch-content strong {
    font-size: 0.95rem;
}

.branch-content small {
    color: #758092;
}

.branch-option input:checked + .branch-content {
    border-color: #4c6fff;
    box-shadow: 0 0 0 3px rgba(76, 111, 255, 0.10);
    background: #f8faff;
}

.auth-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    color: #5b6880;
    text-decoration: none;
    font-size: 0.84rem;
}

.auth-link:hover {
    color: #172b4d;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 22px 18px;
        border-radius: 14px;
    }

    .auth-brand {
        align-items: flex-start;
    }
}


.auth-company-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border: 1px solid #e2e7ee;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.auth-company-context {
    display: grid;
    gap: 3px;
    margin: -4px 0 20px;
    padding: 12px 14px;
    border: 1px solid #dfe6ef;
    border-radius: 11px;
    background: #f8faff;
}

.auth-company-context span {
    color: #788497;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.auth-company-context strong {
    font-size: 0.92rem;
}

.auth-company-context small {
    color: #6e7a8c;
    line-height: 1.45;
}

.auth-submit-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-submit-link:hover {
    color: #ffffff;
}


/* ==========================================================
   DEVELOPER BRANDING - ALMARX TECH
   ========================================================== */

.developer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -8px -8px 24px;
    padding: 14px 14px 16px;
    border-radius: 14px;
    background: #06172f;
    overflow: hidden;
}

.developer-brand-image {
    display: block;
    width: min(100%, 360px);
    height: auto;
    object-fit: contain;
}

.auth-generic-heading {
    flex: 1;
}

.auth-generic-heading h1,
.auth-generic-heading p {
    text-align: center;
}

@media (max-width: 520px) {
    .developer-brand {
        margin: -4px -2px 20px;
        padding: 11px 10px 13px;
        border-radius: 11px;
    }

    .developer-brand-image {
        width: 100%;
        max-width: 330px;
    }
}
