/* ═══════════════════════════════════════════
   SIPBP — Login Page Styles
   Mobile-first: dioptimalkan untuk layar HP
   ═══════════════════════════════════════════ */

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  overflow-x: hidden;
}

/* ── Animated Background ── */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-grid {
  position: absolute; inset: -40px;
  background-image: linear-gradient(var(--grid-c) 1px, transparent 1px), linear-gradient(90deg, var(--grid-c) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 8s linear infinite;
}
.bg-rad {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(6,214,208,.04), transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(59,130,246,.03), transparent 50%);
}
.bg-dots { position: absolute; inset: 0; overflow: hidden; }
.dot {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: var(--dot-c); animation: pulse 3s ease-in-out infinite;
}

/* ── Container: mobile = single column ── */
.container {
  display: flex; flex-direction: column;
  width: 100%; min-height: 100vh; min-height: 100dvh;
  position: relative; z-index: 1;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}

/* ── Mobile Header (compact branding) ── */
.left {
  padding: 24px 20px 16px;
  flex: none;
}
.left::after { display: none; }

.brand { animation: fadeUp .5s ease both; }
.brand-logos {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.brand-logos img { height: 36px; width: auto; object-fit: contain; }
[data-theme="light"] .brand-logos img { filter: none; }
[data-theme="dark"]  .brand-logos img { filter: brightness(1.1); }

.brand-tag {
  font-size: 9px; color: var(--cyan); letter-spacing: .15em;
  text-transform: uppercase; margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.brand-tag::before { content: ""; width: 16px; height: 1px; background: var(--cyan); }

.brand-name { font-size: 32px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.brand-name span { color: var(--cyan); }
.brand-full { font-size: 12px; color: var(--t2); font-weight: 500; line-height: 1.4; margin-top: 4px; }
.brand-org { font-size: 10px; color: var(--t3); margin-top: 3px; margin-bottom: 12px; line-height: 1.4; }

/* ── Modules: horizontal scroll on mobile ── */
.modules {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  animation: fadeUp .5s ease .1s both;
}
.modules::-webkit-scrollbar { height: 0; }
.mc {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--bdr);
  transition: all .25s; min-width: 170px; flex-shrink: 0;
}
.mc:hover { border-color: var(--bdr-h); }
.mi {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.mi.m1 { background: rgba(59,130,246,.1);  color: var(--blue); }
.mi.m2 { background: rgba(34,197,94,.1);   color: var(--green); }
.mi.m3 { background: rgba(245,158,11,.1);  color: var(--amber); }
.mi.m4 { background: rgba(167,139,250,.1); color: var(--purple); }

.mn { font-size: 11px; font-weight: 700; letter-spacing: -.01em; }
.md { font-size: 8px; color: var(--t3); margin-top: 1px; line-height: 1.3; }

.left-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.left-foot span { font-size: 9px; color: var(--t3); }
.left-foot a { font-size: 9px; color: var(--cyan); text-decoration: none; opacity: .5; }

/* ── RIGHT: Login Form ── */
.right {
  width: 100%; padding: 20px; position: relative;
  flex: 1; display: flex; align-items: flex-start; justify-content: center;
}
.right::before {
  content: ""; position: absolute; inset: 0;
  background: var(--right-bg); backdrop-filter: blur(20px);
}

/* Theme toggle */
.theme-toggle {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--bdr); background: var(--card);
  color: var(--t2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Login Card ── */
.lcard {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  animation: fadeUp .5s ease .2s both;
}
.lhead { text-align: center; margin-bottom: 24px; }
.lhead-logos {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 12px;
}
.lhead-logos img { height: 42px; width: auto; object-fit: contain; }
.ltitle { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.lsub { font-size: 12px; color: var(--t3); margin-top: 4px; }

/* ── Alert ── */
.alert {
  padding: 11px 14px; border-radius: 10px;
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.15);
  font-size: 12px; color: var(--red); margin-bottom: 14px;
  display: none;
}
.alert.show { display: block; animation: fadeUp .25s ease; }

/* ── Form Fields: LARGER touch targets for mobile ── */
.field { margin-bottom: 16px; }
.flbl {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 6px;
}
.flbl span { font-size: 12px; font-weight: 600; color: var(--t2); }
.flbl a { font-size: 11px; color: var(--cyan); text-decoration: none; opacity: .6; }
.flbl a:hover { opacity: 1; }

.finp {
  width: 100%; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--bdr);
  background: var(--input-bg); color: var(--t1);
  font: 400 15px "Plus Jakarta Sans", sans-serif;
  outline: none; transition: all .2s; -webkit-appearance: none;
}
.finp::placeholder { color: var(--t3); }
.finp:focus {
  border-color: var(--cyan); background: var(--input-focus);
  box-shadow: 0 0 0 3px var(--cyan-g);
}

.fsel { position: relative; }
.fsel select {
  width: 100%; padding: 14px 42px 14px 16px;
  border-radius: 12px; border: 1px solid var(--bdr);
  background: var(--input-bg); color: var(--t1);
  font: 400 15px "Plus Jakarta Sans", sans-serif;
  outline: none; appearance: none; cursor: pointer; transition: all .2s;
}
.fsel select:focus {
  border-color: var(--cyan); background: var(--input-focus);
  box-shadow: 0 0 0 3px var(--cyan-g);
}
.fsel select option { background: var(--opt-bg); color: var(--t1); }
.fsel::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 5px solid var(--t3); pointer-events: none;
}

/* ── Login Button — tall, chunky, easy to tap ── */
.lbtn {
  width: 100%; padding: 15px;
  border-radius: 12px; border: none;
  background: var(--btn-grad); color: var(--btn-text);
  font: 700 15px "Plus Jakarta Sans", sans-serif;
  cursor: pointer; transition: all .2s;
  letter-spacing: .02em; margin-top: 8px;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.lbtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(6,214,208,.2);
}
.lbtn:active { transform: scale(.97); }
.lbtn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  transform: translateX(-100%); transition: transform .5s;
}
.lbtn:hover::after { transform: translateX(100%); }

/* ── Divider ── */
.ldiv { display: flex; align-items: center; gap: 10px; margin: 20px 0; }
.ldiv::before, .ldiv::after { content: ""; flex: 1; height: 1px; background: var(--bdr); }
.ldiv span { font-size: 10px; color: var(--t3); white-space: nowrap; }

/* ── Quick Role Buttons — 2x2 grid, chunky tap area ── */
.lroles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc {
  padding: 14px 10px; border-radius: 12px;
  border: 1px solid var(--bdr); background: transparent;
  color: var(--t2); font: 500 11px "Plus Jakarta Sans", sans-serif;
  cursor: pointer; transition: all .2s;
  text-align: center; line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.rc:hover { border-color: var(--cyan-b); color: var(--t1); background: var(--cyan-g); }
.rc:active { transform: scale(.96); }
.rc.active {
  border-color: var(--cyan); color: var(--cyan);
  background: var(--cyan-g); box-shadow: 0 0 0 2px var(--cyan-g);
}
.rc b { display: block; font-size: 14px; font-weight: 700; }
.rc small { font-size: 10px; color: var(--t3); display: block; margin-top: 2px; }

.lfoot { text-align: center; margin-top: 22px; }
.lfoot span { font-size: 10px; color: var(--t3); }


/* ═══════════════════════════════════════════
   TABLET (>= 600px)
   ═══════════════════════════════════════════ */
@media (min-width: 600px) {
  .right { padding: 32px; align-items: center; }
  .mc { min-width: 200px; }
}

/* ═══════════════════════════════════════════
   DESKTOP (>= 960px) — side-by-side layout
   ═══════════════════════════════════════════ */
@media (min-width: 960px) {
  .container { flex-direction: row; overflow-y: visible; }

  .left {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; padding: 48px 52px; position: relative;
  }
  .left::after {
    content: ""; display: block; position: absolute;
    right: 0; top: 10%; bottom: 10%; width: 1px;
    background: linear-gradient(transparent, var(--bdr-h), transparent);
  }

  .brand-logos img { height: 48px; }
  .brand-tag { font-size: 10px; margin-bottom: 12px; }
  .brand-name { font-size: 48px; }
  .brand-full { font-size: 14px; margin-top: 6px; }
  .brand-org { font-size: 11px; margin-top: 4px; margin-bottom: 32px; }

  .modules { flex-direction: column; overflow-x: visible; gap: 6px; }
  .mc {
    min-width: auto; flex-shrink: 1;
    padding: 12px 16px; gap: 12px;
  }
  .mc:hover { transform: translateX(3px); }
  .mi { width: 32px; height: 32px; font-size: 14px; border-radius: 8px; }
  .mn { font-size: 12px; }
  .md { font-size: 9px; }

  .left-foot { position: absolute; bottom: 24px; left: 52px; right: 52px; margin-top: 0; }

  .right {
    width: 440px; flex-shrink: 0; padding: 36px; align-items: center;
  }
  .right::before { backdrop-filter: blur(40px); }

  .lcard { max-width: 330px; }
  .lhead-logos img { height: 42px; }
  .ltitle { font-size: 17px; }

  /* Slightly compact inputs on desktop */
  .finp { padding: 12px 14px; font-size: 13px; border-radius: 10px; }
  .fsel select { padding: 12px 36px 12px 14px; font-size: 13px; border-radius: 10px; }
  .lbtn { padding: 13px; font-size: 13px; border-radius: 10px; }
  .rc { padding: 10px 8px; }
  .rc b { font-size: 12px; }
  .rc small { font-size: 9px; }
}

/* ═══════════════════════════════════════════
   SMALL PHONES (<= 380px)
   ═══════════════════════════════════════════ */
@media (max-width: 380px) {
  .left { padding: 18px 16px 12px; }
  .brand-logos img { height: 30px; }
  .brand-name { font-size: 28px; }
  .brand-full { font-size: 11px; }
  .brand-org { font-size: 9px; }
  .mc { min-width: 150px; padding: 8px 10px; gap: 8px; }
  .mi { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }
  .mn { font-size: 10px; }
  .right { padding: 16px; }
  .lhead { margin-bottom: 18px; }
  .lhead-logos img { height: 34px; }
  .ltitle { font-size: 17px; }
  .finp { padding: 13px 14px; font-size: 14px; }
  .fsel select { padding: 13px 38px 13px 14px; font-size: 14px; }
  .lbtn { padding: 14px; font-size: 14px; }
  .rc { padding: 12px 8px; }
  .rc b { font-size: 13px; }
}
