/* ══════════════════════════════════════════
   LOGIN PAGE — Partai Rakyat Indonesia
   public/css/login.css
══════════════════════════════════════════ */

:root {
  --pri-red: #C0001D;
  --pri-red-dark: #8B0012;
  --gold: #C89B3C;
  --gold-light: #F0C060;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif !important;
  display: flex !important;
  min-height: 100vh;
  height: 100%;
  background: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

/* ══ LEFT PANEL ══ */
.login-left {
  width: 52%;
  min-height: 100vh;
  background: linear-gradient(160deg, #8B0012 0%, #C0001D 50%, #8B0012 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,0,0,.2) 0%, transparent 50%);
}

.login-left::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 350px;
  height: 350px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.left-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.left-content { position: relative; z-index: 1; }

/* Brand */
.left-brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 2.5rem;
}

.left-brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.left-brand-text .brand-name {
  font-size: .9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.left-brand-text .brand-sub {
  font-size: .68rem;
  color: rgba(255,255,255,.6);
  letter-spacing: .3px;
}

/* Tags */
.left-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.tag-pill {
  padding: .3em .85em;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.85);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* Heading */
.left-heading {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.0;
  margin-bottom: 1rem;
}

.left-heading em {
  font-style: italic;
  color: var(--gold-light);
}

.left-desc {
  font-size: .875rem;
  color: rgba(255,255,255,.72);
  line-height: 1.65;
  max-width: 380px;
  margin-bottom: 2.5rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  max-width: 400px;
}

.stat-box {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  backdrop-filter: blur(4px);
}

.stat-box .s-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}

.stat-box .s-label {
  font-size: .68rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: .2rem;
}

/* Left footer */
.left-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .72rem;
  color: rgba(255,255,255,.4);
}

/* ══ RIGHT PANEL ══ */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: #fff;
  position: relative;
  min-width: 0;
}

.login-right::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 220px; height: 220px;
  background: radial-gradient(circle at top right, #FFF0F0 0%, transparent 70%);
  pointer-events: none;
}

.login-right::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 160px; height: 160px;
  background: radial-gradient(circle at bottom left, #FFF8F0 0%, transparent 70%);
  pointer-events: none;
}

.login-form-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* Form elements */
.form-eyebrow {
  font-size: .72rem;
  font-weight: 800;
  color: var(--pri-red);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.form-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: #111;
  line-height: 1.1;
  margin-bottom: .6rem;
}

.form-subtitle {
  font-size: .85rem;
  color: #888;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.form-label-custom {
  font-size: .8rem;
  font-weight: 700;
  color: #444;
  margin-bottom: .4rem;
  display: block;
}

.input-wrap {
  position: relative;
  margin-bottom: 1.1rem;
}

.input-wrap .input-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  font-size: .95rem;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  padding: .82rem 1rem .82rem 2.6rem;
  border: 1.5px solid #eaeaea;
  border-radius: 10px;
  font-size: .88rem;
  color: #333;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  background: #fafafa;
}

.input-wrap input:focus {
  border-color: var(--pri-red);
  box-shadow: 0 0 0 3px rgba(192,0,29,.08);
  background: #fff;
}

.input-wrap input::placeholder { color: #c0c0c0; }

.input-wrap .toggle-pw {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: .95rem;
  padding: 0;
  line-height: 1;
  transition: color .2s;
}

.input-wrap .toggle-pw:hover { color: #777; }

/* Remember / Beranda row */
.form-row-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.35rem;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: #666;
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--pri-red);
  width: 15px;
  height: 15px;
}

.beranda-link {
  font-size: .78rem;
  color: #bbb;
  text-decoration: none;
  transition: color .2s;
}

.beranda-link:hover { color: var(--pri-red); }

/* Login button */
.btn-login-main {
  width: 100%;
  padding: .92rem;
  background: linear-gradient(90deg, var(--pri-red-dark), var(--pri-red));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .3px;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(192,0,29,.3);
}

.btn-login-main:hover {
  opacity: .93;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(192,0,29,.4);
}

.btn-login-main:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(192,0,29,.25);
}

/* Error box */
.error-box {
  background: #FFF0F0;
  border: 1.5px solid #f0c0c0;
  border-radius: 10px;
  padding: .65rem 1rem;
  font-size: .8rem;
  color: var(--pri-red);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Portal link */
.portal-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .8rem;
  color: #bbb;
}

.portal-link a {
  color: var(--pri-red);
  font-weight: 700;
  text-decoration: none;
}

.portal-link a:hover { text-decoration: underline; }

/* ══ RESPONSIVE: Tablet landscape ══ */
@media (max-width: 991.98px) {
  .login-left { width: 46%; padding: 2rem 1.75rem; }
  .left-heading { font-size: 2rem; }
  .left-brand { margin-bottom: 2rem; }
  .stats-grid { max-width: 100%; }
}

/* ══ RESPONSIVE: Tablet portrait & mobile ══ */
@media (max-width: 767.98px) {
  body {
    flex-direction: column !important;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
  }

  .login-left {
    width: 100% !important;
    min-height: auto;
    padding: 1.5rem 1.25rem 1.75rem;
    border-radius: 0;
    flex-shrink: 0;
  }

  .login-left::after {
    width: 180px; height: 180px;
    right: -30px; top: -30px;
  }

  .left-brand { margin-bottom: 1.1rem; }
  .left-heading { font-size: 1.65rem; margin-bottom: .6rem; }
  .left-tags { margin-bottom: .85rem; }
  .left-desc { display: none; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
    max-width: 100%;
  }

  .stat-box { padding: .8rem .9rem; }
  .stat-box .s-num { font-size: 1.3rem; }
  .stat-box .s-label { font-size: .63rem; }

  .left-footer { padding-top: 1rem; margin-top: 1.25rem; }

  .login-right {
    width: 100% !important;
    flex: unset;
    padding: 2rem 1.5rem 3rem;
    align-items: flex-start;
    min-height: auto;
  }

  .login-right::before,
  .login-right::after { display: none; }

  .login-form-wrap { max-width: 100%; }
  .form-title { font-size: 1.65rem; }
  .form-subtitle { margin-bottom: 1.5rem; }
}

/* ══ RESPONSIVE: Small mobile ══ */
@media (max-width: 480px) {
  .login-left { padding: 1.25rem 1rem 1.5rem; }
  .left-heading { font-size: 1.5rem; }
  .left-brand-logo { width: 44px; height: 44px; }
  .left-brand-text .brand-name { font-size: .82rem; }
  .stat-box .s-num { font-size: 1.2rem; }

  .login-right { padding: 1.75rem 1rem 2.5rem; }
  .form-title { font-size: 1.5rem; }
  .form-eyebrow { font-size: .65rem; letter-spacing: 1px; }
}

/* ══ RESPONSIVE: Very small screens ══ */
@media (max-width: 360px) {
  .tag-pill { font-size: .62rem; padding: .25em .6em; }
  .left-heading { font-size: 1.3rem; }
  .btn-login-main { font-size: .88rem; padding: .82rem; }
  .form-title { font-size: 1.35rem; }
}
