.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.filter-group { display: grid; gap: 6px; }
.filter-group label { font-weight: 700; color: var(--text-secondary); font-size: 0.95rem; }
.filter-group input, .filter-group select { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(35,48,65,0.12); font-size: 1rem; }
.tabs { display: inline-flex; gap: 8px; border: 1px solid rgba(35,48,65,0.1); border-radius: 12px; padding: 6px; background: var(--graphite-100); }
.tab { padding: 10px 14px; border-radius: 10px; border: 0; background: transparent; font-weight: 700; cursor: pointer; color: var(--text-secondary); }
.tab.active { background: rgba(255,255,255,0.94); box-shadow: 0 8px 18px rgba(0,0,0,0.08); color: var(--text-primary); }
.list { display: grid; gap: 10px; margin-top: 12px; }
.card-item { border: 1px solid rgba(35,48,65,0.08); border-radius: 14px; padding: 14px; background: linear-gradient(135deg, #ffffff, #f8fafc); box-shadow: 0 12px 24px rgba(0,0,0,0.05); display: grid; gap: 10px; }
.item-header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.item-title { margin: 0; font-size: 1.05rem; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(35,48,65,0.06); color: var(--text-secondary); font-weight: 700; font-size: 0.9rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.small { padding: 8px 10px; font-size: 0.95rem; }
.form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.input-inline { padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(35,48,65,0.12); }
.empty { text-align: center; color: var(--text-secondary); padding: 12px; border: 1px dashed rgba(35,48,65,0.2); border-radius: 10px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: none; align-items: center; justify-content: center; z-index: 40; }
.modal { background: #fff; border-radius: 16px; border: 1px solid rgba(35,48,65,0.1); box-shadow: 0 16px 36px rgba(0,0,0,0.18); width: min(960px, 94vw); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.modal header { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, var(--graphite-800, #1b2533), var(--graphite-700, #233041)); color: #fff; }
.modal .body { padding: 14px 16px; overflow: auto; display: grid; gap: 12px; align-items: start; }
.modal .body { scroll-behavior: auto; }
.modal h4 { margin: 0 0 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }

/* Compact list rows */
.list-compact { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.row-item { width: 100%; border: 1px solid rgba(35,48,65,0.08); background: rgba(255,255,255,0.94); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; justify-content: space-between; align-items: center; cursor: pointer; box-shadow: 0 8px 18px rgba(0,0,0,0.04); transition: transform 0.1s ease, box-shadow 0.1s ease; }
.row-item:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(0,0,0,0.06); }
.row-main { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.row-main .primary { font-weight: 700; color: var(--text-primary); }
.row-main .muted { color: var(--text-secondary); font-size: 0.95rem; }
.row-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tag.id { font-weight: 700; color: var(--text-secondary); }
.badge.state { background: rgba(0,128,255,0.08); color: #0b62c0; }
.badge.payments { background: rgba(35,48,65,0.05); }
.badge.state.ok { background: rgba(15, 184, 94, 0.12); color: #0b7a4c; }
.badge.state.pending { background: rgba(255, 170, 0, 0.12); color: #b36a00; }
.badge.state.error { background: rgba(219, 68, 55, 0.12); color: #b3261e; }
.badge.state.process { background: rgba(66, 133, 244, 0.12); color: #0b62c0; }

/* Detail modal layout */
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.detail-main { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.detail-main .full { grid-column: 1 / -1; }
.history-side { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-grid label { display: block; font-weight: 700; color: var(--text-secondary); margin-top: 6px; }
.detail-grid input, .detail-grid select, .detail-grid textarea { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(35,48,65,0.14); margin-top: 4px; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.input-inline[disabled] { background: #f4f6f9; cursor: not-allowed; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.detail-head-actions { display: flex; gap: 8px; align-items: center; }
.detail-bar { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.detail-title { display: flex; align-items: center; gap: 10px; }
.detail-title .primary { font-size: 1.3rem; font-weight: 800; }
.detail-title .tag.id { font-size: 1.3rem; }
.detail-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.full-width { grid-column: 1 / -1; }
.payments-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.payment-box { border: 1px solid rgba(35,48,65,0.1); border-radius: 10px; padding: 8px; background: #f8fafc; display: grid; gap: 6px; }
.payment-box .muted { font-size: 0.9rem; display: block; }
.payment-box-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; }
.btn.xsmall { padding: 6px 8px; font-size: 0.85rem; }
.btn.close-light { background: #1b2533; color: #fff !important; border: none; }
.btn.close-light:hover { background: #111827; }
.btn.header-ghost { background: transparent; color: #fff !important; border: 1px solid rgba(255,255,255,0.4); }
.btn.header-ghost:hover { border-color: #fff; color: #fff !important; }
.btn[disabled] { cursor: not-allowed; opacity: 0.6; pointer-events: none; }
.reimport-group { display: flex; gap: 8px; align-items: center; }
.reimport-group input { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(35,48,65,0.12); }
.history-block { border: 1px solid rgba(35,48,65,0.1); border-radius: 12px; padding: 10px 12px; background: #f9fafb; display: grid; gap: 8px; grid-template-rows: auto 1fr auto; }
.history-head { display: flex; justify-content: space-between; align-items: center; }
.history-list { overflow: auto; display: grid; gap: 6px; padding-right: 4px; }
.history-item { padding: 8px 10px; border: 1px solid rgba(35,48,65,0.12); border-radius: 10px; background: #fff; }
.history-meta { font-size: 0.85rem; color: var(--text-secondary); }
.history-text { margin-top: 4px; }
.history-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.notice { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; display: none; }
.notice.info { background: #e5f0ff; color: #0b62c0; }
.notice.success { background: #e7f6ed; color: #0b7a4c; }
.notice.warn { background: #fff4e5; color: #b36a00; }
.notice.error { background: #fdecea; color: #b3261e; }
.list-controls { display: grid; gap: 10px; }
.list-select-group, .list-create-group { display: grid; gap: 6px; }
.list-select-group select, .list-create-row input { padding: 10px 12px; border: 1px solid rgba(35,48,65,0.12); border-radius: 10px; }
.list-create-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.list-inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.list-feedback { font-size: 0.95rem; }
.list-feedback.success { color: #0b7a4c; }
.list-feedback.error { color: #b3261e; }
.list-actions-row { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.notice { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; display: none; }
.notice.info { background: #e5f0ff; color: #0b62c0; }
.notice.success { background: #e7f6ed; color: #0b7a4c; }
.notice.warn { background: #fff4e5; color: #b36a00; }
.notice.error { background: #fdecea; color: #b3261e; }
.list-controls { display: grid; gap: 10px; }
.list-select-group, .list-create-group { display: grid; gap: 6px; }
.list-select-group select, .list-create-row input { padding: 10px 12px; border: 1px solid rgba(35,48,65,0.12); border-radius: 10px; }
.list-create-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; grid-template-areas: "main" "history"; }
}

/* Hero visual with logo */
.hero-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 24px;
}
.hero-copy .hero-actions { margin-top: 14px; }
.hero-visual {
  background: linear-gradient(135deg, #0f1720, #1f2a3c);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 10px;
  place-items: center;
  box-shadow: 0 18px 36px rgba(0,0,0,0.12);
}
.hero-visual img {
  width: 100%;
  max-height: 280px;
  border-radius: 14px;
  object-fit: contain;
}
.hero-tagline {
  color: #fff;
  font-weight: 700;
  text-align: center;
  background: rgba(255,255,255,0.08);
  padding: 8px 10px;
  border-radius: 12px;
  width: 100%;
}
