
  :root {
    /* ─── Opus / Grupo OM Design System ─── */
    --teal:    #009c93;
    --teal-d:  #007a73;
    --teal-l:  #e6f7f6;
    --orange:  #f05a28;
    --orange-l:#fff3ee;
    --yellow:  #f5c842;
    --yellow-l:#fffbea;
    --pink:    #cb333b;
    --pink-l:  #fce4ec;
    --green:   #b5bd00;
    --green-l: #f0f4d4;
    --blue:    #10173f;
    --blue-l:  #e8eaf6;
    --dark:    #2c2a39;
    --text:    #4a4458;
    --muted:   #9ca3af;
    --border:  #e5e7eb;
    --bg:      #f4f6f8;
    --white:   #ffffff;
    --brand-filter: brightness(0) saturate(100%) invert(15%) sepia(10%) saturate(500%) hue-rotate(220deg);
  }

  [data-theme="dark"] {
    --bg:      #0f1119;
    --white:   #1a1c2a;
    --border:  #2e3044;
    --dark:    #f1f0f5;
    --text:    #c4c0d0;
    --muted:   #6b6880;
    
    --teal:    #00bfb3;
    --teal-d:  #009c93;
    --teal-l:  #162a2a;
    --orange-l:#2e1a0d;
    --yellow-l:#2e2810;
    --pink-l:  #2e1215;
    --green-l: #1a2210;
    --blue-l:  #1a1c2e;
    --brand-filter: brightness(0) saturate(100%) invert(100%) sepia(0%) hue-rotate(0deg) brightness(1.1);
  }

  /* ─── CUSTOM COMPONENTS ─── */
  .custom-select, .custom-input {
    padding: 12px 16px; border-radius: 12px; border: 2px solid var(--border);
    font-size: 13px; font-weight: 600; color: var(--dark); outline: none;
    background: var(--white); transition: all .2s;
    font-family: 'Open Sans', sans-serif;
  }
  .custom-select { cursor: pointer; }
  .custom-select:hover, .custom-input:hover { border-color: var(--teal); }
  .custom-select:focus, .custom-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-l); }
  
  .theme-toggle {
    background: rgba(255,255,255,0.1); border: none; border-radius: 50%;
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px; transition: all .2s;
  }
  .theme-toggle:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: 'Open Sans', sans-serif; background: var(--bg); color: var(--dark); min-height: 100vh; }
  #app-shell { display: flex; flex-direction: column; min-height: 100vh; }
  #content-area { flex: 1; display: flex; flex-direction: column; overflow-x: hidden; }

  /* ─── GATEKEEPER ──────────────────────────────── */
  #gatekeeper {
    position: fixed; inset: 0; z-index: 1500;
    background: linear-gradient(135deg, #1b1c4a 0%, #2c2a39 40%, #10173f 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 0;
  }
  #gatekeeper.hidden-gate { display: none; }
  .gate-logo-mark {
    width: 100px; height: auto; margin-bottom: 24px;
  }
  .gate-logo-mark img { width: 100%; height: auto; display: block; }
  .gate-title { font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 36px; color: white; letter-spacing: 6px; margin-bottom: 4px; }
  .gate-sub { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 40px; }
  .login-btn {
    background: white; border: none; border-radius: 12px; padding: 14px 28px;
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    font-size: 14px; font-weight: 700; color: var(--dark); transition: all .2s;
  }
  .login-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
  .google-icon { width: 18px; height: 18px; }

  /* ─── HEADER ─────────────────────────────────── */
  header {
    background: linear-gradient(135deg, #2c2a39 0%, #1b1c4a 100%);
    height: 76px; padding: 0 2.5rem;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 200;
    box-shadow: 0 2px 16px rgba(0,0,0,0.22);
  }
  [data-theme="dark"] header {
    background: linear-gradient(135deg, #0f1119 0%, #1a1c2a 100%);
    box-shadow: 0 2px 16px rgba(0,0,0,0.4);
  }
  .logo-area { display: flex; align-items: center; gap: 14px; }
  .logo-text { display: flex; flex-direction: column; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 14px; }
  .logo-name  { font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 16px; color: white; letter-spacing: 3px; line-height: 1; }
  .logo-sub   { font-size: 9px; font-weight: 700; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 2px; margin-top: 2px; display: none; }

  nav { display: flex; gap: 4px; align-items:center; }
  nav a {
    color: rgba(255,255,255,.65); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; text-decoration: none;
    padding: 6px 14px; border-radius: 20px; transition: all .18s; cursor: pointer;
  }
  nav a:hover { background: rgba(255,255,255,.12); color: white; }
  nav a.active { background: rgba(255,255,255,.18); color: white; }
  #nav-rh-link { background: rgba(0,156,147,0.15); color: #5cece4; border: 1px solid rgba(0,156,147,0.3); animation: fadeUp .4s; }
  #nav-rh-link:hover { background: var(--teal); color: white; border-color: var(--teal); }

  .user-pill {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.1); border-radius: 30px; padding: 5px 14px 5px 5px; cursor: pointer;
  }
  .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; color: white; flex-shrink: 0; }
  .user-name-h { font-size: 12px; font-weight: 700; color: white; }

  /* ─── HERO ───────────────────────────────────── */
  .hero {
    background: linear-gradient(135deg, #2c2a39 0%, #1b1c4a 60%, #10173f 100%);
    padding: 2.5rem 0 0; /* Sides and top. Bottom spacer is inner margin + svg */
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
  }
  [data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f1119 0%, #151729 60%, #10173f 100%);
  }
  .hero-wave {
    display: block; width: 100%; height: clamp(100px, 12vw, 160px); fill: var(--bg); flex-shrink: 0;
    transform: scaleX(1.02) translateY(1px); transform-origin: bottom center; margin: 0; padding: 0;
  }
  .hero::before {
    content: 'RH'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 300px; color: rgba(255,255,255,.03);
    line-height: 1; pointer-events: none; letter-spacing: 10px; z-index: 1;
  }
  .hero-inner {
    max-width: 1080px; width: 100%; margin: 1rem auto; padding: 0 2rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; position: relative; z-index: 2;
  }
  .hero-text h1 { font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase; font-size: clamp(40px,5vw,60px); color: white; line-height: .95; letter-spacing: 2px; }
  .hero-text h1 span { color: var(--teal); }
  .hero-text p { color: rgba(255,255,255,.65); font-size: 14px; margin-top: 14px; max-width: 380px; line-height: 1.6; }

  .hero-stats-box {
    background: rgba(0,0,0,0.25); border-radius: 12px; padding: 1.5rem 2rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
  }
  .hsb-title {
    font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 20px; color: white;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1.2rem; text-align: center;
  }
  .hero-stats { display: flex; gap: 2rem; justify-content: center; width: 100%; }
  .hs-item { text-align: center; flex: 1; }
  .hs-num { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 32px; color: white; line-height: 1; }
  .hs-label { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
  .hs-div { width: 1px; background: rgba(255,255,255,.15); align-self: stretch; }

  /* ─── AÇÕES RÁPIDAS ── */
  .quick-strip {
    max-width: 1080px; margin: -5.5rem auto 2rem;
    padding: 0 2rem;
    display: grid; grid-template-columns: repeat(4,1fr); gap: 12px;
    position: relative; z-index: 10;
  }
  .qa-card {
    background: var(--white); border-radius: 18px; padding: 16px;
    box-shadow: 0 3px 14px rgba(0,0,0,.07);
    display: flex; align-items: center; gap: 13px;
    cursor: pointer; border: 2px solid transparent; transition: all .18s;
  }
  .qa-card:hover { border-color: var(--teal); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,156,147,.12); }
  .qa-icon { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .qa-label { font-size: 11px; font-weight: 800; color: var(--dark); line-height: 1.3; }
  .qa-sub   { font-size: 9px; color: var(--muted); margin-top: 2px; }

  /* ─── MAIN ───────────────────────────────────── */
  .main { max-width: 1080px; margin: 2rem auto; padding: 0 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
  .col-title { font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 17px; letter-spacing: 2px; color: var(--dark); display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
  .col-title::after { content: ''; flex: 1; height: 2px; background: var(--border); }
  .badge-ct { background: var(--orange); color: white; font-size: 9px; font-weight: 900; padding: 2px 8px; border-radius: 10px; font-family: 'Open Sans'; }

  .pedido {
    background: var(--white); border-radius: 16px; padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.055); margin-bottom: 10px;
    display: flex; align-items: center; gap: 13px;
    cursor: pointer; border: 2px solid transparent; transition: all .18s;
  }
  .pedido:hover { border-color: var(--teal); transform: translateX(4px); box-shadow: 0 4px 16px rgba(0,156,147,.1); }
  .p-ico { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
  .p-info { flex: 1; min-width: 0; }
  .p-title { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .p-meta  { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .p-status { font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; padding: 4px 10px; border-radius: 10px; white-space: nowrap; flex-shrink: 0; }
  .s-open    { background: var(--yellow-l); color: #b45309; }
  .s-review  { background: var(--teal-l);   color: var(--teal); }
  .s-done    { background: var(--green-l);  color: var(--green); }
  .s-urgent  { background: var(--pink-l);   color: #c2185b; }

  .fab-wrap { position: fixed; bottom: 2rem; right: 2rem; z-index: 300; }
  .fab {
    background: var(--teal); color: white; font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: 2px;
    padding: 15px 28px; border-radius: 50px; border: none; cursor: pointer; box-shadow: 0 8px 28px rgba(0,156,147,.35);
    display: flex; align-items: center; gap: 8px; transition: all .2s; user-select: none;
  }
  .fab:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,156,147,.5); }
  .fab.open { background: #2c2a39; color: white; border-radius: 14px 14px 50px 50px; }
  .fab-icon { font-size: 18px; transition: transform .25s; }
  .fab.open .fab-icon { transform: rotate(45deg); }

  .fab-menu {
    position: absolute; bottom: calc(100% + 10px); right: 0; background: var(--white); border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
    min-width: 240px; overflow: hidden; transform-origin: bottom right;
    transform: scale(.85) translateY(10px); opacity: 0; pointer-events: none;
    transition: all .22s cubic-bezier(.34,1.56,.64,1);
  }
  .fab-menu.visible { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }
  .fm-header { padding: 14px 18px 10px; font-size: 9px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: 3px; border-bottom: 1px solid var(--border); }
  .fm-item { display: flex; align-items: center; gap: 13px; padding: 13px 18px; cursor: pointer; transition: background .15s; border: none; background: none; width: 100%; text-align: left; border-bottom: 1px solid var(--border); }
  .fm-item:last-child { border-bottom: none; }
  .fm-item:hover { background: var(--bg); }
  .fm-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
  .fm-label { font-size: 13px; font-weight: 700; color: var(--dark); }
  .fm-desc  { font-size: 10px; color: var(--muted); margin-top: 1px; }

  /* ─── RAINBOW LINE ──────────────────────────── */
  .rainbow-line {
    height: 5px; width: 100%; flex-shrink: 0;
    background: linear-gradient(90deg,
      #cc2229 0%,       /* Vermelho escuro */
      #e84e1b 10%,      /* Vermelho-laranja */
      #f39200 20%,      /* Laranja */
      #ffec00 30%,      /* Amarelo (Brainbox) */
      #b5bd00 40%,      /* Verde-limão (Housecricket) */
      #00a651 50%,      /* Verde */
      #009c93 60%,      /* Teal (D'om) */
      #0068b4 70%,      /* Azul */
      #1b1c4a 82%,      /* Azul-marinho (Brainbox) */
      #6b2c91 90%,      /* Roxo */
      #a31c44 100%      /* Vermelho-vinho */
    );
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  footer {
    display: flex; flex-direction: column; gap: 1.2rem; align-items: center; justify-content: center;
    padding: 2.2rem 2rem;
    background: var(--bg);
    width: 100%;
    flex-shrink: 0;
  }
  .ft-middle {
    max-width: 1080px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    gap: 3rem; flex-wrap: wrap; width: 100%;
  }
  .ft-logos { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
  .ft-logos img { height: 28px; filter: var(--brand-filter); transition: filter .3s; }
  .ft-gptw { height: 60px; border-radius: 8px; background: #ffffff; padding: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
  .ft-copy { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; text-align: center; margin-top: 8px; }

  @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
  .qa-card  { animation: fadeUp .4s ease both; }
  .pedido { animation: fadeUp .35s ease both; }

  /* Layout footer */
  html, body { height: auto; }
  body { display: flex; flex-direction: column; }
  #app-shell { display: none; flex-direction: column; }
  #app-shell.visible { display: flex; }

  /* Global width forcing */
  .main, .qa-strip, .at-wrap, .at-hero-inner, .at-periodo-wrap, 
  .he-wrap, .he-hero-inner, .he-info-wrap, 
  .bh-wrap, .bh-hero-inner, .bh-info-wrap,
  .st-wrap, .st-hero-inner,
  .lp-wrap, .lp-hero-inner,
  .ap-wrap, .ap-hero-inner, .ph-inner {
     width: 100% !important;
     max-width: 1300px !important;
  }

  /* Global Page Hero (Standardized Header Thickness) */
  .page-hero {
    background: linear-gradient(135deg, #2c2a39 0%, #1b1c4a 60%, #10173f 100%);
    padding: 2.5rem 0 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Full-bleed: escape any parent max-width */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }
  .page-hero::before {
    content: 'RH'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 300px; color: rgba(255,255,255,.03);
    line-height: 1; pointer-events: none; letter-spacing: 10px; z-index: 1;
  }
  [data-theme="dark"] .page-hero {
    background: linear-gradient(135deg, #0f1119 0%, #151729 60%, #10173f 100%);
  }
  .ph-inner {
    max-width: 1300px; width: 100%; margin: 1rem auto 2rem; padding: 0 2.5rem;
    position: relative; z-index: 2;
  }
  .ph-crumb {
    font-size: 10px; font-weight: 700; color: rgba(255,255,255,.45);
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
  }
  .ph-crumb button {
    background: none; border: none; color: inherit; font-size: inherit;
    font-weight: inherit; text-transform: inherit; letter-spacing: inherit;
    cursor: pointer; padding: 0; transition: color .15s;
  }
  .ph-crumb button:hover { color: white; }
  .ph-title {
    font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase;
    font-size: clamp(28px, 4vw, 42px); color: white; letter-spacing: 2px; line-height: 1.1;
    margin-bottom: 6px;
  }
  .ph-desc {
    color: rgba(255,255,255,.6); font-size: 12px; line-height: 1.6; max-width: 600px;
  }
  .ph-wave {
    display: block; width: 100%; height: clamp(100px, 12vw, 160px); fill: var(--bg); flex-shrink: 0;
    transform: scaleX(1.02) translateY(1px); transform-origin: bottom center;
  }

  /* UX Forms: Wizards, Validation and Dropzone */
  .wizard-card {
    display: none; /* hidden by default */
  }
  .wizard-card.active-step {
    display: block !important;
    animation: fadeUp .3s ease both;
  }
  
  .wizard-progress {
    max-width: 1300px; width: 100%; margin: -2rem auto 2rem; padding: 0 2rem;
    position: relative; z-index: 10;
  }
  .wp-track {
    display: flex; gap: 4px; height: 6px; background: rgba(0,0,0,0.1); border-radius: 6px; overflow: hidden;
  }
  [data-theme="dark"] .wp-track { background: rgba(255,255,255,0.05); }
  .wp-bar {
    flex: 1; transition: background .3s; opacity: 0.3;
  }
  .wp-bar.done { background: var(--teal); opacity: 1; }
  .wp-bar.current { background: var(--teal-l); opacity: 1; }
  .wp-labels {
    display: flex; justify-content: space-between; margin-top: 8px;
    font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px;
  }

  .hidden-card { display: none !important; }

  /* Drag Drop Zone */
  .dz-wrap {
    border: 2px dashed var(--border); border-radius: 16px; padding: 32px 20px;
    text-align: center; cursor: pointer; transition: all .2s;
    background: var(--bg); position: relative; overflow: hidden;
  }
  .dz-wrap:hover { border-color: var(--teal); background: var(--teal-l); }
  .dz-wrap.dragover { border-color: var(--teal); background: var(--teal-l); transform: scale(1.02); }
  .dz-ico { font-size: 32px; margin-bottom: 12px; transition: transform .3s; }
  .dz-wrap:hover .dz-ico { transform: translateY(-4px); }
  .dz-title { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
  .dz-sub { font-size: 11px; color: var(--muted); }
  .dz-preview {
    margin-top: 16px; padding: 12px; background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: none; align-items: center; gap: 12px; text-align: left;
  }
  .dz-preview.has-file { display: flex; animation: fadeUp .2s ease both; }
  .p-ico { font-size: 24px; }
  .p-info { flex: 1; min-width: 0; }
  .p-name { font-size: 12px; font-weight: 700; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .p-size { font-size: 10px; color: var(--muted); }
  .p-del { background: none; border: none; font-size: 16px; color: var(--red); cursor: pointer; padding: 4px; }
  .dz-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

  /* Inline Validation */
  .is-invalid { border-color: var(--red) !important; background: #fff5f5 !important; }
  .is-valid { border-color: var(--teal) !important; }
  .err-msg { color: var(--red); font-size: 10px; font-weight: 700; margin-top: 4px; display: none; }
  .err-msg.show { display: block; animation: fadeUp .2s ease both; }

  /* Action Buttons in Wizard */
  .wiz-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 2px solid var(--bg); }
  .btn-prev { background: none; border: 2px solid var(--border); border-radius: 12px; padding: 10px 24px; font-family: 'Open Sans', sans-serif; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .18s; }
  .btn-prev:hover { border-color: var(--dark); color: var(--dark); }
  .btn-next { background: var(--dark); color: white; border: none; border-radius: 12px; padding: 11px 28px; font-family: 'Montserrat', sans-serif; font-weight: 900; text-transform: uppercase; font-size: 14px; letter-spacing: 2px; cursor: pointer; transition: all .2s; }
  .btn-next:hover { background: var(--teal); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,156,147,.25); }
