/* Shared styles for Dispute Management mockups */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.5;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top Nav */
.topnav {
  background: #1a1a2e;
  color: #fff;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  font-size: 14px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topnav .logo { font-weight: 700; font-size: 16px; letter-spacing: .5px; color: #60a5fa; }
.topnav .breadcrumb { opacity: .7; }
.topnav .breadcrumb span { color: #fff; opacity: 1; font-weight: 600; }
.topnav .mockup-pill {
  margin-left: auto;
  background: rgba(255,255,255,.1);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
}

/* Mockup nav strip */
.mock-nav {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 24px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.mock-nav .label { color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-right: 8px; }
.mock-nav a {
  padding: 4px 10px;
  border-radius: 4px;
  color: #374151;
  font-weight: 500;
}
.mock-nav a:hover { background: #f3f4f6; text-decoration: none; }
.mock-nav a.active { background: #2563eb; color: #fff; }
.mock-nav a.active:hover { background: #1d4ed8; }

/* Shell */
.shell { max-width: 1440px; margin: 0 auto; padding: 20px 24px 60px; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header .subtitle { color: #6b7280; font-size: 13px; margin-top: 2px; }

/* Card */
.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 18px 20px; }

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: #fff; color: #374151; border: 1px solid #d1d5db; }
.btn-outline:hover { background: #f9fafb; }
.btn-ghost { background: transparent; color: #6b7280; }
.btn-ghost:hover { background: #f3f4f6; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Filters bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 16px;
}
.filter-bar input[type="text"],
.filter-bar select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #1f2937;
  font-family: inherit;
}
.filter-bar input[type="text"] { min-width: 220px; }
.filter-bar select { min-width: 140px; }
.filter-bar .grow { flex: 1; }
.filter-bar .quick-pills { display: flex; gap: 6px; margin-left: 8px; }
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
  cursor: pointer;
  border: 1px solid #e5e7eb;
}
.pill:hover { background: #e5e7eb; }
.pill.red { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.pill.amber { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.pill.blue { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }

/* Table */
table.list {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  font-size: 13px;
}
table.list th,
table.list td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}
table.list th {
  background: #f9fafb;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .5px;
}
table.list tr:hover td { background: #fafbfc; cursor: pointer; }
table.list .id-cell { font-family: 'SF Mono', Menlo, monospace; font-size: 12px; color: #2563eb; font-weight: 600; }
table.list .overdue { color: #b91c1c; font-weight: 600; }

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.review  { background: #fed7aa; color: #9a3412; }
.badge.rejected{ background: #fee2e2; color: #b91c1c; }
.badge.closed  { background: #d1fae5; color: #065f46; }
.badge.dnfu    { background: #fee2e2; color: #b91c1c; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: 12px;
  color: #6b7280;
  background: #fff;
}
.pagination .pages { display: flex; gap: 4px; }
.pagination .pages span,
.pagination .pages a {
  padding: 4px 9px;
  border-radius: 4px;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
}
.pagination .pages .current { background: #2563eb; color: #fff; }

/* Form fields */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }
.field .help { font-size: 12px; color: #6b7280; margin-top: 4px; }

/* Notice / banner */
.notice {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.notice.info  { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.notice.warn  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.notice.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.notice.success { background: #f0fdf4; color: #065f46; border: 1px solid #bbf7d0; }
.notice strong { display: block; margin-bottom: 2px; }

/* Two-column layout */
.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 980px) {
  .cols, .cols-3 { grid-template-columns: 1fr; }
}

/* Timeline */
.timeline { padding: 0; }
.timeline .entry {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  gap: 12px;
}
.timeline .entry:last-child { border-bottom: none; }
.timeline .icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.timeline .icon.email  { background: #dbeafe; color: #1e40af; }
.timeline .icon.note   { background: #fef3c7; color: #92400e; }
.timeline .icon.status { background: #d1fae5; color: #065f46; }
.timeline .icon.system { background: #f3f4f6; color: #6b7280; }
.timeline .content { flex: 1; }
.timeline .meta { font-size: 11px; color: #6b7280; margin-bottom: 4px; }
.timeline .body { font-size: 13px; }
.timeline .body strong { font-weight: 600; }

/* Attachments */
.attachments .att-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #fafbfc;
  font-size: 12px;
}
.attachments .att-icon { font-size: 18px; }
.attachments .att-name { flex: 1; font-weight: 600; }
.attachments .att-meta { color: #6b7280; font-size: 11px; }

/* KPI cards */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.kpi .label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.kpi .value { font-size: 22px; font-weight: 700; margin-top: 4px; }
.kpi .delta { font-size: 12px; color: #059669; margin-top: 2px; }

/* Misc */
.muted { color: #6b7280; font-size: 12px; }
.mono { font-family: 'SF Mono', Menlo, monospace; }
.divider { height: 1px; background: #e5e7eb; margin: 14px 0; }
.row-flex { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
.read-only-field {
  background: #f9fafb;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  border: 1px solid #f3f4f6;
}
