/* Copied from design/v8-glass by site/scripts/sync_v8.py: edit it there. */
/* OrroFi Glass v8 — components. Every value comes from tokens.css; no colour literals here except pure
   black/white alpha for system chrome (Dynamic Island, home indicator, knob). Dark only. */

@font-face {
  font-family: "Inter";
  src: url("../../assets/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: block;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }

/* ---------- Type ---------- */
.t-hero { font: var(--type-hero); letter-spacing: var(--tracking-tight); }
.t-large { font: var(--type-large-title); letter-spacing: var(--tracking-tight); }
.t-title1 { font: var(--type-title-1); letter-spacing: -0.01em; }
.t-title2 { font: var(--type-title-2); letter-spacing: -0.01em; }
.t-title3 { font: var(--type-title-3); }
.t-headline { font: var(--type-headline); }
.t-body { font: var(--type-body); }
.t-callout { font: var(--type-callout); }
.t-subhead { font: var(--type-subhead); }
.t-footnote { font: var(--type-footnote); }
.t-caption { font: var(--type-caption); }
.t-overline { font: var(--type-caption); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-2); }
.t-num { font-variant-numeric: tabular-nums; }
.c-2 { color: var(--color-text-2); }
.c-muted { color: var(--color-muted); }
.c-ok { color: var(--color-ok); }
.c-warn { color: var(--color-warn); }
.c-error { color: var(--color-error); }

/* ---------- Device ---------- */
.device {
  position: relative;
  width: 390px;
  height: 844px;
  overflow: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  --status-h: 60px;               /* iOS safe area top 59 (Dynamic Island) on the 4-grid; the status bar draws in 0–54 */
  --tab-bottom: 24px;              /* floating tab bar above the home indicator */
  --tab-side: 16px;
  --home-ind: 36px;               /* home indicator area (34 pt) on the 4-grid */
  --tabbar-space: calc(var(--tab-bottom) + var(--tabbar-h));   /* what the tab bar takes from the bottom: composer, toasts, scroll padding sit above it */
}
.device[data-platform="android"] {
  width: 412px;
  height: 915px;
  --gutter: var(--gutter-android);
  --hit: var(--hit-android);
  --status-h: 32px;
  --tabbar-h: 80px;
  --tab-bottom: 0px;
  --tab-side: 0px;
  --tabbar-space: calc(var(--tabbar-h) + var(--space-6));   /* M3 navigation bar 80 + the gesture zone 24 under it (.g-tabbar) */
}

.g-defs { position: absolute; }

/* The live background: three brand colour fields under the glass (fixed to the device, not scrolled). */
.g-bg { position: absolute; inset: 0; background: var(--color-bg); overflow: hidden; }
.g-bg i { position: absolute; border-radius: 50%; filter: blur(48px); }
.g-bg .b1 { width: 320px; height: 320px; right: -120px; top: 120px; background: radial-gradient(closest-side, var(--brand-blob-1), transparent); opacity: 0.7; }
.g-bg .b2 { width: 440px; height: 440px; left: -200px; top: 340px; background: radial-gradient(closest-side, var(--brand-blob-2), transparent); opacity: 0.9; }
.g-bg .b3 { width: 300px; height: 300px; right: -80px; bottom: -40px; background: radial-gradient(closest-side, var(--brand-blob-3), transparent); opacity: 0.6; }

/* ---------- Glass: the material ---------- */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-noise), linear-gradient(var(--g-fill), var(--g-fill));
  -webkit-backdrop-filter: var(--g-blur);
  backdrop-filter: var(--g-blur);
  box-shadow: var(--glass-inner-highlight), var(--g-shadow, var(--shadow-1));
  --g-fill: var(--glass-regular-fill);
  --g-blur: var(--glass-regular-blur);
}
.glass::before {                    /* 1 px rim, bright at the top edge */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--glass-rim-top), var(--glass-rim-bottom) 45%, var(--glass-rim-bottom) 80%, rgb(255 255 255 / 0.10));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass--thin { --g-fill: var(--glass-thin-fill); --g-blur: var(--glass-thin-blur); }
.glass--thick { --g-fill: var(--glass-thick-fill); --g-blur: var(--glass-thick-blur); }
.glass--float { --g-shadow: var(--shadow-2); }
.glass--flat { --g-shadow: 0 0 0 transparent; }

/* ---------- Screen layout ---------- */
.g-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: var(--status-h) var(--gutter) calc(var(--tabbar-space) + var(--space-6));
}
.g-stack { display: flex; flex-direction: column; gap: var(--stack-gap); }
.g-hstack { display: flex; align-items: center; gap: var(--space-3); }
.g-spacer { flex: 1; }
.g-section { display: flex; flex-direction: column; gap: var(--space-2); }
.g-section__title { padding: 0 var(--space-1); }

/* ---------- Status bar, Dynamic Island, home indicator ---------- */
.g-status { position: absolute; z-index: 40; top: 0; left: 0; right: 0; height: 54px; pointer-events: none; }
.g-status__time { position: absolute; left: 0; width: 140px; top: 17px; text-align: center; font: 600 17px/22px var(--font); letter-spacing: -0.01em; }
.g-status__icons { position: absolute; right: 0; width: 140px; top: 19px; display: flex; justify-content: center; gap: var(--space-1); align-items: center; }
.g-island { position: absolute; z-index: 41; top: 11px; left: 50%; width: 126px; height: 37px; transform: translateX(-50%); border-radius: 20px; background: #000; }
.g-homebar { position: absolute; z-index: 41; bottom: 8px; left: 50%; width: 134px; height: 5px; transform: translateX(-50%); border-radius: 3px; background: rgb(255 255 255 / 0.92); }
.device[data-platform="android"] .g-status__time { left: 20px; width: auto; top: 6px; font: 500 14px/20px var(--font); text-align: left; }
.device[data-platform="android"] .g-status__icons { right: 20px; width: auto; top: 8px; }
.device[data-platform="android"] .g-island { top: 8px; width: 16px; height: 16px; border-radius: 50%; }
.device[data-platform="android"] .g-homebar { width: 108px; height: 4px; bottom: 8px; border-radius: 2px; z-index: 42; }

/* ---------- Brand row (Inicio) ---------- */
.g-brand { display: flex; align-items: center; gap: var(--space-3); min-height: var(--navbar-h); }
.g-brand__logo { height: 40px; width: var(--brand-logo-w); object-fit: contain; object-position: left center; }
.g-brand__tech { font: var(--type-footnote); color: var(--color-muted); }

/* ---------- Large title → glass nav bar ---------- */
.g-largetitle { font: var(--type-large-title); letter-spacing: var(--tracking-tight); padding: var(--space-1) 0 var(--space-2); }
.g-navbar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--status-h) + var(--navbar-h) + var(--space-2));
  padding: var(--status-h) var(--space-2) var(--space-2);
  display: grid;
  grid-template-columns: var(--hit) 1fr var(--hit);
  align-items: center;
  --g-fill: var(--glass-thick-fill);
  --g-blur: var(--glass-thick-blur);
  --g-shadow: 0 1px 0 rgb(255 255 255 / 0.06);
}
.g-navbar.glass::before { background: linear-gradient(180deg, transparent 90%, rgb(255 255 255 / 0.10)); }
.g-navbar__title { font: var(--type-headline); text-align: center; white-space: nowrap; }
.g-navbar--inline-start { padding-left: var(--space-2); }

/* ---------- Icon button (glass circle) ---------- */
.g-iconbtn { width: var(--hit); height: var(--hit); border-radius: 50%; display: grid; place-items: center; flex: none; }
.g-iconbtn--m3 { width: 48px; height: 48px; margin-left: calc(-1 * var(--space-3)); color: var(--color-text); background: none; }   /* Android: M3 standard icon button, 24 dp icon in a 48 dp target */
.g-topbar--end .g-iconbtn--m3 { margin-left: 0; margin-right: calc(-1 * var(--space-3)); }
.g-iconbtn .g-ic { width: var(--icon-md); height: var(--icon-md); }
.g-iconbtn__dot { position: absolute; z-index: 2; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-error); box-shadow: 0 0 0 2px var(--color-bg); }

/* ---------- Icons ---------- */
.g-ic { width: var(--icon-lg); height: var(--icon-lg); flex: none; display: inline-grid; }
.g-ic svg { width: 100%; height: 100%; }
.g-ic path, .g-ic circle { stroke: currentColor; }

/* ---------- Cards ---------- */
.g-card { border-radius: var(--radius-lg); padding: var(--card-pad); }
.g-hero { border-radius: var(--radius-xl); padding: var(--hero-pad); display: flex; flex-direction: column; gap: var(--space-4); }
.g-hero__value { display: flex; align-items: baseline; gap: var(--space-2); flex: none; }
.g-hero__head { display: flex; align-items: center; gap: var(--space-2); }

/* ---------- Buttons ---------- */
.g-btn {
  position: relative;
  min-height: var(--control-h);
  width: 100%;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: var(--type-headline);
  text-align: center;
  transition: transform var(--motion-fast) var(--ease-spring);
}
.g-btn:active { transform: scale(var(--scale-pressed)); }
.g-btn--primary {
  color: var(--brand-on-accent);
  background: linear-gradient(180deg, var(--brand-accent-highlight) -40%, var(--brand-accent) 60%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.45), inset 0 -1px 0 rgb(0 0 0 / 0.12), var(--shadow-accent);
}
.g-btn--secondary { color: var(--color-text); }
.g-btn--destructive {                /* irreversible action: red-tinted glass, red text (AA on the tint), 1 px red rim */
  --d-tint: rgb(214 48 58 / 0.16);   /* deep red, so the light red label keeps AA on the tint */
  color: var(--color-error);
  background: var(--glass-noise), linear-gradient(var(--d-tint), var(--d-tint)), linear-gradient(var(--g-fill), var(--g-fill));
}
.g-btn--destructive.glass::before { background: color-mix(in srgb, var(--color-error) 72%, transparent); }
.g-btn--destructive[disabled] { background: var(--glass-noise), linear-gradient(var(--g-fill), var(--g-fill)); color: var(--color-text-2); }   /* disabled: no tint, no red */
.g-btn--destructive[disabled].glass::before { background: linear-gradient(180deg, var(--glass-rim-top), var(--glass-rim-bottom) 45%); }
.g-btn--sm { min-height: var(--control-h-sm); width: auto; padding: 0 var(--space-4); border-radius: var(--radius-sm); font: var(--type-subhead); font-weight: 600; }
.g-btn--sm::after { content: ""; position: absolute; inset: -4px 0; }   /* hit area 44 */
.g-btn[disabled] { opacity: 0.4; }
.g-btns { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.g-btns > .g-btn { flex: 1 1 0; }
.g-btns--start > .g-btn { flex: 0 0 auto; }   /* one action at its own width (Android card «propone») */
.g-btns--col { flex-direction: column; }

/* ---------- Badges ---------- */
.g-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  font: var(--type-caption);
  font-weight: 600;
  white-space: nowrap;
  color: color-mix(in srgb, var(--b-color) 80%, #fff);
  background: color-mix(in srgb, var(--b-color) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--b-color) 28%, transparent);
  --b-color: var(--color-text-2);
}
.g-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.g-badge--ok { --b-color: var(--color-ok); }
.g-badge--warn { --b-color: var(--color-warn); }
.g-badge--error { --b-color: var(--color-error); }
.g-badge--info { --b-color: var(--color-info); }

/* ---------- List rows ---------- */
.g-list { border-radius: var(--radius-lg); overflow: hidden; }
.g-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--row-h);
  padding: var(--space-2) var(--space-4);
  width: 100%;
  text-align: left;
}
.g-row--2 { min-height: var(--row-h-2); }
.g-row + .g-row::before { content: ""; position: absolute; top: 0; right: 0; left: calc(var(--space-4) + var(--tile) + var(--space-3)); height: 1px; background: var(--color-separator); }
.g-row--noicon + .g-row::before, .g-row--noicon::before { left: var(--space-4) !important; }
.g-tile { width: var(--tile); height: var(--tile); border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; background: var(--glass-lift-strong); color: var(--color-text); box-shadow: var(--glass-inner-highlight); }
.g-tile .g-ic { width: var(--icon-md); height: var(--icon-md); }
.g-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.g-row__title { font: var(--type-body); }
.g-row__sub { font: var(--type-footnote); color: var(--color-muted); }
.g-row__value { font: var(--type-subhead); color: var(--color-text-2); text-align: right; flex: none; }
.g-row__value--stack { display: flex; flex-direction: column; align-items: flex-end; }   /* ↓ over ↑ (iOS device list) */
.g-row__chev { width: var(--icon-sm); height: var(--icon-sm); color: var(--color-muted); flex: none; }
.device[data-platform="android"] .g-row__chev { display: none; }

/* ---------- Quick actions ---------- */
.g-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.g-quick__item { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.g-quick__btn { width: var(--quick); height: var(--quick); border-radius: 50%; display: grid; place-items: center; --g-fill: var(--glass-regular-fill); }
.g-quick__label { font: var(--type-caption); color: var(--color-text-2); text-align: center; }

/* ---------- Segmented, switch, chips ---------- */
.g-seg { display: flex; padding: var(--space-1); border-radius: var(--radius-full); height: var(--hit); }
.g-seg__item { position: relative; z-index: 2; flex: 1; border-radius: var(--radius-full); font: var(--type-subhead); font-weight: 600; color: var(--color-text-2); display: grid; place-items: center; }
.g-seg__item[aria-selected="true"] { color: var(--color-text); background: var(--glass-lift-strong); box-shadow: var(--glass-inner-highlight), 0 2px 8px rgb(0 0 0 / 0.24); }
.g-switch { position: relative; width: 51px; height: 31px; border-radius: var(--radius-full); background: var(--color-track); flex: none; transition: background var(--motion-fast) var(--ease-standard); }
.g-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.3); transition: transform var(--motion-base) var(--ease-spring); }
.g-switch::before { content: ""; position: absolute; inset: -7px -4px; }   /* hit area 45 × 59 */
.g-switch[aria-checked="true"] { background: var(--color-switch-on); }
.g-switch[aria-checked="true"]::after { transform: translateX(20px); }
.g-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.g-chip { position: relative; height: var(--control-h-sm); padding: 0 var(--space-4); border-radius: var(--radius-full); font: var(--type-subhead); display: inline-flex; align-items: center; white-space: nowrap; --g-fill: var(--glass-thin-fill); --g-blur: var(--glass-thin-blur); --g-shadow: 0 0 0 transparent; }
.g-chip::after { content: ""; position: absolute; inset: -4px 0; }    /* hit area 44 */
.g-chip[aria-pressed="true"] { background: var(--glass-lift-strong); }

/* ---------- Fields ---------- */
.g-field { display: flex; flex-direction: column; gap: var(--space-2); }
.g-field__label { font: var(--type-footnote); color: var(--color-text-2); padding: 0 var(--space-1); }
.g-input { min-height: var(--control-h); border-radius: var(--radius-md); padding: 0 var(--space-4); display: flex; align-items: center; gap: var(--space-2); font: var(--type-body); --g-fill: var(--glass-thin-fill); --g-blur: var(--glass-thin-blur); --g-shadow: 0 0 0 transparent; }
.g-input__ph { color: var(--color-muted); }
.g-input--focus { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.55); }
.g-caret { width: 2px; height: 22px; border-radius: 1px; background: var(--color-text); }
.g-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
.g-otp__cell { height: 56px; border-radius: var(--radius-sm); display: grid; place-items: center; font: var(--type-title-2); font-variant-numeric: tabular-nums; --g-fill: var(--glass-thin-fill); --g-blur: var(--glass-thin-blur); --g-shadow: 0 0 0 transparent; }
.g-otp__cell--focus { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.55); }

/* ---------- Chat ---------- */
.g-thread { display: flex; flex-direction: column; gap: var(--space-3); }
.g-bubble { max-width: 86%; padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); font: var(--type-callout); }
.g-bubble--ai { align-self: flex-start; border-bottom-left-radius: var(--radius-sm); }
.g-bubble--me { align-self: flex-end; border-bottom-right-radius: var(--radius-sm); --g-fill: rgb(56 62 72 / 0.84); --g-blur: var(--glass-thick-blur); }   /* ≈ white 16 % over thick glass, dense enough for AA over the gold blob */
.g-aitag { font: var(--type-caption); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-muted); padding-left: var(--space-1); }
.g-steps { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.g-step { display: flex; gap: var(--space-3); align-items: center; }
.g-step__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font: var(--type-caption); font-weight: 600; background: var(--glass-lift-strong); }
.g-composer { position: absolute; z-index: 25; left: var(--gutter); right: var(--gutter); bottom: calc(var(--tabbar-space) + var(--space-3)); display: flex; align-items: center; gap: var(--space-2); min-height: 52px; padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4); border-radius: var(--radius-full); --g-shadow: var(--shadow-2); }
.g-composer__ph { flex: 1; font: var(--type-callout); color: var(--color-muted); }
.g-composer__btn { width: var(--hit); height: var(--hit); border-radius: 50%; display: grid; place-items: center; background: var(--glass-lift-strong); box-shadow: var(--glass-inner-highlight); }

/* ---------- Tab bar ---------- */
.g-tabbar {
  position: absolute;
  z-index: 35;
  left: var(--tab-side);
  right: var(--tab-side);
  bottom: var(--tab-bottom);
  height: var(--tabbar-h);
  padding: var(--space-1);
  border-radius: var(--radius-full);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  --g-fill: var(--glass-thick-fill);
  --g-blur: var(--glass-thick-blur);
  --g-shadow: var(--shadow-2);
}
.g-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); border-radius: var(--radius-full); color: var(--color-text-2); font: var(--type-tab); white-space: nowrap; }
.g-tab .g-ic { width: 24px; height: 24px; }
.g-tab[aria-selected="true"] { color: var(--color-text); background: var(--glass-lift-strong); box-shadow: var(--glass-inner-highlight); }
.device[data-platform="android"] .g-tabbar { border-radius: 0; padding: var(--space-3) 0 var(--space-6); height: calc(var(--tabbar-h) + var(--space-6)); }
.device[data-platform="android"] .g-tabbar.glass::before { background: linear-gradient(180deg, rgb(255 255 255 / 0.16), transparent 4%); }
.device[data-platform="android"] .g-tab { justify-content: flex-start; gap: var(--space-1); font: 500 12px/16px var(--font); background: none; box-shadow: none; }
.device[data-platform="android"] .g-tab__pill { width: 64px; height: 32px; border-radius: var(--radius-full); display: grid; place-items: center; }
.device[data-platform="android"] .g-tab[aria-selected="true"] .g-tab__pill { background: var(--glass-lift-strong); box-shadow: var(--glass-inner-highlight); }
.device:not([data-platform="android"]) .g-tab__pill { display: contents; }

/* ---------- Sheet, toast, banner ---------- */
.g-scrim { position: absolute; inset: 0; z-index: 50; background: var(--color-scrim); }
.g-sheet { position: absolute; z-index: 51; left: 0; right: 0; bottom: 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-2) var(--gutter) var(--space-10); display: flex; flex-direction: column; gap: var(--space-4); --g-fill: var(--glass-thick-fill); --g-blur: var(--glass-thick-blur); --g-shadow: var(--shadow-2); }
.g-grabber { width: 36px; height: 5px; border-radius: var(--radius-full); background: rgb(255 255 255 / 0.32); align-self: center; margin-bottom: var(--space-2); }
.g-toast { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: var(--space-3) var(--space-5) var(--space-3) var(--space-4); border-radius: var(--radius-full); font: var(--type-subhead); font-weight: 600; --g-fill: var(--glass-thick-fill); --g-blur: var(--glass-thick-blur); --g-shadow: var(--shadow-2); }
.g-banner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); }
.g-banner__icon { width: var(--tile); height: var(--tile); border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; color: var(--color-warn); background: color-mix(in srgb, var(--color-warn) 18%, transparent); }
.g-banner__icon .g-ic { width: var(--icon-md); height: var(--icon-md); }
.g-banner--error .g-banner__icon { color: var(--color-error); background: color-mix(in srgb, var(--color-error) 18%, transparent); }

/* ---------- Skeleton ---------- */
.g-skel { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: rgb(255 255 255 / 0.07); }
.g-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.08), transparent); animation: g-shimmer var(--shimmer-period) var(--ease-standard) infinite; }
.g-skel--still::after { animation: none; transform: translateX(10%); }
@keyframes g-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .g-skel::after { animation: none; transform: none; opacity: 0; } }

/* ---------- Empty / error state ---------- */
.g-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-8) var(--space-4); border-radius: var(--radius-xl); }
.g-state__icon { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; margin-bottom: var(--space-2); color: var(--color-text-2); background: var(--glass-lift); box-shadow: var(--glass-inner-highlight), inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.g-state__icon .g-ic { width: 36px; height: 36px; }
.g-state--error .g-state__icon { color: var(--color-error); background: color-mix(in srgb, var(--color-error) 14%, transparent); }
.g-state .g-btn { margin-top: var(--space-4); }

/* ---------- Charts ---------- */
.g-chart { width: 100%; }
.g-chart__line { fill: none; stroke: url(#g-line); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.g-chart__area { fill: url(#g-area); }
.g-chart__axis { display: flex; justify-content: space-between; font: var(--type-caption); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.g-ring { position: relative; width: 112px; height: 112px; flex: none; }
.g-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.g-ring__track { fill: none; stroke: var(--color-track); stroke-width: 10; }
.g-ring__arc { fill: none; stroke: url(#g-ring); stroke-width: 10; stroke-linecap: round; }
.g-ring__label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.g-bars { display: flex; align-items: flex-end; gap: var(--space-2); height: 88px; }
.g-bars__bar { flex: 1; border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--brand-chart), color-mix(in srgb, var(--brand-chart) 35%, transparent)); }
.g-bars__bar--low { background: linear-gradient(180deg, var(--color-warn), color-mix(in srgb, var(--color-warn) 30%, transparent)); }
.g-usage { height: 6px; border-radius: var(--radius-full); background: var(--color-track); overflow: hidden; }
.g-usage i { display: block; height: 100%; border-radius: inherit; background: var(--brand-chart); }

/* ---------- Avatar ---------- */
.g-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none; font: var(--type-title-2); background: var(--glass-lift-strong); box-shadow: var(--glass-inner-highlight), inset 0 0 0 1px rgb(255 255 255 / 0.12); }

/* ---------- Helpers ---------- */
.t-strong { font-weight: 600; }
.c-text { color: var(--color-text); }
.g-stack--tight { gap: var(--space-2); }
.g-stack > .g-badge { align-self: flex-start; }
.g-stack > .g-list--apart { margin-top: var(--stack-gap); }   /* a new kind of rows: a double stack gap above */
.g-hstack--top { gap: var(--space-4); }
.g-note { padding: 0 var(--space-1); }
.g-divider-top { padding-top: var(--space-3); border-top: 1px solid var(--color-separator); }
.g-topbar { display: flex; align-items: center; min-height: var(--navbar-h); }
.g-scroll--chat { display: flex; flex-direction: column; padding-top: calc(var(--status-h) + var(--navbar-h) + var(--space-4)); padding-bottom: calc(var(--tabbar-space) + var(--space-3) + 52px + var(--space-4)); }
.g-scroll--chat-end { justify-content: flex-end; }
.g-thread__me { display: flex; justify-content: flex-end; }
.g-bubble--chart { width: 86%; display: flex; flex-direction: column; gap: var(--space-3); }
/* Scroll edge: under the floating tab bar the content fades into the background (no hard cut at the screen edge). */
.g-edge { position: absolute; z-index: 34; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-space) - var(--tabbar-h) / 2); pointer-events: none; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--color-bg) 92%, transparent) 72%); }
.g-row .g-seg { width: 112px; flex: none; }
.g-btn--sm { white-space: nowrap; }

/* ================= Wave 1 (Mi red, setup): flows, sheets, lock screen, stats, steps ================= */
/* Flow screens (no tab bar): close button top right, actions pinned at the bottom. */
.g-scroll--notab { padding-bottom: calc(var(--home-ind) + var(--space-6)); }
.g-scroll--footer { padding-bottom: calc(var(--home-ind) + var(--space-4) + var(--footer-h, 0px) + var(--space-6)); }
.g-topbar--end { justify-content: flex-end; }
.g-footer { position: absolute; z-index: 30; left: var(--gutter); right: var(--gutter); bottom: calc(var(--home-ind) + var(--space-2)); display: flex; flex-direction: column; gap: var(--space-2); }
.g-footer-fade { position: absolute; z-index: 29; left: 0; right: 0; bottom: 0; height: calc(var(--home-ind) + var(--space-6) + var(--footer-h, 0px)); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--color-bg) 94%, transparent) 32%); pointer-events: none; }
.g-btn--plain { color: var(--color-text-2); background: none; box-shadow: none; }

/* Sheet over a screen: the scrim dims the screen under it. */
.g-sheet__title { font: var(--type-title-3); }
.g-sheet .g-btns { flex-direction: column; }

/* System alert (iOS): the OS draws it; shown in its own glass so the flow reads. */
.g-alert { position: absolute; z-index: 52; left: 50%; top: 50%; width: 270px; transform: translate(-50%, -50%); border-radius: var(--radius-lg); overflow: hidden; text-align: center; --g-fill: var(--glass-thick-fill); --g-blur: var(--glass-thick-blur); --g-shadow: var(--shadow-2); }
.g-alert__body { padding: var(--space-5) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); }
.g-alert__btns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--color-separator); }
.g-alert__btns button { min-height: var(--hit); font: var(--type-body); color: var(--color-info); }
.g-alert__btns button + button { border-left: 1px solid var(--color-separator); font-weight: 600; }

/* Lock screen with one notification. */
.g-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: calc(var(--status-h) + var(--space-6)) var(--space-3) 0; gap: var(--space-1); }
.g-lock__date { font: var(--type-headline); color: var(--color-text-2); }
.g-lock__time { font: 700 88px/96px var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.g-lock__notifs { position: absolute; left: var(--space-3); right: var(--space-3); bottom: 120px; display: flex; flex-direction: column; gap: var(--space-2); }
.g-notif { border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); display: flex; gap: var(--space-3); align-items: flex-start; }
.g-notif__icon { width: 40px; height: 40px; border-radius: var(--radius-sm); flex: none; display: grid; place-items: center; background: var(--brand-bg); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }
.g-notif__icon img { width: 32px; height: 32px; object-fit: contain; }

/* Stat tiles (three numbers in a row). */
.g-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.g-stat { border-radius: var(--radius-lg); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }

/* Progress steps (done / now / next). */
.g-progress { display: flex; flex-direction: column; gap: var(--space-3); }
.g-progress__step { display: flex; align-items: center; gap: var(--space-3); font: var(--type-body); color: var(--color-muted); }
.g-progress__dot { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--glass-lift); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12); }
.g-progress__dot .g-ic { width: 16px; height: 16px; }
.g-progress__step--done { color: var(--color-text-2); }
.g-progress__step--done .g-progress__dot { color: var(--color-ok); background: color-mix(in srgb, var(--color-ok) 16%, transparent); }
.g-progress__step--now { color: var(--color-text); font-weight: 600; }
.g-progress__step--now .g-progress__dot { box-shadow: inset 0 0 0 2px var(--color-text); }
.g-progress__step--now .g-progress__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--color-text); }

/* Bullets, checkbox, key-value, password field, schedule. */
.g-bullets { display: flex; flex-direction: column; gap: var(--space-3); }
.g-bullet { display: flex; gap: var(--space-3); font: var(--type-subhead); color: var(--color-text-2); }
.g-bullet::before { content: ""; width: 6px; height: 6px; border-radius: 50%; margin-top: 8px; flex: none; background: var(--color-text-2); }
.g-check { display: flex; gap: var(--space-3); align-items: flex-start; font: var(--type-subhead); }
.g-check__box { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--glass-lift-strong); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.4); }
.g-check__box[aria-checked="true"] { background: var(--color-text); color: var(--color-bg); box-shadow: none; }
.g-check__box .g-ic { width: 16px; height: 16px; }
.g-input > :first-child { flex: 1; min-width: 0; }
.g-input__trail { color: var(--color-text-2); width: var(--hit); height: var(--hit); margin-right: calc(var(--space-3) * -1); display: grid; place-items: center; }
.g-input__trail .g-ic { width: var(--icon-md); height: var(--icon-md); }
.g-fineprint { font: var(--type-footnote); color: var(--color-muted); padding: 0 var(--space-1); }
.g-big { display: flex; align-items: baseline; gap: var(--space-2); }
.g-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); }
.g-badge-icon { width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; color: var(--color-ok); background: color-mix(in srgb, var(--color-ok) 14%, transparent); box-shadow: var(--glass-inner-highlight), inset 0 0 0 1px color-mix(in srgb, var(--color-ok) 30%, transparent); }
.g-badge-icon .g-ic { width: 36px; height: 36px; }
.g-badge-icon--warn { color: var(--color-warn); background: color-mix(in srgb, var(--color-warn) 14%, transparent); box-shadow: var(--glass-inner-highlight), inset 0 0 0 1px color-mix(in srgb, var(--color-warn) 30%, transparent); }
.g-badge-icon--info { color: var(--color-text-2); background: var(--glass-lift); }
.g-muted-row { opacity: 0.6; }
.g-device-head { display: flex; align-items: center; gap: var(--space-4); }
.g-device-head .g-tile { width: 56px; height: 56px; border-radius: var(--radius-md); }
.g-device-head .g-tile .g-ic { width: 28px; height: 28px; }
.g-spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--color-track); border-top-color: var(--brand-chart); }
.g-toast--top { position: absolute; z-index: 45; top: calc(var(--status-h) + var(--space-2)); left: var(--gutter); right: var(--gutter); border-radius: var(--radius-lg); }
.g-input--error { box-shadow: inset 0 0 0 1.5px var(--color-error); }
.g-hstack--fields { align-items: flex-start; }
.g-hstack--fields > .g-field { flex: 1; }
.g-bars--channels .g-bars__bar--own { background: linear-gradient(180deg, var(--color-text), color-mix(in srgb, var(--color-text) 30%, transparent)); }
.g-fineprint--center { text-align: center; }
.g-center--hero { padding: var(--space-8) 0 var(--space-4); }
.g-badge-icon--sm { width: var(--hit); height: var(--hit); flex: none; }
.g-badge-icon--sm .g-ic { width: var(--icon-lg); height: var(--icon-lg); }
.g-hero > .g-badge, .g-stack > .g-badge { align-self: flex-start; }   /* column containers only */
.g-seg__item { padding: 0 var(--space-3); white-space: nowrap; }
.g-toast--top { top: auto; bottom: calc(var(--tabbar-space) + var(--space-3)); }
/* Android: small controls keep a 48 dp hit area. */
.device[data-platform="android"] .g-btn--sm::after, .device[data-platform="android"] .g-chip::after { inset: -6px 0; }
/* Android: M3 top spacing above a large title. */
.device[data-platform="android"] .g-scroll > .g-stack > .g-largetitle:first-child { padding-top: var(--space-3); }
.g-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Android list metrics (M3): one-line 56 dp, two-line 72 dp. */
.device[data-platform="android"] { --row-h: 56px; --row-h-2: 72px; }
.g-row--action { align-items: flex-start; padding-top: var(--space-3); padding-bottom: var(--space-3); }
.g-row__action { margin-top: var(--space-2); }

/* Wizard step: block at the optical middle, hero disc with a soft brand light. */
.g-scroll--center > .g-stack { min-height: 100%; }
.g-flex-2 { flex: 2 1 0; }
.g-flex-3 { flex: 3 1 0; }
.g-center-group { flex: none; }
.g-disc-wrap { position: relative; isolation: isolate; width: 120px; height: 120px; margin-bottom: var(--space-4); display: grid; place-items: center; }
.g-disc-wrap::before { content: ""; position: absolute; z-index: -1; inset: -64px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-blob-1) 30%, transparent), transparent); }
.g-disc { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; color: var(--color-text); --g-shadow: var(--shadow-2); }
.g-disc .g-ic { width: 48px; height: 48px; }
.g-disc--ok { color: var(--color-ok); }
.g-disc--warn { color: var(--color-warn); }

/* ================= Wave 2 (services, order, billing, outage, install) ================= */
.g-banner--ok .g-banner__icon { color: var(--color-ok); background: color-mix(in srgb, var(--color-ok) 18%, transparent); }
.g-segbar { display: flex; gap: var(--space-1); }
.g-segbar i { display: block; width: 24px; height: 4px; border-radius: var(--radius-full); background: var(--color-track); }
.g-segbar i.g-segbar--on { background: var(--color-text); }
.g-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: var(--space-1); text-align: center; }
.g-cal__wd { font: var(--type-caption); color: var(--color-muted); padding-bottom: var(--space-1); }
.g-cal__day { height: var(--hit); border-radius: 50%; font: var(--type-body); color: var(--color-text); }
.g-cal__day--off { color: var(--color-muted); }
.g-cal__day--on { background: var(--color-text); color: var(--color-bg); font-weight: 600; }
.g-btn--long { font: var(--type-subhead); font-weight: 600; padding: 0 var(--space-4); }

/* ================= Wave 3 (launch, login, onboarding, notifications, states) ================= */
.g-launch { display: grid; place-items: center; position: relative; isolation: isolate; height: 200px; }
.g-launch::before { content: ""; position: absolute; z-index: -1; inset: -40px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-blob-1) 34%, transparent), transparent); }
.g-launch__logo { width: 200px; height: 112px; object-fit: contain; }
.g-login-head { display: flex; min-height: var(--navbar-h); align-items: center; }
.g-or { height: 1px; background: var(--color-separator); margin: var(--space-2) 0; }
.g-input__prefix { flex: none !important; padding-right: var(--space-2); border-right: 1px solid var(--color-separator); }
.g-timer { text-align: center; }
.g-stale { color: var(--color-text-2); }
.g-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--color-info); }

/* ================= Wave 4 (profile, privacy, family, deletion, reset, report) ================= */
.g-notif__actions { margin-top: var(--space-2); }
.g-qr { width: 192px; height: 192px; align-self: center; padding: var(--space-3); border-radius: var(--radius-md); background: #fff; }
.g-qr svg { width: 100%; height: 100%; }
.g-camera { position: relative; height: 224px; border-radius: var(--radius-xl); display: grid; place-items: center; color: var(--color-text-2); background: rgb(0 0 0 / 0.5); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.g-camera::before { content: ""; position: absolute; inset: 48px 64px; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.7); }
.g-digits { font: var(--type-title-1); letter-spacing: 0.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.device[data-platform="android"] .g-switch::before { inset: -9px -4px; }   /* Android: 49 dp tall hit area */

/* ---------- Site frames (screen.html?frame=site): the page shows every phone at 390×844 ---------- */
.device.device--site { width: 390px; height: 844px; }

/* ---------- Wave 5 · Mi gestor ---------- */
/* mgrlimit: the limit panel takes the composer's place (same glass, over the tab bar); the chat keeps clear of it. */
.g-composer.g-limit { flex-direction: column; align-items: stretch; gap: var(--space-1); padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); }
.g-limit .g-btn { margin-top: var(--space-2); }
.g-limit .g-hstack { gap: var(--space-2); }
.g-scroll--chat-limit { padding-bottom: calc(var(--tabbar-space) + var(--space-3) + 172px + var(--space-4)); }
/* gestor-voice: the listening mic and a 7-bar level wave in the data colour (gold is only the Primary). */
.g-voice__mic { color: var(--color-info); }
.g-voice__mic .g-ic { width: 36px; height: 36px; }
.g-wave { display: flex; align-items: center; justify-content: center; gap: var(--space-1); height: 32px; }
.g-wave i { display: block; width: 4px; border-radius: var(--radius-full); background: var(--brand-chart); }
