/* IMPERIUM AUREA — Operational Components Wave 3 / Build462 */

:root{
  --a462-surface:rgba(8,29,42,.84);
  --a462-surface-hi:rgba(12,41,56,.92);
  --a462-line:rgba(121,220,229,.18);
  --a462-line-hi:rgba(121,220,229,.36);
  --a462-text:#f4f8fa;
  --a462-muted:#9eb1bc;
  --a462-cyan:#72e2e7;
  --a462-warning:#efc06f;
  --a462-danger:#f09ab0;
  --a462-success:#77dfb9;
}

/* WINE FILTER BAR */
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter-shell{
  display:grid!important;
  gap:12px!important;
  padding:14px!important;
  border-radius:20px!important;
  border:1px solid var(--a462-line)!important;
  background:linear-gradient(180deg,rgba(9,31,45,.88),rgba(4,20,31,.86))!important;
  box-shadow:none!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter-title{
  color:var(--a462-muted)!important;
  font-size:.75rem!important;
  font-weight:900!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
  margin:0!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter-group{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:40px!important;
  padding:9px 13px!important;
  border-radius:999px!important;
  border:1px solid var(--a462-line)!important;
  background:rgba(5,22,33,.72)!important;
  color:#eef7f9!important;
  font-size:.84rem!important;
  font-weight:780!important;
  line-height:1.1!important;
  white-space:normal!important;
  text-align:center!important;
  width:auto!important;
  max-width:100%!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter.is-active{
  border-color:rgba(114,226,231,.55)!important;
  background:linear-gradient(135deg,rgba(114,226,231,.18),rgba(92,172,221,.12))!important;
  color:#d7fcff!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter.is-danger{
  border-color:rgba(240,154,176,.38)!important;
  background:rgba(240,154,176,.08)!important;
  color:#ffd6df!important;
}

/* WINE CARDS */
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-card{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:12px!important;
  align-items:start!important;
  width:100%!important;
  min-width:0!important;
  padding:16px!important;
  border-radius:20px!important;
  border:1px solid var(--a462-line)!important;
  background:linear-gradient(145deg,rgba(11,37,52,.90),rgba(5,23,34,.92))!important;
  box-shadow:0 14px 34px rgba(0,0,0,.14)!important;
  overflow:hidden!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-card[data-aurea-state="soldout"]{
  border-color:rgba(240,154,176,.28)!important;
  background:linear-gradient(145deg,rgba(43,20,29,.84),rgba(18,18,27,.90))!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-card[data-aurea-state="soldout"]::before{
  content:"";position:absolute;left:0;top:12px;bottom:12px;width:4px;border-radius:0 99px 99px 0;
  background:linear-gradient(180deg,#f2a2b7,#b74a68)
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-name{
  min-width:0!important;
  color:var(--a462-text)!important;
  font-weight:820!important;
  line-height:1.2!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-status{
  justify-self:end!important;
  align-self:start!important;
  display:inline-flex!important;
  align-items:center!important;
  min-height:32px!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  font-size:.72rem!important;
  font-weight:900!important;
  letter-spacing:.03em!important;
  white-space:nowrap!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-status.soldout{
  color:#ffd3dd!important;
  border:1px solid rgba(240,154,176,.32)!important;
  background:rgba(240,154,176,.10)!important;
}
html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-meta{
  grid-column:1 / -1!important;
  color:var(--a462-muted)!important;
  line-height:1.4!important;
}

/* ACTIVITY / CONTROL CARDS */
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-list{
  display:grid!important;
  gap:12px!important;
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-card{
  position:relative!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:12px!important;
  align-items:center!important;
  min-width:0!important;
  padding:16px!important;
  border-radius:18px!important;
  border:1px solid var(--a462-line)!important;
  background:rgba(7,27,39,.86)!important;
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-card.is-critical{
  border-color:rgba(240,154,176,.34)!important;
  background:linear-gradient(145deg,rgba(48,19,30,.78),rgba(16,22,31,.90))!important;
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-severity{
  align-self:start!important;
  display:inline-flex!important;
  min-height:30px!important;
  padding:6px 9px!important;
  border-radius:999px!important;
  font-size:.72rem!important;
  font-weight:900!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-severity.critical{
  color:#ffd3dd!important;border:1px solid rgba(240,154,176,.32)!important;background:rgba(240,154,176,.10)!important
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-severity.high{
  color:#ffe0a8!important;border:1px solid rgba(239,192,111,.30)!important;background:rgba(239,192,111,.08)!important
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-severity.medium{
  color:#c8f7ff!important;border:1px solid rgba(114,226,231,.28)!important;background:rgba(114,226,231,.07)!important
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-body{
  min-width:0!important;
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-title{
  color:var(--a462-text)!important;
  font-weight:820!important;
  line-height:1.2!important;
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-copy{
  color:var(--a462-muted)!important;
  margin-top:4px!important;
}
html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-open{
  color:var(--a462-cyan)!important;
  text-decoration:none!important;
  font-weight:800!important;
  white-space:nowrap!important;
}

/* KPI STATUS CARDS */
html[data-aurea-screen="home-kpi"] body.imperium-v462 .a462-kpi-card{
  position:relative!important;
  min-width:0!important;
}
html[data-aurea-screen="home-kpi"] body.imperium-v462 .a462-kpi-card .a462-kpi-status{
  display:inline-flex!important;
  align-items:center!important;
  min-height:32px!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  font-size:.72rem!important;
  font-weight:900!important;
  letter-spacing:.02em!important;
}
html[data-aurea-screen="home-kpi"] body.imperium-v462 .a462-kpi-status.warn{
  color:#ffd8a2!important;
  border:1px solid rgba(239,192,111,.28)!important;
  background:rgba(239,192,111,.08)!important;
}
html[data-aurea-screen="home-kpi"] body.imperium-v462 .a462-kpi-status.danger{
  color:#ffd3dd!important;
  border:1px solid rgba(240,154,176,.30)!important;
  background:rgba(240,154,176,.08)!important;
}

/* SYSTEM HEALTH: preserve factual severity, improve hierarchy only */
html[data-aurea-screen="system-health"] body.imperium-v462 .a462-health-card{
  min-width:0!important;
}
html[data-aurea-screen="system-health"] body.imperium-v462 .a462-health-card .a462-health-value{
  font-weight:900!important;
  line-height:1.05!important;
}
html[data-aurea-screen="system-health"] body.imperium-v462 .a462-health-card[data-health="ok"] .a462-health-value{
  color:var(--a462-success)!important;
}
html[data-aurea-screen="system-health"] body.imperium-v462 .a462-health-card[data-health="warning"] .a462-health-value{
  color:var(--a462-warning)!important;
}

/* Final control center compaction */
html[data-aurea-screen="control-center"] body.imperium-v462 .a461-search-shell{
  padding-block:14px!important;
  row-gap:10px!important;
}
html[data-aurea-screen="control-center"] body.imperium-v462 .a461-search-meta{
  margin-top:2px!important;
}

/* Mobile */
@media(max-width:700px){
  html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter-group{
    gap:7px!important;
  }
  html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter{
    flex:1 1 calc(50% - 7px)!important;
  }
  html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-card{
    grid-template-columns:minmax(0,1fr)!important;
    padding:15px!important;
  }
  html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-wine-status{
    justify-self:start!important;
  }
  html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-card{
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
  }
  html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-severity{
    grid-column:1!important;
    justify-self:start!important;
  }
  html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-activity-body{
    grid-column:1!important;
  }
  html[data-aurea-screen="activity-center"] body.imperium-v462 .a462-open{
    grid-column:2!important;
    grid-row:1 / span 2!important;
    align-self:center!important;
  }
}
@media(max-width:390px){
  html[data-aurea-screen="wine-sales"] body.imperium-v462 .a462-filter{
    flex-basis:100%!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.imperium-v462 .a462-filter,
  body.imperium-v462 .a462-wine-card,
  body.imperium-v462 .a462-activity-card{transition:none!important}
}
