/* =====================================================
   AUTH (Signup/Login) - Matches style.css theme
   Uses: Cinzel / Cormorant / Inter, Ivory/Beige, Gold accents
===================================================== */

* { margin:0; padding:0; box-sizing:border-box; }

html, body { height: 100%; }

body{
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(251,247,239,1) 0%, rgba(243,235,222,1) 100%);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.auth-wrapper{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}

/* LEFT IMAGE */
.auth-image{
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.auth-image::before{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(90deg, rgba(11,10,10,.78) 0%, rgba(11,10,10,.38) 55%, rgba(11,10,10,.18) 100%),
    radial-gradient(700px 420px at 20% 30%, rgba(216,179,91,.22) 0%, transparent 55%);
}

.auth-image::after{
  content:"";
  position:absolute;
  top:0; right:0; bottom:0;
  width:64px; /* smaller */
  background: linear-gradient(90deg, rgba(11,10,10,0), rgba(11,10,10,.18));
  pointer-events:none;
}



/* overlay content */
.image-overlay{
  position:absolute;
  left: clamp(22px, 5vw, 56px);
  bottom: clamp(22px, 5vw, 56px);
  z-index:2;
  max-width: 560px;
}

.image-overlay .brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;

  background: rgba(251,247,239,.10);
  border: 1px solid rgba(233,212,168,.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: rgba(255,255,255,.92);
  text-decoration:none;
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
}

.image-overlay .brand img{
  height: 36px;
  width: auto;
  display:block;
  opacity: .95;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,.35));
}

.image-overlay h1{
  margin-top: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 3.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: .02em;
  color: rgba(255,255,255,.97);

  /* Better readability */
  text-shadow:
    0 4px 18px rgba(0,0,0,.75),
    0 12px 48px rgba(0,0,0,.45);
}

.image-overlay p{
  margin-top: 10px;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1.02rem;
  line-height: 1.8;
  color: rgba(240,220,170,.98);

  text-shadow:
    0 3px 12px rgba(0,0,0,.7),
    0 10px 32px rgba(0,0,0,.45);
}


/* RIGHT FORM AREA */
.auth-form-box{
  position: relative;
  display:flex;
  flex-direction:column;
  justify-content:center;

  padding: clamp(38px, 5vw, 76px) clamp(22px, 4vw, 70px);

  /* like your cards/modal surfaces */
  background:
    radial-gradient(900px 520px at 16% 0%, rgba(255, 242, 207, .55) 0%, transparent 58%),
    radial-gradient(900px 520px at 92% 10%, rgba(255, 232, 176, .35) 0%, transparent 56%),
    linear-gradient(180deg, rgba(251,247,239,.98) 0%, rgba(239,230,211,.92) 100%);

  border-left: 1px solid rgba(27,24,22,.08);
  box-shadow: inset 1px 0 0 rgba(255,255,255,.55);
}

.auth-form-box::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:1px;
  background: linear-gradient(90deg,
    rgba(214,183,122,0) 0%,
    rgba(214,183,122,.45) 18%,
    rgba(214,183,122,.45) 82%,
    rgba(214,183,122,0) 100%
  );
  opacity:.9;
}

.form-top .eyebrow{
  display:inline-block;
  font-family:'Cinzel', serif;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(27,24,22,.55);
  margin-bottom: 10px;
}

.form-top h2{
  font-family:'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 2.6vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: .02em;
  color: rgba(27,24,22,.94);
  text-shadow: 0 1px 0 rgba(233,215,176,.45);
}

.form-top .subtitle{
  margin-top: 10px;
  color: rgba(27,24,22,.66);
  font-size: 1.02rem;
  line-height: 1.8;
  max-width: 520px;
}

/* Alerts match your system */
.alert{
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(27,24,22,.12);
  background: rgba(255,255,255,.70);
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
}
.alert ul{ padding-left:18px; margin-top:6px; }
.alert-error{
  background: rgba(160, 40, 40, 0.08);
  border: 1px solid rgba(160, 40, 40, 0.35);
  color: rgba(120, 20, 20, 0.95);
}
.alert-success{
  background: rgba(214,183,122,.16);
  border-color: rgba(214,183,122,.45);
  font-weight: 800;
}

/* Form */
.form{
  margin-top: 22px;
  display:flex;
  flex-direction:column;
  gap: 14px;
}

/* IMPORTANT: scope labels/inputs so it won't affect other pages */
.auth-form-box label{
  font-family:'Cinzel', serif;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(27,24,22,.72);
  font-weight: 800;
  display:block;
  margin-bottom: 8px;
}

.auth-form-box input,
.auth-form-box select{
  width: 100%;
  height: 48px;
  border-radius: 16px;
  padding: 0 14px;

  background: rgba(251,247,239,.92);
  color: rgba(27,24,22,.88);
  border: 1px solid rgba(27,24,22,.14);
  outline: none;

  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.auth-form-box input:hover,
.auth-form-box select:hover{
  border-color: rgba(27,24,22,.18);
  background: rgba(255,255,255,.92);
}

.auth-form-box input:focus,
.auth-form-box select:focus{
  border-color: rgba(214,183,122,.80);
  box-shadow: 0 0 0 6px rgba(214,183,122,.22);
  transform: translateY(-1px);
}

.phone-row{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

/* Password reveal */
.pass-wrap{
  position: relative;
}

.pass-wrap input{
  padding-right: 96px;
}

.pass-toggle{
  position:absolute;
  top:50%;
  right:10px;
  transform: translateY(-50%);

  border: 1px solid rgba(27,24,22,.14);
  background: rgba(255,255,255,.70);

  border-radius: 999px;
  height: 34px;
  padding: 0 12px;

  cursor:pointer;

  font-family:'Cinzel', serif;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 900;

  color: rgba(27,24,22,.82);
  display:inline-flex;
  align-items:center;
  gap:8px;

  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.pass-toggle:hover{
  transform: translateY(-50%) translateY(-1px);
  background: rgba(27,24,22,.05);
  border-color: rgba(214,183,122,.26);
}

.pass-toggle i{
  font-size: 12px;
  color: rgba(194,161,94,.95);
}

.pass-toggle span{
  font-size: 10px;
}

/* Password rules / strength */
.rules{
  margin-top: 10px;
  list-style: none;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(27,24,22,.10);
  background: rgba(255,255,255,.70);
  display:none;
}
.rules.show{ display:block; }

.rules li{
  font-size: 12px;
  color: rgba(27,24,22,.65);
  padding: 4px 0;
}
.rules li.ok{
  color: rgba(22,101,52,.95);
  text-decoration: line-through;
}

.strength{
  margin-top: 8px;
  font-family:'Cinzel', serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 10px;
}
.strength.weak{ color:#9b1c1c; }
.strength.medium{ color:#a16207; }
.strength.strong{ color:#166534; }

/* Primary button (match your gold style) */
.btn-auth{
  margin-top: 8px;
  width: 100%;
  height: 50px;
  border-radius: 999px;

  border: 1px solid rgba(214,183,122,.62);
  background: linear-gradient(135deg, rgba(224,185,106,1), rgba(200,155,69,1));

  color: rgba(27,24,22,.92);
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;

  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.55);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-auth:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.65);
  filter: brightness(1.02);
}

.btn-auth:active{
  transform: translateY(0) scale(.99);
}

/* Link under form */
.auth-link{
  margin-top: 18px;
  color: rgba(27,24,22,.70);
  font-size: .98rem;
}

.auth-link a{
  color: rgba(27,24,22,.92);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px solid rgba(214,183,122,.55);
}

.auth-link a:hover{
  border-bottom-color: rgba(214,183,122,.95);
}

/* Optional top right "Back" */
.auth-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:-6px;
}

.btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height: 42px;
  padding: 0 16px;

  border-radius: 999px;
  border: 1px solid rgba(27,24,22,.16);
  background: rgba(255,255,255,.70);

  color: rgba(27,24,22,.88);
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;

  text-decoration:none;
  box-shadow: 0 12px 28px rgba(0,0,0,.06);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.btn-ghost:hover{
  background: rgba(255,255,255,.92);
  border-color: rgba(214,183,122,.50);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 980px){
  .auth-wrapper{ grid-template-columns: 1fr; }
  .auth-image{ min-height: 320px; }
  .auth-form-box{ border-left: none; border-top: 1px solid rgba(27,24,22,.08); }
}

@media (max-width: 520px){
  .phone-row{ grid-template-columns: 1fr; }
  .pass-wrap input{ padding-right: 86px; }
}
/* Make auth button match index theme more */
.btn-auth{
  height: 50px;
  font-family: 'Cinzel', serif;
  letter-spacing: .18em;
  text-transform: uppercase;

  border: 1px solid rgba(214, 183, 122, .62);
  background: linear-gradient(135deg, rgba(224, 185, 106, 1), rgba(200, 155, 69, 1));
  color: rgba(27, 24, 22, .92);

  box-shadow: 0 16px 40px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.55);
}

.btn-auth:hover{
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.65);
  filter: brightness(1.02);
}

.btn-auth:focus-visible{
  outline: none;
  box-shadow: 0 0 0 6px rgba(214, 183, 122, .22), 0 22px 60px rgba(0,0,0,.18);
}

/* =========================
   SAUJANA ADMIN – BUTTON THEME
========================= */
:root{
  --gold1: #e0b96a;
  --gold2: #c89b45;
  --ink: rgba(17,24,39,.92);
  --danger: #b91c1c;
  --danger2:#991b1b;
}

/* Primary (Add/Save) */
.btn.primary,
.btn.success{
  border: 1px solid rgba(214,183,122,.62);
  background: linear-gradient(135deg, var(--gold1), var(--gold2));
  color: rgba(27,24,22,.92);
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  box-shadow: 0 16px 40px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn.primary:hover,
.btn.success:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
}
.btn.primary:active,
.btn.success:active{
  transform: translateY(0);
}

/* Edit (soft ivory outline) */
.btn.edit,
.btn.secondary{
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(27,24,22,.14);
  color: rgba(27,24,22,.88);
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.btn.edit:hover,
.btn.secondary:hover{
  background: rgba(255,255,255,.92);
  transform: translateY(-1px);
  border-color: rgba(214,183,122,.45);
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
}

/* Delete (deep red) */
.btn.danger{
  border: 1px solid rgba(185,28,28,.40);
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color:#fff;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  box-shadow: 0 16px 34px rgba(185,28,28,.14), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn.danger:hover{ transform: translateY(-1px); filter: brightness(1.02); }

/* Add button (top right) nampak ngam */
#openAddBtn{ border-radius: 999px; }

/* =========================
   BULKBAR – MAKE IT CLEAN (NO DARK BAR)
========================= */
.bulkbar{
  background: rgba(255,255,255,.82);
  color: rgba(27,24,22,.92);
  border: 1px solid rgba(214,183,122,.35);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0,0,0,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bulkbar .left{
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.bulkbar .btn{
  border-radius: 999px;
}
.bulkbar .btn.secondary{
  background: rgba(27,24,22,.04);
  border-color: rgba(27,24,22,.12);
}
.bulkbar .btn.secondary:hover{
  background: rgba(27,24,22,.06);
  border-color: rgba(214,183,122,.45);
}
.bulkbar .btn.danger{
  background: linear-gradient(135deg, #dc2626, #991b1b);
}

/* =========================
   CRUD MODAL SPACING (ADD/EDIT)
========================= */
.modal-card{ border-radius: 22px; }
.modal-body{ padding: 18px 18px; }
.formgrid{ gap: 14px; }
.formgrid .grid2{ gap: 12px; }

/* =========================
   CATEGORY CHECKBOX LIST
========================= */
.catbox{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
}
.catitem{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(27,24,22,.10);
  background: rgba(251,247,239,.60);
  cursor:pointer;
  user-select:none;
}
.catitem:hover{
  border-color: rgba(214,183,122,.45);
  background: rgba(255,255,255,.88);
}
.catitem input{
  width:18px; height:18px;
}
.catitem span{
  font-weight: 800;
  color: rgba(27,24,22,.86);
}
.catnote{
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width:640px){
  .catbox{ grid-template-columns: 1fr; }
}
/* =====================================================
   AUTH RESPONSIVE PATCH (PASTE AT BOTTOM)
   - Tak kacau design asal
   - Cuma fix semua size (mobile -> 4K)
===================================================== */

/* 1) Fix 100vh issues on mobile browser bars */
.auth-wrapper{
  min-height: 100svh; /* better than 100vh on mobile */
  overflow: hidden;   /* prevent sideways scroll */
}

/* 2) Prevent form side jadi terlalu lebar dekat monitor besar */
.auth-form-box{
  position: relative;
}
.auth-form-box > *{
  width: 100%;
  max-width: 560px;   /* keep form content nice */
}

/* 3) Make images/columns behave nicely on very wide screens */
@media (min-width: 1400px){
  .auth-wrapper{
    grid-template-columns: 1.1fr .9fr; /* slightly nicer balance */
  }
  .auth-image::after{
    width: 72px; /* a bit smoother divider */
  }
}

/* 4) Tablet + Mobile: stack layout */
@media (max-width: 980px){
  .auth-wrapper{
    grid-template-columns: 1fr;
  }

  .auth-image{
    min-height: 320px;
  }

  .auth-form-box{
    border-left: none;
    border-top: 1px solid rgba(27,24,22,.08);
  }
}

/* 5) Center overlay content for smaller screens (optional but keep same style) */
@media (max-width: 720px){
  .image-overlay{
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: min(620px, 92%);
  }

  .image-overlay .brand{
    justify-content: center;
  }
}

/* 6) Phone: phone row jadi 1 column */
@media (max-width: 520px){
  .phone-row{
    grid-template-columns: 1fr;
  }
  .pass-wrap input{
    padding-right: 86px;
  }
}

/* 7) Very small devices (<=360px): reduce paddings a bit so tak sempit */
@media (max-width: 360px){
  .auth-form-box{
    padding-left: 16px;
    padding-right: 16px;
  }
  .auth-form-box input,
  .auth-form-box select{
    height: 46px;
  }
  .btn-auth{
    height: 48px;
  }
}
