/* ------------------------------------------------------------------ */
/* Cota Antigravity discreta no topo & Popover                        */
/* ------------------------------------------------------------------ */

.quota-pill {
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.quota-pill:hover {
  color: var(--text-soft);
  background: var(--panel);
  border-color: var(--line-strong);
}

.quota-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--muted);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.quota-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(131, 191, 157, 0.14);
}

.quota-dot.warn {
  background: #e5a54b;
  box-shadow: 0 0 0 2px rgba(229, 165, 75, 0.18);
}

.quota-dot.crit {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(224, 146, 130, 0.2);
}

.quota-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.quota-sep {
  color: var(--faint);
}

html[data-quota-mode="5h"] .quota-sep,
html[data-quota-mode="5h"] .quota-sec {
  display: none;
}

html[data-quota-mode="dot"] .quota-text {
  display: none;
}

html[data-quota-mode="dot"] .quota-pill {
  width: 30px;
  padding: 0;
  justify-content: center;
}

html[data-quota-mode="hidden"] #quota-wrap {
  display: none !important;
}

.quota-pop {
  width: 320px;
  padding: 12px 13px;
}

.quota-pop .pop-head {
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.quota-pop-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.quota-pop-actions .icon-btn {
  width: 26px;
  height: 26px;
}

.quota-pop-actions .icon-btn.spinning svg {
  animation: quota-spin 0.8s linear infinite;
}

@keyframes quota-spin {
  to { transform: rotate(360deg); }
}

.quota-pop-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quota-loading {
  padding: 12px 4px;
  font-size: 0.76rem;
  color: var(--muted);
  text-align: center;
}

.quota-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
}

.quota-group-title {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.quota-bucket {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quota-bucket-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
}

.quota-bucket-name {
  color: var(--text-soft);
}

.quota-bucket-val {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text);
}

.quota-bucket-val.ok { color: var(--green); }
.quota-bucket-val.warn { color: #e5a54b; }
.quota-bucket-val.crit { color: var(--red); }
.quota-bucket-val.muted { color: var(--faint); font-weight: 400; font-size: 0.7rem; }

.quota-track {
  height: 4px;
  border-radius: 99px;
  background: var(--panel-soft);
  overflow: hidden;
}

.quota-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--green);
  transition: width 0.25s ease;
}

.quota-fill.warn { background: #e5a54b; }
.quota-fill.crit { background: var(--red); }
.quota-fill.muted { background: var(--faint); opacity: 0.45; }

.quota-bucket-sub {
  font-size: 0.66rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.quota-pop-foot {
  margin-top: 9px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

@media (max-width: 680px) {
  .quota-pill {
    padding: 0 7px;
    font-size: 0.68rem;
    gap: 5px;
  }

  .quota-sep,
  .quota-sec {
    display: none;
  }

  .quota-pop {
    width: min(310px, calc(100vw - 20px));
    right: -76px;
  }
}

@media (max-width: 420px) {
  .top-actions {
    gap: 3px;
  }

  .top-actions .icon-btn {
    width: 28px;
    height: 28px;
  }
}

