/* ThinkBeauty 業務ポータル — スマホ優先 */
:root {
  --bg: #f5f4f2;
  --card: #ffffff;
  --line: #e3e0db;
  --text: #2a2724;
  --muted: #857e75;
  --accent: #8a6f4e;
  --accent-soft: #f0e9df;
  --good: #2f7d5a;
  --bad: #b4483c;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", "Yu Gothic UI", "Hiragino Sans", sans-serif;
  font-size: 15px; line-height: 1.6;
}
.hidden { display: none !important; }

/* ---- ログイン ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; width: 100%; max-width: 360px;
}
.login-card h1 { margin: 0 0 20px; font-size: 20px; letter-spacing: .04em; }
.login-card h1 span { display: block; font-size: 13px; color: var(--muted); font-weight: normal; letter-spacing: .1em; }

/* ---- 共通パーツ ---- */
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 10px 12px; margin-top: 4px; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
button { font: inherit; cursor: pointer; border-radius: 8px; }
button.primary { width: 100%; padding: 11px; background: var(--accent); color: #fff; border: none; font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.ghost { padding: 8px 14px; background: #fff; border: 1px solid var(--line); color: var(--text); }
button.link { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 0; font-size: 13px; }
.error { color: var(--bad); font-size: 13px; margin: 0 0 12px; }
.msg { font-size: 13px; margin: 10px 0 0; }
.msg.ok { color: var(--good); }
.msg.ng { color: var(--bad); }
.warn { background: #fdf3e7; border: 1px solid #edd6b0; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.hint { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }

/* ---- ヘッダ ---- */
header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 600; letter-spacing: .04em; }
.brand span { color: var(--muted); font-weight: normal; font-size: 12px; }
.user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }

.tabs { display: flex; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 49px; z-index: 9; }
.tab { flex: 1; padding: 12px 4px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

main { padding: 16px; max-width: 1100px; margin: 0 auto; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.toolbar input, .toolbar select { margin-top: 0; width: auto; flex: 1; max-width: 240px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 16px; }
.card h3 { margin: 0 0 14px; font-size: 15px; }
.section-title { font-size: 14px; color: var(--muted); margin: 22px 0 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.actions { display: flex; gap: 10px; margin-top: 6px; }
.actions .ghost { flex: 0 0 auto; }
.actions .primary { flex: 1; }

/* ---- ダッシュボード ---- */
.store-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 16px; }
.store-card.combined { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--card) 60%); }
.store-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.store-head h2 { margin: 0; font-size: 17px; }
.store-head .badge { font-size: 12px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { background: #fbfaf9; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.kpi .label { font-size: 11px; color: var(--muted); }
.kpi .value { font-size: 19px; font-weight: 600; letter-spacing: .01em; }
.kpi .sub { font-size: 11px; color: var(--muted); }
.kpi .up { color: var(--good); }
.kpi .down { color: var(--bad); }

.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 48px; margin-top: 14px; }
.spark > i { flex: 1; background: var(--accent); opacity: .55; border-radius: 2px 2px 0 0; min-height: 1px; }
.spark > i.today { opacity: 1; }

/* ---- テーブル ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: normal; font-size: 12px; }
th:first-child, td:first-child { text-align: left; }
td.comment { text-align: left; white-space: normal; color: var(--muted); font-size: 12px; }
.scroll-x { overflow-x: auto; }
.missing { color: var(--bad); }

.empty { color: var(--muted); font-size: 13px; padding: 16px 0; text-align: center; }

@media (min-width: 720px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .grid2 { grid-template-columns: repeat(3, 1fr); }
}
