/* ============================================================
   Tenant billing: the console (/admin/billing) and its Add Budget form
   (/admin/billing/budgets/new). Both pages are built from design-system
   components; this sheet only places them. Structure in @layer layout.

   Every rule hangs on the page's domain-concept class and reads --t-* / --c-*
   tokens only. See frontend/app/README.md.
   ============================================================ */

@layer layout {
  .admin-billing,
  .admin-billing-budget {
    display: grid;
    gap: var(--t-space-6);
    align-content: start;
  }

  /* Page intro: the heading on the left, the actions on the right. */
  .admin-billing .intro,
  .admin-billing-budget .intro {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--t-space-3);
  }

  .admin-billing .actions,
  .admin-billing-budget .actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--t-space-2);
    flex-shrink: 0;
    max-inline-size: 100%;
  }

  /* Budgets and alerts share a row on a desk, stacking on a phone. */
  .admin-billing .panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--t-space-4);
  }

  @container (max-width: 48rem) {
    .admin-billing .panel-grid { grid-template-columns: 1fr; }
  }

  .admin-billing .ack-form { margin: 0; }

  .admin-billing-budget .budget-form {
    display: grid;
    gap: var(--t-space-4);
  }
}
