/*
 * GigMint UI — redesign foundation ("Clear Ledger, Warm Hands").
 * Every rule is scoped under the .gm root class so nothing leaks into legacy pages.
 * Loaded only by resources/views/layouts/gm.blade.php. Components: resources/views/components/gm/.
 */

/* ---------- Tokens ---------- */
.gm {
  --gm-paper: #FAF7F4;
  --gm-surface: #FFFFFF;
  --gm-sunken: #F4EFEA;
  --gm-line: #E8E0D8;
  --gm-line-strong: #D9CEC4;

  --gm-ink: #1C1612;
  --gm-ink-2: #4B4038;
  --gm-muted: #776A60;

  --gm-coral: #F16334;
  --gm-coral-ink: #C2410C;
  --gm-coral-ink-hover: #9A3412;
  --gm-coral-wash: #FDEDE5;

  --gm-teal: #0F766E;
  --gm-teal-hover: #0B5D57;
  --gm-teal-bright: #14B8A6;
  --gm-teal-wash: #E2F3F0;

  --gm-amber: #B45309;
  --gm-amber-wash: #FEF1DE;
  --gm-red: #B42318;
  --gm-red-wash: #FDECEA;
  --gm-blue: #1D4ED8;
  --gm-blue-wash: #E8EEFD;

  --gm-night: #1C1612;
  --gm-night-text: #F6F0EA;
  --gm-night-muted: #B8AAA0;
  --gm-night-line: #3A302A;

  --gm-font-display: "Bricolage Grotesque", Georgia, serif;
  --gm-font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gm-radius-card: 16px;
  --gm-radius-control: 12px;
  --gm-radius-nav: 10px;
  --gm-radius-pill: 999px;

  --gm-shadow-raised: 0 1px 2px rgba(28, 22, 18, .06), 0 12px 32px -16px rgba(28, 22, 18, .18);
  --gm-focus: 0 0 0 3px rgba(194, 65, 12, .28);

  background: var(--gm-paper);
  color: var(--gm-ink);
  font-family: var(--gm-font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.gm { margin: 0; min-height: 100vh; }
.gm *, .gm *::before, .gm *::after { box-sizing: border-box; }
.gm a { color: var(--gm-coral-ink); }
.gm a:hover { color: var(--gm-coral-ink-hover); }
.gm img, .gm svg { max-width: 100%; }
.gm button, .gm input, .gm select, .gm textarea { font-family: inherit; }
.gm :focus-visible { outline: none; box-shadow: var(--gm-focus); }
.gm .gm-svg { display: inline-block; flex: none; vertical-align: middle; }

/* ---------- Type ---------- */
.gm h1, .gm h2, .gm h3, .gm h4 { margin: 0; font-family: var(--gm-font-display); font-weight: 600; line-height: 1.15; color: var(--gm-ink); }
.gm .gm-d56 { font-family: var(--gm-font-display); font-weight: 700; font-size: 56px; line-height: 1.05; letter-spacing: -0.03em; }
.gm .gm-d40 { font-family: var(--gm-font-display); font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; }
.gm .gm-d30 { font-family: var(--gm-font-display); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
.gm .gm-d22 { font-family: var(--gm-font-display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.gm .gm-t18 { font-size: 18px; }
.gm .gm-t14 { font-size: 14px; }
.gm .gm-caption { font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-ink-2 { color: var(--gm-ink-2); }
.gm .gm-muted { color: var(--gm-muted); }
.gm .gm-num { font-variant-numeric: tabular-nums; }
.gm .gm-money { font-variant-numeric: tabular-nums; color: var(--gm-teal); font-weight: 600; }
.gm .gm-money--lg { font-family: var(--gm-font-display); font-size: 30px; line-height: 1.1; }
.gm .gm-link { color: var(--gm-coral-ink); font-weight: 600; text-decoration: none; }
.gm .gm-link:hover { color: var(--gm-coral-ink-hover); text-decoration: underline; }
.gm .gm-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Logo ---------- */
.gm .gm-logo { display: inline-flex; align-items: baseline; text-decoration: none; color: var(--gm-ink); font-family: var(--gm-font-display); font-weight: 700; font-size: 24px; line-height: 1; letter-spacing: -0.02em; }
.gm .gm-logo:hover { color: var(--gm-ink); }
.gm .gm-logo__dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gm-coral); margin-left: 3px; }
.gm .gm-logo--sm { font-size: 22px; }
.gm .gm-logo--sm .gm-logo__dot { width: 8px; height: 8px; }

/* ---------- Buttons ---------- */
.gm .gm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--gm-radius-control); border: 1px solid transparent;
  font: 600 15px/1 var(--gm-font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.gm .gm-btn:disabled, .gm .gm-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.gm .gm-btn--compact { height: 40px; padding: 0 16px; }
.gm .gm-btn--block { display: flex; width: 100%; }
.gm .gm-btn--primary { background: var(--gm-coral-ink); color: #FFFFFF; }
.gm .gm-btn--primary:hover { background: var(--gm-coral-ink-hover); color: #FFFFFF; }
.gm .gm-btn--secondary { background: var(--gm-surface); border-color: var(--gm-line-strong); color: var(--gm-ink); }
.gm .gm-btn--secondary:hover { background: var(--gm-sunken); color: var(--gm-ink); }
.gm .gm-btn--quiet { background: transparent; color: var(--gm-ink-2); padding: 0 14px; }
.gm .gm-btn--quiet:hover { background: var(--gm-sunken); color: var(--gm-ink); }
.gm .gm-btn--money { background: var(--gm-teal); color: #FFFFFF; }
.gm .gm-btn--money:hover { background: var(--gm-teal-hover); color: #FFFFFF; }
.gm .gm-btn--danger { background: var(--gm-surface); border-color: var(--gm-line-strong); color: var(--gm-red); }
.gm .gm-btn--danger:hover { background: var(--gm-red-wash); color: var(--gm-red); }

.gm .gm-icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; padding: 0; border-radius: var(--gm-radius-control);
  border: 1px solid var(--gm-line); background: var(--gm-surface); color: var(--gm-ink-2);
  text-decoration: none; cursor: pointer;
}
.gm .gm-icon-btn:hover { background: var(--gm-sunken); color: var(--gm-ink); }
.gm .gm-icon-btn__badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--gm-radius-pill); background: var(--gm-coral-ink); color: #FFFFFF;
  font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; border: 2px solid var(--gm-paper);
  font-variant-numeric: tabular-nums;
}

/* ---------- Cards ---------- */
.gm .gm-card { background: var(--gm-surface); border: 1px solid var(--gm-line); border-radius: var(--gm-radius-card); padding: 24px; }
.gm .gm-card--flush { padding: 0; overflow: hidden; }
.gm .gm-card--tight { padding: 20px; }
.gm .gm-card--raised, .gm .gm-raised { box-shadow: var(--gm-shadow-raised); }
.gm .gm-card--link { display: block; color: var(--gm-ink); text-decoration: none; transition: border-color .15s; }
.gm .gm-card--link:hover { border-color: var(--gm-line-strong); color: var(--gm-ink); }
.gm .gm-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; }
.gm .gm-card__row { border-top: 1px solid var(--gm-line); padding: 18px 24px; }

/* ---------- Chips / pills ---------- */
.gm .gm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--gm-radius-pill);
  font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--gm-sunken); color: var(--gm-ink-2);
}
.gm .gm-chip--amber { background: var(--gm-amber-wash); color: var(--gm-amber); }
.gm .gm-chip--blue { background: var(--gm-blue-wash); color: var(--gm-blue); }
.gm .gm-chip--teal { background: var(--gm-teal-wash); color: var(--gm-teal); }
.gm .gm-chip--red { background: var(--gm-red-wash); color: var(--gm-red); }
.gm .gm-chip--coral { background: var(--gm-coral-wash); color: var(--gm-coral-ink); }
.gm .gm-chip--neutral { background: var(--gm-sunken); color: var(--gm-ink-2); }
.gm .gm-chip--outline { background: var(--gm-surface); border: 1px solid var(--gm-line); color: var(--gm-ink-2); padding: 2px 10px; }
.gm .gm-chip--violet { background: #EDE3F7; color: #5B2A86; }

.gm .gm-badge {
  display: inline-block; min-width: 20px; padding: 1px 8px; border-radius: var(--gm-radius-pill);
  font-size: 12px; font-weight: 600; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums;
  background: var(--gm-sunken); color: var(--gm-ink-2);
}
.gm .gm-badge--alert { background: var(--gm-coral-ink); color: #FFFFFF; }

/* ---------- Avatars ---------- */
.gm .gm-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%;
  width: 36px; height: 36px; font-family: var(--gm-font-body); font-weight: 600; font-size: 13.5px; line-height: 1;
  user-select: none;
}
.gm .gm-avatar--28 { width: 28px; height: 28px; font-size: 11px; }
.gm .gm-avatar--36 { width: 36px; height: 36px; font-size: 13.5px; }
.gm .gm-avatar--48 { width: 48px; height: 48px; font-size: 16px; }
.gm .gm-avatar--72 { width: 72px; height: 72px; font-size: 24px; }
.gm .gm-tint-1 { background: #FDE3D6; color: #9A3412; }
.gm .gm-tint-2 { background: #DDF1EC; color: #0F5F59; }
.gm .gm-tint-3 { background: #E3E8FB; color: #1E3A8A; }
.gm .gm-tint-4 { background: #F6E7C8; color: #7C4A03; }
.gm .gm-tint-5 { background: #EDE3F7; color: #5B2A86; }
.gm .gm-tint-6 { background: #E5E7EB; color: #374151; }

/* Image slot (no photos): tint block + centred icon + caps label */
.gm .gm-thumb { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 12px; min-height: 104px; }
.gm .gm-thumb__label { position: absolute; left: 10px; top: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Forms ---------- */
.gm .gm-field { display: flex; flex-direction: column; gap: 6px; }
.gm .gm-label { font-size: 13.5px; font-weight: 600; color: var(--gm-ink); }
.gm .gm-help { font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-error { font-size: 12.5px; font-weight: 600; color: var(--gm-red); }
.gm .gm-input, .gm .gm-select, .gm .gm-textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--gm-radius-control);
  border: 1px solid var(--gm-line-strong); background: var(--gm-surface); color: var(--gm-ink);
  font: 400 15px/1.4 var(--gm-font-body); appearance: none; -webkit-appearance: none;
}
.gm .gm-textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.gm .gm-select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23776A60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.gm .gm-input::placeholder, .gm .gm-textarea::placeholder { color: var(--gm-muted); }
.gm .gm-input:focus, .gm .gm-select:focus, .gm .gm-textarea:focus { outline: none; border-color: var(--gm-coral-ink); box-shadow: inset 0 0 0 1px var(--gm-coral-ink); }
.gm .gm-input[aria-invalid="true"], .gm .gm-input.is-invalid { border-color: var(--gm-red); }
.gm .gm-input--compact { height: 40px; font-size: 14px; }

.gm .gm-search { position: relative; display: block; width: 280px; max-width: 100%; }
.gm .gm-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gm-muted); pointer-events: none; }
.gm .gm-search .gm-input { height: 40px; padding-left: 38px; font-size: 14px; }
.gm .gm-search--pill .gm-input { border-radius: var(--gm-radius-pill); border-color: var(--gm-line); background: var(--gm-sunken); }

.gm .gm-segmented { display: flex; gap: 4px; padding: 4px; background: var(--gm-sunken); border-radius: var(--gm-radius-control); }
.gm .gm-segmented__item {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 12px;
  border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--gm-muted);
  font: 600 14px/1 var(--gm-font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.gm .gm-segmented__item:hover { color: var(--gm-ink); }
.gm .gm-segmented__item.is-selected { background: var(--gm-surface); border-color: var(--gm-line); color: var(--gm-ink); }

/* ---------- Tabs ---------- */
.gm .gm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gm-line); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.gm .gm-tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--gm-ink-2);
  font: 500 14.5px/1 var(--gm-font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.gm .gm-tab:hover { color: var(--gm-ink); }
.gm .gm-tab.is-active, .gm .gm-tab[aria-selected="true"], .gm .gm-tab[aria-current="page"] { border-bottom-color: var(--gm-coral-ink); color: var(--gm-ink); font-weight: 600; }
.gm .gm-tab.is-active .gm-badge, .gm .gm-tab[aria-selected="true"] .gm-badge, .gm .gm-tab[aria-current="page"] .gm-badge { background: var(--gm-coral-wash); color: var(--gm-coral-ink); }

/* ---------- Table ---------- */
.gm .gm-table-wrap { overflow-x: auto; }
.gm .gm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.gm .gm-table th {
  text-align: left; padding: 10px 12px; background: var(--gm-paper);
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); white-space: nowrap;
}
.gm .gm-table td { padding: 16px 12px; border-top: 1px solid var(--gm-line); vertical-align: middle; }
.gm .gm-table th:first-child, .gm .gm-table td:first-child { padding-left: 20px; }
.gm .gm-table th:last-child, .gm .gm-table td:last-child { padding-right: 20px; }
.gm .gm-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.gm .gm-table tr.is-highlight td { background: var(--gm-coral-wash); }
.gm .gm-table tbody tr:hover td { background: #FDFBF9; }
.gm .gm-table__title { font-size: 14.5px; font-weight: 600; color: var(--gm-ink); text-decoration: none; line-height: 1.35; }
.gm .gm-table__title:hover { color: var(--gm-coral-ink); }
.gm .gm-table__meta { display: block; font-size: 12.5px; color: var(--gm-muted); font-variant-numeric: tabular-nums; }

/* ---------- Money pill + Escrow track ---------- */
.gm .gm-money-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--gm-radius-pill);
  background: var(--gm-teal-wash); color: var(--gm-teal); font-size: 12.5px; font-weight: 600; line-height: 1.4;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.gm .gm-money-pill--red { background: var(--gm-red-wash); color: var(--gm-red); }

.gm .gm-escrow { display: flex; flex-direction: column; gap: 18px; }
.gm .gm-escrow__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gm .gm-escrow__title { font-size: 13.5px; font-weight: 600; color: var(--gm-ink); }
.gm .gm-escrow__steps { display: flex; align-items: flex-start; margin: 0; padding: 0; list-style: none; }
.gm .gm-escrow__step { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.gm .gm-escrow__step::before, .gm .gm-escrow__step::after { content: ""; position: absolute; top: 7px; width: 50%; height: 2px; background: var(--gm-line); }
.gm .gm-escrow__step::before { left: 0; }
.gm .gm-escrow__step::after { right: 0; }
.gm .gm-escrow__step:first-child::before, .gm .gm-escrow__step:last-child::after { background: transparent; }
.gm .gm-escrow__step.is-l-done::before, .gm .gm-escrow__step.is-r-done::after { background: var(--gm-teal); }
.gm .gm-escrow__step.is-disputed:not(:first-child)::before { background: var(--gm-red); }
.gm .gm-escrow__node {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; background: var(--gm-surface); border: 2px solid var(--gm-line-strong); color: #FFFFFF;
}
.gm .gm-escrow__step.is-done .gm-escrow__node { background: var(--gm-teal); border: 0; }
.gm .gm-escrow__step.is-current .gm-escrow__node { background: var(--gm-teal-bright); border: 4px solid var(--gm-teal); }
.gm .gm-escrow__step.is-disputed .gm-escrow__node { background: var(--gm-red-wash); border: 4px solid var(--gm-red); }
.gm .gm-escrow__label { font-size: 12.5px; line-height: 1.3; color: var(--gm-muted); }
.gm .gm-escrow__step.is-done .gm-escrow__label { color: var(--gm-ink); }
.gm .gm-escrow__step.is-current .gm-escrow__label { color: var(--gm-ink); font-weight: 600; }
.gm .gm-escrow__step.is-disputed .gm-escrow__label { color: var(--gm-red); font-weight: 600; }
/* Checkout: the step that starts once you pay */
.gm .gm-escrow__step.is-next .gm-escrow__node { border: 2px dashed var(--gm-teal); background: var(--gm-surface); }
.gm .gm-escrow__step.is-next .gm-escrow__label { color: var(--gm-ink); font-weight: 600; }

/* Compact: 96px of dots + connectors, text status beside it */
.gm .gm-escrow--compact { flex-direction: row; align-items: center; gap: 12px; }
.gm .gm-escrow--compact .gm-escrow__steps { flex: none; width: 96px; align-items: center; }
.gm .gm-escrow--compact .gm-escrow__step { flex: 1 1 0; flex-direction: row; gap: 0; }
.gm .gm-escrow--compact .gm-escrow__step:first-child { flex: none; }
.gm .gm-escrow--compact .gm-escrow__step::after { display: none; }
.gm .gm-escrow--compact .gm-escrow__step::before { position: static; flex: 1 1 0; width: auto; }
.gm .gm-escrow--compact .gm-escrow__step:first-child::before { display: none; }
.gm .gm-escrow--compact .gm-escrow__node { width: 12px; height: 12px; }
.gm .gm-escrow--compact .gm-escrow__node .gm-svg { display: none; }
.gm .gm-escrow--compact .gm-escrow__step.is-current .gm-escrow__node,
.gm .gm-escrow--compact .gm-escrow__step.is-disputed .gm-escrow__node { border-width: 3px; }
.gm .gm-escrow__status { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.gm .gm-escrow__status-text { font-size: 13.5px; font-weight: 600; }
.gm .gm-escrow__status-meta { font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-tone-amber { color: var(--gm-amber); }
.gm .gm-tone-blue { color: var(--gm-blue); }
.gm .gm-tone-teal { color: var(--gm-teal); }
.gm .gm-tone-red { color: var(--gm-red); }
.gm .gm-tone-coral { color: var(--gm-coral-ink); }
.gm .gm-tone-neutral { color: var(--gm-ink-2); }

/* ---------- "Needs you" strip ---------- */
.gm .gm-needs-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gm .gm-needs {
  display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--gm-radius-card);
  background: var(--gm-surface); border: 1px solid var(--gm-line); color: var(--gm-ink); text-decoration: none;
  transition: border-color .15s;
}
.gm .gm-needs:hover { border-color: var(--gm-line-strong); color: var(--gm-ink); }
.gm .gm-needs__icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; }
.gm .gm-needs__icon--amber { background: var(--gm-amber-wash); color: var(--gm-amber); }
.gm .gm-needs__icon--blue { background: var(--gm-blue-wash); color: var(--gm-blue); }
.gm .gm-needs__icon--teal { background: var(--gm-teal-wash); color: var(--gm-teal); }
.gm .gm-needs__icon--coral { background: var(--gm-coral-wash); color: var(--gm-coral-ink); }
.gm .gm-needs__icon--red { background: var(--gm-red-wash); color: var(--gm-red); }
.gm .gm-needs__count { font-family: var(--gm-font-display); font-weight: 600; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.gm .gm-needs__count--money { color: var(--gm-teal); }
.gm .gm-needs__label { font-size: 14px; color: var(--gm-ink-2); }
.gm .gm-needs__link { font-size: 14px; font-weight: 600; color: var(--gm-coral-ink); }

/* ---------- App shell ---------- */
.gm .gm-shell { display: flex; align-items: stretch; min-height: 100vh; background: var(--gm-paper); }
.gm .gm-sidebar {
  flex: 0 0 256px; width: 256px; display: flex; flex-direction: column; gap: 20px; padding: 20px 16px;
  background: var(--gm-surface); border-right: 1px solid var(--gm-line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.gm .gm-sidebar__logo { padding: 6px 8px 0; }
.gm .gm-sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.gm .gm-nav-item {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--gm-radius-nav);
  color: var(--gm-ink-2); font-size: 14.5px; font-weight: 500; text-decoration: none;
}
.gm .gm-nav-item:hover { background: var(--gm-sunken); color: var(--gm-ink); }
.gm .gm-nav-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm .gm-nav-item.is-active, .gm .gm-nav-item[aria-current="page"] { background: var(--gm-coral-wash); color: var(--gm-coral-ink); font-weight: 600; }
.gm .gm-sidebar__user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--gm-line); }
.gm .gm-sidebar__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.gm .gm-sidebar__name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm .gm-sidebar__meta { font-size: 12.5px; color: var(--gm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm .gm-logout { margin: 0; }
.gm .gm-logout__btn { border: 0; background: transparent; padding: 4px 2px; font: 600 13px/1 var(--gm-font-body); color: var(--gm-ink-2); cursor: pointer; }
.gm .gm-logout__btn:hover { color: var(--gm-ink); text-decoration: underline; }
.gm .gm-sidebar__close { display: none; }

.gm .gm-main { flex: 999 1 560px; min-width: 0; padding: 28px 40px 48px; }
.gm .gm-main__inner { max-width: 1180px; display: flex; flex-direction: column; gap: 32px; }
.gm .gm-topbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gm .gm-topbar__titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gm .gm-topbar__eyebrow { font-size: 13.5px; color: var(--gm-muted); }
.gm .gm-topbar__title { font-family: var(--gm-font-display); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; }
.gm .gm-topbar__actions { display: flex; align-items: center; gap: 10px; }

/* Phone-only chrome (hidden on desktop) */
.gm .gm-mobilebar, .gm .gm-tabbar, .gm .gm-shell__scrim { display: none; }
.gm .gm-mobilebar {
  position: sticky; top: 0; z-index: 30; height: 60px; padding: 0 16px; align-items: center; gap: 8px;
  background: var(--gm-paper); border-bottom: 1px solid var(--gm-line);
}
.gm .gm-mobilebar .gm-logo { margin-right: auto; }
.gm .gm-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 64px;
  background: var(--gm-surface); border-top: 1px solid var(--gm-line); padding-bottom: env(safe-area-inset-bottom);
}
.gm .gm-tabbar__item {
  position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; color: var(--gm-muted); text-decoration: none;
}
.gm .gm-tabbar__item.is-active, .gm .gm-tabbar__item[aria-current="page"] { color: var(--gm-coral-ink); }
.gm .gm-tabbar__badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--gm-radius-pill); background: var(--gm-coral-ink); color: #FFFFFF;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}

/* ---------- Public header ---------- */
.gm .gm-header { position: relative; height: 72px; background: var(--gm-paper); border-bottom: 1px solid var(--gm-line); }
.gm .gm-header__inner { max-width: 1200px; height: 100%; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; gap: 40px; }
.gm .gm-header__nav { display: flex; gap: 28px; }
.gm .gm-header__link { color: var(--gm-ink-2); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.gm .gm-header__link:hover { color: var(--gm-ink); }
.gm .gm-header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.gm .gm-header .gm-logo, .gm .gm-header__right > .gm-btn { flex: none; }
.gm .gm-header__search { flex: 0 1 280px; min-width: 140px; }
.gm .gm-header__signin { font-weight: 600; padding: 0 6px; }
.gm .gm-header__menu { display: none; }
.gm .gm-header__drawer { display: none; }

/* ---------- Footer ---------- */
.gm .gm-footer { background: var(--gm-night); color: var(--gm-night-text); }
.gm .gm-footer__inner { max-width: 1200px; margin: 0 auto; padding: 72px 32px 32px; display: flex; flex-direction: column; gap: 48px; }
.gm .gm-footer__top { display: flex; flex-wrap: wrap; gap: 48px; }
.gm .gm-footer__brand { flex: 1 1 260px; display: flex; flex-direction: column; gap: 14px; }
.gm .gm-footer .gm-logo, .gm .gm-footer .gm-logo:hover { color: var(--gm-night-text); font-size: 24px; text-decoration: none; }
.gm .gm-footer__blurb { margin: 0; max-width: 280px; color: var(--gm-night-muted); font-size: 14px; }
.gm .gm-footer__cols { flex: 3 1 640px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 32px; }
.gm .gm-footer__col { display: flex; flex-direction: column; gap: 12px; }
.gm .gm-footer__heading { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-night-muted); }
.gm .gm-footer a { color: var(--gm-night-text); text-decoration: none; font-size: 14.5px; }
.gm .gm-footer a:hover { color: #FFFFFF; text-decoration: underline; }
.gm .gm-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--gm-night-line); font-size: 13.5px; color: var(--gm-night-muted); }
.gm .gm-footer__legal { display: flex; gap: 24px; flex-wrap: wrap; }
.gm .gm-footer__legal a { color: var(--gm-night-muted); font-size: 13.5px; }

/* ---------- Layout helpers ---------- */
.gm .gm-stack { display: flex; flex-direction: column; gap: 16px; }
.gm .gm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.gm .gm-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gm .gm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gm .gm-container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

@media (max-width: 1240px) {
  .gm .gm-header__inner { gap: 24px; }
  .gm .gm-header__nav { gap: 20px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .gm .gm-main { padding: 24px 28px 40px; }
  .gm .gm-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .gm .gm-header__search { display: none; }
}

/* ---------- Phone (~768px) ---------- */
@media (max-width: 768px) {
  .gm .gm-shell { display: block; }
  .gm .gm-mobilebar { display: flex; }
  .gm .gm-tabbar { display: flex; }
  .gm .gm-main { padding: 20px 16px 96px; }
  .gm .gm-main__inner { gap: 24px; }
  .gm .gm-topbar__actions { display: none; }
  .gm .gm-topbar__title { font-size: 26px; }

  /* Sidebar becomes an off-canvas drawer opened from the mobile bar's menu button */
  .gm .gm-sidebar {
    position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; height: auto; width: 288px; max-width: 86vw;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--gm-shadow-raised);
  }
  .gm .gm-shell.is-nav-open .gm-sidebar { transform: none; }
  .gm .gm-shell.is-nav-open .gm-shell__scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(28, 22, 18, .35); border: 0; padding: 0; }
  .gm .gm-sidebar__close { display: inline-flex; position: absolute; top: 14px; right: 12px; }

  .gm .gm-needs-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm .gm-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .gm .gm-needs__count { font-size: 26px; }

  .gm .gm-header__inner { padding: 0 16px; gap: 16px; }
  .gm .gm-header__nav, .gm .gm-header__search, .gm .gm-header__signin, .gm .gm-header__post { display: none; }
  .gm .gm-header__menu { display: inline-flex; }
  .gm .gm-header.is-open .gm-header__drawer {
    display: flex; flex-direction: column; gap: 4px; position: absolute; z-index: 40; top: 72px; left: 0; right: 0;
    padding: 12px 16px 20px; background: var(--gm-paper); border-bottom: 1px solid var(--gm-line); box-shadow: var(--gm-shadow-raised);
  }
  .gm .gm-header__drawer .gm-header__link { display: block; padding: 10px 4px; font-size: 16px; }
  .gm .gm-header__drawer .gm-btn { margin-top: 8px; }

  .gm .gm-footer__inner { padding: 48px 16px 28px; gap: 36px; }
  .gm .gm-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .gm .gm-d56 { font-size: 40px; }
  .gm .gm-d40 { font-size: 30px; }
  .gm .gm-container { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .gm .gm-sidebar, .gm .gm-btn, .gm .gm-needs, .gm .gm-card--link { transition: none; }
}

/* =====================================================================
 * Phase 3 wave 2 (U1): app shell extras, Orders hub, Client / Freelancer homes
 * ===================================================================== */

/* ---------- Shell extras ---------- */
/* Breadcrumb (app-shell breadcrumb slot; also usable on its own as nav.gm-crumbs) */
.gm .gm-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 14px; color: var(--gm-muted); }
.gm .gm-crumbs a { color: var(--gm-ink-2); font-weight: 500; text-decoration: none; white-space: nowrap; }
.gm .gm-crumbs a:hover { color: var(--gm-coral-ink); text-decoration: underline; }
.gm .gm-crumbs [aria-current] { color: var(--gm-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
.gm .gm-crumbs .gm-svg { color: var(--gm-muted); flex: none; }
.gm .gm-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--gm-radius-control); background: var(--gm-ink); color: #FFFFFF; font-weight: 600; text-decoration: none; }
.gm .gm-skip:focus { top: 12px; color: #FFFFFF; }
.gm .gm-main:focus { outline: none; }
.gm .gm-topbar__me { display: inline-flex; border-radius: 50%; text-decoration: none; }
.gm form.gm-segmented { margin: 0; }
.gm .gm-icon-btn--ghost { border-color: transparent; background: transparent; width: 32px; height: 32px; border-radius: 10px; }
.gm .gm-icon-btn--ghost:hover { background: var(--gm-sunken); }
.gm .gm-tabbar__badge--quiet { background: var(--gm-sunken); color: var(--gm-ink-2); }
.gm .gm-tone-ink { color: var(--gm-ink); }
.gm .gm-unread-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: var(--gm-radius-pill);
  background: var(--gm-coral-ink); color: #FFFFFF; text-decoration: none; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.gm .gm-unread-pill:hover { background: var(--gm-coral-ink-hover); color: #FFFFFF; }
.gm .gm-section-cap { margin: 0; font-family: var(--gm-font-body); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-h2 { margin: 0; font-family: var(--gm-font-display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.gm .gm-h2__count { font-family: var(--gm-font-body); font-size: 15px; font-weight: 500; color: var(--gm-muted); font-variant-numeric: tabular-nums; }
.gm .gm-card__head .gm-link { font-size: 14px; white-space: nowrap; }
.gm .gm-empty { padding: 28px 24px; color: var(--gm-ink-2); font-size: 14.5px; border-top: 1px solid var(--gm-line); }
.gm .gm-empty p { margin: 0; }
.gm .gm-empty .gm-row { margin-top: 12px; }

/* ---------- Orders hub ---------- */
.gm .gm-hub-stats { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.gm .gm-hub-money { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; padding: 22px 24px; }
.gm .gm-hub-money__item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gm .gm-hub-money__cap { display: inline-flex; align-items: center; gap: 6px; }
.gm .gm-hub-money__num { font-family: var(--gm-font-display); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gm .gm-hub-money__sub { font-size: 13.5px; color: var(--gm-ink-2); }
.gm a.gm-hub-money__sub { color: var(--gm-coral-ink); }
.gm .gm-hub-money__rule { width: 1px; align-self: stretch; background: var(--gm-line); }
.gm .gm-hub-hint { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; }
.gm .gm-hub-hint .gm-needs__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; }
.gm .gm-hub-hint__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gm .gm-hub-hint__title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.gm .gm-hub-hint__text { font-size: 13.5px; color: var(--gm-ink-2); }
.gm .gm-hub-hint .gm-link { font-size: 14px; margin-top: 4px; }
.gm .gm-tab--needs:not([aria-selected="true"]) .gm-badge { background: var(--gm-amber-wash); color: var(--gm-amber); }
.gm .gm-orders__tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 20px; }
.gm .gm-orders__filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; min-width: 0; }
.gm .gm-orders__types { display: inline-flex; }
.gm .gm-orders__types .gm-segmented__item { flex: none; height: 32px; font-size: 13.5px; }
.gm .gm-orders__sort { display: flex; align-items: center; gap: 8px; }
.gm .gm-orders__sort .gm-select { width: auto; min-width: 200px; }
.gm .gm-orders__table { min-width: 960px; }
.gm .gm-orders__whoin { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gm .gm-orders__titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.gm .gm-orders__who { min-width: 260px; }
.gm .gm-orders__amount .gm-orders__total { display: block; font-size: 14.5px; font-weight: 600; }
.gm .gm-orders__held { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gm .gm-orders__date { padding-left: 24px; white-space: nowrap; }
.gm .gm-orders__dateval { display: block; font-size: 13.5px; font-weight: 500; }
.gm .gm-orders__actin { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.gm .gm-orders__cta { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.gm .gm-orders__empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--gm-ink-2); border-top: 1px solid var(--gm-line); }
.gm .gm-orders__empty p { margin: 0; max-width: 520px; }
.gm .gm-orders__empty > .gm-svg { color: var(--gm-muted); }
.gm .is-loading { opacity: .6; transition: opacity .15s; }
.gm .gm-pager { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--gm-line); background: var(--gm-paper); }
.gm .gm-pager__info { font-size: 13.5px; color: var(--gm-muted); font-variant-numeric: tabular-nums; }
.gm .gm-pager__nav { display: flex; align-items: center; gap: 6px; }
.gm .gm-pager__btn, .gm .gm-pager__num {
  height: 36px; min-width: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--gm-line); background: var(--gm-surface);
  color: var(--gm-ink); font: 600 13.5px/1 var(--gm-font-body); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.gm .gm-pager__btn:disabled { color: var(--gm-muted); cursor: not-allowed; opacity: .7; }
.gm .gm-pager__num.is-current { background: var(--gm-ink); border-color: var(--gm-ink); color: #FFFFFF; cursor: default; }
.gm .gm-pager--plain { padding: 4px 0 0; border-top: 0; background: none; }
.gm .gm-hub-foot { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; color: var(--gm-muted); }

/* ---------- Homes (Client / Freelancer) ---------- */
.gm .gm-home-needs { display: flex; flex-direction: column; gap: 14px; }
.gm .gm-home-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.gm .gm-home-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.gm .gm-oline { border-top: 1px solid var(--gm-line); padding: 18px 24px 20px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 14px; align-items: center; }
.gm .gm-oline.is-highlight { background: #FFFBF8; }
.gm .gm-oline__titles { display: flex; flex-direction: column; min-width: 0; }
.gm .gm-oline__title { font-size: 15px; font-weight: 600; color: var(--gm-ink); text-decoration: none; line-height: 1.35; }
.gm .gm-oline__title:hover { color: var(--gm-coral-ink); }
.gm .gm-oline__meta { font-size: 13px; color: var(--gm-muted); font-variant-numeric: tabular-nums; }
.gm .gm-oline__bottom { grid-column: 2 / 4; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gm .gm-oline__bottom .gm-escrow { flex: 1 1 260px; min-width: 0; }
.gm .gm-oline__bottom .gm-link { font-size: 14px; white-space: nowrap; }
.gm .gm-money-pill--quiet { background: var(--gm-sunken); color: var(--gm-ink-2); }
.gm .gm-proj { border-top: 1px solid var(--gm-line); padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.gm .gm-proj__title { font-family: var(--gm-font-display); font-weight: 600; font-size: 20px; line-height: 1.2; color: var(--gm-ink); text-decoration: none; }
.gm .gm-proj__title:hover { color: var(--gm-coral-ink); }
.gm .gm-proj__summary { font-size: 14px; color: var(--gm-ink-2); }
.gm .gm-proj__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: var(--gm-sunken); border-radius: 12px; padding: 14px 16px; margin: 0; }
.gm .gm-proj__stats div { display: flex; flex-direction: column; min-width: 0; }
.gm .gm-proj__stats dt { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-proj__stats dd { margin: 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gm .gm-proj__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.gm .gm-proj__bidders { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--gm-ink-2); }
.gm .gm-avstack { display: flex; }
.gm .gm-avstack .gm-avatar { border: 2px solid var(--gm-surface); }
.gm .gm-avstack .gm-avatar + .gm-avatar { margin-left: -8px; }
.gm .gm-avstack__more { background: var(--gm-sunken); color: var(--gm-ink-2); }
.gm .gm-draft { border-top: 1px solid var(--gm-line); padding: 18px 24px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gm .gm-draft__body { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; }
.gm .gm-draft__title { font-size: 15px; font-weight: 600; }
.gm .gm-side-card { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 22px; }
.gm .gm-side-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gm .gm-side-card__head .gm-link { font-size: 14px; white-space: nowrap; }
.gm .gm-spend { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.gm .gm-spend th, .gm .gm-spend td { padding: 9px 0; border-top: 1px solid var(--gm-line); text-align: right; font-weight: 600; }
.gm .gm-spend thead th { border-top: 0; padding-top: 0; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gm-muted); }
.gm .gm-spend th[scope="row"], .gm .gm-spend thead th:first-child { text-align: left; font-weight: 500; color: var(--gm-ink-2); }
.gm .gm-done { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--gm-line); }
.gm .gm-done__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.gm .gm-done__amt { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gm .gm-quick { display: flex; flex-direction: column; gap: 12px; }
.gm .gm-quick__item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--gm-radius-card); background: var(--gm-surface); border: 1px solid var(--gm-line); color: var(--gm-ink); text-decoration: none; }
.gm .gm-quick__item:hover { border-color: var(--gm-line-strong); color: var(--gm-ink); }
.gm .gm-quick__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.gm .gm-quick__title { font-size: 15px; font-weight: 600; }
.gm .gm-quick__sub { font-size: 13px; color: var(--gm-muted); }
.gm .gm-earn__big { display: flex; flex-direction: column; gap: 2px; }
.gm .gm-earn__num { font-family: var(--gm-font-display); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.gm .gm-earn__list { margin: 0; display: flex; flex-direction: column; }
.gm .gm-earn__list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--gm-line); }
.gm .gm-earn__list dt { display: flex; flex-direction: column; min-width: 0; }
.gm .gm-earn__list dt > span:first-child { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.gm .gm-earn__list dt > span + span { font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-earn__list dd { margin: 0; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gm .gm-payout__head { display: flex; align-items: center; gap: 12px; }
.gm .gm-payout__head .gm-needs__icon { flex: none; }
.gm .gm-payout__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gm .gm-payout__who h2 { font-family: var(--gm-font-body); font-size: 15px; font-weight: 600; line-height: 1.35; }
.gm .gm-payout__who span { font-size: 12.5px; color: var(--gm-muted); }
.gm .gm-payout p { margin: 0; font-size: 14px; color: var(--gm-ink-2); }
.gm .gm-invite { border-top: 1px solid var(--gm-line); padding: 18px 24px 20px; display: flex; flex-direction: column; gap: 12px; }
.gm .gm-invite__who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--gm-ink-2); }
.gm .gm-invite__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gm .gm-invite__facts { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--gm-ink-2); }
.gm .gm-svc { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--gm-line); color: var(--gm-ink); text-decoration: none; }
.gm .gm-svc:hover { color: var(--gm-coral-ink); }
.gm .gm-svc__thumb { flex: none; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.gm .gm-svc__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.gm .gm-svc__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm .gm-svc__facts { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--gm-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .gm .gm-home-grid { grid-template-columns: minmax(0, 1fr); }
  .gm .gm-hub-stats { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .gm .gm-hub-money__rule { display: none; }
  .gm .gm-hub-money, .gm .gm-hub-hint { padding: 18px; }
  .gm .gm-orders__tools { padding: 14px 16px; }
  .gm .gm-orders__filters, .gm .gm-orders__filters .gm-search { width: 100%; }
  .gm .gm-orders__types { width: 100%; overflow-x: auto; }
  .gm .gm-orders__sort { width: 100%; }
  .gm .gm-orders__sort .gm-select { flex: 1; min-width: 0; }

  /* Order rows become cards */
  .gm .gm-orders__table { min-width: 0; }
  .gm .gm-orders__table thead { display: none; }
  .gm .gm-orders__table, .gm .gm-orders__table tbody, .gm .gm-orders__table tr, .gm .gm-orders__table td { display: block; width: 100%; }
  .gm .gm-orders__table tr { position: relative; padding: 16px; border-top: 1px solid var(--gm-line); }
  .gm .gm-orders__table td, .gm .gm-orders__table td:first-child, .gm .gm-orders__table td:last-child { padding: 0; border-top: 0; }
  .gm .gm-orders__table td + td { margin-top: 10px; }
  .gm .gm-orders__table tbody tr:hover td { background: transparent; }
  .gm .gm-orders__table tr.is-highlight { background: var(--gm-coral-wash); }
  .gm .gm-orders__table tr.is-highlight td { background: transparent; }
  .gm .gm-orders__who { min-width: 0; padding-right: 104px !important; }
  .gm .gm-orders__type { position: absolute; top: 16px; right: 16px; width: auto !important; margin: 0 !important; }
  .gm .gm-orders__type .gm-chip { font-size: 11.5px; padding: 1px 8px; }
  .gm .gm-orders__amount { display: flex !important; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; text-align: left !important; }
  .gm .gm-orders__amount .gm-orders__total { display: inline; }
  .gm .gm-orders__date { display: flex !important; gap: 6px; align-items: baseline; padding-left: 0 !important; }
  .gm .gm-orders__dateval { display: inline; }
  .gm .gm-orders__actin { justify-content: flex-start; }
  .gm .gm-pager { padding: 12px 16px; }

  .gm .gm-oline { padding: 16px; grid-template-columns: 36px minmax(0, 1fr); }
  .gm .gm-oline > .gm-money-pill { grid-column: 2; justify-self: start; }
  .gm .gm-oline__bottom { grid-column: 1 / 3; }
  .gm .gm-proj, .gm .gm-draft, .gm .gm-invite { padding: 16px; }
  .gm .gm-side-card { padding: 18px; }
  .gm .gm-card__head { padding: 18px 16px 14px; }
  .gm .gm-proj__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Toasts (layouts.gm global showAlertMessage handler) ---------- */
.gm .gm-toasts { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.gm .gm-toast {
  pointer-events: auto; position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 44px 14px 16px;
  border-radius: 12px; background: var(--gm-surface); border: 1px solid var(--gm-line-strong); box-shadow: var(--gm-shadow-raised);
  font-size: 14px; color: var(--gm-ink-2); line-height: 1.45;
}
.gm .gm-toast--error { border-color: #F3C4BF; }
.gm .gm-toast--error .gm-toast__title { color: var(--gm-red); }
.gm .gm-toast--success .gm-toast__title { color: var(--gm-teal); }
.gm .gm-toast__title { font-weight: 600; color: var(--gm-ink); }
.gm .gm-toast__close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--gm-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.gm .gm-toast__close:hover { background: var(--gm-sunken); color: var(--gm-ink); }
@media (max-width: 768px) {
  .gm .gm-toasts { left: 16px; right: 16px; bottom: 80px; max-width: none; }
}

/* ---------- Minimal public header (x-gm.public-header minimal) ---------- */
.gm .gm-header--minimal .gm-header__inner { justify-content: space-between; }
.gm .gm-header--minimal .gm-header__signin { display: inline-flex; align-items: center; }

/* ---------- Banners (x-gm.auth.alert; welcome back, blocked account, link sent) ---------- */
.gm .gm-auth-alert { width: 100%; border-radius: var(--gm-radius-card); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; background: var(--gm-sunken); }
.gm .gm-auth-alert--red { background: var(--gm-red-wash); }
.gm .gm-auth-alert--teal { background: var(--gm-teal-wash); }
.gm .gm-auth-alert--amber { background: var(--gm-amber-wash); }
.gm .gm-auth-alert--blue { background: var(--gm-blue-wash); }
.gm .gm-auth-alert__icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--gm-surface); color: var(--gm-ink-2);
  display: flex; align-items: center; justify-content: center;
}
.gm .gm-auth-alert--red .gm-auth-alert__icon { color: var(--gm-red); }
.gm .gm-auth-alert--teal .gm-auth-alert__icon { color: var(--gm-teal); }
.gm .gm-auth-alert--amber .gm-auth-alert__icon { color: var(--gm-amber); }
.gm .gm-auth-alert--blue .gm-auth-alert__icon { color: var(--gm-blue); }
.gm .gm-auth-alert__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 14px; color: var(--gm-ink-2); }
.gm .gm-auth-alert__title { font-size: 15px; font-weight: 600; color: var(--gm-ink); }
.gm .gm-auth-alert__body a { font-weight: 600; color: var(--gm-coral-ink); }
.gm .gm-auth-alert__body ul { margin: 0; padding-left: 18px; }
.gm .gm-auth-alert--compact { padding: 14px 16px; }
.gm .gm-welcome-back { max-width: 1200px; margin: 16px auto 0; padding: 0 32px; }
@media (max-width: 768px) {
  .gm .gm-welcome-back { padding: 0 16px; }
}
