.customer-feedback-module {
  min-width: 0;
  padding: 28px 30px 36px;
  color: #182a30;
}

.customer-feedback-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, 0.62fr) minmax(180px, 0.72fr) auto;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 20px;
}

.customer-feedback-search,
.customer-feedback-filter {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid #d8e4e2;
  border-radius: 14px;
  background: #fff;
}

.customer-feedback-search svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #71858c;
}

.customer-feedback-search input,
.customer-feedback-filter select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #243a41;
  font: inherit;
}

.customer-feedback-filter span {
  flex: 0 0 auto;
  color: #7a8d93;
  font-size: 13px;
}

.customer-feedback-status-tabs {
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid #d8e4e2;
  border-radius: 14px;
  background: #f8fbfa;
}

.customer-feedback-status-tabs button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64787f;
  font-weight: 700;
  white-space: nowrap;
}

.customer-feedback-status-tabs button.active {
  background: #168c80;
  color: #fff;
  box-shadow: 0 7px 16px rgba(22, 140, 128, 0.18);
}

.customer-feedback-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid #dce7e5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(25, 59, 62, 0.055);
}

.customer-feedback-metric {
  display: flex;
  min-width: 0;
  min-height: 112px;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-right: 1px solid #e1eae8;
}

.customer-feedback-metric:last-child { border-right: 0; }

.customer-feedback-metric-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: #edf8f6;
  color: #168c80;
}

.customer-feedback-metric-icon svg { width: 23px; height: 23px; }
.customer-feedback-metric.urgent .customer-feedback-metric-icon { background: #fff0ef; color: #dc4e4a; }
.customer-feedback-metric.due .customer-feedback-metric-icon { background: #fff6e9; color: #d98221; }
.customer-feedback-metric.closed .customer-feedback-metric-icon { background: #eff5ff; color: #397dcc; }
.customer-feedback-metric small { display: block; color: #778a90; font-size: 13px; }
.customer-feedback-metric strong { display: block; margin-top: 4px; color: #173138; font-size: 28px; line-height: 1; }
.customer-feedback-metric strong span { margin-left: 4px; color: #71858c; font-size: 13px; }

.customer-feedback-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(370px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.customer-feedback-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce7e5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(25, 59, 62, 0.05);
}

.customer-feedback-panel-head {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #e4eceb;
}

.customer-feedback-panel-head h2 { margin: 0; font-size: 20px; }
.customer-feedback-panel-head p { margin: 5px 0 0; color: #7a8d93; font-size: 13px; }
.customer-feedback-panel-head > strong { color: #168c80; white-space: nowrap; }

.customer-feedback-list { min-height: 340px; }

.customer-feedback-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 106px 30px;
  gap: 14px;
  align-items: center;
  min-height: 98px;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid #e8efee;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.customer-feedback-row:hover { background: #f8fbfa; }
.customer-feedback-row.active { box-shadow: inset 4px 0 #168c80; background: #f1f8f6; }
.customer-feedback-row-main { display: grid; min-width: 0; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: center; }
.customer-feedback-row-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: #edf8f6; color: #168c80; }
.customer-feedback-row-icon svg { width: 21px; height: 21px; }
.customer-feedback-row.urgent .customer-feedback-row-icon { background: #fff0ef; color: #d84743; }
.customer-feedback-row.high .customer-feedback-row-icon { background: #fff5e8; color: #dd7c17; }
.customer-feedback-row-copy { min-width: 0; }
.customer-feedback-row-copy strong { display: block; overflow: hidden; color: #20363c; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.customer-feedback-row-copy span { display: block; overflow: hidden; margin-top: 5px; color: #7a8d93; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-feedback-row-department strong,
.customer-feedback-row-due strong { display: block; overflow: hidden; color: #40565d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.customer-feedback-row-department span,
.customer-feedback-row-due span { display: block; margin-top: 5px; color: #87979c; font-size: 12px; }
.customer-feedback-row-due.overdue strong { color: #d84743; }
.customer-feedback-row-arrow { color: #91a2a6; }
.customer-feedback-row-arrow svg { width: 18px; height: 18px; }

.customer-feedback-status,
.customer-feedback-severity {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.customer-feedback-status.new { background: #fff0ef; color: #c94440; }
.customer-feedback-status.handling { background: #ecf8f6; color: #137d72; }
.customer-feedback-status.pending_followup { background: #fff5e6; color: #bb6d12; }
.customer-feedback-status.closed { background: #edf4ff; color: #3975b9; }
.customer-feedback-severity.low { background: #edf8f2; color: #37815c; }
.customer-feedback-severity.medium { background: #fff7e9; color: #b6731f; }
.customer-feedback-severity.high { background: #fff0e9; color: #cf6825; }
.customer-feedback-severity.urgent { background: #fff0ef; color: #c94440; }

.customer-feedback-detail-panel {
  position: sticky;
  top: 18px;
  min-height: 520px;
  max-height: calc(100vh - 178px);
  overflow-y: auto;
}

.customer-feedback-detail-empty,
.customer-feedback-empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  padding: 34px;
  color: #7a8d93;
  text-align: center;
}

.customer-feedback-detail-empty > span,
.customer-feedback-empty > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: #edf8f6; color: #168c80; }
.customer-feedback-detail-empty svg,
.customer-feedback-empty svg { width: 27px; height: 27px; }
.customer-feedback-detail-empty h3,
.customer-feedback-empty h3 { margin: 15px 0 5px; color: #31474e; }
.customer-feedback-detail-empty p,
.customer-feedback-empty p { margin: 0; }
.customer-feedback-empty .btn { margin-top: 16px; }

.customer-feedback-detail-content { padding: 22px; }
.customer-feedback-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.customer-feedback-detail-head small { color: #7a8d93; font-weight: 700; }
.customer-feedback-detail-head h2 { margin: 8px 0 10px; color: #173138; font-size: 22px; line-height: 1.35; }
.customer-feedback-detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.customer-feedback-detail-section { padding: 20px 0; border-bottom: 1px solid #e5edeb; }
.customer-feedback-detail-section:last-of-type { border-bottom: 0; }
.customer-feedback-detail-section h3 { margin: 0 0 12px; font-size: 15px; }
.customer-feedback-detail-section p { margin: 0; color: #52686f; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.customer-feedback-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.customer-feedback-meta-grid div { min-width: 0; }
.customer-feedback-meta-grid dt { color: #89999e; font-size: 12px; }
.customer-feedback-meta-grid dd { overflow-wrap: anywhere; margin: 4px 0 0; color: #344b52; font-size: 13px; font-weight: 700; }
.customer-feedback-attachment-list { display: grid; gap: 8px; }
.customer-feedback-attachment-list a { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #dfe9e7; border-radius: 11px; color: #247b73; text-decoration: none; }
.customer-feedback-attachment-list a svg { width: 17px; height: 17px; flex: 0 0 auto; }
.customer-feedback-attachment-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-feedback-timeline { display: grid; gap: 14px; }
.customer-feedback-timeline-item { position: relative; padding-left: 21px; }
.customer-feedback-timeline-item::before { position: absolute; top: 5px; left: 2px; width: 9px; height: 9px; border-radius: 50%; background: #168c80; content: ""; }
.customer-feedback-timeline-item::after { position: absolute; top: 16px; bottom: -16px; left: 6px; width: 1px; background: #d7e5e2; content: ""; }
.customer-feedback-timeline-item:last-child::after { display: none; }
.customer-feedback-timeline-item strong { display: block; color: #344b52; font-size: 13px; }
.customer-feedback-timeline-item time { display: block; margin-top: 3px; color: #8a9a9f; font-size: 11px; }
.customer-feedback-timeline-item p { margin-top: 7px; font-size: 13px; }
.customer-feedback-detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 20px; }
.customer-feedback-detail-actions .btn { justify-content: center; }
.customer-feedback-detail-actions .primary { grid-column: 1 / -1; }

.customer-feedback-editor-dialog { width: min(920px, calc(100vw - 34px)); }
.customer-feedback-progress-dialog,
.customer-feedback-close-dialog { width: min(720px, calc(100vw - 34px)); }
.customer-feedback-editor-dialog form,
.customer-feedback-progress-dialog form,
.customer-feedback-close-dialog form { display: grid; max-height: min(90vh, 880px); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.customer-feedback-editor-dialog .dialog-actions,
.customer-feedback-progress-dialog .dialog-actions,
.customer-feedback-close-dialog .dialog-actions { justify-content: flex-end; gap: 12px; }
.customer-feedback-dialog-scroll { overflow-y: auto; padding: 22px 26px 28px; }
.customer-feedback-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.customer-feedback-form-grid .customer-feedback-span-2 { grid-column: 1 / -1; }
.customer-feedback-upload-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e1eae8; }
.customer-feedback-upload-section > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.customer-feedback-upload-section > div:first-child span { color: #809197; font-size: 12px; }
.customer-feedback-upload-box { display: flex; min-height: 68px; align-items: center; justify-content: center; gap: 9px; border: 1px dashed #91c7c0; border-radius: 13px; background: #fbfefd; color: #168c80; font-weight: 800; cursor: pointer; }
.customer-feedback-upload-box svg { width: 20px; height: 20px; }
.customer-feedback-upload-box input { position: absolute; width: 1px; min-width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.customer-feedback-upload-preview { display: grid; gap: 8px; margin-top: 10px; }
.customer-feedback-upload-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 11px; border: 1px solid #e0eae8; border-radius: 11px; }
.customer-feedback-upload-thumb { display: grid; width: 40px; height: 40px; overflow: hidden; place-items: center; border-radius: 9px; background: #eef7f5; color: #168c80; }
.customer-feedback-upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.customer-feedback-upload-thumb svg { width: 18px; height: 18px; }
.customer-feedback-upload-item strong { display: block; overflow: hidden; color: #3a5057; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-feedback-upload-item small { color: #87979c; }
.customer-feedback-upload-item button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; background: #f5f8f7; color: #687d83; }
.customer-feedback-upload-item button svg { width: 16px; height: 16px; }

@media (max-width: 1160px) {
  .customer-feedback-toolbar { grid-template-columns: minmax(250px, 1fr) 170px 210px; }
  .customer-feedback-status-tabs { grid-column: 1 / -1; justify-content: flex-start; }
  .customer-feedback-workspace { grid-template-columns: minmax(0, 1fr) 340px; }
  .customer-feedback-row { grid-template-columns: minmax(0, 1fr) 112px 28px; }
  .customer-feedback-row-due { display: none; }
}

@media (max-width: 940px) {
  .customer-feedback-module { padding: 22px; }
  .customer-feedback-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-feedback-metric:nth-child(2) { border-right: 0; }
  .customer-feedback-metric:nth-child(-n + 2) { border-bottom: 1px solid #e1eae8; }
  .customer-feedback-workspace { grid-template-columns: 1fr; }
  .customer-feedback-detail-panel { position: static; max-height: none; }
}

@media (max-width: 680px) {
  .customer-feedback-module { padding: 14px 12px 24px; }
  .customer-feedback-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
  .customer-feedback-search,
  .customer-feedback-status-tabs { grid-column: 1 / -1; }
  .customer-feedback-search,
  .customer-feedback-filter { min-height: 48px; padding: 0 12px; }
  .customer-feedback-status-tabs { justify-content: stretch; }
  .customer-feedback-status-tabs button { flex: 1 1 0; padding: 0 8px; }
  .customer-feedback-metric-grid { margin-bottom: 14px; border-radius: 15px; }
  .customer-feedback-metric { min-height: 90px; gap: 11px; padding: 15px 14px; }
  .customer-feedback-metric-icon { width: 39px; height: 39px; border-radius: 13px; }
  .customer-feedback-metric strong { font-size: 23px; }
  .customer-feedback-panel { border-radius: 15px; }
  .customer-feedback-panel-head { min-height: 74px; padding: 15px 14px; }
  .customer-feedback-panel-head h2 { font-size: 18px; }
  .customer-feedback-row { grid-template-columns: minmax(0, 1fr) auto 24px; min-height: 90px; gap: 8px; padding: 13px 12px; }
  .customer-feedback-row-department { display: none; }
  .customer-feedback-row-copy span { white-space: normal; }
  .customer-feedback-detail-content { padding: 18px 15px; }
  .customer-feedback-meta-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .customer-feedback-editor-dialog,
  .customer-feedback-progress-dialog,
  .customer-feedback-close-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .customer-feedback-editor-dialog form,
  .customer-feedback-progress-dialog form,
  .customer-feedback-close-dialog form { height: 100dvh; max-height: none; }
  .customer-feedback-dialog-scroll { padding: 17px 14px 24px; }
  .customer-feedback-form-grid { grid-template-columns: 1fr; gap: 13px; }
  .customer-feedback-form-grid .customer-feedback-span-2 { grid-column: auto; }
  .customer-feedback-upload-section > div:first-child { display: block; }
  .customer-feedback-upload-section > div:first-child span { display: block; margin-top: 4px; }
  .customer-feedback-editor-dialog .dialog-actions,
  .customer-feedback-progress-dialog .dialog-actions,
  .customer-feedback-close-dialog .dialog-actions { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 10px; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
  .customer-feedback-editor-dialog .dialog-actions .btn,
  .customer-feedback-progress-dialog .dialog-actions .btn,
  .customer-feedback-close-dialog .dialog-actions .btn { min-width: 0; justify-content: center; }
}

@media (max-width: 400px) {
  .customer-feedback-metric { padding: 13px 10px; }
  .customer-feedback-metric-icon { display: none; }
  .customer-feedback-meta-grid { grid-template-columns: 1fr; }
}
