/* ============================================================
   PKK CRM — signup.css
   Brand colors, fonts (@font-face), shadows and radius all live
   in style.css, which must be linked BEFORE this file. Do not
   redefine any of --primary, --secondary, --bg, --border,
   --text-*, --shadow-*, --radius-* here — this file only adds
   page-specific tokens and rules on top of that shared palette.
   ============================================================ */

/* Reinforce Inter on all elements — form controls (input/button)
   don't always inherit font-family from html/body by default */
* {
    font-family: 'Inter', system-ui, -apple-system,
                 'Segoe UI', 'Noto Sans', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
}

/* ─── SIGNUP-PAGE-ONLY TOKEN (not defined in style.css) ─── */
:root {
    --border-focus: var(--secondary);
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
    background: var(--bg-soft);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* ─── GRADIENT TEXT ─── */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══════════════════════════════════════════
   PAGE LAYOUT — TWO COLUMN
══════════════════════════════════════════ */
.signup-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ══════════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════════ */
.signup-left {
    background: var(--gradient);
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    position: relative; overflow: hidden;
}
.signup-left::before {
    content: '';
    position: absolute; top: -80px; right: -80px;
    width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.signup-left::after {
    content: '';
    position: absolute; bottom: -100px; left: -60px;
    width: 380px; height: 380px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.left-brand {
    display: flex; align-items: center; gap: 12px;
    position: relative; z-index: 1;
}
.left-brand-logo {
    height: 44px; width: auto;
    background: #ffffff;
    padding: 6px 8px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}
.left-brand-name {
    font-size: 20px; font-weight: 700;
    color: #fff; letter-spacing: -0.01em;
}

.left-content { position: relative; z-index: 1; }

.left-tag {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 14px; border-radius: 100px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 12px; font-weight: 600; color: #fff;
    margin-bottom: 24px; letter-spacing: 0.05em;
}
.left-tag i { font-size: 11px; }

.left-title {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 700; color: #fff;
    line-height: 1.15; letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.left-sub {
    font-size: 14px; color: rgba(255,255,255,0.75);
    line-height: 1.7; max-width: 340px;
    margin-bottom: 36px;
}

.left-features { display: flex; flex-direction: column; gap: 14px; }
.left-feature { display: flex; align-items: center; gap: 12px; }
.left-feature-icon {
    width: 34px; height: 34px; border-radius: 9px;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px;
}
.left-feature-text {
    font-size: 13px; color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.left-footer {
    font-size: 12px; color: rgba(255,255,255,0.45);
}

/* ══════════════════════════════════════════
   RIGHT PANEL
══════════════════════════════════════════ */
.signup-right {
    background: var(--bg-card);
    display: flex; align-items: center; justify-content: center;
    padding: 48px 5%;
    overflow-y: auto;
}

.signup-form-wrap { width: 100%; max-width: 460px; }

/* Form header */
.form-header { margin-bottom: 32px; }
.form-header-top {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.form-back {
    font-size: 13px; font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}
.form-back:hover { color: var(--secondary); }
.form-back i { font-size: 11px; }

.form-step-label {
    font-size: 11px; font-weight: 600;
    color: var(--secondary); text-transform: uppercase;
}
.form-title {
    font-size: 26px; font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.form-sub { font-size: 14px; color: var(--text-secondary); }

/* ─── ALERT BOXES ─── */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-md);
    font-size: 13px; font-weight: 500;
    margin-bottom: 20px; line-height: 1.5;
}
.alert-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: #ef4444;
}
.alert-success {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.2);
    color: #16a34a;
}

/* ─── FORM FIELDS ─── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: flex; align-items: center;      /* ← ADDED */
    justify-content: space-between;          /* ← ADDED */
    font-size: 13px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 7px;
}
.form-label-hint {
    font-size: 11px; color: var(--text-muted);
}

.input-wrap {
    position: relative;
    display: flex; align-items: center;
}
.input-icon {
    position: absolute; left: 14px;
    font-size: 14px; color: var(--text-muted);
}
.input-wrap:focus-within .input-icon { color: var(--secondary); }

.form-control {
    width: 100%; height: 48px;
    padding: 0 44px 0 42px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px; color: var(--text-primary);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;                           /* ← ADDED */
}
.form-control::placeholder {
    color: var(--text-muted); font-size: 13px;
}
.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary) 10%, transparent);
}
.form-control.is-error {
    border-color: #ef4444;
}
.form-control.is-error:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 10%, transparent);
}
.form-control.is-valid {
    border-color: #22c55e;
}
.form-control.is-valid:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 10%, transparent);
}

.input-toggle {
    position: absolute; right: 14px;
    background: none; border: none;
    cursor: pointer; padding: 4px;
    color: var(--text-muted); font-size: 14px;
    transition: color 0.2s;
}
.input-toggle:hover { color: var(--secondary); }

.field-error {
    font-size: 11px; color: #ef4444;
    margin-top: 5px; display: none;
    align-items: center; gap: 4px;
}
.field-error.show { display: flex; }

/* Two column row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Password strength bar */
.strength-bar {
    height: 4px; border-radius: 4px;
    background: var(--border);
    margin-top: 8px; overflow: hidden;
}
.strength-fill {
    height: 100%; border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease, background 0.4s ease;
}
.strength-label {
    font-size: 11px; margin-top: 4px;
    color: var(--text-muted); font-weight: 500;
}

/* ─── SUBMIT BUTTON ─── */
.btn-submit {
    width: 100%; height: 50px;
    background: var(--gradient);
    color: #fff; border: none;
    border-radius: var(--radius-md);
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.2s;
    box-shadow: var(--shadow-secondary);
    margin-top: 24px;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px color-mix(in srgb, var(--secondary) 40%, transparent);
}
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-submit .spinner {
    display: none;
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── DIVIDER ─── */
.form-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0; font-size: 12px; color: var(--text-muted);
}
.form-divider::before,
.form-divider::after {
    content: ''; flex: 1;
    height: 1px; background: var(--border);
}

/* ─── FOOTER NOTE ─── */
.form-footer-note {
    text-align: center; margin-top: 20px;
    font-size: 13px; color: var(--text-muted);
}
.form-footer-note a {
    color: var(--secondary); font-weight: 600;
    transition: opacity 0.2s;
}
.form-footer-note a:hover { opacity: 0.8; }

/* ══════════════════════════════════════════
   SUCCESS MODAL
══════════════════════════════════════════ */
.success-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(26, 29, 46, 0.65);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.success-modal {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    max-width: 420px; width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.success-icon-wrap {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
}
.success-icon-ring {
    position: absolute; inset: 0; border-radius: 50%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, var(--secondary) 12%, transparent));
    animation: ringPulse 2s ease infinite;
}
.success-icon {
    width: 68px; height: 68px; border-radius: 50%;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px;
    position: relative; z-index: 1;
    box-shadow: var(--shadow-secondary);
}
.success-title {
    font-size: 22px; font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.success-sub {
    font-size: 14px; color: var(--text-secondary);
    line-height: 1.7; margin-bottom: 24px;
}
.success-sub strong {
    color: var(--secondary);
}
.success-progress {
    height: 4px; background: var(--border);
    border-radius: 4px; overflow: hidden;
    margin-bottom: 28px;
}
.success-progress-fill {
    height: 100%; width: 100%;
    background: var(--gradient);
    border-radius: 4px;
    animation: progressDrain 5s linear forwards;
}
@keyframes progressDrain {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ← ADD THIS BELOW */
@keyframes ringPulse {
    0%, 100% { transform: scale(1);    opacity: 0.6; }
    50%       { transform: scale(1.15); opacity: 0.15; }
}
.success-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 32px; border-radius: var(--radius-md);
    background: var(--gradient);
    color: #fff; font-size: 14px; font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-secondary);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 16px;
}
.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--secondary) 40%, transparent);
}
.success-note {
    font-size: 12px; color: var(--text-muted);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
    .signup-page { grid-template-columns: 1fr; }
    .signup-left { display: none; }
    .signup-right { padding: 40px 6%; }
}
@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
    .signup-right { padding: 32px 5%; }
    .success-modal { padding: 36px 24px; }
}

/* Mobile brand (hidden on desktop) */
.mobile-brand {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}
.mobile-brand img {
    height: 34px; width: auto;
}
.mobile-brand span {
    font-weight: 700; font-size: 18px;
    color: var(--text-primary);
}
@media (max-width: 900px) {
    .mobile-brand { display: flex; }
}