/* /public_html/assets/css/auth.css */

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

:root {
    --brand-primary:   #6366f1;
    --brand-secondary: #8b5cf6;
    --brand-dark:      #4f46e5;
    --text-primary:    #1e293b;
    --text-secondary:  #64748b;
    --text-muted:      #94a3b8;
    --border:          #e2e8f0;
    --border-focus:    #6366f1;
    --bg-input:        #f8fafc;
    --bg-card:         #ffffff;
    --error-bg:        #fef2f2;
    --error-border:    #fca5a5;
    --error-text:      #dc2626;
    --success-bg:      #f0fdf4;
    --success-border:  #86efac;
    --success-text:    #16a34a;
    --radius-sm:       8px;
    --radius-md:       12px;
    --radius-lg:       16px;
    --shadow-card:     0 4px 6px -1px rgb(0 0 0 / .07), 0 2px 4px -2px rgb(0 0 0 / .05);
    --shadow-card-lg:  0 20px 25px -5px rgb(0 0 0 / .08), 0 8px 10px -6px rgb(0 0 0 / .05);
    --transition:      all .18s ease;
}

html { height: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: #f1f5f9;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Background ── */
.auth-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #fdf4ff 100%);
    z-index: 0;
    overflow: hidden;
}

.auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .45;
}

.auth-bg-shape--1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #a5b4fc, #c4b5fd);
    top: -200px; right: -150px;
}

.auth-bg-shape--2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #bfdbfe, #a5f3fc);
    bottom: -200px; left: -150px;
}

/* ── Page Layout ── */
.auth-page {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ── Brand ── */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgb(99 102 241 / .35);
}

.auth-logo-mark span {
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .05em;
}

.auth-brand-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.2;
}

.auth-brand-tagline {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ── Card ── */
.auth-card {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-card-lg);
    border: 1px solid var(--border);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-card-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.auth-card-header p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

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

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

/* ── Alerts ── */
.auth-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert p { margin: 0; }
.auth-alert p + p { margin-top: 4px; }

.auth-alert--error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
}

.auth-alert--success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.auth-alert svg { flex-shrink: 0; margin-top: 2px; }

/* ── Form ── */
.auth-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label-link {
    font-size: 12px;
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.form-label-link:hover { text-decoration: underline; }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
    border-color: var(--border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgb(99 102 241 / .12);
}

.form-control.is-invalid {
    border-color: var(--error-border);
    background: var(--error-bg);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgb(239 68 68 / .12);
}

/* ── Password field ── */
.input-password-wrap { position: relative; }

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

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

.password-toggle:hover,
.password-toggle.active { color: var(--brand-primary); }

/* ── Password strength ── */
.password-strength {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pw-bar-wrap {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.pw-bar {
    height: 100%;
    border-radius: 99px;
    transition: width .3s ease, background .3s ease;
}

/* ── Checkbox ── */
.form-check-row { display: flex; align-items: center; }

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    user-select: none;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
    cursor: pointer;
    border-radius: 4px;
}

/* ── Submit button ── */
.btn-auth-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: .01em;
    box-shadow: 0 4px 14px rgb(99 102 241 / .35);
}

.btn-auth-submit:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgb(99 102 241 / .4);
}

.btn-auth-submit:active { transform: translateY(0); opacity: 1; }

/* ── Footer text ── */
.auth-switch-text {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-switch-text a {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch-text a:hover { text-decoration: underline; }

.auth-terms-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: -8px;
    margin-bottom: -4px;
}

.auth-terms-note a { color: var(--brand-primary); text-decoration: none; }
.auth-terms-note a:hover { text-decoration: underline; }

.auth-footer-text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; }
    .auth-card-header h1 { font-size: 20px; }
}
