/* ============================================
   JK SOFTWARE — AUTH SYSTEM
   Cinematic dark navy + gold, editorial type
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root{
  /* --- color tokens --- */
  --navy-950:#080C18;
  --navy-900:#0D1426;
  --navy-850:#111A31;
  --navy-800:#16203C;
  --navy-700:#212D4E;
  --navy-600:#37456E;

  --gold-600:#B08A2A;
  --gold-500:#C9A227;
  --gold-400:#DEBB55;
  --gold-300:#EAD189;

  --cream-50:#FBF9F4;
  --cream-100:#F2EEE2;

  --ink-050:#F5F4F1;
  --ink-300:#B8BBC6;
  --ink-500:#7C8194;
  --ink-700:#4A4E5A;
  --ink-900:#0E1016;

  --line:#232E4E;
  --success:#7CB88F;

  /* --- type --- */
  --font-display:'Fraunces', serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'JetBrains Mono', monospace;

  --radius-sm:8px;
  --radius-md:10px;
  --radius-lg:20px;
  --radius-xl:28px;
}

*,*::before,*::after{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--navy-900);
  color:var(--ink-050);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
}

a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
input{ font-family:inherit; }

::selection{ background:var(--gold-500); color:var(--navy-950); }

/* focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline:2px solid var(--gold-400);
  outline-offset:3px;
  border-radius:var(--radius-sm);
}

/* ============================================
   SHELL — split screen
   ============================================ */

.auth-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(360px, 44%) 1fr;
}

@media (max-width:920px){
  .auth-shell{ grid-template-columns:1fr; }
  .showcase-panel{ display:none; }
}

/* ---------- LEFT: form panel (light theme) ---------- */
/* The right showcase stays dark navy; the form side runs on a clean
   white surface with near-black text and neutral-gray input borders,
   swapping just the tokens the form components already reference. */

.form-panel{
  --navy-900:#FFFFFF;      /* panel background */
  --navy-850:#FCFCFB;      /* focused input background */
  --navy-800:#FFFFFF;      /* input background */
  --navy-700:#DCDAE2;      /* input border */
  --navy-600:#C3C0CC;      /* input hover border */
  --navy-950:#171321;      /* text on gold buttons / checkmarks */

  --ink-050:#171321;       /* headings, primary text */
  --ink-300:#26232E;       /* field labels */
  --ink-500:#5B5964;       /* body copy, hints, icons, placeholders */
  --ink-700:#3A3843;

  --gold-300:#9C7A1E;      /* links on white */
  --gold-400:#7E6316;      /* link hover on white */

  background:var(--navy-900);
  padding:44px 56px 56px;
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

@media (max-width:560px){
  .form-panel{ padding:32px 22px 40px; }
}

.form-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:clamp(36px, 8vh, 76px);
}

.brand{
  display:flex;
  align-items:center;
  gap:11px;
}
.brand img{ display:block; width:38px; height:38px; }
.brand span{
  font-family:var(--font-display);
  font-weight:600;
  font-size:19px;
  letter-spacing:0.01em;
  color:var(--ink-050);
}

.topbar-note{
  font-size:14px;
  color:var(--ink-500);
  white-space:nowrap;
}
.topbar-note a{
  color:var(--gold-300);
  border-bottom:1px solid rgba(234,209,137,0.35);
  padding-bottom:1px;
  transition:border-color .15s ease, color .15s ease;
}
.topbar-note a:hover{ color:var(--gold-400); border-color:var(--gold-400); }

.form-body{
  width:100%;
  max-width:408px;
  margin:0 auto;
  flex:1;
}

.eyebrow{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--gold-400);
  margin:0 0 14px;
}

.form-heading{
  font-family:var(--font-display);
  font-weight:500;
  font-style:italic;
  font-size:clamp(34px, 4.2vw, 44px);
  line-height:1.08;
  letter-spacing:-0.01em;
  color:var(--ink-050);
  margin:0 0 14px;
}
.form-heading em{ color:var(--gold-300); font-style:italic; }

.form-sub{
  font-size:15px;
  line-height:1.6;
  color:var(--ink-500);
  margin:0 0 36px;
  max-width:38ch;
}

/* ---------- fields ---------- */

.field{
  margin-bottom:24px;
}

.field-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
@media (max-width:480px){
  .field-row{ grid-template-columns:1fr; }
}

label{
  display:block;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:0.03em;
  text-transform:uppercase;
  color:var(--ink-300);
  margin-bottom:8px;
}
label .optional{
  text-transform:none;
  font-weight:400;
  letter-spacing:0;
  color:var(--ink-500);
}

.input-wrap{
  position:relative;
  display:flex;
  align-items:center;
}
.input-wrap svg{
  position:absolute;
  left:15px;
  width:17px;
  height:17px;
  color:var(--ink-500);
  pointer-events:none;
  transition:color .15s ease;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select{
  width:100%;
  height:48px;
  background:var(--navy-800);
  border:1.4px solid var(--navy-700);
  border-radius:var(--radius-md);
  color:var(--ink-050);
  font-size:15px;
  padding:0 16px 0 44px;
  box-shadow:0 1px 2px rgba(23,19,33,0.03);
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
  appearance:none;
  -webkit-appearance:none;
}

select{
  padding-right:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%237C8194' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 16px center;
}
select:invalid{ color:var(--ink-500); }
select option{ background:var(--navy-800); color:var(--ink-050); }

input::placeholder{ color:var(--ink-500); }

input:hover, select:hover{ border-color:var(--navy-600); }

input:focus, select:focus{
  outline:none;
  border-color:var(--gold-500);
  background:var(--navy-850);
  box-shadow:0 0 0 4px rgba(201,162,39,0.16);
}
input:focus + svg,
.input-wrap:focus-within svg{ color:var(--gold-400); }

.input-wrap input[type="password"],
.input-wrap input[data-pw]{ padding-right:44px; }

.pw-toggle{
  position:absolute;
  right:14px;
  width:20px;
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:none;
  border:none;
  color:var(--ink-500);
  padding:0;
}
.pw-toggle:hover{ color:var(--gold-400); }
.pw-toggle svg{ width:19px; height:19px; }
.pw-toggle .icon-off{ display:none; }
.pw-toggle.is-visible .icon-on{ display:none; }
.pw-toggle.is-visible .icon-off{ display:block; }

.field-hint{
  font-size:12.5px;
  color:var(--ink-500);
  margin-top:7px;
  line-height:1.5;
}

/* strength meter */
.pw-strength{
  display:flex;
  gap:5px;
  margin-top:10px;
}
.pw-strength i{
  flex:1;
  height:3px;
  border-radius:2px;
  background:var(--navy-700);
  transition:background .2s ease;
}
.pw-strength[data-level="1"] i:nth-child(1){ background:#C9645B; }
.pw-strength[data-level="2"] i:nth-child(1),
.pw-strength[data-level="2"] i:nth-child(2){ background:var(--gold-500); }
.pw-strength[data-level="3"] i{ background:var(--success); }

/* ---------- OTP verification ---------- */

.otp-target{
  font-weight:600;
  color:var(--ink-050);
}
.otp-row{
  display:flex;
  gap:10px;
  margin:22px 0 8px;
}
@media (max-width:400px){ .otp-row{ gap:7px; } }

.otp-row input{
  width:100%;
  aspect-ratio:1 / 1;
  height:auto;
  padding:0;
  text-align:center;
  font-size:20px;
  font-weight:600;
  letter-spacing:0;
  font-family:var(--font-mono);
}

.otp-status{
  font-size:13px;
  min-height:18px;
  margin:0 0 22px;
}
.otp-status.is-error{ color:#C0483F; }
.otp-status.is-ok{ color:var(--success); }

.otp-resend-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:28px;
  font-size:13.5px;
  color:var(--ink-500);
}
.otp-resend-row button{
  background:none;
  border:none;
  padding:0;
  font-size:13.5px;
  font-weight:600;
  color:var(--gold-300);
}
.otp-resend-row button:disabled{
  color:var(--ink-500);
  cursor:default;
}
.otp-resend-row button:not(:disabled):hover{ color:var(--gold-400); }

/* ---------- checkbox / rows ---------- */

.row-between{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:6px 0 28px;
  gap:12px;
  flex-wrap:wrap;
}

.checkbox{
  display:flex;
  align-items:flex-start;
  gap:10px;
  cursor:pointer;
  font-size:13.5px;
  line-height:1.55;
  color:var(--ink-300);
}
.checkbox input{
  appearance:none;
  -webkit-appearance:none;
  width:19px;
  height:19px;
  min-width:19px;
  border-radius:6px;
  border:1.4px solid var(--navy-600);
  background:var(--navy-800);
  position:relative;
  margin-top:1px;
  transition:border-color .15s ease, background .15s ease;
}
.checkbox input:checked{
  background:var(--gold-500);
  border-color:var(--gold-500);
}
.checkbox input:checked::after{
  content:"";
  position:absolute;
  left:5px; top:1.5px;
  width:5px; height:9px;
  border:solid var(--navy-950);
  border-width:0 2px 2px 0;
  transform:rotate(40deg);
}
.checkbox a{ color:var(--gold-300); border-bottom:1px solid rgba(234,209,137,0.35); }

.link-gold{
  font-size:13.5px;
  font-weight:600;
  color:var(--gold-300);
  white-space:nowrap;
}
.link-gold:hover{ color:var(--gold-400); }

/* ---------- buttons ---------- */

.btn-primary{
  width:100%;
  height:50px;
  background:var(--gold-500);
  color:var(--navy-950);
  border:none;
  border-radius:var(--radius-md);
  font-size:15.5px;
  font-weight:700;
  letter-spacing:0.01em;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:background .15s ease, transform .1s ease;
}
.btn-primary:hover{ background:var(--gold-400); }
.btn-primary:active{ transform:translateY(1px); }
.btn-primary svg{ width:16px; height:16px; }

.btn-secondary{
  width:100%;
  height:50px;
  background:transparent;
  color:var(--ink-050);
  border:1.4px solid var(--navy-600);
  border-radius:var(--radius-md);
  font-size:15px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:border-color .15s ease, background .15s ease;
}
.btn-secondary:hover{ border-color:var(--gold-500); background:var(--navy-850); }

.btn-row{
  display:flex;
  gap:12px;
  margin-top:8px;
}
.btn-row .btn-secondary{ flex:0 0 128px; }
.btn-row .btn-primary{ flex:1; }

.form-footer-note{
  font-size:12.5px;
  color:var(--ink-500);
  line-height:1.6;
  margin-top:22px;
}
.form-footer-note a{ color:var(--gold-300); }

/* ============================================
   STEPPER (signup)
   ============================================ */

.stepper{
  margin-bottom:34px;
}
.stepper-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.stepper-count{
  font-family:var(--font-mono);
  font-size:11px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--ink-500);
}
.stepper-count b{
  color:var(--gold-300);
  font-weight:600;
}
.stepper-name{
  font-size:13.5px;
  font-weight:600;
  color:var(--ink-050);
}
.stepper-track{
  height:4px;
  border-radius:999px;
  background:var(--navy-700);
  overflow:hidden;
}
.stepper-fill{
  height:100%;
  width:25%;
  border-radius:999px;
  background:var(--gold-500);
  transition:width .35s ease;
}



.step-panel{ display:none; }
.step-panel.is-active{ display:block; animation:fadeUp .35s ease; }

@keyframes fadeUp{
  from{ opacity:0; transform:translateY(8px); }
  to{ opacity:1; transform:translateY(0); }
}

@media (prefers-reduced-motion:reduce){
  .step-panel.is-active{ animation:none; }
}

.success-panel{ display:none; text-align:center; padding:20px 0 8px; }
.success-panel.is-active{ display:block; animation:fadeUp .4s ease; }
.success-icon{
  width:60px; height:60px;
  border-radius:50%;
  background:rgba(201,162,39,0.14);
  border:1.4px solid var(--gold-500);
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 22px;
}
.success-icon svg{ width:26px; height:26px; color:var(--gold-400); }

/* ============================================
   RIGHT: showcase panel
   ============================================ */

.showcase-panel{
  position:relative;
  background:var(--cream-100);
  border-left:1px solid #EAE6D8;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:56px;
}

.showcase-panel::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:radial-gradient(rgba(13,20,38,0.09) 1px, transparent 1px);
  background-size:26px 26px;
  mask-image:radial-gradient(ellipse 80% 70% at 60% 30%, black 40%, transparent 85%);
}

.showcase-glow{
  position:absolute;
  top:-140px; right:-120px;
  width:520px; height:520px;
  background:radial-gradient(circle, rgba(201,162,39,0.28) 0%, transparent 70%);
  pointer-events:none;
}

.showcase-stage{
  position:relative;
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:0;
}

/* project card — dark navy card floating on the light showcase surface,
   the one deliberately bold moment on an otherwise quiet page */
.project-card{
  position:relative;
  width:min(430px, 88%);
  background:var(--navy-950);
  border-radius:var(--radius-lg);
  box-shadow:0 30px 60px -18px rgba(13,20,38,0.35);
  padding:26px 26px 30px;
  color:var(--cream-50);
}
.project-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}
.project-card-head h3{
  font-family:var(--font-display);
  font-size:17px;
  font-weight:600;
  margin:0;
  color:var(--cream-50);
}
.pill{
  font-family:var(--font-mono);
  font-size:10.5px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(234,209,137,0.16);
  color:var(--gold-300);
  white-space:nowrap;
}
.skeleton{
  height:9px;
  border-radius:5px;
  background:rgba(245,244,241,0.14);
  margin-bottom:9px;
}
.skeleton.w-90{ width:90%; }
.skeleton.w-70{ width:70%; }
.skeleton.w-50{ width:50%; }

.card-avatars{
  display:flex;
  align-items:center;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid rgba(245,244,241,0.14);
}
.card-avatars img{
  width:30px; height:30px;
  border-radius:50%;
  border:2px solid var(--navy-950);
  margin-left:-8px;
  display:block;
}
.card-avatars img:first-child{ margin-left:0; }
.avatar-more{
  width:30px; height:30px;
  border-radius:50%;
  background:var(--navy-800);
  color:var(--gold-300);
  font-family:var(--font-mono);
  font-size:10.5px;
  display:flex; align-items:center; justify-content:center;
  margin-left:-8px;
  border:2px solid var(--navy-950);
}

/* floating team panel — one shade lighter than the project card for depth */
.team-float{
  position:absolute;
  right:-8%;
  bottom:-14%;
  width:250px;
  background:var(--navy-850);
  border-radius:16px;
  box-shadow:0 24px 50px -14px rgba(13,20,38,0.4);
  padding:14px;
  color:var(--cream-50);
}
.team-float h4{
  font-family:var(--font-body);
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color:var(--ink-300);
  margin:2px 4px 10px;
}
.team-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px;
  border-radius:10px;
  margin-bottom:4px;
}
.team-row img{ width:30px; height:30px; border-radius:50%; }
.team-row .who{ flex:1; min-width:0; }
.team-row .name{ font-size:12.5px; font-weight:600; line-height:1.3; color:var(--cream-50); }
.team-row .role{ font-size:11px; color:var(--ink-300); }
.team-row.is-assigned{
  background:rgba(234,209,137,0.14);
}
.team-row.is-assigned .name{ color:var(--cream-50); }
.team-row.is-assigned .role{ color:var(--gold-300); }
.team-row .check{
  width:18px; height:18px;
  border-radius:6px;
  background:var(--gold-500);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.team-row .check svg{ width:11px; height:11px; color:var(--navy-950); }

.showcase-copy{
  position:relative;
  margin-top:56px;
}
.showcase-copy h2{
  font-family:var(--font-display);
  font-style:italic;
  font-weight:500;
  font-size:clamp(28px, 3vw, 38px);
  line-height:1.15;
  color:var(--ink-900);
  margin:0 0 12px;
  max-width:15ch;
}
.showcase-copy p{
  font-size:14.5px;
  color:var(--ink-700);
  max-width:40ch;
  line-height:1.6;
  margin:0;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-notification{
  position:fixed;
  top:24px;
  right:24px;
  background:#FFFFFF;
  color:#171321;
  border-radius:var(--radius-md);
  box-shadow:0 12px 40px rgba(13,20,38,0.2), 0 0 0 1px rgba(13,20,38,0.08);
  padding:16px 20px;
  min-width:300px;
  max-width:420px;
  z-index:9999;
  opacity:0;
  transform:translateX(400px);
  transition:opacity .3s ease, transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events:none;
}

.toast-notification.show{
  opacity:1;
  transform:translateX(0);
  pointer-events:auto;
}

.toast-content{
  display:flex;
  align-items:center;
  gap:12px;
}

.toast-icon{
  width:28px;
  height:28px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  font-weight:700;
  flex-shrink:0;
}

.toast-success{
  border-left:4px solid var(--success);
}

.toast-success .toast-icon{
  background:rgba(124,184,143,0.15);
  color:var(--success);
}

.toast-error{
  border-left:4px solid #E74C3C;
}

.toast-error .toast-icon{
  background:rgba(231,76,60,0.15);
  color:#E74C3C;
}

.toast-info{
  border-left:4px solid var(--gold-500);
}

.toast-info .toast-icon{
  background:rgba(201,162,39,0.15);
  color:var(--gold-600);
}

.toast-warning{
  border-left:4px solid #F39C12;
}

.toast-warning .toast-icon{
  background:rgba(243,156,18,0.15);
  color:#D68910;
}

.toast-message{
  font-size:14px;
  line-height:1.5;
  color:#171321;
  font-weight:500;
}

@media (max-width:560px){
  .toast-notification{
    top:16px;
    right:16px;
    left:16px;
    min-width:auto;
  }
}

/* ============================================
   LOADING STATES & MICRO-ANIMATIONS
   ============================================ */

@keyframes pulse{
  0%, 100%{ opacity:1; }
  50%{ opacity:0.5; }
}

.btn-primary:disabled,
.btn-secondary:disabled{
  cursor:not-allowed;
  opacity:0.6;
}

input:disabled,
select:disabled{
  cursor:not-allowed;
  opacity:0.5;
  background:var(--navy-700);
}

/* Smooth focus transitions */
input, select, button{
  transition:all .15s ease;
}

/* Enhanced hover states */
.form-topbar .brand:hover img{
  transform:scale(1.05);
  transition:transform .2s ease;
}

/* Smooth page transitions */
@keyframes fadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

body{
  animation:fadeIn .3s ease;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* High contrast focus for accessibility */
*:focus-visible{
  outline:3px solid var(--gold-400);
  outline-offset:2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
  }
}

/* Dark mode support for system preference */
@media (prefers-color-scheme:dark){
  /* The auth system already uses dark theme on showcase,
     this is just a placeholder for future enhancements */
}