/* ============================================================
   Student Corp — Login
   Koperasi Simpan Pinjam & Pegadaian Mahasiswa
   Universitas Advent Surya Nusantara
   ============================================================ */

:root {
  --espresso: #A8431C;
  --espresso-soft: #C1592B;
  --paper: #FBF3EA;
  --paper-dim: #F4E8DA;
  --orange: #C1592B;
  --orange-dark: #8F3F1D;
  --orange-deep: #A34A22;
  --line: #E8D5C0;
  --line-dark: #8A3B1B;
  --text: #2B211B;
  --text-muted: #7A6A5C;
  --text-on-espresso: #FBEFE5;
  --text-on-espresso-muted: #E3B79A;
  --danger: #9A3B33;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  min-height: 100vh;
  font-size: 16px;
}

.layout {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 100vh;
}

/* ---------- Left panel: identity ---------- */

.brand-panel {
  background: var(--espresso);
  color: var(--text-on-espresso);
  padding: 60px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark svg {
  flex-shrink: 0;
}

.brand-mark .name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-on-espresso);
}

.brand-mark .name span {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-on-espresso-muted);
  margin-top: 3px;
}

.brand-hero {
  max-width: 400px;
}

.brand-hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 40px;
  line-height: 1.28;
  font-weight: 500;
  margin: 0 0 20px 0;
  color: var(--text-on-espresso);
}

.brand-hero p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-on-espresso-muted);
  margin: 0;
}

.ledger-graphic {
  position: absolute;
  right: -60px;
  bottom: -60px;
  opacity: 0.55;
}

.brand-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--line-dark);
  padding-top: 22px;
}

.brand-footer .row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-on-espresso-muted);
  gap: 16px;
}

.brand-footer .row strong {
  color: var(--text-on-espresso);
  font-weight: 500;
  text-align: right;
}

/* ---------- Right panel: form ---------- */

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.form-card {
  width: 100%;
  max-width: 420px;
}

.form-card > .heading {
  margin-bottom: 32px;
}

.form-card > .heading h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  margin: 0 0 8px 0;
  color: var(--text);
}

.form-card > .heading p {
  font-size: 15.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* Role selector — segmented tabs styled like a filing tab */

.role-select {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px;
  background: var(--paper-dim);
  margin-bottom: 28px;
}

.role-select input {
  display: none;
}

.role-select label {
  flex: 1;
  text-align: center;
  padding: 11px 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.role-select input:checked + label {
  background: var(--orange);
  color: #fff;
}

/* Fields */

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 13px 15px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(193, 89, 43, 0.18);
}

.field-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 7px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.checkbox-line input {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
}

.link-muted {
  font-size: 14.5px;
  color: var(--orange-dark);
  text-decoration: none;
  font-weight: 500;
}

.link-muted:hover {
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-submit:hover {
  background: var(--orange-dark);
}

.btn-submit:focus-visible {
  outline: 2px solid var(--orange-dark);
  outline-offset: 2px;
}

.alert {
  display: none;
  padding: 13px 16px;
  border-radius: 6px;
  font-size: 14.5px;
  margin-bottom: 22px;
  border: 1px solid transparent;
}

.alert.show {
  display: block;
}

.alert-error {
  background: #FBEDEA;
  border-color: #E7C6BE;
  color: var(--danger);
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 22px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.help-text {
  text-align: center;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.help-text a {
  color: var(--orange-dark);
  font-weight: 500;
  text-decoration: none;
}

.help-text a:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    padding: 40px 28px;
    min-height: 260px;
  }

  .brand-hero h1 {
    font-size: 30px;
  }

  .brand-footer {
    display: none;
  }

  .form-panel {
    padding: 32px 24px 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
