.category-settings-pane {
  width: 100%;
}

.categories-card {
  width: 100%;
  max-width: none !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.v2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.v2-area {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #e8e2df;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(35, 27, 24, .05);
}

.v2-area > header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid #eee9e6;
  background: #fbfaf9;
}

.v2-area > header > span {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--club-primary) 10%, white);
  color: var(--club-primary);
  font-size: 19px;
}

.v2-area header small {
  display: block;
  margin-bottom: 2px;
  color: #918984;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.v2-area header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.v2-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.v2-category {
  overflow: hidden;
  border: 1px solid #ebe6e3;
  border-left: 4px solid var(--category-color);
  border-radius: 11px;
  background: #fff;
}

.v2-summary {
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 11px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 0;
  background: #fff;
  color: #292321;
  text-align: left;
}

.v2-summary:hover { background: #fcfbfa; }
.v2-summary > span { width: 11px; height: 11px; border-radius: 50%; background: var(--category-color); }
.v2-summary b { overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.v2-summary small { color: #8f8782; font-size: 11px; }
.v2-summary i { color: #8f8782; font-size: 13px; transition: transform .2s ease; }
.v2-category:not(.is-closed) .v2-summary { border-bottom: 1px solid #eee9e6; background: #fbfaf9; }
.v2-category:not(.is-closed) .v2-summary i { transform: rotate(180deg); }
.v2-category.is-closed .v2-details { display: none; }

.v2-details { padding: 18px; }
.v2-main-fields { display: grid; grid-template-columns: 54px minmax(0, 1fr) 42px; align-items: end; gap: 10px; }
.v2-main-fields label { margin: 0; color: #635c58; font-size: 11px; font-weight: 700; }
.v2-main-fields label:first-child input { display: block; width: 44px; height: 40px; margin-top: 6px; padding: 3px; border: 1px solid #dcd5d1; border-radius: 8px; background: #fff; }
.v2-main-fields label:nth-child(2) input { margin-top: 6px; }
.v2-delete { width: 42px; height: 40px; padding: 0; color: #a13a3a; }

.v2-subs { display: flex; min-height: 34px; flex-wrap: wrap; gap: 7px; margin: 16px 0 12px; }
.v2-subs:empty::after { content: 'Nessuna sottocategoria'; align-self: center; color: #aaa29d; font-size: 12px; }
.v2-subs span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: #f2efed; color: #4f4946; font-size: 12px; }
.v2-subs button { border: 0; background: none; color: #8f8782; font-size: 16px; line-height: 1; }
.v2-add-sub { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; }
.v2-add-sub button { width: 42px; padding: 0; font-size: 18px; }

.v2-new-category {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 12px;
  border: 1px dashed #cfc6c1;
  border-radius: 10px;
  background: #fff;
  color: var(--club-primary);
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.v2-new-category:hover { border-color: var(--club-primary); background: color-mix(in srgb, var(--club-primary) 4%, white); }
.v2-savebar { display: flex; justify-content: flex-end; align-items: center; gap: 18px; margin-top: 20px; padding: 18px 0 4px; }
.v2-savebar span { color: #817974; font-size: 12px; }
.v2-empty { margin: 0; padding: 24px; color: #918984; font-size: 13px; text-align: center; }

@media (max-width: 900px) {
  .v2-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .v2-grid { gap: 16px; }
  .v2-area > header { padding: 16px; }
  .v2-list { padding: 12px; }
  .v2-summary { grid-template-columns: 11px minmax(0, 1fr) 18px; padding: 12px; }
  .v2-summary small { display: none; }
  .v2-details { padding: 14px 12px; }
  .v2-main-fields { grid-template-columns: 48px minmax(0, 1fr) 40px; }
  .v2-savebar { flex-direction: column; align-items: stretch; }
  .v2-savebar span { text-align: center; }
}
