:root {
    --sotto-black: #0e0e0e;
    --sotto-ink: #1b1c1c;
    --sotto-muted: #626262;
    --sotto-line: #ded8d4;
    --sotto-panel: #ffffff;
    --sotto-background: #fbf9f8;
    --sotto-red: #9e0000;
    --sotto-red-soft: rgba(158, 0, 0, 0.42);
}

* { box-sizing: border-box; }

body { margin: 0; }

.brand-logo {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
    color: var(--sotto-ink);
    font-family: Inter, sans-serif;
    background: var(--sotto-background);
}

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 34px max(24px, calc((100% - 1120px) / 2));
    background: var(--sotto-black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.login-logo {
    color: #ffffff;
    text-decoration: none;
}

.register-link {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 5px;
    transition: color 180ms ease;
}

.register-link:hover {
    color: #ffffff;
}

.login-shell {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: min(100% - 48px, 1120px);
    min-height: calc(100vh - 122px);
    margin: 0 auto;
    padding: 80px 0;
}

.login-card {
    width: min(100%, 480px);
    border: 1px solid var(--sotto-line);
    background: var(--sotto-panel);
    padding: 48px 38px;
    box-shadow: 0 18px 50px rgba(27, 28, 28, 0.08);
}

.login-title {
    margin: 0 0 36px;
    color: var(--sotto-ink);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 38px;
    font-weight: 600;
    line-height: 1.1;
    text-align: center;
}

.error-box {
    padding: 14px 18px;
    margin-bottom: 24px;
    border: 1px solid rgba(158, 0, 0, 0.3);
    background: rgba(158, 0, 0, 0.05);
    color: var(--sotto-red);
    font-size: 14px;
    line-height: 1.5;
}

.login-field {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    margin: 0 0 10px;
    color: var(--sotto-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--sotto-line);
    background: transparent;
    color: var(--sotto-ink);
    min-height: 58px;
    padding: 0 18px;
    font: inherit;
    font-size: 16px;
    outline: none;
    border-radius: 0;
}

.login-input:focus {
    border-color: rgba(158, 0, 0, 0.55);
}

.login-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.password-field {
    position: relative;
}

.password-field .login-input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.login-button {
    width: 100%;
    min-height: 66px;
    border: 1px solid transparent;
    padding: 0 28px;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    background: var(--sotto-red);
    border-radius: 0;
    margin-bottom: 20px;
}

.login-button:disabled {
    cursor: not-allowed;
    background: var(--sotto-red-soft);
    color: rgba(255, 255, 255, 0.42);
}

.forgot-link {
    display: block;
    text-align: center;
    color: var(--sotto-muted);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-bottom: 28px;
}

.forgot-link:hover {
    color: var(--sotto-ink);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--sotto-line);
}

.divider-text {
    color: var(--sotto-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.join-link {
    display: block;
    text-align: center;
    color: var(--sotto-red);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.join-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .login-header {
        padding: 28px 18px;
    }
    .login-logo {
        font-size: 31px;
    }
    .register-link {
        font-size: 12px;
    }
    .login-shell {
        width: min(100% - 36px, 480px);
        padding: 40px 0 60px;
    }
    .login-card {
        padding: 32px 24px;
    }
    .login-title {
        font-size: 32px;
    }
}


/* Forgot / Reset password page styles */
.forgot-description {
    color: var(--sotto-muted);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 28px;
    text-align: center;
}

.back-link {
    display: block;
    text-align: center;
    color: var(--sotto-muted);
    font-size: 14px;
    text-decoration: none;
    margin-top: 20px;
}

.back-link:hover {
    color: var(--sotto-ink);
    text-decoration: underline;
}
