:root {
  --gold: #b8922a;
  --gold-light: #d0ab4c;
  --gold-dark: #90701d;
  --charcoal: #111111;
  --cream: #f9f8f4;
  --cream-deep: #efebe0;
  --white: #ffffff;
  --text-main: #111111;
  --text-soft: #777777;
  --text-faint: #a0a0a0;
  --border: #ddd8ce;
  --red: #b91c1c;
  --green: #15803d;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Noto Sans TC", Arial, sans-serif;
}

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

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
}

.brand-panel {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 64px;
  background:
    radial-gradient(ellipse 70% 58% at 20% 28%, rgba(184, 146, 42, 0.14), transparent 70%),
    radial-gradient(ellipse 50% 40% at 82% 78%, rgba(184, 146, 42, 0.08), transparent 62%),
    var(--charcoal);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
}

.brand-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(255, 255, 255, 0.08) 80%, transparent);
}

.brand-content {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
}

.brand-logo {
  margin-bottom: 58px;
}

.brand-logo h1 {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 2px;
}

.brand-logo h1 span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.48em;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 8px;
}

.brand-logo p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.24);
  font-size: 0.68rem;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.brand-features {
  display: grid;
  gap: 28px;
}

.brand-feature {
  display: flex;
  gap: 16px;
}

.feature-dot {
  width: 6px;
  height: 6px;
  margin-top: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 20px rgba(184, 146, 42, 0.45);
}

.brand-feature h2 {
  margin: 0 0 5px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  font-weight: 500;
}

.brand-feature p {
  max-width: 360px;
  margin: 0;
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.8rem;
  line-height: 1.75;
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  background: var(--cream);
}

.login-card {
  width: 100%;
}

.login-header {
  margin-bottom: 30px;
}

.login-eyebrow {
  margin: 0 0 8px;
  color: var(--gold-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
}

.login-header h2 {
  margin: 0 0 6px;
  font-size: 1.52rem;
  font-weight: 700;
  letter-spacing: 0;
}

.login-header p:last-child {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream-deep);
}

.role-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.role-tab.active {
  color: var(--text-main);
  background: var(--white);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
}

.form-message {
  display: none;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(185, 28, 28, 0.15);
  border-radius: 6px;
  color: var(--red);
  background: rgba(185, 28, 28, 0.07);
  font-size: 0.8rem;
  line-height: 1.6;
}

.form-message.success {
  border-color: rgba(21, 128, 61, 0.16);
  color: var(--green);
  background: rgba(21, 128, 61, 0.08);
}

.form-group {
  display: block;
  margin-bottom: 16px;
}

.form-group span {
  display: block;
  margin-bottom: 7px;
  color: #444444;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.form-group input {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
}

.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 146, 42, 0.12);
}

.form-group input::placeholder {
  color: #b9b4aa;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 18px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.remember-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--gold);
}

.form-options a {
  color: var(--gold-dark);
  text-decoration: none;
}

.form-options a:hover {
  text-decoration: underline;
}

.login-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--charcoal);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.login-button:hover {
  background: #222222;
}

.login-button:active {
  transform: scale(0.99);
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.demo-hint {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(184, 146, 42, 0.16);
  border-radius: 8px;
  color: var(--text-soft);
  background: rgba(184, 146, 42, 0.06);
  font-size: 0.76rem;
  line-height: 1.75;
}

.demo-hint span {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-dark);
  font-weight: 700;
}

.demo-hint p {
  margin: 0;
}

.demo-hint code {
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--gold-dark);
  background: rgba(184, 146, 42, 0.12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
}

@media (max-width: 860px) {
  .login-shell {
    display: block;
    min-height: 100vh;
    background: var(--cream);
  }

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

  .brand-logo {
    margin-bottom: 0;
  }

  .brand-logo h1 {
    font-size: 3rem;
  }

  .brand-logo p {
    font-size: 0.62rem;
    letter-spacing: 3px;
  }

  .brand-features {
    display: none;
  }

  .form-panel {
    min-height: calc(100vh - 260px);
    padding: 40px 28px;
  }
}

@media (max-width: 420px) {
  .brand-panel {
    min-height: 220px;
    padding: 34px 22px;
  }

  .form-panel {
    min-height: calc(100vh - 220px);
    padding: 34px 20px;
  }

  .form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
