/* AI Cloud — single-purpose login screen. Entire canvas and card use blue tones. */
:root {
  font-family: "Noto Sans TC", "Microsoft JhengHei", Inter, system-ui, sans-serif;
  color-scheme: dark;
  font-synthesis: none;
  --blue-base: #0752b7;
  --blue-deep: #061e5a;
  --text: #f7fbff;
  --muted: #c9dcf6;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--blue-base); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--text);
  background: linear-gradient(145deg, #1164c7 0%, #064cae 46%, #092c79 100%);
}
.portal {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 30px 18px;
  background: radial-gradient(circle at 12% 15%, rgba(85,174,255,.16), transparent 34%),
              radial-gradient(circle at 86% 88%, rgba(1,19,83,.25), transparent 45%);
}
.login-shell {
  width: min(100%, 470px);
  padding: clamp(28px, 5vw, 46px);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(8,61,143,.94), rgba(5,35,103,.96));
  border: 1px solid rgba(169,216,255,.30);
  box-shadow: 0 24px 85px rgba(0,25,78,.33);
}
.brand { display: flex; align-items: center; gap: 13px; margin-bottom: 41px; }
.brandmark {
  display: grid; place-items: center; flex: 0 0 46px;
  height: 46px; border-radius: 13px; font-weight: 800; font-size: 25px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(181,225,255,.50);
  letter-spacing: -.08em; color: #fff;
}
.brand-copy strong { display: block; font-size: 14px; letter-spacing: .03em; }
.brand-copy span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(26px,3vw,32px); line-height: 1.3; letter-spacing: -.03em; margin-bottom: 9px; }
h2 { font-size: 27px; margin: 0 0 8px; }
h3 { font-size: 19px; margin-bottom: 8px; }
.subtitle { font-size: 14px; line-height: 1.65; color: var(--muted); margin-bottom: 32px; }
label { display: block; font-size: 13px; font-weight: 650; margin: 0 0 10px; }
input,textarea {
  width: 100%; display: block; border: 1px solid rgba(179,219,255,.38);
  background: rgba(4,32,100,.50); border-radius: 12px;
  padding: 14px 15px; color: #fff; font: inherit; font-size: 15px;
  outline: none; transition: border-color .16s, box-shadow .16s;
}
input::placeholder,textarea::placeholder { color: #bbd0ed; opacity: 1; }
input:focus,textarea:focus {
  border-color: #a5ddff; box-shadow: 0 0 0 3px rgba(149,215,255,.17);
}
#identity { margin-bottom: 24px; }
.password-wrap { position: relative; margin-bottom: 25px; }
.password-wrap input { padding-right: 72px; }
.ghost-toggle {
  position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
  border: 0; padding: 8px; background: transparent; color: #c8e4ff;
  font-size: 13px; cursor: pointer;
}
.primary {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  width: 100%; min-height: 49px; padding: 12px 16px;
  border: 1px solid rgba(223,242,255,.9); border-radius: 12px;
  background: #d2ecff; color: #0c3c88; font: inherit; font-size: 15px;
  font-weight: 750; cursor: pointer; transition: background .16s, transform .16s;
}
.primary:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
.primary:disabled { opacity: .68; cursor: wait; }
.secondary {
  border: 1px solid rgba(194,225,255,.48); background: rgba(13,66,151,.54);
  color: white; padding: 10px 17px; border-radius: 10px;
  font: inherit; cursor: pointer;
}
.secondary:hover { background: rgba(29,100,191,.72); }
.compact { width: auto; white-space: nowrap; }
.service-status { color: #bed6f4; text-align: center; font-size: 12px; line-height: 1.65; margin: 19px 0 0; }
.service-status.ready { color: #beffdf; }
.notice { padding: 11px 12px; border-radius: 10px; font-size: 13px; line-height: 1.6; margin: -8px 0 15px; }
.error { background: rgba(126,15,48,.35); border: 1px solid rgba(255,165,175,.55); color: #ffdfdf; }
.hidden { display: none !important; }
.portal.is-authenticated .login-shell { width: min(100%, 790px); }
.dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.kicker { font-weight: 750; font-size: 12px; text-transform: uppercase; letter-spacing: .13em; color: #bedcff; margin: 0 0 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 22px 0 25px; }
.stat-grid > div { background: rgba(3,31,94,.42); border: 1px solid rgba(185,221,255,.21); border-radius: 13px; padding: 18px; }
.stat-grid small { display: block; color: #c7dcf6; margin-bottom: 6px; }
.stat-grid strong { font-size: 18px; }
.chat-box { padding: 24px; background: rgba(4,31,90,.47); border: 1px solid rgba(185,221,255,.20); border-radius: 16px; }
.chat-box p { font-size: 13px; color: var(--muted); line-height: 1.6; }
textarea { min-height: 128px; resize: vertical; margin-bottom: 14px; }
.answer { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; color: #eff7ff; font-size: 13px; margin: 16px 0 0; }
@media (max-width: 560px) {
  .portal { padding: 18px 14px; }
  .login-shell { padding: 28px 22px; border-radius: 19px; }
  .brand { margin-bottom: 33px; }
  .dashboard-heading { flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
  .chat-box { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { input,.primary { transition: none; } }
