/* Generated by scripts/css-bundle.mjs — do not edit by hand. */
/* /public/css/routes/surfaces/tools-budgeting-surface.css */
@layer routes {
/* ==========================================================================
   tools-budgeting-surface.css
   --------------------------------------------------------------------------
   Purpose
   - Route-scoped surface for body[data-spw-surface="tools-budgeting"].
   - Present budgeting as a compact working dashboard without moving shared
     card, panel, or shell ownership out of the system CSS files.
   - Keep dashboard, panel, summary, row, and status semantics inspectable.

   Debugging notes
   - Use route scope first, then component nouns.
   - Promote reusable table/card/control behavior to component-family CSS.
   ========================================================================== */

gap: 1.5rem;
    }

    & .budget-panel {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      padding: 1.25rem;
      border: 1px solid color-mix(in srgb, var(--line, rgba(18, 52, 50, 0.16)) 100%, transparent);
      border-radius: 1rem;
      background:
        linear-gradient(180deg, color-mix(in srgb, var(--card-bg, rgba(255, 255, 255, 0.9)) 92%, white 8%), color-mix(in srgb, var(--matte-surface, rgba(245, 242, 236, 0.96)) 94%, transparent 6%));
      box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    }

    & .budget-form {
      display: flex;
      flex-direction: column;
      gap: 0.875rem;
    }

    & .budget-input-row,
    & .budget-action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
    }

    & .budget-input {
      min-width: 0;
      flex: 1 1 14rem;
      padding: 0.8rem 0.9rem;
      border: 1px solid color-mix(in srgb, var(--line, rgba(18, 52, 50, 0.16)) 100%, transparent);
      border-radius: 0.85rem;
      background: color-mix(in srgb, var(--page-bg, #f8f7f5) 92%, white 8%);
      color: var(--ink, #122420);
      font: inherit;

      &[type="number"] {
        flex-basis: 10rem;
        font-variant-numeric: tabular-nums;
      }

      &:focus-visible {
        outline: 2px solid color-mix(in srgb, var(--op-frame-color, #1a9999) 55%, transparent);
        outline-offset: 2px;
      }
    }

    & .budget-button,
    & .budget-reset {
      appearance: none;
      border: 1px solid color-mix(in srgb, var(--line, rgba(18, 52, 50, 0.16)) 100%, transparent);
      border-radius: 999px;
      background: color-mix(in srgb, var(--page-bg, #f8f7f5) 82%, white 18%);
      color: var(--ink, #122420);
      cursor: pointer;
      font: inherit;
      padding: 0.72rem 1rem;
      transition:
        transform 140ms ease,
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 180ms ease;

      &:is(:hover, :focus-visible) {
        transform: translateY(-1px);
        border-color: color-mix(in srgb, var(--op-frame-color, #1a9999) 42%, transparent);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
      }
    }

    & .budget-button {
      flex: 1 1 12rem;

      &[data-budget-add="income"] {
        border-color: color-mix(in srgb, var(--op-topic-color, #2f8f6b) 38%, transparent);
        background: color-mix(in srgb, var(--op-topic-color, #2f8f6b) 10%, white 90%);
      }

      &[data-budget-add="expense"] {
        border-color: color-mix(in srgb, var(--op-object-color, #bd7f23) 38%, transparent);
        background: color-mix(in srgb, var(--op-object-color, #bd7f23) 10%, white 90%);
      }
    }

    & .budget-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    & .budget-item,
    & .budget-empty {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.75rem;
      padding: 0.95rem 1rem;
      border-radius: 0.9rem;
      background: color-mix(in srgb, var(--page-bg, #f8f7f5) 86%, white 14%);
      border-left: 3px solid color-mix(in srgb, var(--line, rgba(18, 52, 50, 0.16)) 100%, transparent);
    }

    & .budget-item {
      &[data-type="income"] {
        border-left-color: var(--op-topic-color, #2f8f6b);
      }

      &[data-type="expense"] {
        border-left-color: var(--op-object-color, #bd7f23);
      }
    }

    & .budget-empty {
      justify-content: center;
      color: var(--ink-soft, rgba(18, 36, 32, 0.68));
      text-align: center;
    }

    & .budget-item__content {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;

      & strong {
        font-variant-numeric: tabular-nums;
      }
    }

    & .budget-item__amount {
      font-variant-numeric: tabular-nums;
      color: var(--ink-soft, rgba(18, 36, 32, 0.68));
    }

    & .budget-item__remove {
      appearance: none;
      border: 0;
      background: transparent;
      color: var(--ink-soft, rgba(18, 36, 32, 0.68));
      cursor: pointer;
      font: inherit;
      font-size: 1.2rem;
      line-height: 1;
      padding: 0.1rem 0.25rem;

      &:is(:hover, :focus-visible) {
        color: var(--ink, #122420);
      }
    }

    & .budget-gauge {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    & .budget-total-label,
    & .budget-milestones {
      color: var(--ink-soft, rgba(18, 36, 32, 0.68));
    }

    & .budget-total {
      font-size: clamp(2.4rem, 6vw, 3.5rem);
      font-weight: 600;
      color: var(--op-frame-color, #1a9999);
      font-variant-numeric: tabular-nums;
    }

    & .budget-message {
      margin: 0;
      min-height: 2.75rem;
    }

    & .budget-progress {
      position: relative;
      overflow: hidden;
      height: 0.9rem;
      border-radius: 999px;
      background: color-mix(in srgb, var(--line, rgba(18, 52, 50, 0.16)) 32%, white 68%);
    }

    & .budget-progress__bar {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--op-topic-color, #2f8f6b), var(--op-frame-color, #1a9999), var(--op-probe-color, #6b4bb6));
      transition: width 280ms ease;
    }

    & .budget-milestones {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.75rem;
      font-size: 0.9rem;
    }

    & .budget-tier-list {
      display: grid;
      gap: 0.85rem;
    }

    & .budget-tier-card {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      padding: 1rem;
      border-radius: 0.95rem;
      border: 1px solid color-mix(in srgb, var(--line, rgba(18, 52, 50, 0.16)) 100%, transparent);
      background: color-mix(in srgb, var(--card-bg, rgba(255, 255, 255, 0.9)) 88%, white 12%);
      color: inherit;
      text-decoration: none;
      opacity: 0.72;
      transition:
        opacity 160ms ease,
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 180ms ease;

      &:is(:hover, :focus-visible) {
        transform: translateY(-1px);
        opacity: 1;
      }

      &[data-state~="unlocked"] {
        opacity: 1;
        border-color: color-mix(in srgb, var(--op-frame-color, #1a9999) 42%, transparent);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
      }

      & p {
        margin: 0;
      }
    }

    & .budget-links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
    }
  }
}

@media (min-width: 64rem) {
  :where(body[data-spw-surface="tools-budgeting"]) .budget-dashboard {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
  }
}

@media (max-width: 40rem) {
  :where(body[data-spw-surface="tools-budgeting"]) .budget-panel {
    padding: 1rem;
  }

  :where(body[data-spw-surface="tools-budgeting"]) .budget-milestones {
    grid-template-columns: 1fr;
  }
}
}
