.cef-classifiche {
  --cef-accent: #278160;
  --cef-surface: #f8fafc;
  --cef-ink: #172033;
  --cef-muted: #687386;
  --cef-line: #e8edf2;
  --cef-green-bg: #d9f7e9;
  --cef-green-text: #197a57;
  --cef-blue-bg: #dcecff;
  --cef-blue-text: #2059b5;
  --cef-amber-bg: #fff1cf;
  --cef-amber-text: #9a6100;
  --cef-grey-bg: #e9edf2;
  --cef-grey-text: #536174;
  box-sizing: border-box;
  padding: 4px 0;
  background: var(--cef-surface);
  color: var(--cef-ink);
  font-family: inherit;
}

.cef-classifiche *,
.cef-classifiche *::before,
.cef-classifiche *::after {
  box-sizing: border-box;
}

.cef-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 24px;
}

.cef-heading-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cef-heading-icon,
.cef-small-icon,
.cef-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.cef-heading-icon {
  width: 23px;
  height: 23px;
  color: var(--cef-accent);
}

.cef-heading-icon svg {
  width: 23px;
  height: 23px;
}

.cef-heading-icon svg,
.cef-small-icon svg,
.cef-button-icon svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cef-title {
  margin: 0;
  color: var(--cef-ink);
  font-size: clamp(21px, 2.1vw, 27px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.cef-count {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 10px;
  border: 1px solid #b7e9d2;
  border-radius: 8px;
  background: #effcf6;
  color: var(--cef-accent);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.cef-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cef-card {
  display: flex;
  min-width: 0;
  min-height: 342px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--cef-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 9px 18px rgba(15, 23, 42, 0.035);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cef-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(15, 23, 42, 0.07), 0 18px 30px rgba(15, 23, 42, 0.06);
}

.cef-card-content {
  display: flex;
  min-height: 242px;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 24px 24px 22px;
}

.cef-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cef-category {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.cef-category--green {
  border-color: #bcefd5;
  background: var(--cef-green-bg);
  color: var(--cef-green-text);
}

.cef-category--blue {
  border-color: #c3dcff;
  background: var(--cef-blue-bg);
  color: var(--cef-blue-text);
}

.cef-category--amber {
  border-color: #ffe0a2;
  background: var(--cef-amber-bg);
  color: var(--cef-amber-text);
}

.cef-category--grey {
  border-color: #d8dee7;
  background: var(--cef-grey-bg);
  color: var(--cef-grey-text);
}

.cef-file-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8a94a7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cef-file-meta i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #aab3c2;
}

.cef-card-title {
  margin: 23px 0 12px;
  color: var(--cef-ink);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.cef-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--cef-muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
}

.cef-small-icon {
  width: 14px;
  height: 14px;
  color: #7a8597;
}

.cef-small-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.7;
}

.cef-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: auto;
  padding: 12px 13px;
  border: 1px solid #eff2f5;
  border-radius: 11px;
  background: #fbfcfd;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
}

.cef-status-icon {
  color: var(--cef-accent);
}

.cef-status-label {
  min-width: 0;
  overflow: hidden;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cef-status-text {
  margin-left: auto;
  color: var(--cef-accent);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.cef-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 23px 24px;
  border-top: 1px solid #eff2f5;
}

.cef-button {
  display: inline-flex;
  min-width: 0;
  min-height: 33px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.cef-button:hover,
.cef-button:focus-visible {
  transform: translateY(-1px);
  text-decoration: none;
}

.cef-button:focus-visible {
  outline: 2px solid var(--cef-accent);
  outline-offset: 2px;
}

.cef-button-icon {
  width: 16px;
  height: 16px;
}

.cef-button-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

.cef-button--preview {
  background: #fff;
  color: #252d3a;
}

.cef-button--preview:hover,
.cef-button--preview:focus-visible {
  border-color: #c7d0da;
  background: #f8fafc;
  color: #111827;
}

.cef-button--download {
  border-color: var(--cef-accent);
  background: var(--cef-accent);
  color: #fff;
}

.cef-button--download:hover,
.cef-button--download:focus-visible {
  border-color: #1d694f;
  background: #1d694f;
  color: #fff;
}

@media (max-width: 1024px) {
  .cef-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .cef-header {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
  }

  .cef-count {
    white-space: normal;
  }

  .cef-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .cef-card {
    min-height: 0;
  }

  .cef-card-content {
    min-height: 226px;
    padding: 20px 18px;
  }

  .cef-actions {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .cef-card-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .cef-card-title {
    margin-top: 18px;
  }

  .cef-actions {
    grid-template-columns: 1fr;
  }
}
