.cc-root {
  --cc-blue: var(--hz-blue, #0b63f6);
  --cc-green: var(--hz-green, #16a365);
  --cc-amber: var(--hz-amber, #d99100);
  --cc-red: var(--hz-red, #f05a47);
  padding: 0 2px 24px;
}

.cc-hero {
  margin-bottom: 14px;
  overflow: hidden;
  color: var(--hz-ink, #101828);
  background:
    radial-gradient(circle at 88% -20%, color-mix(in srgb, var(--cc-blue) 18%, transparent), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--hz-surface-solid, #fff) 98%, var(--cc-blue)), var(--hz-surface-solid, #fff));
  border: 1px solid var(--hz-line, #e6e9ef);
  border-radius: 21px;
  box-shadow: var(--hz-shadow-sm, 0 5px 18px rgba(16,24,40,.07));
}

.cc-hero-copy { padding: 22px 22px 18px; }
.cc-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cc-blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.cc-eyebrow > span { width: 18px; height: 2px; background: var(--cc-blue); border-radius: 99px; }
.cc-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 9px; }
.cc-title-line h2 { margin: 0; color: var(--hz-ink, #101828); font-size: 23px; font-weight: 760; letter-spacing: -.045em; }
.cc-title-line p { max-width: 620px; margin: 6px 0 0; color: var(--hz-muted, #667085); font-size: 11.5px; line-height: 1.55; }
.cc-role {
  min-width: 225px;
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 9px;
  align-items: center;
  padding: 9px 11px;
  color: var(--cc-blue);
  background: color-mix(in srgb, var(--cc-blue) 7%, var(--hz-surface-solid, #fff));
  border: 1px solid color-mix(in srgb, var(--cc-blue) 18%, var(--hz-line, #e6e9ef));
  border-radius: 13px;
}
.cc-role svg { grid-row: 1 / span 2; width: 18px; height: 18px; justify-self: center; }
.cc-role b { color: var(--hz-ink, #101828); font-size: 10.5px; font-weight: 760; }
.cc-role small { overflow: hidden; color: var(--hz-muted, #667085); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }

.cc-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--hz-line, #e6e9ef); }
.cc-metric {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 18px;
  background: color-mix(in srgb, var(--hz-canvas, #f7f8fb) 45%, transparent);
}
.cc-metric + .cc-metric { border-inline-start: 1px solid var(--hz-line, #e6e9ef); }
.cc-metric-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--cc-blue);
  background: color-mix(in srgb, var(--cc-blue) 10%, transparent);
  border-radius: 11px;
}
.cc-metric[data-tone="green"] .cc-metric-icon { color: var(--cc-green); background: color-mix(in srgb, var(--cc-green) 10%, transparent); }
.cc-metric[data-tone="amber"] .cc-metric-icon { color: var(--cc-amber); background: color-mix(in srgb, var(--cc-amber) 11%, transparent); }
.cc-metric[data-tone="red"] .cc-metric-icon { color: var(--cc-red); background: color-mix(in srgb, var(--cc-red) 10%, transparent); }
.cc-metric-icon svg { width: 17px; height: 17px; }
.cc-metric > div { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 7px; }
.cc-metric small { grid-column: 1 / -1; overflow: hidden; color: var(--hz-muted, #667085); font-size: 8.5px; font-weight: 680; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.cc-metric strong { overflow: hidden; margin-top: 3px; color: var(--hz-ink, #101828); font-size: 17px; font-weight: 780; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.cc-metric em { overflow: hidden; color: var(--hz-faint, #98a2b3); font-size: 8.5px; font-style: normal; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }

.cc-toolbar {
  position: sticky;
  z-index: 5;
  top: -1px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--hz-surface-solid, #fff) 94%, transparent);
  border: 1px solid var(--hz-line, #e6e9ef);
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(16, 24, 40, .055);
  backdrop-filter: blur(14px);
}
.cc-search {
  min-width: 210px;
  flex: 1 1 300px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: var(--hz-faint, #98a2b3);
  background: var(--hz-canvas, #f7f8fb);
  border: 1px solid var(--hz-line, #e6e9ef);
  border-radius: 11px;
}
.cc-search svg { width: 15px; height: 15px; }
.cc-search input { width: 100%; color: var(--hz-ink, #101828); background: transparent; border: 0; outline: 0; font: 600 10.5px/1 Inter, sans-serif; }
.cc-search input::placeholder { color: var(--hz-faint, #98a2b3); }
.cc-filters { display: flex; align-items: center; gap: 4px; }
.cc-filters button {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--hz-muted, #667085);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font: 680 9.5px/1 Inter, sans-serif;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}
.cc-filters button:hover { color: var(--hz-ink, #101828); background: var(--hz-canvas, #f7f8fb); }
.cc-filters button.active { color: var(--cc-blue); background: color-mix(in srgb, var(--cc-blue) 9%, transparent); }
.cc-filters button b { min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; color: #fff; background: var(--cc-red); border-radius: 99px; font-size: 8px; }
.cc-sort {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  color: var(--hz-faint, #98a2b3);
  border-inline-start: 1px solid var(--hz-line, #e6e9ef);
}
.cc-sort svg { width: 14px; height: 14px; }
.cc-sort select { max-width: 118px; color: var(--hz-muted, #667085); background: transparent; border: 0; outline: 0; font: 650 9.5px/1 Inter, sans-serif; }
.cc-shown { min-width: 66px; color: var(--hz-faint, #98a2b3); font-size: 8.5px; font-weight: 650; text-align: end; }

.cc-root .cust-card {
  border-color: var(--hz-line, #e6e9ef) !important;
  border-radius: 16px !important;
  background: var(--hz-surface-solid, #fff) !important;
  box-shadow: 0 2px 7px rgba(16, 24, 40, .035) !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}
.cc-root .cust-card:hover { border-color: color-mix(in srgb, var(--cc-blue) 22%, var(--hz-line, #e6e9ef)) !important; box-shadow: 0 9px 24px rgba(16, 24, 40, .075) !important; transform: translateY(-1px); }
.cc-root .cust-card.cc-needs-action { border-inline-start: 3px solid color-mix(in srgb, var(--cc-amber) 72%, var(--hz-line, #e6e9ef)) !important; }
.cc-root .cust-card[hidden] { display: none !important; }
.cc-empty { display: grid; place-items: center; gap: 8px; padding: 42px; color: var(--hz-faint, #98a2b3); border: 1px dashed var(--hz-line, #e6e9ef); border-radius: 16px; }
.cc-empty[hidden] { display: none; }
.cc-empty svg { width: 24px; height: 24px; }
.cc-empty strong { font-size: 11px; }

.cc-modal { position: fixed; z-index: 60000; inset: 0; display: grid; place-items: center; padding: 18px; }
.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(7, 13, 24, .52); backdrop-filter: blur(6px); animation: ccFade .18s ease both; }
.cc-dialog {
  position: relative;
  width: min(510px, 100%);
  overflow: hidden;
  color: var(--hz-ink, #101828);
  background: var(--hz-surface-solid, #fff);
  border: 1px solid color-mix(in srgb, var(--hz-line-strong, #d7dce5) 76%, transparent);
  border-radius: 21px;
  box-shadow: 0 28px 80px rgba(6, 15, 30, .26);
  animation: ccDialogIn .28s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes ccFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccDialogIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.cc-dialog header { display: grid; grid-template-columns: 42px 1fr 34px; align-items: start; gap: 12px; padding: 21px 21px 17px; background: linear-gradient(145deg, color-mix(in srgb, var(--cc-blue) 8%, var(--hz-surface-solid, #fff)), var(--hz-surface-solid, #fff)); border-bottom: 1px solid var(--hz-line, #e6e9ef); }
.cc-dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--cc-blue), #004ec7); border-radius: 13px; box-shadow: 0 8px 18px rgba(11, 99, 246, .2); }
.cc-dialog-icon svg { width: 19px; height: 19px; }
.cc-dialog header small { color: var(--cc-blue); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.cc-dialog header h2 { margin: 3px 0 0; color: var(--hz-ink, #101828); font-size: 18px; font-weight: 760; letter-spacing: -.035em; }
.cc-dialog header p { margin: 5px 0 0; color: var(--hz-muted, #667085); font-size: 10px; line-height: 1.5; }
.cc-dialog-close { width: 32px; height: 32px; display: grid; place-items: center; color: var(--hz-muted, #667085); background: var(--hz-canvas, #f7f8fb); border: 1px solid var(--hz-line, #e6e9ef); border-radius: 10px; cursor: pointer; }
.cc-dialog-close svg { width: 15px; height: 15px; }
.cc-dialog-client { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin: 16px 21px 0; padding: 11px 12px; background: var(--hz-canvas, #f7f8fb); border: 1px solid var(--hz-line, #e6e9ef); border-radius: 12px; }
.cc-dialog-client span { overflow: hidden; color: var(--hz-ink, #101828); font-size: 11.5px; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.cc-dialog-client small { color: var(--hz-muted, #667085); font-size: 8.5px; white-space: nowrap; }
.cc-dialog-fields { display: grid; gap: 12px; padding: 17px 21px 21px; }
.cc-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-field { display: grid; gap: 6px; color: var(--hz-muted, #667085); font-size: 9px; font-weight: 680; }
.cc-field input {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  color: var(--hz-ink, #101828);
  background: var(--hz-canvas, #f7f8fb);
  border: 1px solid var(--hz-line, #e6e9ef);
  border-radius: 11px;
  outline: 0;
  font: 650 12px/1 Inter, sans-serif;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.cc-field input:focus { background: var(--hz-surface-solid, #fff); border-color: color-mix(in srgb, var(--cc-blue) 55%, var(--hz-line, #e6e9ef)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-blue) 10%, transparent); }
.cc-field small { color: var(--hz-faint, #98a2b3); font-size: 8px; font-weight: 560; }
.cc-preview { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; color: var(--hz-muted, #667085); background: color-mix(in srgb, var(--cc-green) 7%, var(--hz-canvas, #f7f8fb)); border: 1px solid color-mix(in srgb, var(--cc-green) 18%, var(--hz-line, #e6e9ef)); border-radius: 11px; font-size: 9px; font-weight: 650; }
.cc-preview strong { color: var(--cc-green); font-size: 11px; }
.cc-form-error { min-height: 13px; color: var(--cc-red); font-size: 9px; font-weight: 650; }
.cc-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 21px; background: color-mix(in srgb, var(--hz-canvas, #f7f8fb) 68%, transparent); border-top: 1px solid var(--hz-line, #e6e9ef); }
.cc-dialog footer button { height: 40px; padding: 0 16px; border-radius: 11px; cursor: pointer; font: 700 10px/1 Inter, sans-serif; }
.cc-secondary { color: var(--hz-muted, #667085); background: var(--hz-surface-solid, #fff); border: 1px solid var(--hz-line, #e6e9ef); }
.cc-primary { display: inline-flex; align-items: center; gap: 8px; color: #fff; background: linear-gradient(135deg, var(--cc-blue), #004ec7); border: 0; box-shadow: 0 7px 16px rgba(11, 99, 246, .2); }
.cc-primary svg { width: 14px; height: 14px; }
html[dir="rtl"] .cc-primary svg { transform: scaleX(-1); }
.cc-primary:disabled { cursor: wait; opacity: .65; }
.cc-modal.is-saving .cc-dialog { pointer-events: none; }
.cc-toast { position: fixed; z-index: 65000; inset-inline-end: 18px; top: 18px; display: flex; align-items: center; gap: 9px; padding: 12px 14px; color: #fff; background: #12372b; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 14px 32px rgba(10,30,23,.24); animation: ccToastIn .28s ease both; font-size: 10.5px; font-weight: 680; }
.cc-toast svg { width: 16px; height: 16px; color: #5de3a9; }
.cc-toast.out { opacity: 0; transform: translateY(-8px); transition: .24s ease; }
@keyframes ccToastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

html[data-theme="dark"] .cc-root .cust-card > div:first-child { color: var(--hz-ink) !important; }
html[data-theme="dark"] .cc-root .cust-card [style*="background:#f6f9fc"] { background: var(--hz-canvas) !important; border-color: var(--hz-line) !important; }
html[data-theme="dark"] .cc-root .cust-card [style*="color:#1a2b45"] { color: var(--hz-ink) !important; }
html[data-theme="dark"] .cc-root .cust-card button { background: var(--hz-surface-solid) !important; }
html[data-theme="dark"] .cc-sort select option { color: var(--hz-ink); background: var(--hz-surface-solid); }

@media (max-width: 1050px) {
  .cc-title-line { display: block; }
  .cc-role { width: fit-content; max-width: 100%; margin-top: 13px; }
  .cc-metrics { grid-template-columns: 1fr 1fr; }
  .cc-metric:nth-child(3) { border-inline-start: 0; border-top: 1px solid var(--hz-line, #e6e9ef); }
  .cc-metric:nth-child(4) { border-top: 1px solid var(--hz-line, #e6e9ef); }
  .cc-toolbar { flex-wrap: wrap; }
  .cc-search { flex-basis: calc(100% - 150px); }
  .cc-shown { margin-inline-start: auto; }
}

@media (max-width: 700px) {
  .cc-root { padding-bottom: 86px; }
  .cc-hero { border-radius: 17px; }
  .cc-hero-copy { padding: 17px 16px 14px; }
  .cc-title-line h2 { font-size: 19px; }
  .cc-title-line p { font-size: 10px; }
  .cc-role { min-width: 0; width: 100%; }
  .cc-metrics { grid-template-columns: 1fr 1fr; }
  .cc-metric { gap: 8px; padding: 12px; }
  .cc-metric-icon { width: 31px; height: 31px; }
  .cc-metric strong { font-size: 14px; }
  .cc-toolbar { position: relative; top: auto; padding: 8px; border-radius: 14px; }
  .cc-search { flex-basis: 100%; min-width: 0; }
  .cc-filters { width: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .cc-filters::-webkit-scrollbar { display: none; }
  .cc-filters button { flex: 0 0 auto; }
  .cc-sort { flex: 1; border-inline-start: 0; }
  .cc-sort select { max-width: none; width: 100%; }
  .cc-root .cust-card { border-radius: 14px !important; }
  .cc-root .cust-card > div:first-child { padding: 13px !important; gap: 9px !important; }
  .cc-root .cust-card > div:first-child > div:first-child { width: 38px !important; height: 38px !important; }
  .cc-root .cust-card > div:first-child > div:last-child { gap: 5px !important; }
  .cc-dialog { max-height: calc(100vh - 24px); overflow-y: auto; border-radius: 18px; }
  .cc-dialog header { grid-template-columns: 38px 1fr 31px; gap: 9px; padding: 17px 15px 14px; }
  .cc-dialog-icon { width: 38px; height: 38px; }
  .cc-dialog header h2 { font-size: 16px; }
  .cc-dialog-client { margin: 13px 15px 0; align-items: flex-start; flex-direction: column; gap: 3px; }
  .cc-dialog-fields { padding: 15px; }
  .cc-field-grid { grid-template-columns: 1fr; }
  .cc-dialog footer { position: sticky; bottom: 0; padding: 12px 15px; }
  .cc-dialog footer button { flex: 1; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-dialog, .cc-modal-backdrop, .cc-toast { animation: none !important; }
  .cc-root .cust-card { transition: none !important; }
}
