/* Typography */
.h1{
  font-size: 26px;
  margin: 0 0 6px;
  letter-spacing: .2px;
  font-family: var(--font-display);
}

.sub{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.eyebrow{
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: rgba(237,240,245,.65);
  font-weight: 600;
}

.page-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:16px;
}
.page-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.spacer{
  height:16px;
}

/* Grid */
.grid{
  display: grid;
  gap: var(--gap, 12px);
}
.grid-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 980px){
  .grid-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .grid-4,
  .grid-3,
  .grid-2{ grid-template-columns: 1fr; }
}

/* Card */
.card{
  background: linear-gradient(180deg, rgba(20,29,46,.82), rgba(15,22,36,.9));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius, 16px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card__hd{
  padding: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card__bd{ padding: 14px; }
.card__ft{
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* KPI */
.kpi{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.kpi__dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--brand);
  margin-top: 6px;
}
.kpi__meta b{
  display: block;
  font-size: 20px;
  color: var(--text);
  font-family: var(--font-display);
}
.kpi__meta span{
  color: var(--muted);
  font-size: 12px;
}
.trend{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color: var(--muted);
}
.trend--up{ color: #7bf3c3; }
.trend--down{ color: #ffb3b3; }

/* Badges */
.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12px;
}
.badge--ok{
  border-color: rgba(34,197,94,.25);
  background: rgba(34,197,94,.10);
  color: #b7f7cb;
}
.badge--warn{
  border-color: rgba(245,158,11,.25);
  background: rgba(245,158,11,.10);
  color: #ffe2b3;
}
.badge--bad{
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.10);
  color: #ffd0d0;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover{ background: rgba(255,255,255,.09); }
.btn:focus-visible{
  outline: 2px solid rgba(245,158,11,.45);
  outline-offset: 2px;
}

.btn--primary{
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: rgba(245,158,11,.45);
  color: #201402;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(245,158,11,.25);
}
.btn--ghost{ background: transparent; }
.btn--danger{
  background: linear-gradient(135deg, rgba(239,68,68,.95), rgba(248,113,113,.95));
  border-color: rgba(239,68,68,.45);
  color: #2b0c0c;
  font-weight: 700;
}

/* Table */
.table{
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  overflow: hidden;
  background: rgba(11,15,20,.4);
}
.table th,
.table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
  font-size: 13px;
}
.table th{
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}
.table tr:hover td{ background: rgba(255,255,255,.03); }
.table td a{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Toolbar + Fields */
.toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.field{
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(17,24,39,.55);
}
.field input,
.field select{
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
}
.field label{
  color: var(--muted);
  font-size: 12px;
}

.progress-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.progress-row{
  display:grid;
  grid-template-columns: 110px 1fr 46px;
  align-items:center;
  gap:10px;
  font-size:13px;
}
.progress{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
}
.progress span{
  display:block;
  height:100%;
  width: calc(var(--value, 0) * 1%);
  background: linear-gradient(90deg, rgba(34,211,238,.6), rgba(245,158,11,.9));
}

.bar-chart{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.bar-row{
  display:grid;
  grid-template-columns: 90px 1fr 46px;
  gap:10px;
  align-items:center;
  font-size:12px;
  color: var(--muted);
}
.bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
}
.bar span{
  display:block;
  height:100%;
  width: calc(var(--value, 0) * 1%);
  background: linear-gradient(90deg, rgba(245,158,11,.85), rgba(34,211,238,.7));
}

.action-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.list{
  margin:0;
  padding-left:18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Toast */
.toast-host{
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}
.toast{
  width: min(420px, calc(100vw - 28px));
  background: rgba(17,24,39,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.toast b{ display: block; margin-bottom: 4px; }
.toast p{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Modal */
.modal[hidden]{ display: none; }
.modal{
  position: fixed;
  inset: 0;
  z-index: 300;
}
.modal__panel{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, calc(100vw - 28px));
  max-height: min(80vh, 740px);
  overflow: auto;
  background-color: rgb(20, 29, 46);
}

/* Processor pill (single, final version) */
.proc-pill{
  --proc: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: color-mix(in srgb, var(--proc) 18%, transparent);
  color: var(--text);
}
.proc-pill .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--proc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--proc) 22%, transparent);
}

/* Select (used in table cells) */
.field-select{
  width: 100%;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline: none;
}




/* Dark dropdown (select + opened options) */
.field select,
.field-select{
  background: rgba(0,0,0,.22);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.10);
}

/* Opened list items (works in many browsers) */
.field select option,
.field-select option{
  background-color: #020a18;   /* your dark background */
  color: rgba(255,255,255,.92);
}

/* Optional: optgroup label styling */
.field select optgroup,
.field-select optgroup{
  background-color: #0b1220;
  color: rgba(255,255,255,.70);
}


/*  */
.badge--vendor{
  border-color: rgba(56,189,248,.25);
  background: rgba(56,189,248,.12);
  color: #cfeaff;
  font-weight: 600;
}
