/* ============================================================
   WStudios — Gmails: loja, biblioteca/resgate e painel admin
   Prefixo: gm-  •  mobile-first  •  sem overflow horizontal
   Usa as variáveis do site (styles.css) com fallback próprio.
   ============================================================ */

/* ---------- base das telas gm- ---------- */
.gm-page,
.gm-scope {
  --gm-gold: var(--gold-gradient, linear-gradient(135deg, #5f18d6, #9b4dff, #d8d8dc));
  --gm-accent: var(--gold-light, #d7c4ff);
  --gm-line: var(--border, rgba(216, 216, 220, .13));
  --gm-card: var(--bg-card, rgba(12, 11, 18, .84));
  --gm-hover: var(--bg-hover, rgba(155, 77, 255, .11));
  --gm-muted: var(--text-muted, #8f879d);
  --gm-text: var(--text-primary, #f3f3f6);
  --gm-text2: var(--text-secondary, #c9c4d2);
  --gm-ok: #34d399;
  --gm-warn: #fcd34d;
  --gm-err: #f87171;
}

.gm-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 14px 72px;
  color: var(--gm-text);
  font-family: var(--font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  overflow-x: hidden;
}

/* O site carrega o Material Icons Round, mas nunca definiu a classe .mi
   (a de /gmails.html). Sem isto os ícones saem como texto literal. */
.mi {
  font-family: 'Material Icons Round';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.gm-page * { box-sizing: border-box; }
.gm-page h1, .gm-page h2, .gm-page h3, .gm-page p { margin: 0; }
.gm-hr { height: 1px; background: var(--gm-line); border: 0; margin: 26px 0; }

/* ---------- topo ---------- */
.gm-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 22px;
}
.gm-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gm-text);
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 16px; letter-spacing: .3px;
  min-width: 0;
}
.gm-brand img { height: 36px; width: auto; flex: 0 0 auto; }
.gm-brand em {
  font-style: normal;
  background: var(--gm-gold); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.gm-top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- botões ---------- */
.gm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; min-height: 46px;
  border-radius: 12px; border: 1px solid var(--gm-line);
  background: var(--gm-card); color: var(--gm-text);
  font: inherit; font-weight: 700; font-size: 14.5px; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  max-width: 100%;
}
.gm-btn:hover { border-color: rgba(155, 77, 255, .45); transform: translateY(-1px); }
.gm-btn:active { transform: translateY(0) scale(.99); }
.gm-btn:disabled, .gm-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.gm-btn .mi { font-size: 19px; }
.gm-btn-primary {
  background: var(--gm-gold); color: #0a0514; border-color: transparent;
  box-shadow: var(--shadow-gold, 0 0 28px rgba(155, 77, 255, .28));
}
.gm-btn-primary:hover { box-shadow: 0 8px 32px rgba(155, 77, 255, .42); }
.gm-btn-ghost { background: transparent; }
.gm-btn-sm { padding: 9px 13px; min-height: 38px; font-size: 13px; border-radius: 10px; }
.gm-btn-sm .mi { font-size: 16px; }
.gm-btn-block { width: 100%; }
.gm-btn-ok { border-color: rgba(52, 211, 153, .45); color: var(--gm-ok); background: rgba(52, 211, 153, .08); }
.gm-btn-danger { border-color: rgba(248, 113, 113, .4); color: #fca5a5; background: rgba(248, 113, 113, .07); }

.gm-copied { border-color: rgba(52, 211, 153, .6) !important; background: rgba(52, 211, 153, .12) !important; }
.gm-copy-fail { border-color: rgba(248, 113, 113, .6) !important; }

/* ---------- cabeçalho de seção ---------- */
.gm-sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.gm-sec-head .gm-ico {
  width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
  border-radius: 12px; background: var(--gm-hover); border: 1px solid rgba(155, 77, 255, .35);
  color: var(--gm-accent);
}
.gm-sec-head .gm-ico .mi { font-size: 21px; }
.gm-sec-head h2 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -.2px; }
.gm-sec-head p { color: var(--gm-muted); font-size: 13px; margin-top: 2px; }

.gm-section { margin-top: 34px; }
.gm-muted { color: var(--gm-muted); font-size: 13px; line-height: 1.55; }
.gm-dim { color: var(--gm-text2); }

/* ---------- avisos ---------- */
.gm-warn {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 15px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
  background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .32); color: var(--gm-warn);
}
.gm-warn .mi { font-size: 19px; flex: 0 0 auto; margin-top: 1px; }
.gm-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 15px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
  background: var(--gm-hover); border: 1px solid rgba(155, 77, 255, .3); color: var(--gm-accent);
}
.gm-note .mi { font-size: 19px; flex: 0 0 auto; margin-top: 1px; }

.gm-error-box {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px; border-radius: 13px; margin: 12px 0;
  background: rgba(248, 113, 113, .07); border: 1px solid rgba(248, 113, 113, .3);
}
.gm-error-box .mi { color: var(--gm-err); font-size: 22px; flex: 0 0 auto; }
.gm-error-box p { color: #fca5a5; font-size: 13.5px; line-height: 1.55; margin-bottom: 10px; }

.gm-loading { display: flex; align-items: center; gap: 10px; padding: 22px 4px; color: var(--gm-muted); font-size: 14px; }
.gm-spinner {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%;
  border: 2px solid rgba(155, 77, 255, .25); border-top-color: var(--gm-accent);
  animation: gm-spin .8s linear infinite;
}
@keyframes gm-spin { to { transform: rotate(360deg); } }

.gm-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 16px; border-radius: 14px; text-align: center;
  border: 1px dashed var(--gm-line); background: rgba(255, 255, 255, .015); color: var(--gm-muted);
}
.gm-empty .mi { font-size: 34px; opacity: .6; }
.gm-empty p { font-size: 14px; line-height: 1.55; max-width: 420px; }

/* ============================================================
   A) LOJA
   ============================================================ */
.gm-shop-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.gm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--gm-line); background: var(--gm-card); color: var(--gm-text2);
}
.gm-chip .mi { font-size: 15px; }
.gm-chip-ok { border-color: rgba(52, 211, 153, .4); color: var(--gm-ok); background: rgba(52, 211, 153, .07); }
.gm-chip-warn { border-color: rgba(251, 191, 36, .4); color: var(--gm-warn); background: rgba(251, 191, 36, .07); }

.gm-years-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
@media (min-width: 620px) { .gm-years-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; } }

.gm-year-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 16px 13px 14px; border-radius: 16px;
  border: 1px solid var(--gm-line); background: var(--gm-card);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
  min-width: 0;
}
.gm-year-card:hover { border-color: rgba(155, 77, 255, .45); box-shadow: 0 0 26px rgba(155, 77, 255, .2); }
.gm-year-card.is-out { opacity: .55; }
.gm-year-card.is-in-cart { border-color: rgba(52, 211, 153, .5); box-shadow: 0 0 22px rgba(52, 211, 153, .16); }

.gm-year-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gm-year-num { font-family: 'Poppins', sans-serif; font-weight: 900; font-size: 23px; line-height: 1; letter-spacing: -.5px; }
.gm-year-age { font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gm-muted); }
.gm-year-price { font-size: 16.5px; font-weight: 800; color: var(--gm-accent); }
.gm-year-stock { font-size: 11.5px; font-weight: 600; color: var(--gm-muted); display: flex; align-items: center; gap: 5px; }
.gm-year-stock .mi { font-size: 14px; }
.gm-year-stock.ok { color: var(--gm-ok); }
.gm-year-stock.low { color: var(--gm-warn); }
.gm-year-stock.zero { color: var(--gm-err); }

.gm-qty { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.gm-qty-btn {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--gm-line); background: var(--gm-hover);
  color: var(--gm-text); font-size: 20px; font-weight: 800; cursor: pointer; line-height: 1;
  transition: border-color .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.gm-qty-btn:hover { border-color: rgba(155, 77, 255, .5); }
.gm-qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.gm-qty-val {
  flex: 1 1 auto; text-align: center; font-weight: 800; font-size: 16px;
  padding: 9px 4px; border-radius: 10px; border: 1px solid var(--gm-line);
  background: rgba(0, 0, 0, .25); min-width: 34px;
}
.gm-year-sub { font-size: 12px; font-weight: 700; color: var(--gm-text2); text-align: center; min-height: 16px; }

/* ---------- carrinho ---------- */
.gm-cart {
  margin-top: 18px; border-radius: 16px; padding: 16px;
  border: 1px solid rgba(155, 77, 255, .38); background: var(--gm-card);
  box-shadow: 0 0 30px rgba(155, 77, 255, .14);
}
.gm-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.gm-cart-head h3 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.gm-cart-lines { display: flex; flex-direction: column; gap: 8px; }
.gm-cart-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 13px; border-radius: 11px; background: rgba(255, 255, 255, .03);
  border: 1px solid var(--gm-line); font-size: 14px;
}
.gm-cart-line .gm-cl-year { font-weight: 800; }
.gm-cart-line .gm-cl-qty { color: var(--gm-muted); font-size: 12.5px; }
.gm-cart-line .gm-cl-val { font-weight: 800; color: var(--gm-accent); white-space: nowrap; }
.gm-cart-line button.gm-cl-x {
  background: transparent; border: 0; color: var(--gm-muted); cursor: pointer;
  font-size: 19px; line-height: 1; padding: 6px; border-radius: 8px; min-width: 34px; min-height: 34px;
}
.gm-cart-line button.gm-cl-x:hover { color: var(--gm-err); }

.gm-cart-totals { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--gm-line); display: flex; flex-direction: column; gap: 6px; }
.gm-cart-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--gm-text2); }
.gm-cart-row.gm-total { font-size: 18px; font-weight: 900; color: var(--gm-text); padding-top: 4px; }
.gm-cart-row.gm-disc { color: var(--gm-ok); font-weight: 700; }
.gm-cart-actions { margin-top: 15px; display: flex; flex-direction: column; gap: 9px; }

.gm-step2-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  background: rgba(251, 191, 36, .12); color: var(--gm-warn); border: 1px solid rgba(251, 191, 36, .35);
}

/* ============================================================
   B) BIBLIOTECA / RESGATE
   ============================================================ */
.gm-library-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .gm-library-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); } }

.gm-code-card {
  display: flex; flex-direction: column; gap: 11px; padding: 16px;
  border-radius: 15px; border: 1px solid var(--gm-line); background: var(--gm-card);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.gm-code-card:hover { border-color: rgba(155, 77, 255, .4); box-shadow: 0 0 24px rgba(155, 77, 255, .16); }
.gm-code-card .gm-cc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gm-code-code {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700; font-size: 14.5px; letter-spacing: .4px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--gm-line); border-radius: 9px;
  padding: 6px 10px; color: var(--gm-accent); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  overflow-wrap: anywhere; text-align: left;
}
.gm-code-code .mi { font-size: 15px; opacity: .75; }
.gm-cc-title { font-weight: 700; font-size: 14.5px; }

.gm-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
}
.gm-badge .mi { font-size: 13px; }
.gm-badge-pending { background: rgba(251, 191, 36, .12); color: var(--gm-warn); border: 1px solid rgba(251, 191, 36, .35); }
.gm-badge-delivered, .gm-badge-available { background: rgba(52, 211, 153, .12); color: var(--gm-ok); border: 1px solid rgba(52, 211, 153, .35); }
.gm-badge-sold, .gm-badge-used { background: rgba(155, 77, 255, .12); color: var(--gm-accent); border: 1px solid rgba(155, 77, 255, .35); }
.gm-badge-blocked { background: rgba(248, 113, 113, .12); color: #fca5a5; border: 1px solid rgba(248, 113, 113, .35); }

/* ---------- entrega ---------- */
.gm-delivery {
  margin-top: 16px; border-radius: 17px; border: 1px solid rgba(155, 77, 255, .45);
  background: linear-gradient(165deg, rgba(95, 24, 214, .16), rgba(12, 11, 18, .92) 60%);
  padding: 16px; box-shadow: 0 0 40px rgba(155, 77, 255, .16);
}
.gm-delivery-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.gm-delivery-head h3 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }

.gm-field {
  display: flex; flex-direction: column; gap: 6px; padding: 12px 13px;
  border-radius: 12px; border: 1px solid var(--gm-line); background: rgba(0, 0, 0, .26);
  margin-bottom: 10px; min-width: 0;
}
.gm-field-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--gm-muted);
  display: flex; align-items: center; gap: 6px;
}
.gm-field-label .mi { font-size: 14px; }
.gm-field-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.gm-field-value {
  flex: 1 1 150px; min-width: 0; font-size: 14.5px; font-weight: 600;
  overflow-wrap: anywhere; word-break: break-word;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
}
.gm-field-value.gm-plain { font-family: inherit; }
.gm-field.is-secret .gm-field-value { letter-spacing: 1.5px; }

.gm-fields-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 760px) { .gm-fields-grid { grid-template-columns: 1fr 1fr; gap: 0 12px; } }

/* ---------- gerador 2FA ---------- */
.gm-totp {
  margin: 14px 0; padding: 16px; border-radius: 15px;
  border: 1px solid rgba(52, 211, 153, .35);
  background: linear-gradient(160deg, rgba(52, 211, 153, .1), rgba(12, 11, 18, .9) 70%);
}
.gm-totp-title {
  display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px;
  margin-bottom: 12px; color: var(--gm-ok);
}
.gm-totp-title .mi { font-size: 19px; }
.gm-totp-code {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;
  font-size: clamp(34px, 12vw, 52px); font-weight: 800; letter-spacing: .12em;
  text-align: center; color: var(--gm-text); line-height: 1.12;
  padding: 12px 6px; border-radius: 13px; background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(52, 211, 153, .28); word-break: break-all;
}
.gm-totp-code.gm-totp-expiring { color: var(--gm-warn); border-color: rgba(251, 191, 36, .4); }
.gm-totp-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .09); overflow: hidden; margin: 11px 0 8px; }
.gm-totp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #34d399, #d8d8dc); transition: width .25s linear; }
.gm-totp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--gm-muted); }
.gm-totp-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.gm-totp-key input {
  flex: 1 1 190px; min-width: 0; padding: 11px 12px; min-height: 44px;
  border-radius: 11px; border: 1px solid var(--gm-line); background: rgba(0, 0, 0, .3);
  color: var(--gm-text); font: inherit; font-size: 13.5px;
  font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5px;
}
.gm-totp-key input:focus { outline: none; border-color: rgba(52, 211, 153, .55); }

.gm-links { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.gm-link-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 11px 14px; min-height: 44px;
  border-radius: 11px; border: 1px solid var(--gm-line); background: var(--gm-card);
  color: var(--gm-text); text-decoration: none; font-size: 13.5px; font-weight: 700;
  transition: border-color .18s ease; max-width: 100%;
}
.gm-link-btn:hover { border-color: rgba(155, 77, 255, .5); }
.gm-link-btn .mi { font-size: 17px; color: var(--gm-accent); }

/* ============================================================
   C) PAINEL ADMIN
   ============================================================ */
.gm-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.gm-tabs::-webkit-scrollbar { display: none; }
.gm-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 15px; min-height: 44px; border-radius: 11px;
  border: 1px solid var(--gm-line); background: var(--gm-card); color: var(--gm-text2);
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.gm-tab .mi { font-size: 17px; }
.gm-tab.is-active {
  border-color: rgba(155, 77, 255, .55); color: var(--gm-text);
  background: linear-gradient(150deg, rgba(95, 24, 214, .3), rgba(12, 11, 18, .9));
}
.gm-tabpanel[hidden] { display: none; }

/* caixas de upload por ano */
.gm-boxes { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .gm-boxes { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); } }

.gm-box {
  border-radius: 15px; border: 1px solid var(--gm-line); background: var(--gm-card);
  padding: 13px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.gm-box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gm-box-year { font-family: 'Poppins', sans-serif; font-weight: 900; font-size: 20px; letter-spacing: -.4px; }
.gm-box-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--gm-muted); }
.gm-box-price-row { display: flex; align-items: center; gap: 8px; }
.gm-box-price-row label { font-size: 11.5px; color: var(--gm-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.gm-input {
  width: 100%; padding: 11px 12px; min-height: 44px; border-radius: 11px;
  border: 1px solid var(--gm-line); background: rgba(0, 0, 0, .3); color: var(--gm-text);
  font: inherit; font-size: 14px; min-width: 0;
}
.gm-input:focus { outline: none; border-color: rgba(155, 77, 255, .55); }
.gm-input-sm { padding: 8px 10px; min-height: 38px; font-size: 13px; }

.gm-drop {
  position: relative; border: 1.6px dashed rgba(155, 77, 255, .42); border-radius: 13px;
  padding: 20px 14px; text-align: center; cursor: pointer;
  background: rgba(155, 77, 255, .05); transition: background .2s ease, border-color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.gm-drop:hover { background: rgba(155, 77, 255, .1); }
.gm-drop.is-over { background: rgba(52, 211, 153, .13); border-color: rgba(52, 211, 153, .65); transform: scale(1.01); }
.gm-drop .mi { font-size: 30px; color: var(--gm-accent); display: block; margin-bottom: 7px; }
.gm-drop strong { display: block; font-size: 13.5px; font-weight: 800; margin-bottom: 3px; }
.gm-drop small { color: var(--gm-muted); font-size: 11.5px; line-height: 1.45; display: block; }
.gm-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.gm-progress { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.gm-progress-fill { height: 100%; width: 0; background: var(--gm-gold); transition: width .2s ease; }
.gm-upload-log { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; }
.gm-log-row {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  padding: 7px 9px; border-radius: 9px; background: rgba(255, 255, 255, .03);
  border: 1px solid var(--gm-line); overflow-wrap: anywhere;
}
.gm-log-row .mi { font-size: 15px; flex: 0 0 auto; }
.gm-log-ok .mi { color: var(--gm-ok); }
.gm-log-err .mi { color: var(--gm-err); }
.gm-log-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--gm-accent); }

/* tabelas */
.gm-table-wrap {
  border-radius: 14px; border: 1px solid var(--gm-line); background: var(--gm-card);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.gm-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.gm-table th, .gm-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--gm-line); vertical-align: middle; }
.gm-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--gm-muted);
  font-weight: 800; white-space: nowrap; background: rgba(0, 0, 0, .25);
  position: sticky; top: 0; z-index: 1;
}
.gm-table tbody tr:hover { background: rgba(155, 77, 255, .06); }
.gm-table tbody tr:last-child td { border-bottom: 0; }
.gm-table .gm-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--gm-accent); }
.gm-table .gm-nowrap { white-space: nowrap; }

.gm-filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.gm-filters .gm-input { flex: 1 1 190px; width: auto; min-width: 0; }
.gm-filters select.gm-input { flex: 0 1 150px; }
.gm-filters select.gm-input option { background: #12101c; color: #f3f3f6; }

.gm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 15px; }
@media (min-width: 620px) { .gm-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
.gm-stat {
  padding: 13px 14px; border-radius: 13px; border: 1px solid var(--gm-line); background: var(--gm-card);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.gm-stat .gm-stat-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--gm-muted); }
.gm-stat .gm-stat-value { font-family: 'Poppins', sans-serif; font-weight: 900; font-size: 20px; letter-spacing: -.4px; overflow-wrap: anywhere; }

/* resultado da busca de cliente */
.gm-client-hit {
  border-radius: 15px; border: 1px solid rgba(155, 77, 255, .38); background: var(--gm-card);
  padding: 15px; margin-bottom: 14px;
}
.gm-client-hit .gm-ch-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 11px; }
.gm-client-hit .gm-ch-email { font-weight: 800; font-size: 14.5px; overflow-wrap: anywhere; }

.gm-reveal {
  margin-top: 11px; padding: 12px 13px; border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, .32); background: rgba(52, 211, 153, .06);
  display: flex; flex-direction: column; gap: 7px;
}
.gm-reveal-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.gm-reveal-row .gm-rlabel { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--gm-muted); flex: 0 0 74px; }
.gm-reveal-row .gm-rvalue {
  flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; font-weight: 600;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px;
}

/* ============================================================
   TOASTS
   ============================================================ */
.gm-toasts {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  width: min(94vw, 460px); pointer-events: none;
}
.gm-toast {
  display: flex; align-items: center; gap: 9px; padding: 12px 15px; border-radius: 12px;
  background: rgba(14, 12, 22, .97); border: 1px solid var(--gm-line, rgba(216, 216, 220, .13));
  color: #f3f3f6; font-size: 13.5px; line-height: 1.45;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .5);
  transition: opacity .25s ease, transform .25s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.gm-toast .mi { font-size: 19px; flex: 0 0 auto; }
.gm-toast.success .mi { color: #34d399; }
.gm-toast.error .mi { color: #f87171; }
.gm-toast.info .mi { color: #d7c4ff; }

/* ---------- utilidades ---------- */
.gm-hidden { display: none !important; }
.gm-flex { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.gm-spacer { flex: 1 1 auto; }
.gm-mt { margin-top: 12px; }
.gm-mb { margin-bottom: 12px; }
@media (prefers-reduced-motion: reduce) {
  .gm-page * { transition: none !important; animation: none !important; }
}

/* ---------- páginas standalone (não são o app-shell) ---------- */
body.gm-standalone {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-primary, #030304);
  color: var(--text-primary, #f3f3f6);
  -webkit-font-smoothing: antialiased;
}
body.gm-standalone .gm-bg {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
}
body.gm-standalone .gm-bg video { width: 100%; height: 100%; object-fit: cover; opacity: .16; filter: saturate(.9); }
body.gm-standalone .gm-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(1100px 560px at 50% -10%, rgba(155, 77, 255, .15), transparent 62%),
              linear-gradient(180deg, rgba(3, 3, 4, .88), rgba(3, 3, 4, .95));
}
