/* file: public/css/style.css */
/* path: public/css/style.css */

:root {
  --bg: #f6f7fb;
  --bg-soft: #eef2ff;
  --card: #ffffff;
  --card-soft: rgba(255, 255, 255, 0.86);
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --brand: #4f46e5;
  --brand-soft: rgba(79, 70, 229, 0.10);
  --brand-soft-strong: rgba(79, 70, 229, 0.16);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.12);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.10);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.12);
  --shadow-sm: 0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 16px 48px rgba(17, 24, 39, 0.09);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.09), transparent 30%),
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.06), transparent 28%),
    linear-gradient(180deg, #f4f7ff 0%, #f7f8fc 38%, #ffffff 100%);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic",
    "Meiryo", sans-serif;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.shell-header-inner {
  min-height: 92px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.app-shell {
  padding-top: 28px;
  padding-bottom: 56px;
}

.eyebrow,
.section-label,
.hero-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.page-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 760px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
}

.hero-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 18px;
  background: linear-gradient(180deg, #ffffff, #fafbff);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-value {
  display: block;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.panel-span-12 { grid-column: span 12; }
.panel-span-8  { grid-column: span 8; }
.panel-span-7  { grid-column: span 7; }
.panel-span-6  { grid-column: span 6; }
.panel-span-5  { grid-column: span 5; }
.panel-span-4  { grid-column: span 4; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  width: min(520px, 100%);
}

.card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.card p {
  margin: 0 0 14px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #1f2937;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.06);
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(180deg, #5b52f2, #4f46e5);
  color: #ffffff;
  border-color: transparent;
}

.btn.primary:hover {
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.72);
}

.error {
  color: var(--danger);
  margin-top: 12px;
  min-height: 1.2em;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: #ffffff;
}

.data-table th,
.data-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.data-table th {
  background: #fafbff;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.clickable-row {
  cursor: pointer;
  transition: background 120ms ease;
}

.clickable-row:hover {
  background: rgba(79, 70, 229, 0.045);
}

.cell-title {
  font-weight: 800;
  color: #111827;
}

.cell-note {
  color: #4b5563;
  max-width: 260px;
}

.empty-cell {
  text-align: center !important;
  color: var(--muted);
  padding: 28px !important;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill-open {
  color: #3730a3;
  background: rgba(79, 70, 229, 0.12);
  border-color: rgba(79, 70, 229, 0.20);
}

.pill-close {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.12);
}

.pill-neutral {
  color: #334155;
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.08);
}

.stack-list {
  display: grid;
  gap: 12px;
}

.soft-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(250,251,255,0.98));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.soft-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.soft-card p {
  margin: 8px 0 0;
}

.muted {
  color: var(--muted);
}

.info-block-grid,
.summary-card-grid,
.placeholder-grid {
  display: grid;
  gap: 14px;
}

.info-block-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.placeholder-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.placeholder-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(79, 70, 229, 0.24);
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.04), rgba(255, 255, 255, 0.95));
}

.placeholder-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.placeholder-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.callout-panel {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.07), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(79, 70, 229, 0.14);
}

.callout-panel h3 {
  margin: 0 0 8px;
}

.callout-panel p {
  margin: 0;
  color: #4b5563;
}

.summary-value {
  margin: 10px 0 4px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-span-2 {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1080px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .panel-span-8,
  .panel-span-7,
  .panel-span-6,
  .panel-span-5,
  .panel-span-4 {
    grid-column: span 12;
  }

  .summary-card-grid,
  .placeholder-grid,
  .info-block-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 16px;
  }

  .shell-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel,
  .panel,
  .card {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-span-2 {
    grid-column: span 1;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .metric-value {
    font-size: 24px;
  }
}
