/* ============================================================
   FINANCEL — CATEGORIAS V4 PREMIUM
   "Categoria não é etiqueta, é inteligência financeira"

   Redesign decision-first, mobile-first
   Layer sobre legacy categorias UI
   ============================================================ */

:root {
  --cg-radius: 1.2rem;
  --cg-radius-sm: 0.75rem;
  --cg-border: rgba(148, 163, 184, 0.18);
  --cg-gold: rgba(250, 204, 21, 0.85);
  --cg-green: #22c55e;
  --cg-red: #ef4444;
  --cg-amber: #f59e0b;
  --cg-blue: #38bdf8;
  --cg-purple: #a78bfa;
  --cg-surface: rgba(15, 23, 42, 0.92);
  --cg-surface-elevated: rgba(17, 25, 45, 0.95);
  --cg-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --cg-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
  --cg-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   HIDE LEGACY
   ============================================================ */

.lanc-grid,
#diagnostics-banner,
[aria-label="Categorias cadastradas"],
[aria-label="Nova categoria"],
.lanc-form-card,
.lanc-list-card {
  display: none !important;
}

/* Also hide legacy inspire phrase (we have our own) */
.page.dashboard-container > div[style*="max-width: 1400px"][style*="opacity: 0.7"] {
  display: none !important;
}

/* ============================================================
   IMPACT PANEL — 3 Decision KPIs
   ============================================================ */

.cg-impact-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.cg-impact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--cg-radius);
  background: var(--cg-surface);
  border: 1px solid var(--cg-border);
  box-shadow: var(--cg-shadow);
  transition: transform var(--cg-transition), box-shadow var(--cg-transition);
  position: relative;
  overflow: hidden;
  animation: cgFadeUp 0.5s ease both;
}

.cg-impact-card:nth-child(1) { animation-delay: 0.05s; }
.cg-impact-card:nth-child(2) { animation-delay: 0.1s; }
.cg-impact-card:nth-child(3) { animation-delay: 0.15s; }

.cg-impact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: var(--cg-radius) 0 0 var(--cg-radius);
}

.cg-impact--essential::before { background: var(--cg-green); }
.cg-impact--wasteful::before  { background: var(--cg-red); }
.cg-impact--coverage::before  { background: var(--cg-blue); }

.cg-impact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cg-shadow-hover);
}

.cg-impact-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.cg-impact-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cg-impact-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fin-slate-400, #94a3b8);
}

.cg-impact-value {
  font-size: 1.55rem;
  font-weight: 900;
  color: #f1f5f9;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cg-impact-sub {
  font-size: 0.75rem;
  color: var(--fin-slate-400, #94a3b8);
  margin-top: 2px;
}

.cg-impact--alert .cg-impact-value {
  color: var(--cg-red);
}

/* ============================================================
   INSIGHTS BAR
   ============================================================ */

.cg-insights-bar {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.cg-insights-bar::-webkit-scrollbar {
  height: 3px;
}

.cg-insights-bar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
}

.cg-insight-chip {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 0.65rem 1rem;
  border-radius: var(--cg-radius);
  background: var(--cg-surface);
  border: 1px solid var(--cg-border);
  font-size: 0.78rem;
  color: #e2e8f0;
  font-weight: 600;
  line-height: 1.35;
  min-width: 200px;
  max-width: 340px;
  box-shadow: var(--cg-shadow);
  animation: cgFadeUp 0.5s ease both;
  animation-delay: 0.2s;
}

.cg-insight-chip strong {
  font-weight: 800;
}

.cg-insight--warning {
  border-color: rgba(245, 158, 11, 0.2);
  background: linear-gradient(135deg, var(--cg-surface), rgba(45, 35, 12, 0.85));
}

.cg-insight--danger {
  border-color: rgba(239, 68, 68, 0.15);
  background: linear-gradient(135deg, var(--cg-surface), rgba(40, 18, 18, 0.85));
}

.cg-insight--success {
  border-color: rgba(34, 197, 94, 0.15);
  background: linear-gradient(135deg, var(--cg-surface), rgba(14, 35, 22, 0.85));
}

.cg-insight--info {
  border-color: rgba(56, 189, 248, 0.15);
  background: linear-gradient(135deg, var(--cg-surface), rgba(14, 25, 40, 0.85));
}

/* ============================================================
   CHART + QUICK CREATE — Side by Side
   ============================================================ */

.cg-main-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
}

/* Chart */
.cg-chart-section {
  background: var(--cg-surface);
  border: 1px solid var(--cg-border);
  border-radius: var(--cg-radius);
  padding: 1.2rem;
  box-shadow: var(--cg-shadow);
  animation: cgFadeUp 0.5s ease both;
  animation-delay: 0.25s;
}

.cg-chart-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cg-chart-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}

.cg-chart-subtitle {
  font-size: 0.78rem;
  color: var(--fin-slate-400, #94a3b8);
}

/* Quick Create */
.cg-quick-create {
  background: var(--cg-surface);
  border: 1px solid rgba(250, 204, 21, 0.12);
  border-radius: var(--cg-radius);
  padding: 1.2rem;
  box-shadow: var(--cg-shadow);
  position: relative;
  overflow: hidden;
  animation: cgFadeUp 0.5s ease both;
  animation-delay: 0.3s;
}

.cg-quick-create::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--cg-gold);
  border-radius: var(--cg-radius) 0 0 var(--cg-radius);
}

.cg-quick-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cg-field {
  margin-bottom: 0.75rem;
}

.cg-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fin-slate-400, #94a3b8);
  margin-bottom: 0.35rem;
}

.cg-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--cg-radius-sm);
  border: 1px solid var(--cg-border);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--cg-transition);
  box-sizing: border-box;
}

.cg-input:focus {
  outline: none;
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

.cg-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--cg-radius-sm);
  border: 1px solid var(--cg-border);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--cg-transition);
  box-sizing: border-box;
  appearance: none;
  cursor: pointer;
}

.cg-select:focus {
  outline: none;
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.1);
}

/* Chip selectors (importancia, tipo_gasto) */
.cg-chip-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cg-chip-opt {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--cg-border);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--cg-transition);
  font-family: inherit;
  white-space: nowrap;
}

.cg-chip-opt:hover {
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}

.cg-chip-opt.active {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.1);
  color: #fde68a;
}

.cg-chip-opt[data-value="essencial"].active {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.cg-chip-opt[data-value="importante"].active {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
}

.cg-chip-opt[data-value="superflua"].active {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.cg-chip-opt[data-value="fixo"].active {
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
}

.cg-chip-opt[data-value="variavel"].active {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.cg-chip-opt[data-value="pontual"].active {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
}

.cg-color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cg-color-picker {
  width: 36px;
  height: 36px;
  border-radius: var(--cg-radius-sm);
  border: 2px solid var(--cg-border);
  background: transparent;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.cg-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.cg-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.cg-btn-create {
  width: 100%;
  padding: 12px;
  border-radius: var(--cg-radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--cg-gold), #d97706);
  color: #1a1500;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--cg-transition);
  font-family: inherit;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(250, 204, 21, 0.2);
}

.cg-btn-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(250, 204, 21, 0.35);
}

.cg-btn-create:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   FILTER BAR
   ============================================================ */

.cg-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0.65rem 1rem;
  background: var(--cg-surface);
  border: 1px solid var(--cg-border);
  border-radius: var(--cg-radius);
  box-shadow: var(--cg-shadow);
  flex-wrap: wrap;
  animation: cgFadeUp 0.5s ease both;
  animation-delay: 0.35s;
}

.cg-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fin-slate-400, #94a3b8);
  white-space: nowrap;
}

.cg-filter-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.cg-f-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--cg-border);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--cg-transition);
  font-family: inherit;
  white-space: nowrap;
}

.cg-f-chip:hover {
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}

.cg-f-chip.active {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--cg-blue);
}

.cg-filter-search {
  flex: 1;
  min-width: 120px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--cg-border);
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--cg-transition);
}

.cg-filter-search:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}

.cg-filter-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fin-slate-400, #94a3b8);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  white-space: nowrap;
}

.cg-filter-sep {
  width: 1px;
  height: 20px;
  background: var(--cg-border);
  flex-shrink: 0;
}

/* ============================================================
   CATEGORY CARDS GRID
   ============================================================ */

.cg-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 0;
}

.cg-cat-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem;
  border-radius: var(--cg-radius);
  background: var(--cg-surface);
  border: 1px solid var(--cg-border);
  box-shadow: var(--cg-shadow);
  transition: all var(--cg-transition);
  position: relative;
  overflow: hidden;
  animation: cgCardFadeUp 0.4s ease both;
}

.cg-cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: var(--cg-radius) 0 0 var(--cg-radius);
}

.cg-cat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--cg-shadow-hover);
  border-color: rgba(148, 163, 184, 0.3);
}

.cg-cat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.cg-cat-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f1f5f9;
}

.cg-cat-badges {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cg-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.cg-badge--despesa  { background: rgba(239, 68, 68, 0.1);  color: #f87171; }
.cg-badge--receita  { background: rgba(34, 197, 94, 0.1);  color: #4ade80; }
.cg-badge--ambos    { background: rgba(167, 139, 250, 0.1); color: #c4b5fd; }

.cg-badge--essencial { background: rgba(34, 197, 94, 0.08); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.cg-badge--importante { background: rgba(56, 189, 248, 0.08); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.2); }
.cg-badge--superflua  { background: rgba(239, 68, 68, 0.08); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

.cg-badge--fixo     { background: rgba(167, 139, 250, 0.06); color: #c4b5fd; }
.cg-badge--variavel { background: rgba(245, 158, 11, 0.06); color: #fbbf24; }
.cg-badge--pontual  { background: rgba(148, 163, 184, 0.06); color: #cbd5e1; }

/* Spending info */
.cg-cat-spend {
  margin: 0.45rem 0;
}

.cg-cat-spend-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 2px;
}

.cg-cat-spend-value {
  font-size: 1.05rem;
  font-weight: 900;
  color: #f1f5f9;
}

.cg-cat-spend-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fin-slate-400, #94a3b8);
}

.cg-cat-spend-bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  overflow: hidden;
  margin-top: 3px;
}

.cg-cat-spend-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
}

.cg-cat-desc {
  font-size: 0.75rem;
  color: var(--fin-slate-400, #94a3b8);
  line-height: 1.35;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cg-cat-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--cg-border);
}

.cg-btn {
  padding: 5px 12px;
  border-radius: var(--cg-radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--cg-border);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all var(--cg-transition);
  font-family: inherit;
  white-space: nowrap;
}

.cg-btn:hover {
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.06);
}

.cg-btn--edit:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--cg-blue);
  background: rgba(56, 189, 248, 0.06);
}

.cg-btn--del:hover {
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
  background: rgba(239, 68, 68, 0.06);
}

.cg-btn--imp {
  margin-left: auto;
}

.cg-btn--imp:hover {
  border-color: rgba(250, 204, 21, 0.4);
  color: #fde68a;
  background: rgba(250, 204, 21, 0.06);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.cg-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--fin-slate-400, #94a3b8);
}

.cg-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.cg-empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 0.5rem;
}

.cg-empty-text {
  font-size: 0.82rem;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ============================================================
   MODAL V4 — Premium Edit
   ============================================================ */

.cg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cg-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cg-modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--cg-surface-elevated);
  border: 1px solid rgba(250, 204, 21, 0.12);
  border-radius: var(--cg-radius) var(--cg-radius) 0 0;
  padding: 1.5rem 1.3rem 2rem;
  box-shadow: 0 -16px 64px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cg-modal-overlay.active .cg-modal {
  transform: translateY(0);
}

.cg-modal-drag {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.3);
  margin: 0 auto 1rem;
}

.cg-modal-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cg-modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.cg-modal-btn-cancel {
  flex: 1;
  padding: 12px;
  border-radius: var(--cg-radius-sm);
  border: 1px solid var(--cg-border);
  background: transparent;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--cg-transition);
}

.cg-modal-btn-cancel:hover {
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}

.cg-modal-btn-save {
  flex: 2;
  padding: 12px;
  border-radius: var(--cg-radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--cg-blue), #2563eb);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--cg-transition);
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.2);
}

.cg-modal-btn-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes cgFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cgCardFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MOBILE — 768px
   ============================================================ */

@media (max-width: 768px) {
  .cg-impact-panel {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cg-impact-card {
    padding: 0.9rem 1rem;
  }

  .cg-impact-value {
    font-size: 1.3rem;
  }

  .cg-main-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .cg-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
  }

  .cg-filter-sep {
    display: none;
  }

  .cg-filter-count {
    margin-left: 0;
    text-align: center;
  }

  .cg-cards-grid {
    grid-template-columns: 1fr;
  }

  .cg-chart-section {
    padding: 0.9rem;
  }

  .cg-modal {
    max-width: 100%;
    border-radius: 1.2rem 1.2rem 0 0;
  }
}

/* ============================================================
   MOBILE — 480px
   ============================================================ */

@media (max-width: 480px) {
  .cg-impact-value {
    font-size: 1.15rem;
  }

  .cg-cat-badges {
    flex-wrap: wrap;
  }

  .cg-cat-actions {
    flex-wrap: wrap;
  }

  .cg-btn {
    flex: 1;
    text-align: center;
    min-width: 0;
    padding: 6px 8px;
  }

  .cg-insight-chip {
    min-width: 160px;
    font-size: 0.72rem;
    padding: 0.5rem 0.8rem;
  }

  .cg-quick-create {
    padding: 1rem;
  }

  .cg-modal-actions {
    flex-direction: column;
  }
}
