/* ==========================================================================
   from me to you Management OS — Design Tokens
   Palette: 深いチャコールネイビー + コーポレートカラーのシアンブルーのアクセント。
   BtoB経営システムとしての「高級感・信頼感・先進性・情報密度・可読性」を優先。
   ========================================================================== */

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

:root {
  --bg: #11141a;
  --surface: #181c24;
  --surface-raised: #1f2530;
  --border: #2b3140;
  --border-strong: #3a4152;

  --text-primary: #e7e9ee;
  --text-secondary: #9098a8;
  --text-muted: #5b6472;

  --accent: #18b6d9;
  --accent-hover: #39c7e6;
  --accent-soft: rgba(24, 182, 217, 0.14);
  --accent-deep: #0f8eab;

  --status-green: #4f9c6d;
  --status-green-bg: rgba(79, 156, 109, 0.12);
  --status-yellow: #c99a3d;
  --status-yellow-bg: rgba(201, 154, 61, 0.12);
  --status-red: #c0564a;
  --status-red-bg: rgba(192, 86, 74, 0.14);
  --status-unknown: var(--text-muted);
  --status-unknown-bg: rgba(91, 100, 114, 0.12);

  --radius: 6px;
  --font-serif: 'Shippori Mincho', 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}

.app-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* --- Header --- */
.app-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.app-header .brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
.app-header .brand span {
  display: block;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.app-nav {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.app-nav form {
  display: inline;
}
.app-nav button.link-button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
}
.app-nav button.link-button:hover {
  color: var(--accent);
}

/* --- Section / Card --- */
.section {
  margin-bottom: 24px;
}
.section-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  font-weight: 500;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card + .card {
  margin-top: 10px;
}

/* --- Status rows --- */
.status-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--border);
}
.status-row .label {
  font-size: 14px;
  color: var(--text-primary);
}
.status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.status-badge.GREEN { color: var(--status-green); background: var(--status-green-bg); }
.status-badge.YELLOW { color: var(--status-yellow); background: var(--status-yellow-bg); }
.status-badge.RED { color: var(--status-red); background: var(--status-red-bg); }
.status-badge.unknown, .status-badge.不明 { color: var(--status-unknown); background: var(--status-unknown-bg); }

/* --- Decision card --- */
.decision-card {
  border-left: 3px solid var(--accent);
}
.decision-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.decision-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.decision-meta .tag {
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 2px 8px;
}
.decision-reason {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0;
}
.decision-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.decision-actions form {
  flex: 1;
}
.btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn.approve { border-color: var(--status-green); color: var(--status-green); }
.btn.approve:hover { background: var(--status-green-bg); }
.btn.reject { border-color: var(--status-red); color: var(--status-red); }
.btn.reject:hover { background: var(--status-red-bg); }
.btn.hold { border-color: var(--text-muted); color: var(--text-secondary); }
.btn.hold:hover { background: var(--surface); }
.btn.primary {
  border-color: var(--accent);
  color: var(--bg);
  background: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* --- Lists --- */
.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-plain li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-primary);
}
.list-plain li:last-child {
  border-bottom: none;
}
.empty-note {
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px 0;
}

/* --- Forms --- */
.form-field {
  margin-bottom: 14px;
}
.form-field label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
}
.form-field textarea {
  min-height: 64px;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.unit-block {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}
.unit-block h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-primary);
}

/* --- Login --- */
.login-shell {
  max-width: 360px;
  margin: 18vh auto 0;
  padding: 0 20px;
}
.login-brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-brand .brand {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
}
.login-brand span {
  display: block;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.error-note {
  color: var(--status-red);
  font-size: 13px;
  margin-bottom: 14px;
}

/* --- Executive report blocks --- */
.exec-block {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}
.exec-block:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.exec-block h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.error-flag {
  color: var(--status-red);
  font-size: 12px;
  border: 1px solid var(--status-red);
  border-radius: 4px;
  padding: 1px 6px;
}

/* --- Filters --- */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar select {
  padding: 8px 10px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
}

.subtle {
  color: var(--text-muted);
  font-size: 12px;
}

.snapshot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.snapshot-row:last-child { border-bottom: none; }
