@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-page: #eef0f4;
  --bg-panel: #1b1f2a;
  --bg-panel-line: #2a3040;
  --card-bg: #ffffff;
  --accent: #c89b3c;
  --accent-dim: #a9822f;
  --text-dark: #171b24;
  --text-light: #edeef2;
  --text-muted: #6b7280;
  --border: #dadfe7;
  --error: #b3261e;
  --error-bg: #fbeae9;
  --success: #2f6d4f;
  --radius: 6px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.screen {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-template-rows: 100vh;
  height: 100vh;
}

.brand-panel {
  background: var(--bg-panel);
  color: var(--text-light);
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden auto;
}

.brand-panel .mark {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

.brand-panel .pitch {
  max-width: 26ch;
}

.brand-panel .pitch h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.brand-panel .pitch p {
  color: #b9bfcd;
  line-height: 1.6;
  margin: 0;
}

.brand-panel .footnote {
  color: #7d8496;
  font-size: 0.85rem;
}

.lines {
  position: absolute;
  top: -30px;
  right: -50px;
  width: 380px;
  height: 380px;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

.brand-panel .mark,
.brand-panel .pitch,
.brand-panel .footnote {
  position: relative;
  z-index: 1;
}

.form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  overflow-y: auto;
}

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

.card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.9rem;
  margin: 0 0 0.4rem;
}

.card .sub {
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.5;
}

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: #fff;
  transition: border-color 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.18);
}

.field .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

button.primary {
  width: 100%;
  padding: 0.8rem;
  background: var(--text-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.98rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 0.4rem;
}

button.primary:hover { background: #000; }
button.primary:disabled { background: #9aa0ac; cursor: not-allowed; }

.switch-line {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.switch-line a {
  color: var(--text-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.message {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
  display: none;
}

.message.error {
  display: block;
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #f3c6c3;
}

.message.success {
  display: block;
  background: #e8f3ec;
  color: var(--success);
  border: 1px solid #bfe0cc;
}

/* Dashboard */
.dashboard {
  min-height: 100vh;
  background: var(--bg-page);
}

.dashboard header {
  background: var(--bg-panel);
  color: var(--text-light);
  padding: 1.3rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard header .mark {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.dashboard header button {
  background: transparent;
  border: 1px solid #444a5a;
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.dashboard header button:hover { border-color: var(--accent); color: var(--accent); }

.dashboard main {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.dashboard .welcome {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.dashboard .welcome-sub {
  color: var(--text-muted);
  margin-bottom: 2.2rem;
}

.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--text-muted); }
.info-row .v { font-weight: 500; }

.loading-state {
  color: var(--text-muted);
  text-align: center;
  padding: 3rem 0;
}

@media (max-width: 860px) {
  .screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
  }
  .brand-panel {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 1.1rem 1.5rem;
    overflow: hidden;
  }
  .brand-panel .mark { font-size: 1.05rem; }
  .brand-panel .pitch,
  .brand-panel .footnote { display: none; }
  .form-side {
    padding: 1.5rem;
    overflow-y: auto;
    min-height: 0;
  }
  .dashboard header { padding: 1.1rem 1.5rem; }
  .dashboard main { padding: 2.5rem 1.2rem; }
}

@supports (height: 100dvh) {
  .screen { height: 100dvh; }
  @media (max-width: 860px) {
    .screen { height: 100dvh; }
  }
}

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