/*
 * IF-0004 — shared design tokens and components used by the redesigned
 * login, signup, onboarding checkout, and subscription plans pages.
 * Loaded via <link rel="stylesheet"> in the split-auth layout and pushed
 * from onboarding checkout + subscription plans views.
 * Do not import into the global app layout — the tokens are scoped by class
 * so nothing here bleeds into the admin dashboard's Bootstrap theme.
 */
.if-theme{
  --primary:#6571FF; --primary-hover:#4F55E0;
  --gradient:linear-gradient(135deg,#6571FF 0%,#7603F3 100%);
  --bg:#FAFBFF; --surface:#FFFFFF;
  --text:#181C32; --text-muted:#5E6278; --border:#E4E6EF;
  --success:#17C666; --danger:#F1416C; --warning:#FFA800;
  --shadow-card:0 4px 24px rgba(101,113,255,.08);
  --shadow-card-lift:0 20px 60px rgba(101,113,255,.14);
  --shadow-cta:0 8px 24px rgba(101,113,255,.28);
  font-family:'Poppins',system-ui,-apple-system,sans-serif;
  color:var(--text); background:var(--bg); font-size:15px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

.if-theme *{box-sizing:border-box}
.if-theme a{color:var(--primary);text-decoration:none;font-weight:500}
.if-theme a:hover{color:var(--primary-hover)}
.if-theme button{font-family:inherit}
.if-theme h1,.if-theme h2,.if-theme h3{color:var(--text);margin:0}

/* wordmark */
.if-theme .wordmark{font-weight:700;font-size:20px;color:var(--primary);letter-spacing:-.02em;display:flex;align-items:center;gap:8px}
.if-theme .wordmark svg{width:28px;height:28px}
.if-theme .brand-side .wordmark{color:#fff;position:relative;z-index:1}

/* ------------------- split-screen auth ------------------- */
.if-theme .split{display:grid;grid-template-columns:60% 40%;min-height:100vh}
.if-theme .form-side{padding:48px 72px;display:flex;flex-direction:column;justify-content:space-between}
.if-theme .brand-side{background:var(--gradient);position:relative;overflow:hidden;color:#fff;padding:56px 48px;display:flex;flex-direction:column;justify-content:space-between}
.if-theme .brand-side::before{content:'';position:absolute;inset:-20% -20%;background:radial-gradient(circle at 20% 20%,rgba(255,255,255,.28) 0%,transparent 45%),radial-gradient(circle at 80% 80%,rgba(255,255,255,.14) 0%,transparent 40%);pointer-events:none}

.if-theme .form-wrap{max-width:460px;width:100%;margin:0 auto}
.if-theme h1.title{font-size:32px;font-weight:700;letter-spacing:-.02em;margin:0 0 8px}
.if-theme .sub{color:var(--text-muted);margin:0 0 28px}

.if-theme .grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.if-theme .field{margin-bottom:14px}
.if-theme .field label{display:block;font-size:13px;font-weight:500;color:var(--text);margin-bottom:6px}
.if-theme .hint{color:var(--text-muted);font-size:12px;margin-top:6px}
.if-theme .input-wrap{position:relative}
.if-theme .input-wrap svg.leading{position:absolute;top:50%;left:14px;transform:translateY(-50%);color:var(--text-muted);width:18px;height:18px;pointer-events:none}
.if-theme .input-wrap .toggle-eye{position:absolute;top:50%;right:14px;transform:translateY(-50%);color:var(--text-muted);width:18px;height:18px;background:none;border:0;cursor:pointer;padding:0}
.if-theme .input-wrap .toggle-eye svg{width:18px;height:18px;display:block}
.if-theme input[type=email],
.if-theme input[type=password],
.if-theme input[type=text]{
  width:100%;padding:12px 14px 12px 42px;border:1px solid var(--border);border-radius:10px;font-size:15px;
  background:#fff;color:var(--text);outline:none;transition:border-color .15s,box-shadow .15s;font-family:inherit
}
.if-theme .no-leading input{padding-left:14px}
.if-theme input:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(101,113,255,.12)}

.if-theme .row-line{display:flex;align-items:center;justify-content:space-between;margin:14px 0 20px;font-size:13px}
.if-theme .checkbox{display:flex;align-items:center;gap:8px;color:var(--text-muted);cursor:pointer;user-select:none}
.if-theme .checkbox input{accent-color:var(--primary);width:16px;height:16px;margin:0}

.if-theme .cta{
  width:100%;background:var(--gradient);color:#fff;font-weight:600;font-size:15px;
  padding:14px 24px;border:0;border-radius:999px;cursor:pointer;
  box-shadow:var(--shadow-cta);transition:transform .1s,box-shadow .2s;font-family:inherit;margin-top:8px
}
.if-theme .cta:hover{transform:translateY(-1px);box-shadow:0 12px 32px rgba(101,113,255,.36)}
.if-theme .cta:disabled{opacity:.7;cursor:not-allowed}

.if-theme .legal{color:var(--text-muted);font-size:12px;text-align:center;margin-top:12px;line-height:1.5}
.if-theme .footer-line{margin-top:24px;text-align:center;color:var(--text-muted);font-size:14px}
.if-theme .footnote{text-align:center;color:var(--text-muted);font-size:12px}

/* validation errors container from Blade */
.if-theme .error-panel{background:rgba(241,65,108,.08);border:1px solid rgba(241,65,108,.24);color:#B03554;border-radius:10px;padding:10px 14px;font-size:13px;margin-bottom:16px}
.if-theme .error-panel ul{margin:0;padding-left:18px}

/* password strength */
.if-theme .strength{display:flex;gap:4px;margin-top:8px}
.if-theme .strength span{flex:1;height:4px;border-radius:2px;background:var(--border);transition:background .2s}
.if-theme .strength.s1 span:nth-child(1){background:var(--danger)}
.if-theme .strength.s2 span:nth-child(-n+2){background:var(--warning)}
.if-theme .strength.s3 span:nth-child(-n+3){background:var(--warning)}
.if-theme .strength.s4 span{background:var(--success)}
.if-theme .strength-label{font-size:12px;margin-top:6px;color:var(--text-muted)}

/* brand panel content */
.if-theme .brand-inner{position:relative;z-index:1;display:flex;flex-direction:column;height:100%;justify-content:space-between}
.if-theme .mock-invoice{position:relative;margin-top:auto;margin-bottom:32px;background:#fff;color:var(--text);border-radius:16px;padding:20px 22px;box-shadow:0 20px 60px rgba(0,0,0,.14);width:82%;max-width:340px;transform:rotate(-3deg)}
.if-theme .mock-invoice .mi-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.if-theme .mock-invoice .mi-title{font-weight:700;font-size:14px}
.if-theme .mock-invoice .mi-num{font-size:11px;color:var(--text-muted)}
.if-theme .mock-invoice .mi-badge{background:rgba(23,198,102,.12);color:var(--success);font-size:11px;font-weight:600;padding:4px 10px;border-radius:999px;display:inline-flex;align-items:center;gap:4px}
.if-theme .mock-invoice .mi-row{display:flex;justify-content:space-between;font-size:12px;color:var(--text-muted);padding:8px 0;border-bottom:1px dashed var(--border)}
.if-theme .mock-invoice .mi-row:last-child{border-bottom:0}
.if-theme .mock-invoice .mi-row b{color:var(--text);font-weight:600}
.if-theme .mock-invoice .mi-total{background:linear-gradient(135deg,rgba(101,113,255,.08),rgba(118,3,243,.08));margin:12px -22px -20px;padding:14px 22px;border-radius:0 0 16px 16px;display:flex;justify-content:space-between;font-weight:600}
.if-theme .mock-invoice .mi-total b{color:var(--primary)}

.if-theme .testimonial{position:relative;z-index:1;background:rgba(255,255,255,.14);backdrop-filter:blur(6px);padding:22px 24px;border-radius:16px;border:1px solid rgba(255,255,255,.24)}
.if-theme .testimonial .stars{display:flex;gap:2px;margin-bottom:10px}
.if-theme .testimonial .stars svg{width:16px;height:16px;color:#FFD166}
.if-theme .testimonial p{font-size:15px;line-height:1.5;margin:0 0 14px;font-weight:500;color:#fff}
.if-theme .testimonial .who{display:flex;align-items:center;gap:12px}
.if-theme .avatar{width:34px;height:34px;border-radius:50%;background:#fff;color:var(--primary);display:grid;place-items:center;font-weight:600;font-size:13px;flex-shrink:0}
.if-theme .who-name{font-size:13px;font-weight:600;line-height:1.2}
.if-theme .who-role{font-size:12px;opacity:.8}

.if-theme .brand-headline{margin-top:48px;position:relative;z-index:1}
.if-theme .brand-headline h2{font-size:30px;font-weight:700;line-height:1.2;letter-spacing:-.02em;margin:0 0 12px;color:#fff}
.if-theme .brand-headline p{opacity:.88;font-size:15px;line-height:1.6;margin:0;max-width:340px;color:#fff}

.if-theme .value-props{margin-top:auto;display:flex;flex-direction:column;gap:20px}
.if-theme .value-props .value{display:flex;gap:14px;align-items:flex-start}
.if-theme .value-props .icon{width:40px;height:40px;flex-shrink:0;border-radius:12px;background:rgba(255,255,255,.16);display:grid;place-items:center;color:#fff}
.if-theme .value-props .icon svg{width:20px;height:20px}
.if-theme .value-props h3{font-size:16px;font-weight:600;margin:0 0 4px;letter-spacing:-.01em;color:#fff}
.if-theme .value-props p{font-size:14px;line-height:1.5;margin:0;opacity:.88;color:#fff}

/* ------------------- onboarding checkout ------------------- */
.if-theme .oc-wrap{max-width:760px;margin:0 auto;padding:0 20px}
.if-theme .stepper{display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 20px 12px;color:var(--text-muted);font-size:13px;flex-wrap:wrap}
.if-theme .step{display:flex;align-items:center;gap:8px}
.if-theme .step .n{width:22px;height:22px;border-radius:50%;background:var(--border);color:var(--text-muted);display:grid;place-items:center;font-weight:600;font-size:12px}
.if-theme .step.done .n{background:var(--success);color:#fff}
.if-theme .step.done .n svg{width:12px;height:12px}
.if-theme .step.active .n{background:var(--primary);color:#fff}
.if-theme .step.active{color:var(--text);font-weight:500}
.if-theme .step-line{width:44px;height:1px;background:var(--border)}
.if-theme .subtitle{color:var(--text-muted);margin:0 0 32px;text-align:center}

.if-theme .oc-card{
  background:var(--surface);border-radius:16px;border:1px solid var(--border);
  box-shadow:var(--shadow-card);padding:32px;
  display:grid;grid-template-columns:1.15fr 1fr;gap:32px
}
.if-theme .oc-card > *{min-width:0}
.if-theme .oc-card input{min-width:0}

.if-theme .summary-label,.if-theme .card-label{font-size:12px;font-weight:600;letter-spacing:.06em;color:var(--text-muted);text-transform:uppercase;margin-bottom:8px}
.if-theme .plan-name{font-size:24px;font-weight:700;margin:0 0 4px;letter-spacing:-.01em}
.if-theme .plan-price{color:var(--text-muted);margin:0 0 20px;font-size:14px}
.if-theme .badge-trial{display:inline-flex;align-items:center;gap:6px;background:rgba(23,198,102,.12);color:var(--success);font-size:12px;font-weight:600;padding:6px 12px;border-radius:999px}
.if-theme .badge-trial svg{width:12px;height:12px}
.if-theme .mini-row{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-top:1px solid var(--border);font-size:14px;color:var(--text-muted)}
.if-theme .mini-row:last-child{border-bottom:1px solid var(--border);font-weight:600;color:var(--text)}
.if-theme .mini-row b{font-weight:600;color:var(--text);white-space:nowrap}
.if-theme .change-plan{font-size:13px;margin-top:14px;display:inline-flex;align-items:center;gap:4px}

.if-theme .card-input-mount{border:1px solid var(--border);border-radius:10px;padding:14px 16px;background:#fff;transition:border-color .15s;overflow:hidden}
.if-theme .card-input-mount.StripeElement--focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(101,113,255,.12)}
.if-theme .card-errors{color:var(--danger);font-size:13px;margin-top:8px;min-height:1em}
.if-theme .security-line{margin-top:14px;font-size:12px;color:var(--text-muted);display:flex;align-items:center;gap:6px}
.if-theme .security-line svg{width:14px;height:14px}

.if-theme .callout{
  margin-top:24px;background:rgba(23,198,102,.08);border:1px solid rgba(23,198,102,.24);
  border-radius:14px;padding:20px 24px;display:flex;gap:16px;align-items:flex-start
}
.if-theme .callout .cb-icon{width:40px;height:40px;background:rgba(23,198,102,.16);color:var(--success);border-radius:12px;display:grid;place-items:center;flex-shrink:0}
.if-theme .callout .cb-icon svg{width:20px;height:20px}
.if-theme .callout h4{margin:0 0 4px;font-size:16px;font-weight:600}
.if-theme .callout p{margin:0;color:var(--text-muted);font-size:14px}

.if-theme .trust-row{margin-top:20px;text-align:center;color:var(--text-muted);font-size:12px;display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}
.if-theme .trust-row svg{width:14px;height:14px;opacity:.6}

/* ------------------- subscription plans (internal /subscription-plans) ------------------- */
.if-theme .plans-hero{text-align:center;padding:24px 20px 12px;max-width:640px;margin:0 auto}
.if-theme .plans-hero h1{font-size:32px;font-weight:700;letter-spacing:-.02em;margin:0 0 8px;line-height:1.2}
.if-theme .plans-hero .grad{background:var(--gradient);-webkit-background-clip:text;background-clip:text;color:transparent}
.if-theme .plans-hero p{color:var(--text-muted);margin:0}

.if-theme .toggle-wrap{display:flex;justify-content:center;align-items:center;gap:12px;margin:20px 0 36px;flex-wrap:wrap}
.if-theme .toggle-pill{background:#fff;border:1px solid var(--border);border-radius:999px;padding:4px;display:flex;gap:2px;box-shadow:0 2px 8px rgba(0,0,0,.02)}
.if-theme .toggle-pill button{padding:9px 22px;border:0;background:transparent;color:var(--text-muted);border-radius:999px;font-weight:500;font-size:14px;cursor:pointer;transition:all .18s}
.if-theme .toggle-pill button.active{background:var(--gradient);color:#fff;box-shadow:0 4px 12px rgba(101,113,255,.24)}
.if-theme .save-badge{background:rgba(23,198,102,.14);color:var(--success);font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;display:inline-flex;align-items:center;gap:4px}

.if-theme .plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;padding:0 4px 40px;max-width:1180px;margin:0 auto}
.if-theme .if-plan{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:32px 28px;display:flex;flex-direction:column;box-shadow:var(--shadow-card);transition:transform .2s}
.if-theme .if-plan:hover{transform:translateY(-4px)}
.if-theme .if-plan.featured{border-color:transparent;box-shadow:var(--shadow-card-lift);background:linear-gradient(#fff,#fff) padding-box,var(--gradient) border-box;border:2px solid transparent}
.if-theme .badge-featured{position:absolute;top:-14px;left:50%;transform:translateX(-50%);background:var(--gradient);color:#fff;font-size:12px;font-weight:600;padding:6px 16px;border-radius:999px;box-shadow:0 6px 18px rgba(101,113,255,.32)}
.if-theme .if-plan .name{font-size:14px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-muted);margin:0 0 12px}
.if-theme .if-plan.featured .name{color:var(--primary)}
.if-theme .if-plan .price{display:flex;align-items:baseline;gap:6px;margin-bottom:4px}
.if-theme .if-plan .price .amount{font-size:44px;font-weight:700;letter-spacing:-.02em;line-height:1}
.if-theme .if-plan .price .cycle{color:var(--text-muted);font-size:15px}
.if-theme .if-plan .tag{color:var(--text-muted);font-size:13px;margin:0 0 24px;min-height:20px}
.if-theme .if-plan .features{list-style:none;padding:0;margin:0 0 32px;flex:1}
.if-theme .if-plan .features li{display:flex;gap:10px;padding:8px 0;font-size:14px;color:var(--text)}
.if-theme .if-plan .features li svg{width:18px;height:18px;color:var(--success);flex-shrink:0;margin-top:2px}
.if-theme .if-plan .cta-btn{width:100%;font-family:inherit;font-weight:600;font-size:15px;padding:14px;border-radius:12px;cursor:pointer;transition:all .2s;text-align:center;text-decoration:none;display:block}
.if-theme .if-plan .cta-btn.primary{background:var(--gradient);color:#fff;border:0;box-shadow:var(--shadow-cta)}
.if-theme .if-plan .cta-btn.primary:hover{transform:translateY(-1px);box-shadow:0 12px 32px rgba(101,113,255,.36);color:#fff}
.if-theme .if-plan .cta-btn.outline{background:#fff;color:var(--primary);border:1.5px solid var(--border)}
.if-theme .if-plan .cta-btn.outline:hover{border-color:var(--primary);background:#F8F9FC}
.if-theme .active-badge{display:flex;align-items:center;justify-content:center;gap:6px;background:rgba(23,198,102,.14);color:var(--success);font-weight:600;font-size:14px;padding:12px;border-radius:12px;margin-bottom:8px}
.if-theme .active-badge svg{width:16px;height:16px}
.if-theme .cancel-btn{width:100%;font-family:inherit;background:#fff;color:var(--danger);border:1.5px solid rgba(241,65,108,.28);border-radius:12px;padding:11px;font-weight:500;font-size:13px;cursor:pointer;transition:all .2s}
.if-theme .cancel-btn:hover{border-color:var(--danger);background:rgba(241,65,108,.06)}
.if-theme .free-plan-note{background:rgba(101,113,255,.06);color:var(--primary);border:1px solid rgba(101,113,255,.24);border-radius:12px;padding:12px;font-weight:500;font-size:13px;text-align:center}

/* ------------------- responsive ------------------- */
@media (max-width:992px){
  .if-theme .split{grid-template-columns:1fr}
  .if-theme .brand-side{display:none}
  .if-theme .form-side{padding:32px 24px}
  .if-theme .grid-2{grid-template-columns:1fr}
  .if-theme .oc-card{grid-template-columns:1fr;padding:24px}
  .if-theme .plans-hero h1{font-size:26px}
}
