/* Dashboard v2 additions */
.top-actions:has(.data-badge:only-child) { justify-content: flex-end; }
.delta-neutral { color: var(--soft); }

.pure-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .45fr); gap: 14px; }
.pure-progress-card { min-height: 330px; }
.pure-progress-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: center; }
.radial { width: 190px; height: 190px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--value) * 1%), #e8ece9 0); display: grid; place-items: center; position: relative; }
.radial::after { content: ""; width: 146px; height: 146px; border-radius: 50%; background: #fff; position: absolute; }
.radial > div { position: relative; z-index: 1; text-align: center; }
.radial strong, .radial span { display: block; }
.radial strong { font-size: 32px; letter-spacing: -.05em; }
.radial span { margin-top: 6px; color: var(--muted); font-size: 9px; }
.monthly-bars header { margin-bottom: 14px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.monthly-bars header small { color: var(--soft); font-size: 9px; }
.bar-grid { height: 184px; display: grid; grid-template-columns: repeat(9, minmax(24px, 1fr)); gap: 8px; align-items: end; }
.month-bar { height: 100%; display: grid; grid-template-rows: 16px 1fr 18px; gap: 5px; text-align: center; }
.month-bar > span, .month-bar > strong { color: var(--soft); font-size: 8px; font-weight: 500; }
.month-bar i { min-height: 110px; border-radius: 5px; background: #f0f2ef; display: flex; align-items: end; overflow: hidden; }
.month-bar i b { width: 100%; min-height: 3px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #4f9d85, var(--green)); }
.month-bar:nth-last-child(1) i b { background: var(--blue); }
.pure-kpis { display: grid; gap: 10px; }
.metric-card { min-height: 96px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.metric-card > span { color: var(--muted); font-size: 10px; }
.metric-card > strong { display: block; margin-top: 8px; font-size: 24px; letter-spacing: -.04em; }
.metric-card footer { padding: 8px 0 0; border: 0; color: var(--soft); font-size: 9px; }
.metric-card footer span:last-child { font-weight: 700; }

.diagnostic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.diagnostic-panel { box-shadow: var(--shadow); }
.diagnostic-list { max-height: 410px; padding: 8px 18px 16px; overflow-y: auto; }
.diagnostic-row { padding: 11px 0; border-bottom: 1px solid var(--line-soft); display: grid; grid-template-columns: minmax(96px, 1fr) minmax(60px, .75fr) 62px; gap: 10px; align-items: center; }
.diagnostic-row:last-child { border-bottom: 0; }
.diagnostic-label b, .diagnostic-label small { display: block; }
.diagnostic-label b { font-size: 10px; }
.diagnostic-label small { margin-top: 3px; color: var(--soft); font-size: 8px; }
.diagnostic-track { height: 6px; border-radius: 99px; background: #edf0ed; overflow: hidden; }
.diagnostic-track span { display: block; height: 100%; border-radius: inherit; background: #7aa994; }
.diagnostic-row > span { font-size: 9px; font-weight: 700; text-align: right; }

.table-panel-head { align-items: center; }
.result-count { padding: 6px 10px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 700; }
.filter-bar { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); background: #fafaf8; display: grid; grid-template-columns: minmax(180px, 1.3fr) repeat(4, minmax(112px, .65fr)) auto; gap: 9px; align-items: end; }
.filter-bar label { display: grid; gap: 5px; }
.filter-bar label > span { color: var(--soft); font-size: 8px; }
.filter-bar input, .filter-bar select { width: 100%; height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; outline: 0; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,116,93,.1); }
.secondary-button.compact { height: 37px; padding-inline: 12px; }
.aw26-table { max-height: 660px; overflow: auto; }
.aw26-table table { min-width: 1050px; }
.aw26-table thead { position: sticky; top: 0; z-index: 2; }
.aw26-table td { padding-block: 8px; }
.product-photo { display: block; object-fit: contain; background: #f5f5f1; }
.product-photo.fallback { color: var(--green); display: grid; place-items: center; font-family: Georgia, serif; font-weight: 700; }
.table-photo { width: 54px; height: 54px; border-radius: 9px; }
.sell-through { min-width: 112px; }
.sell-through header { min-height: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 5px; }
.sell-through header small { color: var(--soft); font-size: 8px; }
.sell-through .track { height: 5px; margin-top: 6px; }
.table-summary { padding: 12px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); background: #fafaf8; display: flex; justify-content: flex-end; gap: 18px; flex-wrap: wrap; font-size: 9px; }
.table-summary b, .table-summary strong { color: var(--ink); }

.focus-overview { overflow: visible; }
.gallery-controls { display: flex; gap: 8px; }
.gallery-controls input, .gallery-controls select { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; outline: 0; }
.gallery-controls input { width: 190px; }
.focus-gallery { padding: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.focus-card { min-width: 0; padding: 0; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fff; overflow: hidden; text-align: left; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.focus-card:hover { transform: translateY(-2px); border-color: #a9c5ba; box-shadow: 0 14px 30px rgba(23,33,29,.1); }
.focus-card.is-active { border-color: var(--green); box-shadow: 0 0 0 2px rgba(22,116,93,.12); }
.focus-card-image { height: 156px; background: linear-gradient(145deg, #f5f5f0, #eceee8); position: relative; overflow: hidden; }
.focus-photo { width: 100%; height: 100%; }
.focus-card-image .tier { position: absolute; left: 10px; top: 10px; color: #fff; background: rgba(18,59,49,.9); backdrop-filter: blur(4px); }
.focus-card-body { padding: 12px; }
.focus-card-body > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.focus-card-body > header > b { font-size: 13px; }
.focus-card-body p { min-height: 28px; margin: 6px 0 11px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.focus-progress { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.focus-progress b { color: var(--ink); }
.focus-progress strong { color: var(--green); font-size: 10px; }
.focus-card .track { height: 5px; margin-top: 7px; }

.selected-product-head { min-height: 176px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(110deg, #fff 0%, #fff 60%, #edf4f1 100%); box-shadow: var(--shadow); display: flex; align-items: center; gap: 24px; }
.selected-product-image { width: 144px; height: 136px; border-radius: 12px; overflow: hidden; background: #f3f3ef; flex: none; }
.hero-photo { width: 100%; height: 100%; }
.selected-product-copy { min-width: 0; }
.selected-product-copy > div { display: flex; align-items: center; gap: 10px; }
.selected-product-copy h2 { margin: 3px 0; font-family: Georgia, serif; font-size: 34px; font-weight: 550; letter-spacing: -.04em; }
.selected-product-copy > p:not(.section-kicker) { margin: 6px 0 12px; color: var(--muted); font-size: 11px; }
.tier.large { padding: 5px 8px; font-size: 10px; }
.summary-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-grid .summary-card { min-height: 112px; }

.chart-legend .dashed { height: 0; border-top: 2px dashed var(--blue); background: transparent; }
.note-panel { margin-top: 14px; }
.note-area { width: 100%; min-height: 130px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fbfbf9; resize: vertical; outline: 0; }
.note-area:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,116,93,.1); }
.save-hint { margin-top: 7px; color: var(--soft); font-size: 8px; text-align: right; }
.empty { padding: 26px; color: var(--soft); text-align: center; font-size: 10px; line-height: 1.7; }
.task-list { padding: 4px 20px 18px; display: grid; gap: 8px; }
.task-item { padding: 12px; border: 1px solid var(--line-soft); border-radius: 9px; display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: start; }
.task-item.done { opacity: .55; }
.task-item.done b { text-decoration: line-through; }
.task-item b, .task-item small { display: block; }
.task-item b { font-size: 11px; line-height: 1.5; }
.task-item small { margin-top: 4px; color: var(--soft); font-size: 8px; }
.task-item button { border: 0; color: var(--soft); background: transparent; font-size: 9px; }
.task-item button:hover { color: var(--red); }

@media (max-width: 1280px) {
  .pure-layout { grid-template-columns: 1fr; }
  .pure-kpis { grid-template-columns: repeat(3, 1fr); }
  .diagnostic-grid { grid-template-columns: 1fr 1fr; }
  .focus-gallery { grid-template-columns: repeat(3, 1fr); }
  .filter-bar { grid-template-columns: repeat(3, 1fr); }
  .search-wide { grid-column: span 2; }
}

@media (max-width: 900px) {
  .pure-progress-body { grid-template-columns: 1fr; justify-items: center; }
  .monthly-bars { width: 100%; }
  .pure-kpis { grid-template-columns: 1fr; }
  .diagnostic-grid { grid-template-columns: 1fr; }
  .focus-gallery { grid-template-columns: repeat(2, 1fr); }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .selected-product-head { align-items: flex-start; }
  .filter-bar { grid-template-columns: repeat(2, 1fr); }
  .search-wide { grid-column: span 2; }
}

@media (max-width: 600px) {
  .panel-head { flex-direction: column; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-wide { grid-column: span 1; }
  .diagnostic-list { max-height: none; }
  .gallery-controls { width: 100%; }
  .gallery-controls input { width: 100%; min-width: 0; }
  .focus-gallery { grid-template-columns: 1fr 1fr; padding: 12px; gap: 8px; }
  .focus-card-image { height: 126px; }
  .selected-product-head { padding: 16px; flex-direction: column; }
  .selected-product-image { width: 100%; height: 220px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .bar-grid { gap: 4px; }
  .table-summary { justify-content: flex-start; }
}

@media (max-width: 390px) {
  .focus-gallery { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
}
