/* ─── ProfeApp Login Page – Stitch Redesigned ─── */

/* Full-page dark mesh background */
body.login-page,
.login-page-wrapper {
    min-height: 100dvh;
    background-color: #020617;
    background-image:
        radial-gradient(at 0% 0%, rgba(34, 197, 94, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.15) 0px, transparent 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-family: 'Inter', 'Roboto', sans-serif;
    color: #f1f5f9;
    -webkit-font-smoothing: antialiased;
}

/* ── Light Mode override ── */
[data-theme]:not([data-theme="dark"]) body.login-page,
[data-theme]:not([data-theme="dark"]) .login-page-wrapper {
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgba(22, 163, 74, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
    color: #0f172a;
}

/* ── Branding header ── */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.login-brand img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
}

.login-brand h1 {
    font-size: 1.875rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.02em;
}

[data-theme]:not([data-theme="dark"]) .login-brand h1 {
    color: #0f172a;
}

.login-brand h1 span {
    color: #22c55e;
}

/* ── Main card ── */
.login-container {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    color: #f1f5f9;
}

[data-theme]:not([data-theme="dark"]) .login-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

.login-container h2 {
    text-align: center;
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

[data-theme]:not([data-theme="dark"]) .login-container h2 {
    color: #0f172a;
}

.login-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

/* ── Form groups ── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

[data-theme]:not([data-theme="dark"]) .form-group label {
    color: #64748b;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 20px;
    pointer-events: none;
    transition: color 0.2s;
    /* Force Material Symbols Outlined rendering */
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    z-index: 1;
    user-select: none;
}

.input-wrapper:focus-within .input-icon {
    color: #22c55e;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme]:not([data-theme="dark"]) .form-group input {
    background-color: #f8fafc;
    border-color: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

.form-group input::placeholder {
    color: #475569;
}

.form-group input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* ── Password toggle ── */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    z-index: 1;
}

.password-toggle:hover {
    color: #94a3b8;
}

/* Force icon rendering inside password toggle */
.password-toggle span {
    font-family: 'Material Symbols Outlined', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    user-select: none;
}

/* ── Forgot password ── */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    margin-top: 0.25rem;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #22c55e;
}

/* ── Submit button ── */
.btn.btn-login {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    background-color: #22c55e;
    color: #0a0f1a;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.btn.btn-login:hover {
    background-color: #16a34a;
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.45);
    transform: translateY(-1px);
}

.btn.btn-login:active {
    transform: scale(0.97);
}

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.75rem 0;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme]:not([data-theme="dark"]) .divider::before,
[data-theme]:not([data-theme="dark"]) .divider::after {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.divider:not(:empty)::before {
    margin-right: 1rem;
}

.divider:not(:empty)::after {
    margin-left: 1rem;
}

/* ── Google button ── */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #ffffff;
    color: #1e293b;
    border: none;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-google:hover {
    background-color: #f1f5f9;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-google img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ── Register link ── */
.login-footer-link {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 1.5rem;
}

.login-footer-link a {
    color: #22c55e;
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.25rem;
}

.login-footer-link a:hover {
    text-decoration: underline;
}