/* Compact login layout for Amatiran Mail. */
body.task-login {
    overflow: hidden !important;
    color: #30323d;
    background: #f2f3f6;
}

.task-login #layout {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
}

.task-login #layout-content {
    grid-template-columns: minmax(300px, 0.88fr) minmax(390px, 1.12fr);
    width: min(920px, 100%);
    height: min(500px, calc(100vh - 40px));
    height: min(500px, calc(100dvh - 40px));
    min-height: 0;
    max-height: 500px;
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(42, 44, 57, 0.14);
}

.amatiran-brand-panel {
    padding: 34px 38px 30px;
}

#amatiran-logo {
    width: 154px;
}

.amatiran-brand-copy {
    margin: auto 0;
    padding: 30px 0 26px;
}

.amatiran-eyebrow {
    margin-bottom: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
}

.amatiran-brand-copy h2 {
    max-width: 340px;
    font-size: clamp(1.8rem, 2.7vw, 2.3rem);
    line-height: 1.16;
}

.amatiran-brand-link {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.amatiran-brand-link:hover,
.amatiran-brand-link:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.amatiran-brand-mark {
    right: -48px;
    bottom: -76px;
    width: 270px;
}

.amatiran-login-panel {
    padding: 40px clamp(38px, 5vw, 62px);
}

.amatiran-login-card {
    max-width: 380px;
    margin: 0;
}

.amatiran-login-card h2 {
    color: #2a2c39;
    font-size: clamp(1.75rem, 2.6vw, 2.05rem);
    line-height: 1.18;
}

.amatiran-login-intro {
    margin: 10px 0 24px;
    color: #656a78;
    font-size: 0.9rem;
    line-height: 1.5;
}

.task-login #login-form tr {
    position: relative;
    margin-bottom: 14px;
}

.task-login #login-form td.title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

.task-login #login-form td.input {
    position: relative;
    padding: 0 !important;
}

.task-login #login-form .input-group-prepend {
    display: none !important;
}

.task-login #login-form .form-control {
    height: 50px;
    padding: 0 48px !important;
    color: #20222b !important;
    caret-color: #ef6603;
    font-size: 0.96rem;
    font-weight: 500;
    border: 1px solid #d9dbe2;
    border-radius: 12px;
    background-color: #fff !important;
    background-repeat: no-repeat !important;
    background-position: 16px center !important;
    background-size: 18px 18px !important;
    -webkit-text-fill-color: #20222b !important;
    opacity: 1;
}

.task-login #rcmloginuser {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666b78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E") !important;
}

.task-login #rcmloginpwd {
    padding-right: 52px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666b78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") !important;
}

.task-login #login-form .form-control::placeholder {
    color: #858997;
    font-weight: 400;
    -webkit-text-fill-color: #858997;
    opacity: 1;
}

.task-login #login-form .form-control:hover {
    border-color: #babec9;
}

.task-login #login-form .form-control:focus {
    color: #161821 !important;
    border-color: #1ca48f;
    background-color: #fff !important;
    -webkit-text-fill-color: #161821 !important;
    box-shadow: 0 0 0 4px rgba(28, 164, 143, 0.12);
}

.task-login #login-form .form-control:-webkit-autofill,
.task-login #login-form .form-control:-webkit-autofill:hover,
.task-login #login-form .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #161821 !important;
    box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(28, 164, 143, 0.12);
    transition: background-color 9999s ease-out;
}

.amatiran-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 3;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666b78;
    border: 0;
    border-radius: 9px;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.amatiran-password-toggle:hover {
    color: #2a2c39;
    background: #f0f1f4;
}

.amatiran-password-toggle:focus-visible {
    color: #2a2c39;
    outline: 3px solid rgba(28, 164, 143, 0.28);
    outline-offset: 1px;
}

.amatiran-password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.amatiran-password-toggle .eye-off,
.amatiran-password-toggle[aria-pressed="true"] .eye-on {
    display: none;
}

.amatiran-password-toggle[aria-pressed="true"] .eye-off {
    display: block;
}

.task-login #login-form .formbuttons {
    margin: 18px 0 0;
}

.task-login #rcmloginsubmit {
    min-height: 50px;
    font-size: 0.92rem;
    text-transform: none;
}

.task-login #login-footer.voice {
    position: absolute !important;
}

html.dark-mode .task-login #login-form .form-control,
.dark-mode .task-login #login-form .form-control {
    color: #20222b !important;
    background-color: #fff !important;
    -webkit-text-fill-color: #20222b !important;
}

@media (max-width: 700px) {
    body.task-login {
        overflow: auto !important;
    }

    .task-login #layout {
        padding: 12px;
    }

    .task-login #layout-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: min(680px, calc(100dvh - 24px));
        max-height: none;
        border-radius: 20px;
    }

    .amatiran-brand-panel {
        padding: 22px 26px 20px;
    }

    #amatiran-logo {
        width: 132px;
    }

    .amatiran-brand-copy {
        margin: 18px 0 2px;
        padding: 0;
    }

    .amatiran-brand-copy h2 {
        max-width: 520px;
        font-size: 1.42rem;
        line-height: 1.24;
    }

    .amatiran-eyebrow {
        margin-bottom: 7px;
        font-size: 0.66rem;
    }

    .amatiran-brand-link {
        display: none;
    }

    .amatiran-brand-mark {
        right: -34px;
        bottom: -100px;
        width: 230px;
    }

    .amatiran-login-panel {
        padding: 30px 26px 28px;
    }

    .amatiran-login-card h2 {
        font-size: 1.65rem;
    }
}

@media (max-width: 520px) {
    .task-login #layout {
        padding: 0;
    }

    .task-login #layout-content {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        grid-template-rows: 160px minmax(0, 1fr);
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .amatiran-brand-panel {
        padding: 18px 22px;
    }

    #amatiran-logo {
        width: 124px;
    }

    .amatiran-brand-copy {
        margin-top: 15px;
    }

    .amatiran-brand-copy h2 {
        max-width: 330px;
        font-size: 1.24rem;
    }

    .amatiran-login-panel {
        justify-content: flex-start;
        padding: 28px 22px;
    }

    .amatiran-login-card h2 {
        font-size: 1.55rem;
    }

    .amatiran-login-intro {
        margin: 8px 0 20px;
    }
}

@media (max-height: 620px) and (min-width: 701px) {
    .task-login #layout-content {
        height: calc(100dvh - 24px);
    }

    .task-login #layout {
        padding: 12px;
    }

    .amatiran-brand-panel {
        padding-top: 26px;
        padding-bottom: 24px;
    }

    .amatiran-login-panel {
        padding-top: 28px;
        padding-bottom: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .amatiran-brand-copy,
    .amatiran-login-card {
        animation: none !important;
    }
}
