/* ─── JMS Auth Pages ─────────────────────────────── */

.jms-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0eeff 0%, #e8f4f8 50%, #f0f0ff 100%);
    padding: 2rem 1rem;
    font-family: var(--jms-font-body, 'Inter', sans-serif);
}

.jms-auth__card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 4px 32px rgba(108, 99, 255, 0.08), 0 1px 4px rgba(0,0,0,0.04);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 440px;
    animation: authSlideUp 0.5s ease-out;
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.jms-auth__header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.jms-auth__logo {
    margin-bottom: 1rem;
}

.jms-auth__title {
    font-family: var(--jms-font-heading, 'Poppins', sans-serif);
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--jms-dark, #1e1b4b);
    margin: 0 0 0.375rem;
    line-height: 1.2;
}

.jms-auth__subtitle {
    font-size: 0.9rem;
    color: var(--jms-text-light, #6b7280);
    margin: 0;
}

/* Social Buttons */
.jms-auth__social {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.jms-auth__social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-family: inherit;
}

.jms-auth__social-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.jms-auth__social-btn--google:hover {
    border-color: #4285F4;
    background: #f8faff;
}

.jms-auth__social-btn--facebook:hover {
    border-color: #1877F2;
    background: #f0f7ff;
}

/* Divider */
.jms-auth__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.jms-auth__divider::before,
.jms-auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.jms-auth__divider span {
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* Form */
.jms-auth__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.jms-auth__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.jms-auth__field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.jms-auth__label {
    font-size: 0.825rem;
    font-weight: 600;
    color: #374151;
}

.jms-auth__label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jms-auth__forgot {
    font-size: 0.8rem;
    color: var(--jms-primary, #6C63FF);
    text-decoration: none;
    font-weight: 500;
}

.jms-auth__forgot:hover {
    text-decoration: underline;
}

.jms-auth__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.jms-auth__input-icon {
    position: absolute;
    left: 0.875rem;
    color: #9ca3af;
    pointer-events: none;
    flex-shrink: 0;
}

.jms-auth__input {
    width: 100%;
    padding: 0.7rem 0.875rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.625rem;
    font-size: 0.9rem;
    color: #1f2937;
    background: #fafafe;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    outline: none;
}

.jms-auth__input-wrap .jms-auth__input {
    padding-left: 2.75rem;
}

.jms-auth__input:focus {
    border-color: var(--jms-primary, #6C63FF);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
    background: #fff;
}

.jms-auth__input::placeholder {
    color: #c0c4cc;
}

.jms-auth__toggle-pass {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    transition: color 0.2s;
}

.jms-auth__toggle-pass:hover {
    color: #6b7280;
}

/* Password strength */
.jms-auth__pass-strength {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin-top: 0.25rem;
    overflow: hidden;
}

.jms-auth__pass-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--strength, 0%);
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    background: var(--strength-color, #e5e7eb);
}

/* Remember checkbox */
.jms-auth__remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
}

.jms-auth__remember input[type="checkbox"] {
    accent-color: var(--jms-primary, #6C63FF);
    width: 1rem;
    height: 1rem;
}

/* Submit button */
.jms-auth__submit {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, var(--jms-primary, #6C63FF), #5a52d5);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-top: 0.25rem;
}

.jms-auth__submit:hover {
    background: linear-gradient(135deg, #5a52d5, #4840b0);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}

.jms-auth__submit:active {
    transform: translateY(0);
}

.jms-auth__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.jms-auth__submit--loading {
    position: relative;
    color: transparent;
}

.jms-auth__submit--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* Error / Success messages */
.jms-auth__error {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 0.85rem;
    line-height: 1.4;
}

.jms-auth__success {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Footer text */
.jms-auth__footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.jms-auth__footer-text a {
    color: var(--jms-primary, #6C63FF);
    font-weight: 600;
    text-decoration: none;
}

.jms-auth__footer-text a:hover {
    text-decoration: underline;
}

/* Logged-in message */
.jms-auth__logged-in {
    text-align: center;
    padding: 2rem;
}

.jms-auth__logged-in a {
    color: var(--jms-primary, #6C63FF);
    font-weight: 600;
}

/* ─── Responsive ──────────────────────────────────── */

@media (max-width: 480px) {
    .jms-auth {
        padding: 1rem 0.75rem;
    }
    .jms-auth__card {
        padding: 1.75rem 1.25rem;
        border-radius: 1rem;
    }
    .jms-auth__row {
        grid-template-columns: 1fr;
    }
    .jms-auth__title {
        font-size: 1.375rem;
    }
}

/* Auth page template - remove header/footer padding */
.page-template-page-auth .site-header,
.page-template-page-auth .site-footer {
    display: none;
}
