/* NerdVault - Auth & UI components */

/* --- Auth shell (manga / geek dark) --- */
.auth-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem min(1.5rem, 4vw);
  overflow: hidden;
}

.auth-bg-halftone {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 12px 12px;
  opacity: 0.85;
}

.auth-bg-halftone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.25), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255, 59, 92, 0.12), transparent 50%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem;
  background: var(--bg-secondary);
  border: 4px solid var(--text-primary);
  border-radius: 4px;
  box-shadow: 8px 8px 0 var(--accent-purple), 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo {
  margin: 0 0 0.35rem;
  font-family: 'Bangers', cursive, sans-serif;
  font-size: clamp(2.25rem, 6vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--accent-red);
  text-shadow: 3px 3px 0 var(--accent-purple);
  line-height: 1.1;
}

.auth-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.auth-alert {
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  border: 2px solid;
}

.auth-alert--error {
  background: rgba(255, 59, 92, 0.12);
  border-color: var(--accent-red);
  color: #fecaca;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-label span {
  font-size: 0.75rem;
}

.auth-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  color: var(--text-primary);
  background: rgba(10, 10, 15, 0.6);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.auth-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.auth-password-wrap .auth-input {
  flex: 1;
  padding-right: 5.5rem;
}

.auth-toggle-pw {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  background: transparent;
  border: none;
  border-radius: 4px;
}

.auth-toggle-pw:hover {
  background: rgba(6, 182, 212, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 4px;
  border: 3px solid transparent;
  transition: transform 0.1s, box-shadow 0.15s;
}

.btn:active:not(:disabled) {
  transform: translate(2px, 2px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  margin-top: 0.25rem;
  color: var(--bg-primary);
  background: var(--accent-red);
  border-color: var(--text-primary);
  box-shadow: 4px 4px 0 var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border-color);
}

.auth-divider span {
  white-space: nowrap;
}

.btn-google {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color);
  font-weight: 600;
}

.btn-google:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
}

.btn-google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6C44.53 39.5 48 33.06 48 24c0-1.64-.17-3.25-.47-4.77z'/%3E%3Cpath fill='%23FBBC05' d='M6.53 21.33c-.6-1.8-.96-3.7-.96-5.68 0-1.98.36-3.88.97-5.67l-7.98-6.19C.92 11.76 0 17.77 0 24c0 6.26 2.93 11.85 7.5 15.45l7.98-6.19c-.6-1.8-.96-3.7-.96-5.68 0-1.98.36-3.88.97-5.67z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3Cpath fill='none' d='M0 0h48v48H0z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.auth-footer {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-link {
  color: var(--accent-gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-link:hover {
  color: var(--accent-cyan);
}

/* --- App shell: sidebar + main + bottom nav --- */

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 900px) {
  .app-layout {
    flex-direction: row;
  }

  .app-main {
    padding-bottom: 0;
  }
}

/* Sidebar (desktop) */
.sidebar {
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  width: 260px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.25rem 0.75rem;
  background: var(--bg-secondary);
  border-right: 4px solid var(--border-color);
  box-shadow: 4px 0 0 rgba(124, 58, 237, 0.15);
}

.sidebar__brand {
  padding: 0.5rem 0.75rem 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px dashed var(--border-color);
}

.sidebar__logo {
  font-family: 'Bangers', cursive, sans-serif;
  font-size: 1.85rem;
  letter-spacing: 0.06em;
  color: var(--accent-red);
  text-shadow: 2px 2px 0 var(--accent-purple);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  border: 2px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.sidebar__link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar__link.is-active {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent-gold);
  box-shadow: 3px 3px 0 var(--accent-purple);
}

.sidebar__link--fab {
  margin-top: 0.5rem;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.25), rgba(124, 58, 237, 0.2));
  border: 3px solid var(--accent-red);
  color: var(--accent-red);
  font-family: 'Bangers', cursive, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.sidebar__link--fab.is-active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.45), rgba(124, 58, 237, 0.35));
  border-color: var(--accent-gold);
}

@media (min-width: 900px) {
  .sidebar {
    display: flex;
  }
}

/* Bottom nav (mobile) */
.bottom-nav {
  display: flex;
  position: fixed;
  z-index: 100;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-secondary);
  border-top: 4px solid var(--text-primary);
  box-shadow: 0 -6px 0 rgba(124, 58, 237, 0.35);
}

.bottom-nav__inner {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.15rem;
  max-width: 520px;
  margin: 0 auto;
  padding: 0.35rem 0.5rem 0.5rem;
  width: 100%;
}

.bottom-nav__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.35rem 0.2rem 0.25rem;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color 0.15s, background 0.15s;
}

.bottom-nav__link .nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav__link:hover {
  color: var(--text-primary);
}

.bottom-nav__link.is-active {
  color: var(--accent-cyan);
}

.bottom-nav__link.is-active .nav-icon {
  color: var(--accent-gold);
}

.bottom-nav__link--fab {
  flex: 0 0 auto;
  position: relative;
  top: -14px;
  width: 56px;
  height: 56px;
  min-width: 56px;
  padding: 0;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: var(--accent-red);
  border: 4px solid var(--text-primary);
  color: var(--text-primary);
  box-shadow: 4px 4px 0 var(--accent-purple);
}

.bottom-nav__link--fab:hover {
  filter: brightness(1.08);
  color: var(--text-primary);
}

.bottom-nav__link--fab.is-active {
  background: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 4px 4px 0 var(--accent-gold);
}

@media (min-width: 900px) {
  .bottom-nav {
    display: none;
  }
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-icon--lg {
  width: 26px;
  height: 26px;
}

.bottom-nav__link--fab .nav-icon--lg {
  width: 28px;
  height: 28px;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem min(1.25rem, 4vw);
}

/* Page placeholder (inside main) */
.page-placeholder {
  position: relative;
  min-height: min(60vh, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.page-placeholder__halftone {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background-color: rgba(10, 10, 15, 0.5);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 10px 10px;
  pointer-events: none;
}

.page-placeholder__halftone::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124, 58, 237, 0.12), transparent 55%);
}

.page-placeholder__card {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 420px;
  background: var(--bg-secondary);
  border: 4px solid var(--text-primary);
  border-radius: 4px;
  box-shadow: 6px 6px 0 var(--accent-purple);
}

.page-placeholder__title {
  margin: 0 0 0.75rem;
  font-family: 'Bangers', cursive, sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--accent-red);
  text-shadow: 2px 2px 0 var(--accent-purple);
}

.page-placeholder__muted {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.page-placeholder__brand {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  opacity: 0.85;
}

/* Item form + combo */
.item-form-wrap {
  position: relative;
  padding-bottom: 2rem;
}

.item-form__header {
  margin-bottom: 1.25rem;
}

.item-form__title {
  margin: 0 0 0.35rem;
  font-family: 'Bangers', cursive, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--accent-red);
  text-shadow: 2px 2px 0 var(--accent-purple);
}

.item-form__hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.item-form__alert {
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  border: 2px solid;
}

.item-form__alert--error {
  background: rgba(255, 59, 92, 0.12);
  border-color: var(--accent-red);
  color: #fecaca;
}

.item-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-fieldset {
  margin: 0 0 1.5rem;
  padding: 1.25rem;
  border: 3px solid var(--border-color);
  border-radius: 6px;
  background: rgba(30, 30, 46, 0.5);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.form-legend {
  padding: 0 0.5rem;
  font-family: 'Bangers', cursive, sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--accent-gold);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-row--3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.combo-slots {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.combo-slots.form-row {
  display: grid;
}

.item-form__textarea {
  min-height: 4rem;
  resize: vertical;
}

.item-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--border-color);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 3px solid var(--border-color);
  box-shadow: none;
  font-weight: 600;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.combo-input {
  width: 100%;
}

.combo-input__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.combo-input__inner {
  position: relative;
}

.combo-input__dropdown {
  position: absolute;
  z-index: 250;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--accent-purple);
}

.combo-input__option {
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.combo-input__option:hover,
.combo-input__option:focus {
  background: rgba(124, 58, 237, 0.25);
}

.combo-input__option--add {
  border-top: 2px dashed var(--border-color);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-style: italic;
}

.field-category-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.field-error {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-red);
  line-height: 1.35;
}

.auth-input--error {
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.2) !important;
}

/* --- Collezione --- */
.collection-page__header {
  margin-bottom: 1rem;
}

.collection-page__title {
  margin: 0;
  font-family: 'Bangers', cursive, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: 0.05em;
  color: var(--accent-red);
  text-shadow: 2px 2px 0 var(--accent-purple);
}

.collection-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: rgba(30, 30, 46, 0.45);
  border: 3px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.collection-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.collection-toolbar__row--filters {
  align-items: flex-end;
}

.collection-view-toggle {
  display: inline-flex;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.collection-view-toggle__btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
}

.collection-view-toggle__btn.is-active {
  background: var(--accent-purple);
  color: var(--text-primary);
}

.collection-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.collection-field--grow {
  flex: 1;
  min-width: 140px;
}

.collection-field__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.collection-select {
  min-width: 140px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .collection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .collection-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.collection-list {
  width: 100%;
}

.collection-list__scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-secondary);
}

.collection-table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.collection-table thead {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
}

.collection-table__th {
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  vertical-align: bottom;
}

.collection-table__th--title {
  width: 30%;
}

.collection-table__th--category {
  width: 16%;
}

.collection-table__th--status {
  width: 12%;
  text-align: center;
}

.collection-table__th--paid {
  width: 14%;
  text-align: right;
}

.collection-table__th--value {
  width: 14%;
  text-align: center;
}

.collection-table__th--actions {
  width: 3rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  text-align: center;
}

.collection-table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

.collection-table tbody tr:last-child {
  border-bottom: none;
}

.collection-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  border: 2px dashed var(--border-color);
  border-radius: 6px;
}

.collection-load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.collection-loading {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.collection-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--border-color);
  text-align: center;
}

.collection-trash-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.collection-trash-link:hover {
  color: var(--accent-cyan);
}

/* Card griglia */
.item-card--grid {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 3px solid var(--text-primary);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--accent-purple);
  overflow: hidden;
  transition: transform 0.12s;
}

.item-card--grid:hover {
  transform: translate(-2px, -2px);
}

.item-card__cover {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg-primary);
  overflow: hidden;
}

.item-card__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card__cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 8px 8px;
}

.item-card__cover-placeholder-inner {
  font-family: 'Bangers', cursive, sans-serif;
  font-size: 3rem;
  color: var(--accent-purple);
  text-shadow: 2px 2px 0 var(--accent-red);
  opacity: 0.85;
}

.btn-icon-delete {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--text-primary);
  background: rgba(10, 10, 15, 0.75);
  color: var(--accent-red);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-delete:hover {
  background: var(--accent-red);
  color: var(--text-primary);
}

.item-card__body {
  padding: 0.65rem 0.75rem 0.85rem;
  min-width: 0;
}

.item-card__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-card__category {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.item-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 3px;
  border: 2px solid;
}

.item-badge--sm {
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
}

.item-badge--owned {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.item-badge--wishlist {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.item-badge--reserved {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--accent-purple);
  color: #e9d5ff;
}

.item-badge--sold {
  background: rgba(255, 59, 92, 0.15);
  border-color: var(--accent-red);
  color: #fecaca;
}

.item-badge--deleted {
  background: rgba(100, 100, 100, 0.3);
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.item-badge--default {
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.item-card__values {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  margin-top: 0.5rem;
  min-width: 0;
}

.item-card__value {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item-card__delta {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
}

.item-card__delta--up {
  color: #4ade80;
}

.item-card__delta--down {
  color: var(--accent-red);
}

.item-card__delta--muted {
  color: var(--text-secondary);
}

/* Lista tabellare (allineamento colonne fisso) */
tr.item-card--list td {
  padding: 0.55rem 0.65rem;
  vertical-align: middle;
  background: var(--bg-secondary);
}

.item-card--list__title {
  font-weight: 700;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}

.item-card--list__cat {
  font-size: 0.75rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-card--list__status {
  text-align: center;
}

.item-card--list__status .item-badge {
  vertical-align: middle;
}

.item-card--list__paid {
  text-align: right;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item-card--list__val {
  text-align: center;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item-card--list__actions {
  text-align: center;
  width: 3rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  vertical-align: middle;
}

.item-card--list__delete {
  margin: 0 auto;
}

/* Dialog eliminazione */
.collection-dialog {
  max-width: 420px;
  padding: 1.5rem;
  border: 4px solid var(--text-primary);
  border-radius: 6px;
  background: var(--bg-secondary);
  box-shadow: 8px 8px 0 var(--accent-purple);
}

.collection-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.collection-dialog__text {
  margin: 0 0 1.25rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.collection-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Cestino */
.trash-page__header {
  margin-bottom: 1.25rem;
}

.trash-page__back {
  margin-bottom: 0.75rem;
}

.trash-page__title {
  margin: 0 0 0.35rem;
  font-family: 'Bangers', cursive, sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--accent-red);
  text-shadow: 2px 2px 0 var(--accent-purple);
}

.trash-page__hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.trash-purged-msg {
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 2px solid var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  font-size: 0.875rem;
}

.trash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.trash-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 6px;
}

.trash-list__main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.trash-list__title {
  font-weight: 700;
}

.trash-list__meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.trash-list__days {
  font-size: 0.8rem;
  color: var(--accent-gold);
}

.btn--sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}
