:root {
  --art-bg: #F8F9FB;
  --art-surface: #FFFFFF;
  --art-primary: #6D4AFF;
  --art-primary-soft: rgba(109, 74, 255, 0.12);
  --art-border: #E7EAF2;
  --art-text: #1A1D26;
  --art-muted: #6B7285;
  --art-success: #0F9F6E;
  --art-danger: #E11D48;
  --art-warn: #D97706;
  --art-radius: 12px;
  --art-header-h: 64px;
  --art-sticky-col-w: 48px;
  --art-font: "DM Sans", system-ui, sans-serif;
  --art-display: "Instrument Serif", Georgia, serif;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--art-bg);
  color: var(--art-text);
  font-family: var(--art-font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--art-primary); text-decoration: none; }
a:hover { color: #5636e8; }

.btn-art-primary {
  --bs-btn-bg: var(--art-primary);
  --bs-btn-border-color: var(--art-primary);
  --bs-btn-hover-bg: #5636e8;
  --bs-btn-hover-border-color: #5636e8;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #4a2dd4;
  --bs-btn-active-border-color: #4a2dd4;
  --bs-btn-active-color: #fff;
  border-radius: 10px;
  font-weight: 600;
}

.btn-art-export {
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--art-border);
  background: #fff;
  color: var(--art-text);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.btn-art-export:hover {
  border-color: var(--art-primary);
  color: var(--art-primary);
  background: var(--art-primary-soft);
}

.btn-art-export .bi {
  color: #DC2626;
}

.art-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--art-header-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--art-border);
}

.art-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
  padding: 0 1.25rem;
  max-width: 100%;
}

.art-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--art-text);
  flex-shrink: 0;
}

.art-brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(74, 45, 212, 0.18);
}

.art-brand__text {
  font-family: var(--art-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.art-nav {
  gap: 0.15rem;
  flex: 1;
}

.art-nav a {
  color: var(--art-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
}

.art-nav a:hover,
.art-nav a.is-active {
  color: var(--art-text);
  background: var(--art-primary-soft);
}

.art-header__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.art-project-select .form-select {
  min-width: 200px;
  max-width: 280px;
  border-color: var(--art-border);
  border-radius: 10px;
  background-color: var(--art-surface);
  font-size: 13px;
}

.art-switcher {
  position: relative;
  min-width: 200px;
  max-width: 280px;
}

.art-switcher__btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 31px;
  border: 1px solid var(--art-border);
  border-radius: 10px;
  background: var(--art-surface);
  color: var(--art-text);
  padding: 0.3rem 0.65rem;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.art-switcher__btn:hover,
.art-switcher.is-open .art-switcher__btn {
  border-color: var(--art-primary);
  box-shadow: 0 0 0 3px var(--art-primary-soft);
}

.art-switcher__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-switcher__caret {
  color: var(--art-muted);
  font-size: 11px;
  flex-shrink: 0;
}

.art-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  z-index: 1200;
  min-width: 100%;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - var(--art-header-h) - 24px));
  overflow: auto;
  background: #fff;
  border: 1px solid var(--art-border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(26, 29, 38, 0.14);
  padding: 0.35rem;
}

.art-switcher__group-label {
  padding: 0.45rem 0.6rem 0.25rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--art-muted);
}

.art-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 13px;
  color: var(--art-text);
  text-align: left;
  cursor: pointer;
}

.art-switcher__option:hover {
  background: var(--art-primary-soft);
}

.art-switcher__option.is-active {
  background: var(--art-primary-soft);
  font-weight: 600;
  color: var(--art-primary);
}

.art-switcher__check {
  color: var(--art-primary);
  font-size: 14px;
  flex-shrink: 0;
}

.art-search {
  align-items: center;
  gap: 0.4rem;
  background: var(--art-bg);
  border: 1px solid var(--art-border);
  border-radius: 10px;
  padding: 0.35rem 0.7rem;
  min-width: 200px;
}

.art-search i { color: var(--art-muted); font-size: 13px; }
.art-search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--art-text);
}

.art-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--art-border);
  background: var(--art-surface);
  color: var(--art-muted);
  display: grid;
  place-items: center;
}

.art-profile {
  border: 0;
  background: transparent;
  padding: 0;
}
.art-profile::after { display: none; }
.art-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--art-primary-soft);
  color: var(--art-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  flex-shrink: 0;
}

.art-avatar.has-image {
  background: transparent;
}

.art-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.art-main {
  padding: 1.25rem;
  max-width: 100%;
}

.art-vendors-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--art-border);
}

.art-vendors-empty {
  padding: 3.5rem 1rem;
}

.art-vendors-empty__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--art-primary-soft);
  color: var(--art-primary);
  font-size: 1.4rem;
}

.art-vendors-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--art-muted);
  font-weight: 600;
  border-bottom-color: var(--art-border);
  white-space: nowrap;
}

.art-vendors-table tbody td {
  border-bottom-color: var(--art-border);
  font-size: 13px;
  vertical-align: middle;
}

.art-vendors-table tr.is-inactive td {
  opacity: 0.62;
}

.art-vendor-status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.art-vendor-status.is-active {
  background: rgba(15, 159, 110, 0.12);
  color: var(--art-success);
}

.art-link-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.art-link-badge.is-linked {
  background: var(--art-primary-soft);
  color: var(--art-primary);
}

.art-link-badge.is-independent {
  background: rgba(107, 114, 133, 0.12);
  color: var(--art-muted);
}

.art-budget-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.art-card {
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(26, 29, 38, 0.03);
}

.art-card__label {
  font-size: 12px;
  color: var(--art-muted);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.art-card__value {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.art-card__value.is-positive { color: var(--art-success); }
.art-card__value.is-negative { color: var(--art-danger); }

.art-budget-overall__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.art-budget-overall__field {
  max-width: 320px;
}

.art-budget-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--art-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.art-budget-input:focus-within {
  border-color: var(--art-primary);
  box-shadow: 0 0 0 3px var(--art-primary-soft);
}

.art-budget-input__prefix {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  background: rgba(109, 74, 255, 0.06);
  color: var(--art-muted);
  font-size: 12px;
  font-weight: 600;
  border-right: 1px solid var(--art-border);
  white-space: nowrap;
}

.art-budget-input .form-control {
  border: 0;
  box-shadow: none;
  border-radius: 0;
  font-weight: 600;
}

.art-budget-input .form-control:focus {
  box-shadow: none;
}

.art-budget-input--sm {
  min-width: 140px;
  max-width: 180px;
}

.art-budget-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.85rem;
  font-size: 13px;
  color: var(--art-muted);
}

.art-budget-meta .is-negative,
.art-budget-meta span.is-negative,
.art-budget-table td.is-negative {
  color: var(--art-danger);
}

.art-budget-table td.is-positive {
  color: var(--art-success);
  font-weight: 600;
}

.art-budget-table td.is-negative {
  font-weight: 600;
}

.art-budget-cat-name {
  font-weight: 600;
}

.art-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  align-items: center;
}

.art-filters .form-select,
.art-filters .form-control {
  width: auto;
  flex: 0 1 auto;
  border-color: var(--art-border);
  border-radius: 10px;
  font-size: 13px;
  min-width: 120px;
  max-width: 160px;
  background: var(--art-surface);
}

.art-filters .form-control[data-filter="assigned"] {
  max-width: 140px;
}

.art-filters .form-control[data-filter="q"] {
  max-width: 180px;
}

.art-filters .art-cat-picker--filter {
  width: auto;
  flex: 0 1 auto;
  min-width: 140px;
  max-width: 170px;
}

.art-filters .btn,
.art-filters .art-save-pill {
  flex: 0 0 auto;
}

@media (min-width: 992px) {
  .art-filters {
    flex-wrap: nowrap;
  }
}

.art-sheet-wrap {
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  border-radius: var(--art-radius);
  overflow: auto;
  max-height: calc(100vh - var(--art-header-h) - 210px);
}

.art-sheet {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 100%;
  font-size: 13px;
}

.art-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #FAFBFD;
  border-bottom: 1px solid var(--art-border);
  color: var(--art-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.7rem 0.65rem;
  white-space: nowrap;
  overflow: hidden;
}

.art-sheet thead th .art-th-label {
  display: inline-block;
  max-width: calc(100% - 8px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.art-col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
  z-index: 7;
}

.art-col-resizer::after {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  right: 2px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.15s ease;
}

.art-sheet thead th:hover .art-col-resizer::after,
.art-sheet.is-resizing .art-col-resizer::after {
  background: var(--art-border);
}

.art-col-resizer:hover::after,
.art-sheet.is-resizing .art-col-resizer:hover::after {
  background: var(--art-primary);
}

body.art-col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

body.art-col-resizing * {
  cursor: col-resize !important;
}

.art-sheet tbody td {
  border-bottom: 1px solid var(--art-border);
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
  background: var(--art-surface);
}

.art-sheet tbody tr:hover td {
  background: #FBFBFE;
}

.art-sheet tbody tr.is-expanded td {
  background: #F7F5FF;
}

.art-sheet .sticky-col {
  position: sticky;
  left: 0;
  z-index: 4;
  background: inherit;
  box-shadow: 1px 0 0 var(--art-border);
}

.art-sheet thead th.sticky-col {
  z-index: 6;
  background: #FAFBFD;
}

.art-cell-input,
.art-cell-select {
  width: 100%;
  border: 1px solid var(--art-border);
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.4rem;
  font: inherit;
  color: inherit;
  outline: none;
}

.art-cell-input:hover,
.art-cell-select:hover {
  border-color: #C9CFDD;
}

.art-cell-input:focus,
.art-cell-select:focus {
  border-color: var(--art-primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--art-primary-soft);
}

.art-cell-input.is-dirty,
.art-cell-select.is-dirty {
  background: #FFFBEB;
  border-color: #F5D78A;
}

.art-thumb {
  width: 120px;
  height: 80px;
  border-radius: 10px;
  border: 1px solid var(--art-border);
  background: var(--art-bg);
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.art-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.art-lightbox[hidden] {
  display: none !important;
}

.art-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 29, 38, 0.72);
  backdrop-filter: blur(3px);
}

.art-lightbox__panel {
  position: relative;
  z-index: 1;
  width: 1280px;
  height: 720px;
  max-width: calc(100vw - 3rem);
  max-height: calc(100vh - 3rem);
  animation: art-dialog-in 0.18s ease;
}

.art-lightbox__img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  background: #111;
  object-fit: contain;
}

.art-lightbox__close {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--art-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.art-lightbox__close:hover,
.art-lightbox__close:focus-visible {
  background: #F3F4F6;
  outline: none;
}

.art-lightbox__replace {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body.art-lightbox-open {
  overflow: hidden;
}

.art-thumb-empty {
  width: 120px;
  height: 80px;
  border-radius: 10px;
  border: 1px dashed var(--art-border);
  background: var(--art-bg);
  display: grid;
  place-items: center;
  color: var(--art-muted);
  font-size: 11px;
  cursor: pointer;
}

.art-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #EEF0F6;
  color: var(--art-muted);
}

.art-status[data-status="needed"] { background: #EEF2FF; color: #4338CA; }
.art-status[data-status="sourcing"] { background: #FEF3C7; color: #B45309; }
.art-status[data-status="ordered"] { background: #E0E7FF; color: #3730A3; }
.art-status[data-status="received"] { background: #D1FAE5; color: #047857; }
.art-status[data-status="on_set"] { background: #CFFAFE; color: #0E7490; }
.art-status[data-status="wrapped"] { background: #E5E7EB; color: #374151; }
.art-status[data-status="cut"] { background: #FEE2E2; color: #B91C1C; }
.art-status[data-status="idea"] { background: #F3E8FF; color: #7E22CE; }

.art-row-actions {
  display: flex;
  gap: 0.25rem;
}

.art-row-actions button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--art-border);
  background: #fff;
  color: var(--art-muted);
}

.art-expand {
  background: #F7F5FF;
  border-bottom: 1px solid var(--art-border);
}

.art-expand__inner {
  padding: 1rem 1.25rem 1.25rem 3.25rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
}

.art-expand label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--art-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.art-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  background: #1A1D26;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  pointer-events: none;
}

.art-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.art-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.art-dialog[hidden] {
  display: none !important;
}

.art-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 29, 38, 0.45);
  backdrop-filter: blur(2px);
}

.art-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--art-border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(26, 29, 38, 0.18);
  padding: 1.35rem 1.35rem 1.2rem;
  animation: art-dialog-in 0.18s ease;
}

@keyframes art-dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.art-dialog__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--art-primary-soft);
  color: var(--art-primary);
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}

.art-dialog.is-danger .art-dialog__icon {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
}

.art-dialog.is-info .art-dialog__icon {
  background: var(--art-primary-soft);
  color: var(--art-primary);
}

.art-dialog__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--art-text);
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

.art-dialog__message {
  margin: 0;
  color: var(--art-muted);
  font-size: 14px;
  line-height: 1.45;
}

.art-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.art-dialog__actions .btn {
  min-width: 88px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.art-dialog.is-danger #artDialogConfirm {
  --bs-btn-bg: #DC2626;
  --bs-btn-border-color: #DC2626;
  --bs-btn-hover-bg: #B91C1C;
  --bs-btn-hover-border-color: #B91C1C;
  --bs-btn-active-bg: #B91C1C;
  --bs-btn-active-border-color: #B91C1C;
  background: #DC2626;
  border-color: #DC2626;
  color: #fff;
}

.art-dialog.is-danger #artDialogConfirm:hover,
.art-dialog.is-danger #artDialogConfirm:focus-visible {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #fff;
}

.art-dialog.is-alert #artDialogCancel {
  display: none;
}

body.art-dialog-open {
  overflow: hidden;
}

.art-save-pill {
  font-size: 12px;
  color: var(--art-muted);
  margin-left: auto;
}

.art-save-pill.is-saving { color: var(--art-warn); }
.art-save-pill.is-saved { color: var(--art-success); }

.art-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(109, 74, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(14, 165, 160, 0.12), transparent 50%),
    var(--art-bg);
}

.art-login__card {
  width: min(400px, calc(100% - 2rem));
  background: var(--art-surface);
  border: 1px solid var(--art-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(26, 29, 38, 0.06);
}

.art-login__card h1 {
  font-family: var(--art-display);
  font-size: 2rem;
  margin: 0 0 0.35rem;
}

.art-login__card p {
  color: var(--art-muted);
  margin-bottom: 1.5rem;
}

.art-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--art-muted);
}

.art-quick-add-slot:empty {
  display: none;
}

.art-quick-add-row td {
  padding: 0.65rem 0.5rem 0.85rem;
  background: transparent;
  border-bottom: 0;
  vertical-align: middle;
}

#quickAddSlotTop .art-quick-add-row td {
  padding: 0.5rem 0.5rem 0.75rem;
  border-bottom: 1px solid var(--art-border);
}

#quickAddSlotTop .art-quick-add-row {
  position: sticky;
  top: 40px;
  z-index: 4;
}

#quickAddSlotTop .art-quick-add-row td {
  background: var(--art-surface);
}

.art-quick-add {
  display: block;
  width: 100%;
  border: 1.5px dashed var(--art-primary);
  border-radius: 12px;
  background: var(--art-primary-soft);
  color: var(--art-primary);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  text-align: center;
}

.art-quick-add:hover,
.art-quick-add:focus-visible {
  border-color: var(--art-border);
  color: var(--art-muted);
  background: transparent;
  outline: none;
}

.art-quick-add:disabled {
  opacity: 0.55;
  cursor: wait;
}

.art-quick-add__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 13px;
  font-weight: 600;
}

.art-quick-add__inner > .bi {
  font-size: 15px;
  color: inherit;
}

.art-quick-add__hint {
  margin-left: 0.25rem;
  font-weight: 400;
  font-size: 12px;
  color: inherit;
  opacity: 0.85;
}

.art-quick-add:hover .art-quick-add__hint,
.art-quick-add:focus-visible .art-quick-add__hint {
  opacity: 0.9;
}

.art-row.is-new-row td {
  animation: art-row-flash 0.9s ease;
}

@keyframes art-row-flash {
  0% { background: var(--art-primary-soft); }
  100% { background: var(--art-surface); }
}

.art-modal {
  border: 1px solid var(--art-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(26, 29, 38, 0.14);
}

.art-modal .modal-header {
  border-bottom-color: var(--art-border);
  padding: 1.15rem 1.25rem;
  background: #FAFBFD;
}

.art-modal .modal-footer {
  border-top-color: var(--art-border);
  padding: 1rem 1.25rem;
  background: #FAFBFD;
}

.art-modal .form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--art-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.art-modal .form-control,
.art-modal .form-select {
  border-color: var(--art-border);
  border-radius: 10px;
  font-size: 14px;
}

.art-cat-icon {
  color: var(--art-primary);
  font-size: 1em;
  line-height: 1;
  flex-shrink: 0;
}

.art-cat-settings-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.art-cat-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.art-cat-row {
  padding: 0.55rem 0;
}

.art-cat-row__view,
.art-cat-row__edit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.art-cat-row__edit {
  display: none;
}

.art-cat-row.is-editing .art-cat-row__view {
  display: none;
}

.art-cat-row.is-editing .art-cat-row__edit {
  display: flex;
}

.art-cat-row__edit-fields {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.art-cat-row__edit-fields .form-control {
  flex: 1;
  min-width: 0;
}

.art-cat-row__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.art-cat-row__actions form {
  margin: 0;
}

.art-icon-picker {
  position: relative;
}

.art-icon-picker__btn {
  width: 38px;
  height: 31px;
  border: none;
  border-radius: 8px;
  background: var(--art-primary);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.art-icon-picker__btn:hover,
.art-icon-picker__btn:focus-visible {
  filter: brightness(0.95);
  outline: none;
}

.art-icon-picker.is-open .art-icon-picker__btn {
  box-shadow: 0 0 0 3px var(--art-primary-soft);
}

.art-icon-picker__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 232px;
  max-height: 220px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--art-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(26, 29, 38, 0.14);
}

.art-icon-picker__menu[hidden] {
  display: none !important;
}

.art-cat-row .art-icon-picker__menu {
  top: auto;
  bottom: calc(100% + 6px);
}

.art-icon-picker__option {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--art-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 0;
}

.art-icon-picker__option:hover,
.art-icon-picker__option:focus-visible {
  background: var(--art-primary-soft);
  outline: none;
}

.art-icon-picker__option.is-active {
  background: var(--art-primary-soft);
  border-color: var(--art-primary);
}

.art-cat-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.art-cat-picker__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.art-cat-picker__btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  border: 1px solid var(--art-border);
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.4rem;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  min-height: 32px;
}

.art-cat-picker--filter {
  min-width: 140px;
  max-width: 170px;
}

.art-cat-picker--filter .art-cat-picker__btn {
  border-color: var(--art-border);
  border-radius: 10px;
  font-size: 13px;
  min-height: 31px;
  background: var(--art-surface);
  padding: 0.25rem 0.55rem;
}

.art-cat-picker--modal .art-cat-picker__btn {
  border-color: var(--art-border);
  border-radius: 10px;
  font-size: 14px;
  min-height: 38px;
  background: #fff;
  padding: 0.375rem 0.75rem;
}

.art-cat-picker__btn:hover,
.art-cat-picker.is-open .art-cat-picker__btn {
  border-color: var(--art-primary);
  background: #fff;
}

.art-cat-picker__btn:focus-visible,
.art-cat-picker.is-open .art-cat-picker__btn {
  box-shadow: 0 0 0 3px var(--art-primary-soft);
}

.art-cat-picker__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.art-cat-picker__text.is-placeholder {
  color: var(--art-muted);
}

.art-cat-picker__caret {
  color: var(--art-muted);
  font-size: 11px;
  margin-left: auto;
  flex-shrink: 0;
}

.art-cat-picker__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 280px;
  max-height: 260px;
  overflow: auto;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--art-border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(26, 29, 38, 0.12);
  padding: 0.3rem;
}

.art-cat-picker__menu.is-fixed {
  position: fixed;
  z-index: 1080;
}

.art-cat-picker--filter .art-cat-picker__menu {
  z-index: 50;
}

.art-cat-picker__option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.art-cat-picker__option:hover {
  background: var(--art-primary-soft);
}

.art-cat-picker__option.is-active {
  background: var(--art-primary-soft);
  font-weight: 600;
}

.art-modal .form-control:focus,
.art-modal .form-select:focus,
.art-modal .art-cat-picker.is-open .art-cat-picker__btn {
  border-color: var(--art-primary);
  box-shadow: 0 0 0 3px var(--art-primary-soft);
}

.art-modal-preview {
  margin-top: 1.6rem;
  border: 1px solid var(--art-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--art-bg);
  height: 120px;
}

.art-modal-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1100px) {
  .art-budget-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-expand__inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .art-budget-row { grid-template-columns: 1fr; }
  .art-header__inner { gap: 0.5rem; padding: 0 0.75rem; }
  .art-brand__text { display: none; }
  .art-main { padding: 0.85rem; }
}
