@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700&display=swap");

:root {
  --ra-bg: #f3f1ea;
  --ra-card: #ffffff;
  --ra-bar: #14120a;
  --ra-gold: #ffd000;
  --ra-text: #1a1a1a;
  --ra-muted: #6b7280;
  --ra-line: #e5e7eb;
  --ra-danger: #b42318;
  --ra-max: 430px;
}

@media (min-width: 768px) {
  :root { --ra-max: min(760px, calc(100vw - 48px)); }
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif;
  background: var(--ra-bg);
  color: var(--ra-text);
}
.ra-hidden { display: none !important; }

.ra-login {
  min-height: 100dvh;
  max-width: var(--ra-max);
  margin: 0 auto;
  display: flex;
  padding: calc(36px + env(safe-area-inset-top, 0px)) 22px 28px;
}
.ra-login-card {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ra-card);
  border: 1px solid rgba(20, 18, 10, 0.12);
  border-radius: 20px;
  padding: 40px 24px 36px;
  box-shadow: 0 12px 40px rgba(20, 18, 10, 0.08);
}
.ra-login-brand { text-align: center; margin-bottom: 36px; }
.ra-login-brand .logo,
.ra-top .logo {
  display: grid;
  place-items: center;
  font-weight: 800;
}
.ra-login-brand .logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: var(--ra-bar);
  color: var(--ra-gold);
  font-size: 20px;
}
.ra-login-brand h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.ra-login-brand p { margin: 12px 0 0; font-size: 14px; color: var(--ra-muted); }
.ra-field { margin-bottom: 16px; }
.ra-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ra-muted);
}
.ra-field input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--ra-line);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 15px;
}
.ra-field input:focus { outline: none; border-color: #c9a400; }
.ra-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  background: var(--ra-gold);
  color: #142006;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.ra-btn-block { width: 100%; margin-top: 22px; }
.ra-btn-ghost {
  background: transparent;
  color: #142006;
  border: 1px solid rgba(20, 18, 10, 0.2);
}
.ra-btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; letter-spacing: 0; border-radius: 10px; }
.ra-err { margin-top: 14px; min-height: 1.2em; font-size: 14px; color: var(--ra-danger); }

.ra-shell {
  max-width: var(--ra-max);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.ra-top {
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px 12px;
  background: var(--ra-bar);
  color: #fff;
}
.ra-top .logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ra-gold);
  color: #142006;
  font-size: 11px;
  flex-shrink: 0;
}
.ra-top-mid { flex: 1; min-width: 0; }
.ra-top h1 { margin: 0; font-size: 16px; font-weight: 700; }
.ra-top .meta { font-size: 12px; opacity: 0.9; }
.ra-back-link {
  display: block;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  cursor: pointer;
}
.ra-btn-logout {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.ra-home-card {
  flex: 1;
  margin: 12px 14px 0;
  padding: 18px 14px 20px;
  min-height: calc(100dvh - 80px);
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(20, 18, 10, 0.08);
}
.ra-section-title { margin: 4px 0 10px; font-size: 17px; font-weight: 700; }
.ra-grid + .ra-section-title { margin-top: 18px; }
.ra-section-sub { margin: 0 0 12px; font-size: 12px; color: var(--ra-muted); line-height: 1.5; }
.ra-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 6px; }
.ra-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 89px;
  padding: 13px 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(20, 18, 10, 0.08);
  background: linear-gradient(180deg, #fffdf6 0%, #f6f1df 100%);
  font: inherit;
  cursor: pointer;
}
.ra-tile .title { font-size: 12px; font-weight: 650; line-height: 1.3; }
.ra-tile .hint { font-size: 10px; color: #6a7a70; }
.ra-panel { margin: 12px 14px 24px; }
.ra-panel-head { display: flex; align-items: center; gap: 8px; }
.ra-panel-head h2 { flex: 1; margin: 0; font-size: 18px; }
.person { margin-top: 16px; }
.person h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.ra-table-wrap { overflow-x: auto; border: 1px solid var(--ra-line); border-radius: 12px; }
.ra-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ra-table th, .ra-table td { padding: 10px 8px; border-bottom: 1px solid var(--ra-line); text-align: left; white-space: nowrap; }
.ra-table th { background: #faf8f3; font-weight: 650; }
.ra-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { margin: 18px 0; color: var(--ra-muted); font-size: 14px; }
.ra-stats { margin: 0; padding: 0; list-style: none; border: 1px solid var(--ra-line); border-radius: 12px; overflow: hidden; }
.ra-stats li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--ra-line); font-size: 14px; }
.ra-stats li:last-child { border-bottom: 0; }
.ra-stats b { font-variant-numeric: tabular-nums; }
.tx { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
