/* Extracted from dashboard/index.html <style> */

.dashboard-page {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.dashboard-updated-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
  color: var(--color-text);
  font-size: 0.85rem;
}
.dashboard-updated-icon { line-height: 1; }
.dashboard-updated-text { color: var(--color-text-light); }

.dashboard-description {
  color: var(--color-text-light);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 auto 0.5rem;
}

/* Phase2: Data Status Bar */
.data-status-bar {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.status-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: white;
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.status-icon {
  font-size: 1rem;
}

.status-text {
  color: var(--color-text);
  font-weight: 500;
}

.auth-status.logged-in {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.auth-status.logged-in .status-text {
  color: #166534;
}

.data-expiry-section .status-text {
  color: #b45309;
}

/* Phase2: Summary Statistics */
.stats-summary {
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stats-grid.compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
  font-weight: 500;
}

.stat-item.compact {
  padding: 0.75rem 0.65rem;
}

.stat-item.compact .stat-value {
  font-size: 1rem;
  color: var(--color-text);
}

.stat-item.compact .stat-label {
  margin-top: 0.15rem;
  font-size: 0.76rem;
}

/* Phase2: Category Bar Chart (no external libs) */
.category-bar-chart {
  padding: 0.5rem 0;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.bar-label {
  width: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
  flex-shrink: 0;
}

.bar-container {
  flex: 1;
  height: 24px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease-out;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
}

.bar-value {
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bar-value-outside {
  position: absolute;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .bar-label {
    width: 70px;
    font-size: 0.7rem;
  }
}

.chart-section {
  margin-bottom: 2rem;
}

.chart-card {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.chart-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.01em;
}

 
.level-legend-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  overflow: hidden;
}

.level-legend-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.level-legend-table th,
.level-legend-table td {
  padding: 0.5rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.level-legend-table thead th {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.75rem;
}

.level-legend-table thead th:first-child {
  width: 220px;
  min-width: 220px;
}

.level-legend-table tbody tr:last-child th,
.level-legend-table tbody tr:last-child td {
  border-bottom: none;
}

.level-legend-table .type-label {
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.5rem;
}

 
.level-legend-table .type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: white;
}

.level-legend-table .type-badge.technical-engineering {
  background: #2563eb;
}

.level-legend-table .type-badge.service-operation {
  background: #0369a1;
}

.level-legend-table .type-badge.governance {
  background: #7c3aed;
}

.level-legend-table .type-badge.program-delivery {
  background: #c2410c;
}

.level-legend-table .type-badge.incident-intelligence {
  background: #dc2626;
}

.level-legend-table .type-badge.security-assurance {
  background: #15803d;
}

 
.level-legend-table .legend-row-technical-engineering {
  background: rgba(37, 99, 235, 0.06);
}

.level-legend-table .legend-row-service-operation {
  background: rgba(3, 105, 161, 0.06);
}

.level-legend-table .legend-row-governance {
  background: rgba(124, 58, 237, 0.06);
}

.level-legend-table .legend-row-program-delivery {
  background: rgba(194, 65, 12, 0.06);
}

.level-legend-table .legend-row-incident-intelligence {
  background: rgba(220, 38, 38, 0.06);
}

.level-legend-table .legend-row-security-assurance {
  background: rgba(21, 128, 61, 0.06);
}

.level-legend-table td {
  color: var(--color-text-light);
  font-size: 0.75rem;
}

 
.level-legend-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

 
.filter-controls {
  padding: 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input:checked + .toggle-switch {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.toggle-text {
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 500;
}

#polar-chart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 450px;
  position: relative;
}

#polar-chart {
  width: 100%;
  max-width: 550px;
}

#chart-empty-message {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-light);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

#chart-empty-message p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

 
#polar-chart svg {
  overflow: visible;
}

.sector {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.sector-label {
  font-weight: 500;
  fill: #374151;
  pointer-events: none;
  letter-spacing: 0.01em;
}

.level-circle {
  fill: none;
}

.level-label {
  font-weight: 700;
  font-size: 11px;
  fill: #374151;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: white;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

 
.chart-tooltip {
  position: fixed;
  background: rgba(15, 23, 42, 0.95);
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 220px;
  backdrop-filter: blur(8px);
}

.chart-tooltip.visible {
  opacity: 1;
}

.tooltip-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  gap: 1rem;
}

.tooltip-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.tooltip-value {
  font-weight: 500;
  font-size: 12px;
}

.tooltip-interest {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #fbbf24;
  font-size: 12px;
}

 
.skill-detail-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.skill-detail-panel h3 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.1rem;
  font-weight: 600;
}

.detail-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.detail-close:hover {
  color: var(--color-text);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

.dashboard-actions {
  text-align: center;
  margin-top: 2rem;
}

 
@media (max-width: 640px) {
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .level-legend-bar {
    gap: 0.5rem;
  }
  
  .legend-item {
    font-size: 0.7rem;
  }
  
  .level-legend-table {
    font-size: 0.7rem;
    min-width: 760px;
  }
  
  .level-legend-table th,
  .level-legend-table td {
    padding: 0.4rem 0.5rem;
  }
  
  .level-legend-table thead th,
  .level-legend-table .type-label,
  .level-legend-table td {
    font-size: 0.65rem;
  }
}

 

.qual-section {
  margin-top: 2rem;
}

.tool-section {
  margin-top: 2rem;
}

#tool-grid-container {
  margin-top: 1.5rem;
}

.dash-tool-category-group {
  margin-bottom: 1rem;
}

/* Dashboard-only tool styles (avoid collision with /css/style.css tool styles) */
.dash-tool-category-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dash-tool-category-header:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dash-tool-category-header:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.dash-tool-category-header .toggle-icon {
  font-size: 0.8rem;
  color: var(--color-text-light);
  transition: transform 0.2s;
}

.dash-tool-category-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.dash-tool-category-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.dash-tool-category-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-light);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.dash-tool-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.dash-tool-card-grid.collapsed {
  display: none;
}

.dash-tool-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.dash-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.dash-tool-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.dash-tool-card-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.dash-tool-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  word-break: break-word;
}

.dash-tool-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: 600;
}

.dash-tool-chip-label {
  color: var(--color-text-light);
  font-weight: 600;
}

.dash-tool-chip-interest {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.22);
  color: #B45309;
}

.dash-tool-chip-muted {
  color: var(--color-text-light);
  font-weight: 600;
}

#tool-empty-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
}

#tool-empty-message .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

#tool-empty-message p {
  margin-bottom: 1.5rem;
}

 
.filter-toggle-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 4px;
}

.filter-toggle-group .filter-btn {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.filter-toggle-group .filter-btn:hover {
  color: var(--color-text);
}

.filter-toggle-group .filter-btn.active {
  background: white;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

 
#qual-grid-container {
  margin-top: 1.5rem;
}

 
.qual-category-group {
  margin-bottom: 1.5rem;
}

.qual-category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.qual-category-header:hover {
  opacity: 0.8;
}

.qual-category-header .toggle-icon {
  font-size: 0.75rem;
  color: var(--color-text-light);
  transition: transform 0.2s;
}

.qual-category-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.qual-category-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.qual-category-count {
  font-size: 0.75rem;
  color: var(--color-text-light);
  background: rgba(0, 0, 0, 0.04);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
}

 
.qual-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.qual-card-grid.collapsed {
  display: none;
}

 
.qual-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.qual-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.qual-card.acquired::before {
  background: linear-gradient(90deg, #10B981, #34D399);
}

.qual-card.studying::before {
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.qual-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qual-card.qual-card-expiry-planned {
  border-color: #d1d5db;
  background: #f9fafb;
}

.qual-card.qual-card-expiring-soon {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12) inset;
}

.qual-card.qual-card-expired {
  border-color: #9ca3af;
  background: #f3f4f6;
  box-shadow: 0 0 0 1px rgba(75, 85, 99, 0.12) inset;
}

.qual-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.qual-card-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.qual-card-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  word-break: break-word;
}

.qual-card-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.qual-card-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.qual-card-date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.qual-card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.qual-card-status.acquired {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.qual-card-status.studying {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
}

.qual-card-status.expired {
  background: rgba(107, 114, 128, 0.15);
  color: #4b5563;
}

.qual-card-status.expiring-soon {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.qual-card-status.valid {
  background: #D1D5DB;
  color: #111827;
}

.qual-card-date {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  color: var(--color-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

 
.qual-card-custom-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.625rem;
  background: rgba(99, 102, 241, 0.1);
  color: #6366F1;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 500;
}

 
#qual-empty-message {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
}

#qual-empty-message .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

#qual-empty-message p {
  margin-bottom: 1.5rem;
}

 
@media (max-width: 640px) {
  .filter-toggle-group .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .qual-card-grid {
    grid-template-columns: 1fr;
  }
  
  .qual-card-name {
    font-size: 0.8rem;
  }
}

 
.view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.view-tab-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 3px;
}

.view-tab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.view-tab:hover {
  color: var(--color-text);
}

.view-tab.active {
  background: white;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-tab-icon-svg {
  flex-shrink: 0;
}

 
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline-year {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.timeline-year:first-child {
  margin-top: 0;
}

.timeline-year-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 60px;
}

.timeline-year.current .timeline-year-label {
  color: #DC2626;
}

.timeline-year.no-date .timeline-year-label {
  color: var(--color-text-light);
  font-size: 1rem;
  min-width: auto;
}

.timeline-year-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  border-radius: 1px;
}

.timeline-year.no-date .timeline-year-line {
  background: linear-gradient(90deg, var(--color-border), transparent);
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-year-content {
  margin-left: 30px;
  padding-left: 2rem;
  border-left: 2px solid var(--color-border);
}

.timeline-month {
  margin-bottom: 1rem;
}

.timeline-month-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.timeline-month-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-month.empty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.125rem;
  margin-left: 2rem;
  opacity: 0.4;
}

.timeline-month.empty .timeline-month-label {
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin-bottom: 0;
  min-width: 1.5rem;
}

.timeline-month.empty .timeline-month-items {
  display: none;
}

.timeline-empty {
  color: var(--color-text-light);
  font-size: 0.7rem;
}

 
.timeline-current-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: #DC2626;
  background: rgba(220, 38, 38, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.5rem;
}

 
.timeline-today-marker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin: 0.25rem 0 0.5rem 0;
}

.timeline-today-dot {
  width: 10px;
  height: 10px;
  background: #DC2626;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
  animation: pulse-today 2s ease-in-out infinite;
}

@keyframes pulse-today {
  0%, 100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.1); }
}

.timeline-today-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #DC2626;
}

.timeline-today-line {
  flex-grow: 1;
  height: 2px;
  background: linear-gradient(to right, #DC2626, transparent);
}

 
.timeline-month.current .timeline-month-label {
  color: #DC2626;
  font-weight: 600;
}

.timeline-month.empty.current {
  opacity: 0.7;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--color-border);
  flex-shrink: 0;
  margin-top: 0.75rem;
}

.timeline-item.acquired .timeline-dot {
  border-color: #10B981;
  background: #10B981;
}

.timeline-item.studying .timeline-dot {
  border-color: #F59E0B;
  background: #F59E0B;
}

.timeline-item.expired_event .timeline-dot {
  border-color: #4B5563;
  background: #4B5563;
}

.timeline-item.expiry_planned .timeline-dot {
  border-color: #9CA3AF;
  background: #9CA3AF;
}

.timeline-item.expiring_event .timeline-dot {
  border-color: #EF4444;
  background: #EF4444;
}

.timeline-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  flex: 1;
}

.timeline-content:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.timeline-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.timeline-details {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  padding: 0.125rem 0.5rem;
  background: #f1f5f9;
  border-radius: 4px;
}

.timeline-item.acquired .timeline-date {
  background: #dcfce7;
  color: #166534;
}

.timeline-item.studying .timeline-date {
  background: #fef3c7;
  color: #92400e;
}

.timeline-item.expired_event .timeline-date {
  background: #9CA3AF;
  color: #111827;
}

.timeline-item.expiry_planned .timeline-date {
  background: #D1D5DB;
  color: #111827;
}

.timeline-item.expiring_event .timeline-date {
  background: #FEE2E2;
  color: #B91C1C;
}

.timeline-custom-badge {
  display: inline-block;
  background: #f1f5f9;
  color: var(--color-text-light);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.625rem;
  font-weight: 500;
}

 
.timeline-no-date-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--color-border);
}

.timeline-no-date-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.timeline-no-date-icon {
  font-size: 1rem;
}

.timeline-no-date-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.timeline-no-date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .view-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-items {
    padding-left: 1.5rem;
    margin-left: 20px;
  }
  
  .timeline-dot {
    left: -1.5rem;
  }
  
  .timeline-content {
    padding: 0.75rem;
  }
  
  .timeline-icon {
    font-size: 1.25rem;
  }
}

@media (max-width: 600px) {
  .stats-grid.compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   Phase5: Matching Section Styles
   ============================================================ */

.matching-section {
  margin-top: 2rem;
}

.matching-description {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.matching-state {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-light);
}

.matching-state-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.matching-state p {
  margin: 0 0 1rem 0;
}

/* 求人一覧（/jobs/）の .jobs-list / .job-item と同一のカード見た目 */
.matching-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 1rem 0;
}

.matching-list .job-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
}

.matching-list .job-item-title {
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 10px 0;
  font-size: 1.05rem;
}

.matching-list .job-card-header,
.matching-list .job-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.matching-list .job-card-header .job-item-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.matching-list .job-card-title-line {
  display: flex;
  align-items: center;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}

.matching-list .job-card-header .job-card-title-line .job-item-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.matching-list .job-contract-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.matching-list .job-contract-badge--full-time {
  background: #e0e7ff;
  color: #3730a3;
}

.matching-list .job-contract-badge--b2b {
  background: #f3e8ff;
  color: #6b21a8;
}

.matching-list .job-contract-badge--spot {
  background: #e2e8f0;
  color: #334155;
}

.matching-list .job-company-name {
  margin: -2px 0 10px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.5;
  color: #334155;
}

.matching-list .job-item-meta,
.matching-list .job-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.86rem;
  color: var(--color-text-light);
  margin-bottom: 10px;
}

.matching-list .job-item-meta-label,
.matching-list .job-detail-meta-label {
  font-weight: 600;
  color: var(--color-text);
  margin-right: 4px;
}

.matching-list .job-item-salary-supplement {
  min-width: 0;
  margin: -2px 0 10px;
  padding-left: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--color-text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matching-list .job-item-salary-supplement-value {
  color: var(--color-text-light);
}

.matching-list .job-item-actions {
  margin-top: 10px;
}

.matching-list .job-item-detail-block-title {
  margin-top: 12px;
}

.matching-list .job-item .job-item-description-preview {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text);
  margin: 0 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.matching-list .job-item-description-preview-suffix {
  color: var(--color-text-light);
  font-weight: 600;
}

.matching-list .job-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.matching-list .job-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
}

.matching-list .job-badge.spot {
  background: #e2e8f0;
  color: #334155;
}

.matching-list .job-feature-list,
.matching-list .job-matching-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}

.matching-list .job-matching-summary {
  margin-top: 10px;
}

.matching-list .job-matching-heading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

/* 特徴チップ（一覧と同じベース） */
.matching-list .job-feature-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #f1f5f9;
  color: #334155;
}

/* マッチチップの色は /css/style.css の .job-matching-chip.skill|tool|qualification を利用 */
.matching-list .job-matching-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.matching-list .job-matching-note {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
  white-space: pre-wrap;
}

.matching-list .job-match-rate-card {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #93c5fd;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  flex-shrink: 0;
}

.matching-list .job-match-rate-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.matching-list .job-match-rate-value {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.matching-list .job-link-btn {
  display: inline-block;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.85rem;
  background: #f8fafc;
}

.matching-list .job-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.matching-list .detail-block-title {
  margin: 12px 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.matching-footer-link {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .matching-list .job-card-header {
    flex-direction: column;
  }

  .matching-list .job-card-header .job-match-rate-card {
    align-self: flex-start;
  }

  .matching-list .job-link-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .matching-list .job-action-links {
    flex-direction: column;
    align-items: stretch;
  }

  .matching-footer-link {
    justify-content: stretch;
  }

  .matching-footer-link .btn {
    width: 100%;
  }
}

/* Extracted from dashboard/index.html style attributes */
.csp-dashboard-1 {
  display: none;
}
.csp-dashboard-2 {
  background: #93C5FD;
}
.csp-dashboard-3 {
  background: #60A5FA;
}
.csp-dashboard-4 {
  background: #3B82F6;
}
.csp-dashboard-5 {
  background: #2563EB;
}
.csp-dashboard-6 {
  background: #1D4ED8;
}
