.client-budget { margin: 0; padding: 22px; border: 1px solid var(--customer-border, #29322f); border-radius: 16px; background: var(--customer-surface, #111917); color: inherit; }
.client-budget-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.client-budget h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.client-budget-status { font-size: 12px; color: var(--customer-success, #73d8af); }
.client-budget-status[data-exhausted="true"], .client-budget [data-error="true"] { color: var(--customer-danger, #f09787); }
.client-budget-description, .client-budget-hint, .client-budget-period { color: var(--customer-muted, #9baba4); font-size: 13px; line-height: 1.6; }
.client-budget-description { margin: 8px 0 18px; }
.client-budget form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.client-budget label { display: flex; flex: 1 1 160px; flex-direction: column; gap: 7px; font-size: 12px; }
.client-budget input, .client-budget select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid var(--customer-border, #34413b); border-radius: 9px; color: inherit; background: var(--customer-field, #0c1310); font: inherit; font-size: 14px; box-sizing: border-box; }
.client-budget-actions { display: flex; flex: 0 0 100%; flex-wrap: wrap; gap: 8px; }
.client-budget label.client-budget-repeat { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 9px; min-height: 42px; cursor: pointer; }
.client-budget .client-budget-repeat input { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; flex: 0 0 18px; accent-color: var(--customer-success, #73d8af); cursor: pointer; }
.client-budget button { min-height: 42px; padding: 9px 15px; border: 1px solid #4a9e7c; border-radius: 9px; background: var(--customer-accent-soft, #173e2e); color: var(--customer-accent-strong, #baf1d6); font: inherit; font-size: 13px; cursor: pointer; }
.client-budget button[data-budget-disable] { border-color: var(--customer-border, #34413b); background: transparent; color: inherit; }
.client-budget :focus-visible { outline: 2px solid #73d8af; outline-offset: 3px; }
.client-budget :disabled { opacity: .6; cursor: wait; }
.client-budget [hidden] { display: none !important; }
.client-budget-totals { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 4px 0 12px; font-size: 13px; }
.client-budget-totals strong { margin-left: 6px; font-variant-numeric: tabular-nums; }
.client-budget progress { display: block; width: 100%; height: 6px; accent-color: var(--customer-success, #73d8af); }
.client-budget-period { margin: 8px 0 18px; }
.client-budget-hint { margin: 14px 0 0; }
.client-budget [data-budget-feedback] { margin: 12px 0 0; font-size: 13px; color: var(--customer-success, #73d8af); }
@media (max-width: 600px) { .client-budget { padding: 16px; } .client-budget label { flex-basis: 100%; } .client-budget-actions button { flex: 1; } .client-budget-totals { flex-direction: column; gap: 8px; } }

.client-budget-list { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.client-budget-card { min-width: 0; padding: 18px; border: 1px solid var(--customer-border, #29322f); border-radius: 12px; }
.client-budget-card h3 { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.client-budget-card-period { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--customer-muted, #9baba4); }
.client-budget-card .client-budget-period { margin: 8px 0 14px; }
.client-budget-scope { display: table; max-width: 100%; margin: 10px 0 0; padding: 4px 9px; border-radius: 6px; background: var(--customer-accent-soft, #173e2e); color: var(--customer-accent-strong, #baf1d6); font-size: 12px; overflow-wrap: anywhere; }
.client-budget-assignment { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:12px 0; font-size:12px; color:var(--customer-muted,#9baba4); }
.client-budget-assignment .client-budget-scope { margin:0; padding:6px 11px; font-size:14px; font-weight:650; }
.client-budget-card[data-created="true"] { border-color:var(--customer-accent,#4a9e7c); }
.client-budget-target { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 18px; font-size:14px; }
.client-budget-target strong { padding:6px 11px; border-radius:7px; background:var(--customer-accent-soft,#173e2e); color:var(--customer-accent-strong,#baf1d6); }
.client-budget-saved-heading { margin:28px 0 0; font-size:15px; line-height:1.5; }
.client-budget-saved-heading + .client-budget-list { margin-top:12px; }
.client-budget-dialog { position:fixed; inset:0; width:1000px; max-width:calc(100% - 32px); max-height:calc(100dvh - 32px); margin:auto; padding:0; box-sizing:border-box; overflow:auto; border:1px solid var(--customer-border,#29322f); border-radius:16px; background:var(--customer-surface,#151e24); color:var(--customer-text,#edf3f6); font:inherit; box-shadow:0 24px 80px #0007; }
.client-budget-dialog::backdrop { background:#050b10b3; backdrop-filter:blur(3px); }
.client-budget-dialog #budgets { display:block !important; margin:0; padding:24px; border:0; background:transparent; }
.client-budget-dialog .client-budget-heading { padding-right:34px; }
.client-budget-dialog-close { position:absolute; z-index:1; top:12px; right:12px; display:grid; place-items:center; width:36px; height:36px; padding:0; border:1px solid var(--customer-border,#34413b); border-radius:8px; background:var(--customer-field,#10171c); color:inherit; font:inherit; font-size:26px; line-height:1; cursor:pointer; }
.client-budget-dialog-close:focus-visible { outline:2px solid var(--customer-accent,#73d8af); outline-offset:3px; }
.client-budget-key-fixed select:disabled { opacity:1; cursor:default; }
body:has(.client-budget-dialog[open]) { overflow:hidden; }
@media (max-width:600px) { .client-budget-dialog { max-width:calc(100% - 16px); max-height:calc(100dvh - 16px); border-radius:12px; } .client-budget-dialog #budgets { padding:18px 16px; } }
.client-budget-card progress { margin-bottom: 14px; }
.client-budget-card[data-status="ended"] { opacity: .75; }
.client-budget-card[data-status="ended"] .client-budget-status { color: var(--customer-muted, #9baba4); }
.client-budget-card button { background: transparent; border-color: var(--customer-border, #34413b); color: inherit; }
.client-budget-card button[data-budget-delete] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 13px;
  border-color: var(--customer-border-strong, #34413b);
  border-radius: 8px;
}
.client-budget-card button[data-budget-delete] svg {
  flex: none;
  color: var(--customer-danger, #f09787);
}
.client-budget-card button[data-budget-delete]:hover:enabled {
  border-color: var(--customer-accent, #4a9e7c);
  background: var(--customer-accent-soft, #173e2e);
  color: var(--customer-text, #e4f1ea);
}
.client-budget-card button[data-budget-delete]:focus-visible {
  outline-color: var(--customer-accent, #73d8af);
}
.client-budget-card [data-budget-confirm] { color: var(--customer-danger, #f09787); }
.client-budget-confirm { margin-top: 14px; font-size: 13px; line-height: 1.6; }
.client-budget-empty { color: var(--customer-muted, #9baba4); font-size: 14px; margin: 24px 0 4px; }
.client-budget [data-hours-field] { display: grid; gap: 7px; flex: 0 1 180px; }
@media (width > 600px) {
  .client-budget [data-hours-field][hidden] { display: grid !important; visibility: hidden; }
}
.client-budget-hours-control {
  display: flex;
  justify-self: start;
  align-items: center;
  border: 1px solid var(--customer-border, #34413b);
  border-radius: 9px;
  background: var(--customer-field, #0c1310);
}
.client-budget-hours-control:focus-within {
  outline: 2px solid var(--customer-accent, #73d8af);
  outline-offset: 2px;
}
.client-budget .client-budget-hours-control input {
  flex: none;
  width: 5rem;
  min-height: 40px;
  border: 0;
  background: transparent;
}
.client-console.single-page.portal-layout .client-budget-hours-control > input:focus-visible {
  outline: none;
}
.client-budget-hours-control output {
  margin-inline-end: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--customer-accent-soft, #173e2e);
  color: var(--customer-accent-strong, #baf1d6);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) { .client-budget-card { padding: 14px; } .client-budget [data-hours-field] { flex-basis: 100%; } }
