/* ============================================================
   Portlio — Auth pages (login, register, forgot/reset password)
   ============================================================ */

/* ── Page shell ──────────────────────────────────────────── */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--color-bg);
}

@media (min-width: 960px) {
    .auth-page {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Left panel (branding) ───────────────────────────────── */

.auth-panel {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    background: var(--sidebar-bg);
    padding: 56px 64px;
    color: #fff;
}

@media (min-width: 960px) {
    .auth-panel {
        display: flex;
    }
}

.auth-panel__logo {
    text-decoration: none;
    display: inline-block;
    line-height: 0;
}

.auth-panel__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 0;
}

.auth-panel__headline {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.auth-panel__sub {
    font-size: 1rem;
    color: #A7F3D0;
    line-height: 1.7;
    max-width: 360px;
}

.auth-panel__features {
    list-style: none;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-panel__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: #A7F3D0;
}

.auth-panel__features li::before {
    content: '';
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: #1D9E75;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: contain;
}

.auth-panel__footer {
    font-size: 0.8125rem;
    color: #2E9E76;
}

/* ── Right side (form area) ──────────────────────────────── */

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

/* Mobile logo (only shown when panel is hidden) */
.auth-card__mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.auth-card__mobile-logo span {
    color: #5CCBA6;
}

@media (min-width: 960px) {
    .auth-card__mobile-logo {
        display: none;
    }
}

/* ── Card header ─────────────────────────────────────────── */

.auth-card__header {
    margin-bottom: 32px;
}

.auth-card__title {
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--color-text);
    margin-bottom: 6px;
}

.auth-card__subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

/* ── Form ────────────────────────────────────────────────── */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .auth-form__row {
        grid-template-columns: 1fr;
    }
}

.auth-form__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.auth-form__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    user-select: none;
}

.auth-form__checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.auth-form__forgot {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Password visibility toggle */
.input-wrap {
    position: relative;
}

.input-wrap .input {
    padding-right: 44px;
}

.input-wrap__toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.input-wrap__toggle:hover {
    color: var(--color-text-secondary);
}

/* ── Divider ─────────────────────────────────────────────── */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* ── Footer link ─────────────────────────────────────────── */

.auth-card__footer {
    margin-top: 28px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.auth-card__footer a {
    font-weight: 600;
}

/* ── Success state (forgot password sent) ────────────────── */

.auth-success-icon {
    width: 56px;
    height: 56px;
    background: var(--color-success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.auth-success-icon svg {
    color: var(--color-success);
}

/* ── Password strength meter ─────────────────────────────── */

.password-strength {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.password-strength__bar {
    height: 3px;
    flex: 1;
    border-radius: 2px;
    background: var(--color-border);
    transition: background 200ms ease;
}

.password-strength__bar.active-weak   { background: var(--color-error); }
.password-strength__bar.active-fair   { background: var(--color-warning); }
.password-strength__bar.active-good   { background: #3B82F6; }
.password-strength__bar.active-strong { background: var(--color-success); }

.password-strength__label {
    font-size: 0.75rem;
    margin-top: 4px;
    color: var(--color-text-muted);
}
