/* ===============================
   VARIABEL GLOBAL
=================================*/
:root{
  --bg:#eef0ff;
  --brand:#2e7bff;
  --brand-2:#32CD32;
  --ink:#0f172a;
  --muted:#475569;
  --card-bg:rgba(255,255,255,0.78);
  --radius:18px;
  --ring:#c7d2fe;
  --shadow:0 10px 30px rgba(2,6,23,.12);
  --border:rgba(2,6,23,.06);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:"Poppins",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:
    radial-gradient(1200px 600px at -10% 0%, #c7d2fe 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 10%, #e9d5ff 0%, transparent 55%),
    var(--bg);
  color:var(--ink);
}

a{ color:inherit; }

/* ===============================
   LANDING PAGE (index.php)
=================================*/
.hero{ padding:clamp(56px,6vw,84px) 0; }
.hero-title{
  font-weight:700;
  font-size:clamp(28px,4vw,44px);
  line-height:1.15;
}
.hero-sub{
  color:var(--muted);
  font-size:clamp(14px,2vw,18px);
  font-weight:300;
}
.hero-card{
  background:var(--card-bg);
  border-radius:var(--radius);
  box-shadow:0 10px 30px rgba(2,6,23,.08);
  border:1px solid var(--border);
  overflow:hidden;
}
.hero-img{
  display:block;
  width:100%;
  border-radius:calc(var(--radius) - 2px);
  box-shadow:0 12px 30px rgba(2,6,23,.15);
}
.card-soft{
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:0 8px 22px rgba(2,6,23,.06);
}
.section-title{
  font-size:clamp(20px,2.4vw,26px);
  font-weight:700;
}
.lead-sm{ color:var(--muted); }
.ic{
  width:44px;height:44px;border-radius:999px;
  display:inline-grid;place-items:center;
  background:linear-gradient(135deg,#dbeafe 0%, #d1fae5 100%);
  color:#0f172a;margin-right:.5rem;
}
.reveal{ opacity:0; transform:translateY(14px); transition:all .6s ease; }
.reveal.show{ opacity:1; transform:none; }
footer{ color:var(--muted); font-size:14px; }
.text-brand{ color:var(--brand); }

/* ===============================
   AUTH PAGES SHARED (lamarkerja.php, register.php)
   Pakai: body class="auth-body auth-apply" atau "auth-body auth-register"
=================================*/
.auth-body{
  margin:0;
  font-family:"Poppins",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
}

/* Background layer (gambar + gradient) */
.auth-body .auth-bg{
  position:fixed;
  inset:0;
  background:
    radial-gradient(1200px 600px at -10% 0%, #c7d2fe55 0%, transparent 55%),
    radial-gradient(900px 500px at 110% 10%, #e9d5ff55 0%, transparent 50%),
    url('../image/loginblur.jpg') center/cover no-repeat;
  filter:blur(6px) saturate(1.05);
  transform:scale(1.02);
  z-index:-2;
}

/* Wrapper */
.auth-body .auth-wrap{
  min-height:100dvh;
  display:grid;
  place-items:start center;
  padding:20px 16px 40px;
}

/* Brand header */
.auth-body .auth-brand{
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:center;
  margin:28px 0 10px;
}
.auth-body .auth-brand img{
  height:64px; width:auto; border-radius:8px;
}
.auth-body .brand-sans{ font-weight:700; }
.auth-body .brand-script{
  font-family:"Monotype Corsiva","Lucida Calligraphy","Great Vibes","Segoe Script",cursive;
  color:var(--brand);
  font-size:1.6rem;
  line-height:1.1;
  white-space:nowrap;
}

/* Card */
.auth-body .auth-card{
  width:min(94vw, 980px);
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
  overflow:hidden;
  -webkit-backdrop-filter:blur(10px) saturate(1.1);
  backdrop-filter:blur(10px) saturate(1.1);
  animation:auth-pop .35s ease;
}
.auth-body.auth-register .auth-card{ width:min(92vw, 900px); }

@keyframes auth-pop{
  from{ opacity:0; transform:translateY(8px) scale(.98); }
  to{ opacity:1; transform:none; }
}

.auth-body .auth-card-head{
  padding:16px 22px;
  border-bottom:1px solid var(--border);
  text-align:center;
}
.auth-body .title{
  font-weight:700;
  font-size:1.4rem;
  margin:0 0 4px;
}
.auth-body .sub{
  color:var(--muted);
  font-size:.95rem;
  margin:0;
}
.auth-body .auth-card-body{ padding:20px; }

/* Grid */
.auth-body .grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px 16px;
}
@media (min-width:768px){
  .auth-body .grid{ grid-template-columns:1fr 1fr; }
  .auth-body .grid .full{ grid-column:1 / -1; }
}

/* Inputs */
.auth-body label{
  display:block;
  font-size:.9rem;
  color:#334155;
  margin:6px 2px 6px;
}
.auth-body .control{
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid #e6eaf2;
  border-radius:12px;
  padding:12px 14px;
  transition:border .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-body .control:focus-within{
  border-color:var(--ring);
  box-shadow:0 0 0 4px #c7d2fe55;
}
.auth-body .control input,
.auth-body .control select{
  width:100%;
  border:none;
  outline:0;
  background:transparent;
  font-size:.98rem;
  color:var(--ink);
  appearance:none;
}
.auth-body .hint{
  font-size:.8rem;
  color:#64748b;
  margin:4px 2px 0;
}

/* File drop */
.auth-body .drop{
  position:relative;
  border:2px dashed #d7def0;
  background:#fff;
  border-radius:14px;
  padding:18px;
  text-align:center;
  color:#475569;
  transition:border .2s ease, background .2s ease;
}
.auth-body .drop:hover{
  border-color:#b8c2ef;
  background:#f9fbff;
}
.auth-body .drop input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}
.auth-body .drop .name{
  font-weight:600;
  color:#1f2937;
  margin-top:6px;
  word-break:break-all;
}

/* Toggle password */
.auth-body .toggle{
  border:none;
  background:transparent;
  cursor:pointer;
  color:#64748b;
  font-size:.9rem;
  padding:4px 6px;
}

/* Actions */
.auth-body .actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:10px;
}
.auth-body .btn{
  border:none;
  cursor:pointer;
  border-radius:999px;
  padding:12px 18px;
  font-weight:700;
  font-size:1rem;
  box-shadow:0 8px 20px rgba(37,99,235,.25);
  color:#fff;
  background:linear-gradient(180deg,#3b82f6,#2563eb);
  transition:transform .06s ease, filter .2s ease;
}
.auth-body .btn:hover{ filter:brightness(.97); }
.auth-body .btn:active{ transform:translateY(1px); }

.auth-body .note{
  font-size:.92rem;
  color:#1f2937;
  padding:14px 18px;
  background:#f3f6ff;
  border-top:1px solid #e6ebff;
}
.auth-body .note a{
  color:#2563eb;
  font-weight:600;
  text-decoration:none;
}
.auth-body .note a:hover{ text-decoration:underline; }

/* ===============================
   VALIDATION UI (shared)
=================================*/
.auth-body .field-error{
  margin-top:8px;
  font-size:12px;
  line-height:1.35;
  color:#b42318;
  display:none;
}
.auth-body .is-invalid .field-error{ display:block; }
.auth-body .is-invalid input,
.auth-body .is-invalid select{
  border-color:rgba(180,35,24,.55) !important;
  box-shadow:0 0 0 4px rgba(180,35,24,.12) !important;
}
/* invalid state untuk dropzone file */
.auth-body .drop.is-invalid{
  border-color: rgba(180,35,24,.55);
  background: rgba(180,35,24,.04);
}
.auth-body .drop.is-invalid .name{
  color:#b42318;
}

.auth-body .error-banner{
  margin:0 0 14px 0;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(180,35,24,.25);
  background:rgba(180,35,24,.08);
  color:#7a271a;
  font-size:13px;
}
.auth-body .error-banner b{ font-weight:700; }

/* ===============================
   SUCCESS MODAL (khusus lamarkerja.php)
=================================*/
.auth-body.auth-apply{
  --success-accent:#2e7bff;
  --success-accent-2:#1d4ed8;
  --success-bg:rgba(18,18,18,.92);
  --success-border:rgba(255,255,255,.14);
  --success-text:rgba(255,255,255,.92);
  --success-muted:rgba(255,255,255,.72);
}
.auth-body.auth-apply .success-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:9999;
  background:
    radial-gradient(1200px 600px at 50% 10%, rgba(46,123,255,0.18), transparent 55%),
    rgba(0,0,0,.62);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.auth-body.auth-apply .success-overlay.is-open{ display:flex; }
.auth-body.auth-apply .success-modal{
  width:100%;
  max-width:560px;
  border-radius:22px;
  overflow:hidden;
  position:relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03)),
    var(--success-bg);
  border:1px solid var(--success-border);
  box-shadow:0 30px 80px rgba(0,0,0,.48), 0 0 0 1px rgba(0,0,0,.18) inset;
}
.auth-body.auth-apply .success-modal::before{
  content:"";
  position:absolute;
  top:-120px; left:-120px;
  width:260px; height:260px;
  background:radial-gradient(circle, rgba(46,123,255,0.22), transparent 65%);
  filter:blur(2px);
  pointer-events:none;
}
.auth-body.auth-apply .success-overlay.is-open .success-modal{
  animation:lamarSuccessPop .28s ease-out both;
}
@keyframes lamarSuccessPop{
  from{ opacity:0; transform:translateY(10px) scale(.985); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}
.auth-body.auth-apply .success-head{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:18px 20px 14px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.auth-body.auth-apply .success-icon{
  width:46px; height:46px;
  border-radius:14px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:rgba(46,123,255,0.16);
  border:1px solid rgba(46,123,255,0.40);
  box-shadow:0 0 0 7px rgba(46,123,255,0.10);
}
.auth-body.auth-apply .success-icon svg{ width:22px; height:22px; display:block; }
.auth-body.auth-apply .success-title{
  margin:0;
  font-size:16.5px;
  font-weight:800;
  color:#fff;
  letter-spacing:.2px;
}
.auth-body.auth-apply .success-subtitle{
  margin:4px 0 0;
  font-size:13px;
  color:var(--success-muted);
  line-height:1.45;
}
.auth-body.auth-apply .success-body{ padding:14px 20px 18px; }
.auth-body.auth-apply .success-desc{
  margin:0 0 14px;
  font-size:13.5px;
  color:var(--success-text);
  line-height:1.6;
}
.auth-body.auth-apply .success-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:10px;
}
.auth-body.auth-apply .success-btn{
  appearance:none;
  border:0;
  cursor:pointer;
  border-radius:14px;
  padding:10px 14px;
  font-weight:700;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
  user-select:none;
}
.auth-body.auth-apply .success-btn:active{ transform:translateY(1px); }
.auth-body.auth-apply .success-btn:focus{ outline:none; }
.auth-body.auth-apply .success-btn:focus-visible{ box-shadow:0 0 0 3px rgba(46,123,255,0.30); }
.auth-body.auth-apply .success-btn-ghost{
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.03);
  color:rgba(255,255,255,0.92);
}
.auth-body.auth-apply .success-btn-ghost:hover{
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.26);
}
.auth-body.auth-apply .success-btn-primary{
  background:linear-gradient(180deg,var(--success-accent),var(--success-accent-2));
  color:#071426;
  box-shadow:0 12px 34px rgba(46,123,255,0.30);
}
.auth-body.auth-apply .success-btn-primary:hover{ filter:brightness(1.05); }
.auth-body.auth-apply .success-footnote{
  margin-top:12px;
  font-size:12.5px;
  color:rgba(255,255,255,0.70);
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.auth-body.auth-apply .success-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.86);
}

/* ===============================
   LOGIN PAGE (tetap, tidak diubah)
=================================*/
.login-body{
  margin:0;
  font-family:"Poppins",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
}
.login-body .bg{
  position:fixed;
  inset:0;
  background:url('../image/loginblur.jpg') center/cover no-repeat;
  transform:scale(1.04);
  z-index:-2;
}
.login-body .bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 600px at -10% 0%, #c7d2fe55 0%, transparent 55%),
    radial-gradient(900px 500px at 110% 10%, #e9d5ff55 0%, transparent 50%);
  z-index:-1;
}
.login-body .wrap{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:24px;
}
.login-body .card{
  width:min(92vw, 440px);
  background:var(--card-bg);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
  -webkit-backdrop-filter:blur(8px) saturate(1.1);
  backdrop-filter:blur(8px) saturate(1.1);
  overflow:hidden;
  animation:login-pop .35s ease;
}
@keyframes login-pop{
  from{ opacity:0; transform:translateY(8px) scale(.98); }
  to{ opacity:1; transform:none; }
}
.login-body .card-head{
  padding:22px 22px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.login-body .brand-row{
  display:flex;
  align-items:center;
  gap:10px;
}
.login-body .brand-row img{
  height:70px;
  width:auto;
  border-radius:8px;
}
.login-body .brand-sans{ font-weight:700; letter-spacing:.2px; }
.login-body .brand-script{
  font-family:"Monotype Corsiva","Lucida Calligraphy","Great Vibes","Segoe Script",cursive;
  font-weight:400;
  color:var(--brand);
  font-size:1.6rem;
  line-height:1.1;
  white-space:nowrap;
}
.login-body .title{
  font-weight:700;
  font-size:1.4rem;
  margin:6px 0 2px;
  text-align:center;
}
.login-body .sub{
  color:var(--muted);
  font-size:.9rem;
  text-align:center;
  margin:0 0 8px;
}
.login-body .card-body{ padding:18px 22px 22px; }
.login-body .field{
  display:flex;
  align-items:center;
  background:#fff;
  border:1px solid #eaeef5;
  border-radius:12px;
  padding:10px 12px;
  gap:8px;
  transition:border .2s ease, box-shadow .2s ease, background .2s ease;
  margin-bottom:12px;
}
.login-body .field:focus-within{
  border-color:#c7d2fe;
  box-shadow:0 0 0 4px #c7d2fe55;
  background:#fff;
}
.login-body .field input{
  border:none;
  outline:0;
  width:100%;
  font-size:.98rem;
  background:transparent;
  color:var(--ink);
}
.login-body .toggle{
  border:none;
  background:transparent;
  cursor:pointer;
  color:var(--muted);
  font-size:.95rem;
  padding:4px 6px;
}
.login-body .btn{
  width:100%;
  border:none;
  cursor:pointer;
  border-radius:999px;
  padding:12px 16px;
  background:linear-gradient(180deg,#3b82f6,#2563eb);
  color:#fff;
  font-weight:700;
  font-size:1rem;
  box-shadow:0 8px 20px rgba(37,99,235,.35);
  transition:transform .06s ease, filter .2s ease;
}
.login-body .btn:hover{ filter:brightness(.97); }
.login-body .btn:active{ transform:translateY(1px); }
.login-body .card-foot{
  background:#f3f6ff;
  border-top:1px solid #e6ebff;
  padding:14px 18px;
  font-size:.93rem;
  color:#1f2937;
}
.login-body .card-foot a{
  color:#2563eb;
  font-weight:600;
  text-decoration:none;
}
.login-body .card-foot a:hover{ text-decoration:underline; }
.login-body .error{
  color:#dc2626;
  text-align:center;
  font-weight:600;
  margin:10px 0 -2px;
}
.login-body label{
  display:block;
  font-size:.85rem;
  color:#64748b;
  margin:6px 0 6px 2px;
}
/* ===============================
   FILE DROP VALIDATION (FIX)
   =============================== */

/* border merah untuk dropzone saat invalid */
.lamar-body .drop.is-invalid,
.register-body .drop.is-invalid{
  border-color: rgba(180, 35, 24, 0.55) !important;
  background: rgba(180, 35, 24, 0.04) !important;
}

/* tampilkan error kalau .field-error itu SIBLING setelah .drop */
.lamar-body .drop.is-invalid + .field-error,
.register-body .drop.is-invalid + .field-error{
  display: block !important;
}

/* opsional: teks nama file ikut merah */
.lamar-body .drop.is-invalid .name,
.register-body .drop.is-invalid .name{
  color: #b42318 !important;
}

