:root {
  --asp-bg: #f4f6f8;
  --asp-surface: #ffffff;
  --asp-border: #e0e4e9;
  --asp-text: #1f2933;
  --asp-text-muted: #62707d;
  --asp-primary: #2563eb;
  --asp-primary-dark: #1d4ed8;
  --asp-accent: #0891b2;
  --asp-warn-bg: #fff7e6;
  --asp-warn-border: #f2c94c;
  --asp-danger: #dc2626;
  --asp-positive: #16a34a;
  --asp-radius: 10px;
  --asp-shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
}

.asp-tool {
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--asp-text);
  background: var(--asp-bg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  line-height: 1.6;
  box-sizing: border-box;
}

.asp-tool * {
  box-sizing: border-box;
}

.asp-header h1 {
  font-size: 1.6rem;
  margin: 0 0 6px;
}

.asp-sub {
  color: var(--asp-text-muted);
  margin: 0 0 20px;
  font-size: 0.92rem;
}

.asp-card {
  background: var(--asp-surface);
  border: 1px solid var(--asp-border);
  border-radius: var(--asp-radius);
  box-shadow: var(--asp-shadow);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.asp-card h2 {
  font-size: 1.05rem;
  margin: 0 0 14px;
}

/* Upload */
.asp-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed #b6c2cf;
  border-radius: var(--asp-radius);
  padding: 32px 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.asp-dropzone:hover,
.asp-dropzone.asp-dragover {
  border-color: var(--asp-primary);
  background-color: #f0f6ff;
}

.asp-dropzone-icon {
  font-size: 2rem;
}

.asp-dropzone-text {
  color: var(--asp-text-muted);
  font-size: 0.95rem;
}

.asp-dropzone-filename {
  font-weight: 600;
  color: var(--asp-primary-dark);
  font-size: 0.9rem;
}

.asp-note {
  color: var(--asp-text-muted);
  font-size: 0.8rem;
  margin: 10px 0 0;
}

.asp-status {
  margin-top: 10px;
  font-size: 0.9rem;
}

.asp-status.is-error {
  color: var(--asp-danger);
}

.asp-status.is-success {
  color: var(--asp-positive);
}

/* Filter */
.asp-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.asp-filter-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--asp-text-muted);
}

.asp-filter-row input[type="month"] {
  padding: 7px 10px;
  border: 1px solid var(--asp-border);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--asp-text);
}

.asp-btn {
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.asp-btn-primary {
  background: var(--asp-primary);
  color: #fff;
}

.asp-btn-primary:hover {
  background: var(--asp-primary-dark);
}

.asp-btn-secondary {
  background: #fff;
  color: var(--asp-text);
  border-color: var(--asp-border);
}

.asp-btn-secondary:hover {
  background: #f1f3f5;
}

/* Summary */
.asp-range-label {
  font-weight: 400;
  color: var(--asp-text-muted);
  font-size: 0.85rem;
}

.asp-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.asp-stat {
  background: #f8fafc;
  border: 1px solid var(--asp-border);
  border-radius: 8px;
  padding: 14px 16px;
}

.asp-stat-label {
  font-size: 0.78rem;
  color: var(--asp-text-muted);
  margin-bottom: 6px;
}

.asp-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--asp-text);
}

.asp-stat-value.asp-accent {
  color: var(--asp-accent);
}

/* Table */
.asp-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--asp-border);
  border-radius: 8px;
  max-height: 560px;
  overflow-y: auto;
}

.asp-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.86rem;
  white-space: nowrap;
}

.asp-table th,
.asp-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--asp-border);
  text-align: right;
}

.asp-table th:first-child,
.asp-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: inherit;
}

.asp-table thead th {
  position: sticky;
  top: 0;
  background: #eef2f6;
  z-index: 2;
  text-align: right;
  white-space: normal;
  vertical-align: bottom;
}

.asp-table thead th:first-child {
  z-index: 3;
  background: #eef2f6;
}

.asp-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

/* Notes */
.asp-notes ul {
  margin: 6px 0 14px;
  padding-left: 20px;
  font-size: 0.85rem;
}

.asp-notes p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--asp-text-muted);
}

.asp-notes details {
  background: var(--asp-warn-bg);
  border: 1px solid var(--asp-warn-border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.asp-notes summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
}

.asp-notes .asp-name-list {
  columns: 2;
  column-gap: 24px;
}

@media (max-width: 640px) {
  .asp-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .asp-notes .asp-name-list {
    columns: 1;
  }
}
