/* YAAC Hub — APP_Design.md の共通トークン準拠（罫線行型リスト・色数を絞る） */

:root {
  --ink: #172033;
  --body: #334155;
  --muted: #64748b;
  --line: #dbe4ef;
  --line-soft: #eef1f6;
  --panel: #ffffff;
  --canvas: #f5f7fb;
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --brand-soft: #dbeafe;
  --danger: #a44343;
  --warning: #9b6a18;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: Inter, "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-feature-settings: "palt";
  background: var(--canvas);
  color: var(--body);
  font-size: 14px;
  line-height: 1.6;
}
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }

/* ---- ヘッダー ---- */
.app-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 960px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.brand-name { font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav-tabs { display: flex; gap: 4px; }
.nav-tab { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.nav-tab.is-on { color: var(--brand-dark); background: var(--brand-soft); }
.nav-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.nav-user { color: var(--ink); font-weight: 600; }
.nav-role { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-logout { border: 1px solid var(--line); background: var(--panel); color: var(--body); font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.nav-logout:hover { border-color: var(--muted); }

/* ---- 本文 ---- */
.app-main { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.page-summary { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 8px; }

/* ---- アプリ一覧（罫線行型） ---- */
.app-list { list-style: none; border-top: 1px solid var(--line); }
.app-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.app-row:hover { background: var(--panel); }
.app-mark { --app-accent: var(--brand); width: 40px; height: 40px; border-radius: 10px; background: var(--app-accent); color: #fff; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.app-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.app-name { font-weight: 700; color: var(--ink); font-size: 15px; }
.app-desc { font-size: 12px; color: var(--muted); }
.app-arrow { color: var(--muted); font-size: 16px; }

/* ---- テーブル ---- */
.table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.table td { padding: 9px 6px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.table tr.is-disabled td { color: var(--muted); }
.sync-result { margin-top: 10px; font-size: 13px; color: var(--brand-dark); }

/* ---- ボタン ---- */
.btn { font: inherit; border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-secondary:hover:not(:disabled) { border-color: var(--muted); }
.btn-large { padding: 12px 22px; font-size: 15px; width: 100%; }

/* ---- ログイン ---- */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.login-main { width: 100%; padding: 20px; }
.login-card { max-width: 380px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; display: flex; flex-direction: column; gap: 16px; }
.login-desc { font-size: 13px; color: var(--muted); }
.login-status { font-size: 13px; color: var(--brand-dark); }
.error-text { color: var(--danger); font-size: 13px; }

@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; }
  .nav { width: 100%; justify-content: space-between; }
  .nav-user { display: none; }
}
