body {
  margin: 0;
}

.incoterms-page-container {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  padding-bottom: 50px;
}

.incoterms-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 40px 20px;
  border-bottom: 4px solid #0284c7;
}
.incoterms-hero h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}
.incoterms-hero p {
  font-size: 15px;
  color: #94a3b8;
  margin: 0;
  max-width: 700px;
}

.incoterms-body-wrapper {
  max-width: 1240px;
  margin: -30px auto 0 auto;
  padding: 0 20px;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.filter-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.incoterms-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}
@media (max-width: 991px) {
  .incoterms-grid {
    grid-template-columns: 1fr;
  }
}

.terms-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.term-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.term-card:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.term-card.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.term-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  color: #ffffff;
  min-width: 44px;
  text-align: center;
}

.badge-E {
  background-color: #64748b;
}

.badge-F {
  background-color: #e11d48;
}

.badge-C {
  background-color: #d97706;
}

.badge-D {
  background-color: #059669;
}

.term-info {
  flex: 1;
  margin-left: 14px;
}

.term-code {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.term-title {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.detail-pane {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.detail-title-group h2 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-subtitle {
  font-size: 15px;
  color: #64748b;
  margin-top: 4px;
}

.mode-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 24px 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cost-matrix-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.cost-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  padding: 12px 18px;
  border-bottom: 1px solid #e2e8f0;
  align-items: center;
}
.cost-row:last-child {
  border-bottom: none;
}

.cost-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.cost-label i {
  margin-top: 4px;
}
.cost-label .cost-main-text {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.3;
}
.cost-label .cost-sub-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  font-weight: 400;
}

.cost-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  text-align: center;
}
.cost-tag.tag-seller {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.cost-tag.tag-buyer {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.obligation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .obligation-grid {
    grid-template-columns: 1fr;
  }
}

.obligation-card {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.obligation-card.ob-seller {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.obligation-card.ob-seller .ob-header {
  color: #15803d;
}
.obligation-card.ob-buyer {
  background: #fff1f2;
  border-color: #fecdd3;
}
.obligation-card.ob-buyer .ob-header {
  color: #be123c;
}

.ob-header {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ob-content {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

.risk-card {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
}
.risk-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #a16207;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.risk-card p {
  font-size: 14px;
  color: #713f12;
  margin: 0;
  line-height: 1.5;
}

.notes-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}
.notes-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}
.notes-card p {
  font-size: 14px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.incoterms-groups-footer {
  margin-top: 40px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .groups-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.group-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.group-letter {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  flex-shrink: 0;
}