/**
 * Auth Pages Stylesheet
 * Shared styles for login, forgot-password, reset-password, signup.
 *
 * @package CCS_Dashboard
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body.ccs-login-page {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f0f0f5;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
    padding: 40px;
    gap: 40px;
}

#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* =========================================================================
   Layout — full-width 50/50
   ========================================================================= */

.auth-card {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 80px);
    gap: 40px;
    background: transparent;
}

/* Left panel — gradient brand */
.auth-brand {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(to bottom right, #070d2a 0%, #0c1445 30%, #112057 55%, #145fff 100%);
}

.auth-brand__logo {
    position: absolute;
    top: 32px;
    left: 36px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.9);
}

.auth-brand__content {
    position: relative;
    z-index: 2;
}

.auth-brand__eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.auth-brand__heading {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.auth-brand__glass {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    z-index: 1;
}

/* Right panel — form */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #fff;
    border-radius: 24px;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-form__logo {
    color: #1264FF;
    margin-bottom: 20px;
}

.auth-form__title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.auth-form__subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* =========================================================================
   Alerts
   ========================================================================= */

.auth-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
}

.auth-alert--error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.auth-alert svg { flex-shrink: 0; }

/* =========================================================================
   Form Fields
   ========================================================================= */

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.auth-field__input-wrap {
    position: relative;
}

.auth-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 24px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: all 150ms ease;
}

.auth-field input:focus {
    outline: none;
    border-color: #1264FF;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.auth-field input::placeholder {
    color: #9ca3af;
}

/* Autofill override — kill browser background tint, keep font size */
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #111827 !important;
    font-size: 24px !important;
    caret-color: #111827;
    transition: background-color 600000s 0s, color 600000s 0s;
}

/* Password toggle */
.auth-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px;
    display: flex;
}

.auth-toggle-pw:hover { color: #6b7280; }

/* =========================================================================
   Extras (remember me / forgot link)
   ========================================================================= */

.auth-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

.auth-remember input {
    width: 16px;
    height: 16px;
    accent-color: #1264FF;
    cursor: pointer;
}

/* =========================================================================
   Links & Buttons
   ========================================================================= */

.auth-link {
    font-size: 13px;
    color: #1264FF;
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover { color: #1d4ed8; }

.auth-submit {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1264FF 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    box-shadow: 0 2px 8px rgba(20, 95, 255, 0.3);
}

.auth-submit:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(20, 95, 255, 0.4);
}

.auth-submit:active { transform: scale(0.99); }

/* =========================================================================
   Footer
   ========================================================================= */

.auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}

.auth-footer a {
    color: #1264FF;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover { color: #1d4ed8; }

/* =========================================================================
   Password Strength (reset-password page)
   ========================================================================= */

.pw-strength {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin-top: 8px;
    overflow: hidden;
}

.pw-strength__bar {
    height: 100%;
    border-radius: 2px;
    transition: width 200ms ease, background 200ms ease;
    width: 0;
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 900px) {
    body.ccs-login-page { padding: 20px; }
    .auth-card { gap: 20px; }
    .auth-brand { display: none; }
    .auth-form-panel { border-radius: 16px; }
}

@media (max-width: 480px) {
    body.ccs-login-page { padding: 0; }
    .auth-card { gap: 0; min-height: 100vh; }
    .auth-form-panel { border-radius: 0; padding: 32px 24px; }
}
