:root {
  color-scheme: light;
  --ink: #15251f;
  --muted: #65746e;
  --line: #dfe8e3;
  --surface: #ffffff;
  --canvas: #f2f7f4;
  --brand: #176b4c;
  --brand-dark: #0f4e37;
  --danger: #9d2d32;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }

.login-page { display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #dceee5, transparent 45%), var(--canvas); }
.login-card { width: min(100%, 430px); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(31,67,52,.12); }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #fff; background: var(--brand); font-size: 24px; font-weight: 800; }
.brand-mark--small { width: 38px; height: 38px; border-radius: 12px; font-size: 19px; }
.eyebrow { margin: 22px 0 4px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(32px, 8vw, 44px); letter-spacing: -.04em; }
.login-intro, .service-hours { color: var(--muted); }
.service-hours { margin: 24px 0 0; font-size: 13px; text-align: center; }
.login-form { display: grid; gap: 16px; margin-top: 28px; }
.login-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 650; }
.login-form input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; }
.login-form input:focus { border-color: var(--brand); outline: 3px solid rgba(23,107,76,.14); }
.login-form button { padding: 13px 16px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
.login-form button:hover { background: var(--brand-dark); }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.alert--error { margin-top: 18px; color: var(--danger); background: #fff0f0; border: 1px solid #f0c9cb; }
.alert--notice { margin-bottom: 14px; color: #624c18; background: #fff8df; border: 1px solid #eadba4; }

.chat-page { min-height: 100vh; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 14px max(20px, calc((100vw - 1050px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.app-brand { display: flex; align-items: center; gap: 11px; }
.app-brand > div:last-child { display: grid; }
.app-brand span, .account-menu span { color: var(--muted); font-size: 12px; }
.account-menu { display: flex; align-items: center; gap: 14px; }
.account-menu a { color: var(--brand-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.chat-shell { width: min(100% - 32px, 900px); margin: 28px auto; }

/* Add the character image later by replacing the span with:
   <img src="/assets/hilkkabotti-hahmo.png" alt="Hilkkabotti"> */
.chat-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bot-character-slot { display: grid; flex: 0 0 auto; width: 46px; height: 46px; place-items: center; overflow: hidden; border: 1px dashed #84b8a3; border-radius: 50%; color: var(--brand-dark); background: linear-gradient(145deg, #e9f6ef, #d4ebdf); box-shadow: inset 0 0 0 4px rgba(255,255,255,.55); }
.bot-character-slot span { font-size: 18px; font-weight: 800; }
.bot-character-slot img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 620px) {
  .login-card { padding: 28px 22px; }
  .app-header { align-items: flex-start; padding: 12px 16px; }
  .account-menu { align-items: flex-end; flex-direction: column; gap: 4px; text-align: right; }
  .account-menu span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .chat-shell { width: 100%; margin: 0; }
  .alert--notice { margin: 12px; }
  .bot-character-slot { width: 40px; height: 40px; }
}
