.stitch-login-page {
    --stitch-ink: #1b1c1a;
    --stitch-muted: #5e6766;
    --stitch-teal: #002424;
    --stitch-teal-soft: #0d3b3a;
    --stitch-ochre: #825500;
    --stitch-gold: #fdbe62;
    --stitch-sand: #fbf9f6;
    --stitch-panel: #ffffff;
    --stitch-field: #f5f3f0;
    --stitch-line: #c0c8c7;
    display: grid;
    grid-template-columns: minmax(300px, 0.88fr) minmax(0, 1.12fr);
    width: min(1024px, calc(100% - 48px));
    min-height: min(660px, calc(100vh - 48px));
    margin: 24px auto;
    padding: 0;
    overflow: visible;
    background: var(--stitch-panel);
    border: 1px solid rgba(0, 36, 36, 0.08);
    border-radius: 16px;
    box-shadow: 0 24px 48px -18px rgba(0, 36, 36, 0.22), 0 4px 16px rgba(0, 36, 36, 0.06);
    color: var(--stitch-ink);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
}

body.stitch-login-page {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.stitch-login-page header {
    display: none;
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 660px;
    padding: 42px 40px 28px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(150deg, #124b49 0%, var(--stitch-teal-soft) 48%, var(--stitch-teal) 100%);
}

.login-brand-panel::before,
.login-brand-panel::after {
    position: absolute;
    border: 1px solid rgba(253, 190, 98, 0.16);
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.login-brand-panel::before {
    width: 360px;
    height: 360px;
    right: -190px;
    top: 18%;
}

.login-brand-panel::after {
    width: 260px;
    height: 260px;
    left: -170px;
    bottom: -100px;
}

.login-brand-mark,
.login-brand-name,
.login-brand-caption,
.login-brand-copy,
.login-testimonial,
.login-brand-footer {
    position: relative;
    z-index: 1;
}

.login-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: var(--stitch-gold);
    background: rgba(255, 255, 255, 0.12);
    font-size: 20px;
}

.login-brand-name {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.login-brand-caption {
    margin-top: 5px;
    color: var(--stitch-gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-brand-copy {
    margin-top: auto;
    margin-bottom: 28px;
}

.login-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #ffddb3;
    background: rgba(255, 255, 255, 0.09);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-brand-copy h1 {
    max-width: 310px;
    margin: 20px 0 16px;
    color: #ffffff;
    font-family: 'Noto Serif', Georgia, serif;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.12;
}

.login-brand-copy p {
    max-width: 330px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.65;
}

.login-testimonial {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.09);
}

.login-testimonial > span {
    padding-top: 2px;
    color: var(--stitch-gold);
    font-size: 15px;
}

.login-testimonial p {
    margin: 0 0 5px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-style: italic;
    line-height: 1.45;
}

.login-testimonial strong {
    color: #ffddb3;
    font-size: 10px;
    letter-spacing: 0.03em;
}

.login-brand-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
}

.login-brand-footer i {
    margin-right: 4px;
    color: var(--stitch-gold);
}

.login-content {
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 52px 48px 44px !important;
    background: var(--stitch-panel);
}

.login-content > h2 {
    margin: 0;
    color: var(--stitch-ink);
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-align: left;
    text-transform: none;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    margin-bottom: 0;
    border: 1px solid rgba(113, 121, 120, 0.22);
    border-radius: 8px;
    color: var(--stitch-muted);
    background: var(--stitch-field);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.login-brand-back-link {
    align-self: flex-start;
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0 0 28px;
    border: 0;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    font-size: 12px;
}

.login-back-link i {
    color: var(--stitch-gold);
}

.login-back-link:hover {
    color: var(--stitch-teal-soft);
    background: #ffffff;
}

.login-brand-back-link:hover {
    color: #ffffff;
    background: transparent;
}

.login-content > hr {
    display: none;
}

.login-card {
    width: 100%;
    margin: 36px 0 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.login-card-body {
    padding: 0;
}

.login-content form {
    width: 100%;
}

.login-field-row {
    margin: 0 0 17px;
}

.login-field {
    max-width: none;
    padding: 0;
}

.login-field .form-label {
    margin-bottom: 7px;
    color: var(--stitch-ink);
    font-size: 13px;
    font-weight: 700;
}

.login-field .form-control {
    height: 48px;
    padding: 12px 15px;
    border: 1px solid rgba(113, 121, 120, 0.34);
    border-radius: 8px;
    color: var(--stitch-ink);
    background: var(--stitch-field);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: none;
}

.login-field .form-control::placeholder {
    color: #6b7372;
    opacity: 1;
}

.login-field .form-control:focus {
    border-color: var(--stitch-teal-soft);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(253, 190, 98, 0.28);
}

.login-password-wrap {
    position: relative;
    display: block;
}

.login-password-wrap .form-control {
    padding-right: 48px;
}

.login-password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 10px !important;
    z-index: 3;
    display: flex !important;
    width: 30px !important;
    height: 30px !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    transform: translateY(-50%) !important;
    border: 0;
    color: #727b79;
    background: transparent;
    cursor: pointer;
}

.login-password-toggle:hover {
    color: var(--stitch-teal-soft);
}

.login-field .error_form {
    min-height: 0;
    margin-top: 5px;
    color: #ba1a1a;
    font-size: 12px;
}

.login-content .error-message {
    margin: 0 0 18px !important;
    border: 1px solid rgba(186, 26, 26, 0.16);
    border-radius: 8px !important;
    color: #93000a !important;
    background: #ffdad6 !important;
    font-size: 12px;
}

.login-actions-row {
    display: flex;
    gap: 12px;
    margin: 3px 0 0;
}

.login-actions-row .form-group {
    flex: 1 1 0;
    width: auto;
    padding: 0;
}

.login-actions-row .btn {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(113, 121, 120, 0.22);
    border-radius: 8px;
    color: var(--stitch-muted);
    background: var(--stitch-field);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.login-actions-row .btn-primary {
    border-color: var(--stitch-teal);
    color: #ffffff;
    background: var(--stitch-teal);
}

.login-actions-row .btn:hover {
    border-color: var(--stitch-teal-soft);
    color: var(--stitch-teal);
    background: #ffffff;
}

.login-actions-row .btn-primary:hover {
    color: #ffffff;
    background: var(--stitch-teal-soft);
}

.login-submit-group,
.login-social-group {
    width: 100%;
    padding: 0 !important;
}

.login-submit-group {
    margin-top: 24px;
    margin-bottom: 14px;
}

.login-submit-col,
.login-social-col {
    width: 100%;
    max-width: none;
    padding: 0;
}

.login-submit-group button[type='submit'] {
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--stitch-teal);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.login-submit-group button[type='submit']:hover {
    background: var(--stitch-teal-soft);
    box-shadow: 0 8px 18px rgba(0, 36, 36, 0.16);
}

.login-submit-group button[type='submit']:active {
    transform: scale(0.99);
}

.login-google-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 23px 0 12px;
    color: #6a7271;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

.login-google-separator::before,
.login-google-separator::after {
    flex: 1;
    height: 1px;
    background: rgba(113, 121, 120, 0.22);
    content: '';
}

.login-social-group {
    margin-top: 0;
    padding-top: 0 !important;
}

.login-social-col .btn-google {
    min-height: 46px;
    padding: 11px 16px;
    border: 1px solid rgba(113, 121, 120, 0.22);
    border-radius: 8px;
    color: var(--stitch-ink);
    background: var(--stitch-field);
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
}

.login-social-col .btn-google:hover {
    border-color: var(--stitch-teal-soft);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 36, 36, 0.08);
}

.login-social-col .btn-google i {
    color: #4285f4;
}

@media (max-width: 820px) {
    .stitch-login-page {
        grid-template-columns: 1fr;
        width: min(600px, calc(100% - 32px));
        min-height: auto;
    }

    .login-brand-panel {
        display: block;
        min-height: 0;
        padding: 28px 30px;
    }

    .login-brand-copy {
        margin: 34px 0 24px;
    }

    .login-brand-copy h1 {
        max-width: 520px;
        margin-top: 15px;
        font-size: 30px;
    }

    .login-brand-copy p {
        max-width: 520px;
    }

    .login-testimonial {
        max-width: 440px;
        margin-bottom: 22px;
    }

    .login-brand-footer {
        padding-top: 14px;
    }

    .login-content {
        padding: 36px 30px 32px !important;
    }
}

@media (max-width: 480px) {
    .stitch-login-page {
        width: 100%;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .login-brand-panel {
        padding: 25px 20px 22px;
    }

    .login-brand-copy {
        margin-top: 28px;
    }

    .login-brand-copy h1 {
        font-size: 27px;
    }

    .login-brand-footer {
        flex-direction: column;
        gap: 6px;
    }

    .login-content {
        padding: 31px 20px 28px !important;
    }

    .login-content > h2 {
        font-size: 28px;
    }

    .login-card {
        margin-top: 28px;
    }

    .login-actions-row {
        flex-direction: column;
        gap: 9px;
    }
}

@media (min-width: 821px) and (max-width: 1100px) {
    .stitch-login-page {
        width: min(940px, calc(100% - 36px));
    }

    .login-brand-panel {
        padding-right: 30px;
        padding-left: 30px;
    }

    .login-content {
        padding-right: 36px !important;
        padding-left: 36px !important;
    }
}

@media (max-width: 600px) {
    .stitch-login-page {
        width: 100%;
        margin: 0;
        border-radius: 0;
    }

    .login-brand-panel {
        padding: 24px 20px 22px;
    }

    .login-brand-copy h1 {
        max-width: none;
        font-size: 28px;
    }

    .login-brand-copy p {
        max-width: none;
        font-size: 13px;
    }

    .login-content {
        padding: 30px 20px 28px !important;
    }

    .login-content > h2 {
        font-size: 29px;
    }

    .login-field .form-label,
    .login-field .form-control,
    .login-actions-row .btn,
    .login-social-col .btn-google,
    .login-submit-group button[type='submit'] {
        font-size: 13px;
    }
}

@media (max-width: 375px) {
    .login-brand-panel {
        padding: 20px 16px 18px;
    }

    .login-brand-name {
        font-size: 20px;
    }

    .login-brand-caption {
        font-size: 9px;
    }

    .login-brand-copy {
        margin-top: 24px;
        margin-bottom: 20px;
    }

    .login-brand-copy h1 {
        font-size: 25px;
    }

    .login-brand-copy p {
        font-size: 12px;
    }

    .login-content {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }

    .login-content > h2 {
        font-size: 27px;
    }
}

@media (max-width: 320px) {
    .login-brand-badge {
        font-size: 9px;
    }

    .login-brand-copy h1 {
        font-size: 23px;
    }

    .login-field .form-control {
        height: 46px;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .stitch-login-page {
        margin: 12px auto;
    }

    .login-brand-panel {
        min-height: 480px;
        padding-top: 24px;
    }

    .login-brand-copy {
        margin-top: 28px;
    }

    .login-content {
        padding-top: 30px !important;
        padding-bottom: 28px !important;
    }
}
