/* 3DCP Skill Standards - Page Specific Styles */

/* Page Header (secondary header below global nav) */
.page-header {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 60px;
  z-index: 90;
}

.page-logo {
  width: 32px;
  height: 32px;
  background: #06C755;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

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

.page-title {
  font-size: 18px;
  font-weight: 700;
}

.page-ver {
  font-size: 13px;
  color: #666;
}

/* Breadcrumb */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 12px 24px;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list a {
  color: #06C755;
  text-decoration: none;
}

.breadcrumb-list a:hover {
  text-decoration: underline;
}

.breadcrumb-list .current {
  color: #666;
}

.breadcrumb-sep {
  color: #ccc;
}

/* Layout */
.skill-container {
  display: flex;
}

.sidebar {
  width: 200px;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  min-height: calc(100vh - 188px);
  padding: 16px 0;
  flex-shrink: 0;
  position: sticky;
  top: 124px;
  align-self: flex-start;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  color: #666;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.nav-item:hover {
  background: #f7f8f9;
}

.nav-item.active {
  background: #e8f9ee;
  color: #06C755;
  font-weight: 600;
  border-left-color: #06C755;
}

.main {
  flex: 1;
  padding: 24px;
  min-width: 0;
}

/* Cards */
.card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  margin-bottom: 16px;
}

/* Phase Selection */
.phase-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.phase-btn {
  flex: 1;
  min-width: 140px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.phase-btn.active {
  border: 2px solid #06C755;
  background: #e8f9ee;
}

.phase-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f7f8f9;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin: 0 auto 8px;
}

.phase-btn.active .phase-icon {
  background: #06C755;
  color: #fff;
}

.phase-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.phase-btn.active .phase-name {
  color: #06C755;
}

.phase-arrow {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: #e5e5e5;
  z-index: 1;
}

/* Phase Header */
.phase-header {
  padding: 24px;
  border-bottom: 1px solid #e5e5e5;
  background: #f7f8f9;
}

.phase-header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.phase-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #06C755;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.phase-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.phase-duration {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.phase-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.outputs-section {
  margin-top: 16px;
}

.outputs-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.outputs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.output-tag {
  padding: 4px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e5e5;
  font-size: 12px;
}

/* Legend */
.legend {
  padding: 16px 24px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.legend-label {
  font-size: 12px;
  color: #999;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-symbol {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.legend-text {
  font-size: 12px;
  color: #666;
}

/* Tasks */
.tasks-section {
  padding: 24px;
}

.tasks-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tasks-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #666;
  background: #f7f8f9;
  border-bottom: 1px solid #e5e5e5;
  white-space: nowrap;
}

.tasks-table th.center {
  text-align: center;
}

.tasks-table td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}

.tasks-table td.center {
  text-align: center;
}

.tasks-table tr {
  cursor: pointer;
  transition: background 0.15s;
}

.tasks-table tr:hover {
  background: #f7f8f9;
}

.task-id {
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

.task-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-cat {
  padding: 2px 8px;
  border-radius: 4px;
  background: #f7f8f9;
  font-size: 10px;
  color: #666;
}

.task-chevron {
  color: #999;
  transition: transform 0.2s;
}

.task-chevron.open {
  transform: rotate(90deg);
}

/* Role Symbols */
.role-symbol {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.role-main {
  background: #e8f9ee;
  color: #06C755;
}

.role-sub {
  background: #e3f2fd;
  color: #1976D2;
}

.role-assist {
  background: #fff3e0;
  color: #F57C00;
}

.role-none {
  background: #f7f8f9;
  color: #999;
}

/* Skill Tags */
.skill-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s;
}

.skill-tag:hover {
  transform: scale(1.05);
}

/* Task Detail */
.task-detail {
  padding: 16px 24px;
  background: #f7f8f9;
  border-bottom: 1px solid #e5e5e5;
  display: none;
}

.task-detail.open {
  display: block;
}

.detail-desc {
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  margin-bottom: 16px;
}

.detail-desc-label {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  margin-bottom: 6px;
}

.detail-desc-text {
  font-size: 14px;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-section-label {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  margin-bottom: 8px;
}

.detail-outputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-output {
  padding: 6px 12px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e5e5e5;
  font-size: 13px;
}

.detail-skills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-skill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-skill:hover {
  background: #f7f8f9;
  border-color: #06C755;
}

.detail-skill-id {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.detail-skill-name {
  font-size: 13px;
}

.detail-skill-cat {
  font-size: 11px;
  color: #999;
}

.detail-skill-link {
  margin-left: auto;
  font-size: 11px;
  color: #06C755;
}

/* Skills Summary */
.skills-summary {
  padding: 24px;
  border-top: 1px solid #e5e5e5;
}

.skills-summary-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.skills-summary-hint {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-left: 12px;
}

.skills-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f7f8f9;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  transition: all 0.2s;
}

.skill-summary-item:hover {
  border-color: #06C755;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.1);
}

/* Level Cards */
.levels-grid {
  display: grid;
  gap: 16px;
}

.level-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  display: flex;
}

.level-badge {
  width: 120px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.level-badge-code {
  font-size: 24px;
  font-weight: 700;
}

.level-badge-name {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.level-content {
  flex: 1;
  padding: 24px;
  border-left: 1px solid #e5e5e5;
}

.level-exp {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.level-desc {
  font-size: 14px;
  line-height: 1.6;
}

.l1-badge { background: #f7f8f9; }
.l1-badge .level-badge-code, .l1-badge .level-badge-name { color: #666; }
.l2-badge { background: #e3f2fd; }
.l2-badge .level-badge-code, .l2-badge .level-badge-name { color: #1976D2; }
.l3-badge { background: #e8f5e9; }
.l3-badge .level-badge-code, .l3-badge .level-badge-name { color: #388E3C; }
.l4-badge { background: #fff3e0; }
.l4-badge .level-badge-code, .l4-badge .level-badge-name { color: #F57C00; }
.l5-badge { background: #fce4ec; }
.l5-badge .level-badge-code, .l5-badge .level-badge-name { color: #C2185B; }

/* Role Cards */
.role-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  margin-bottom: 16px;
}

.role-header {
  padding: 20px 24px;
  cursor: pointer;
  transition: background 0.15s;
}

.role-header:hover {
  background: #f7f8f9;
}

.role-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.role-header-left {
  flex: 1;
}

.role-header-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.role-layer {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.role-layer-mgr {
  background: #e8f9ee;
  color: #06C755;
}

.role-layer-exec {
  background: #fff3e0;
  color: #F57C00;
}

.role-name {
  font-size: 18px;
  font-weight: 700;
}

.role-name-en {
  font-size: 13px;
  color: #999;
}

.role-desc {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
  line-height: 1.6;
}

.role-chevron {
  color: #999;
  margin-left: 16px;
}

.role-detail {
  border-top: 1px solid #e5e5e5;
  display: none;
}

.role-detail.open {
  display: block;
}

.role-meta {
  padding: 20px 24px;
  background: #f7f8f9;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.role-meta-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.role-meta-value {
  font-size: 14px;
}

.role-skills-section {
  padding: 20px 24px;
  border-top: 1px solid #e5e5e5;
}

.role-skills-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.role-skills-hint {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-left: 12px;
}

.role-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-skill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f7f8f9;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  transition: all 0.2s;
}

.role-skill-item:hover {
  border-color: #06C755;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.1);
}

.role-skill-level {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
}

.role-auth-section {
  padding: 20px 24px;
  border-top: 1px solid #e5e5e5;
}

.role-auth-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.role-auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}

.role-auth-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f7f8f9;
  border-radius: 6px;
}

.role-auth-name {
  font-size: 13px;
}

.role-auth-level {
  font-size: 11px;
  font-weight: 600;
}

.role-auth-level.decision {
  color: #06C755;
}

.role-auth-level.judge {
  color: #1976D2;
}

.role-auth-level.recommend {
  color: #666;
}

/* Filter Bar */
.filter-bar {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  padding: 20px;
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.filter-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.filter-input-wrap {
  position: relative;
}

.filter-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

.filter-select {
  padding: 10px 32px 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23666666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  cursor: pointer;
  outline: none;
  appearance: none;
}

/* Skill Cards */
.skill-count {
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  transition: all 0.2s;
}

.skill-card.selected {
  border: 2px solid #06C755;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.1);
}

.skill-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.skill-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.skill-id-badge {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.skill-info {
  flex: 1;
}

.skill-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.skill-name {
  font-size: 15px;
  font-weight: 600;
}

.skill-cat-name {
  font-size: 12px;
  color: #999;
}

.skill-required {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #e8f9ee;
  color: #06C755;
}

.skill-def {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  line-height: 1.5;
}

.skill-chevron {
  color: #999;
  flex-shrink: 0;
  margin-left: 12px;
}

.skill-proficiency {
  border-top: 1px solid #e5e5e5;
  display: none;
}

.skill-proficiency.open {
  display: block;
}

.prof-row {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
}

.prof-level {
  width: 80px;
  flex-shrink: 0;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.prof-level-badge {
  font-size: 14px;
  font-weight: 700;
}

.prof-desc {
  flex: 1;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  border-left: 1px solid #e5e5e5;
}

/* Glossary */
.glossary-header {
  margin-bottom: 24px;
}

.glossary-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.glossary-search {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  font-size: 14px;
  width: 300px;
  outline: none;
}

.cat-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.cat-btn:hover {
  background: #f7f8f9;
}

.cat-btn.active {
  background: #06C755;
  color: #fff;
  border-color: #06C755;
}

.glossary-list {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
}

.glossary-item {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.glossary-item:last-child {
  border-bottom: none;
}

.glossary-term-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.glossary-term {
  font-size: 18px;
  font-weight: 700;
}

.glossary-reading {
  font-size: 13px;
  color: #999;
}

.glossary-cat {
  padding: 4px 10px;
  border-radius: 12px;
  background: #f7f8f9;
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

.glossary-english {
  font-size: 13px;
  color: #06C755;
  font-style: italic;
  margin-bottom: 8px;
}

.glossary-def {
  font-size: 14px;
  line-height: 1.7;
}

.glossary-related {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.glossary-related-label {
  font-size: 12px;
  color: #999;
  font-weight: 600;
}

.glossary-related-btn {
  padding: 3px 10px;
  border-radius: 12px;
  background: #e8f9ee;
  border: none;
  font-size: 12px;
  color: #06C755;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.glossary-related-btn:hover {
  background: #d4f4e2;
}

.glossary-empty {
  padding: 40px;
  text-align: center;
  color: #666;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .level-card {
    flex-direction: column;
  }
  
  .level-badge {
    width: 100%;
    border-bottom: 1px solid #e5e5e5;
  }
  
  .level-content {
    border-left: none;
  }
}
