   /* ================================================================
   DESIGN SYSTEM (idêntico ao /U/home.php)
   ================================================================ */
    :root {
      --navy: #001440;
      --navy-2: #001F5B;
      --blue: #0047AB;
      --teal: #00C9B1;
      --teal-dim: rgba(0, 201, 177, 0.12);
      --teal-border: rgba(0, 201, 177, 0.28);
      --gold: #FFB800;
      --red: #FF3B3B;
      --orange: #FF8C00;
      --green: #10B981;
      --surface: rgba(255, 255, 255, 0.07);
      --surface-2: rgba(255, 255, 255, 0.11);
      --border: rgba(255, 255, 255, 0.10);
      --border-2: rgba(255, 255, 255, 0.16);
      --text: #ffffff;
      --text-2: rgba(255, 255, 255, 0.72);
      --text-muted: rgba(255, 255, 255, 0.40);
      --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
      --r: 16px;
      --r-lg: 22px;
      --r-xl: 28px;
    }

    *,
    *::before,
    *::after {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'DM Sans', -apple-system, sans-serif;
      background: var(--navy);
      min-height: 100vh;
      color: var(--text);
      overflow-x: hidden;
      padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

    /* Background */
    body::after {
      content: '';
      position: fixed;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background:
        radial-gradient(ellipse 80% 50% at 50% -5%, rgba(0, 71, 171, .60) 0%, transparent 65%),
        radial-gradient(ellipse 40% 30% at 90% 60%, rgba(0, 201, 177, .08) 0%, transparent 50%),
        linear-gradient(180deg, #001440 0%, #00091F 100%);
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
      opacity: .022;
    }

    /* ================================================================
   HEADER
   ================================================================ */
    .header {
      position: sticky;
      top: 0;
      z-index: 400;
      height: 58px;
      background: rgba(0, 15, 45, .94);
      backdrop-filter: blur(28px) saturate(180%);
      -webkit-backdrop-filter: blur(28px) saturate(180%);
      border-bottom: 1px solid var(--border);
      padding: 0 18px;
      display: flex;
      align-items: center;
      gap: 14px;
      box-shadow: 0 2px 20px rgba(0, 0, 0, .35);
    }

    .back-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--surface);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      text-decoration: none;
      color: white;
      flex-shrink: 0;
      transition: all .18s;
    }

    .back-btn:hover {
      background: var(--surface-2);
      transform: translateX(-2px);
    }

    .header-center {
      flex: 1;
      min-width: 0;
    }

    .header-title {
      font-family: 'Syne', sans-serif;
      font-size: 17px;
      font-weight: 800;
    }

    .header-count {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 1px;
    }

    /* ================================================================
   RESUMO STATS (topo)
   ================================================================ */
    .stats-row {
      display: flex;
      gap: 10px;
      padding: 16px 18px 8px;
      overflow-x: auto;
      scrollbar-width: none;
    }

    .stats-row::-webkit-scrollbar {
      display: none;
    }

    .stat-pill {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 50px;
      padding: 8px 16px;
      white-space: nowrap;
      cursor: pointer;
      transition: all .18s;
      -webkit-user-select: none;
      user-select: none;
    }

    .stat-pill:hover {
      background: var(--surface-2);
    }

    .stat-pill.active {
      background: var(--teal-dim);
      border-color: var(--teal-border);
    }

    .stat-pill-icon {
      font-size: 16px;
      line-height: 1;
    }

    .stat-pill-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-2);
    }

    .stat-pill.active .stat-pill-label {
      color: var(--teal);
    }

    .stat-pill-num {
      font-size: 11px;
      font-weight: 800;
      background: rgba(255, 255, 255, .12);
      color: var(--text-muted);
      padding: 2px 7px;
      border-radius: 50px;
      min-width: 22px;
      text-align: center;
    }

    .stat-pill.active .stat-pill-num {
      background: rgba(0, 201, 177, .2);
      color: var(--teal);
    }

    /* Pill especial para "em andamento" — pulse */
    .stat-pill.andamento.active {
      background: rgba(255, 184, 0, .10);
      border-color: rgba(255, 184, 0, .3);
    }

    .stat-pill.andamento.active .stat-pill-label {
      color: var(--gold);
    }

    .stat-pill.andamento.active .stat-pill-num {
      background: rgba(255, 184, 0, .2);
      color: var(--gold);
    }

    /* Pill especial para "não pagos" — pulse vermelho */
    .stat-pill.nao-pago {
      border-color: rgba(255, 59, 59, .35);
      animation: pillPulse 2s ease-in-out infinite;
    }

    @keyframes pillPulse {

      0%,
      100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 59, .25);
      }

      50% {
        box-shadow: 0 0 0 6px rgba(255, 59, 59, 0);
      }
    }

    /* ================================================================
   LISTA DE PEDIDOS
   ================================================================ */
    .orders-list {
      padding: 12px 18px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    /* Card principal */
    .order-card {
      border-radius: var(--r-lg);
      overflow: hidden;
      background: var(--surface);
      border: 1px solid var(--border);
      cursor: pointer;
      transition: transform .2s, box-shadow .2s, border-color .2s;
      position: relative;
      animation: cardIn .4s ease both;
    }

    @keyframes cardIn {
      from {
        opacity: 0;
        transform: translateY(16px);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }

    .order-card:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow);
      border-color: var(--border-2);
    }

    .order-card:active {
      transform: scale(.99);
    }

    /* Variantes de status */
    .order-card.card-progress {
      border-color: rgba(255, 184, 0, .28);
      background: rgba(255, 184, 0, .04);
    }

    .order-card.card-delivered {
      border-color: rgba(0, 201, 177, .22);
      background: var(--teal-dim);
    }

    .order-card.card-nao-pago {
      border-color: rgba(255, 59, 59, .30);
      background: rgba(255, 59, 59, .04);
      animation: cardIn .4s ease both, cardPulse 3s ease-in-out 1s infinite;
    }

    @keyframes cardPulse {

      0%,
      100% {
        box-shadow: none;
      }

      50% {
        box-shadow: 0 0 0 4px rgba(255, 59, 59, .10);
      }
    }

    .order-card.card-cancelled {
      opacity: .75;
    }

    /* Badge "EM ANDAMENTO" no canto */
    .card-live-badge {
      position: absolute;
      top: 12px;
      right: 12px;
      z-index: 5;
      background: linear-gradient(135deg, #FFB800, #FF8C00);
      color: #001440;
      font-size: 9px;
      font-weight: 800;
      padding: 3px 10px;
      border-radius: 50px;
      letter-spacing: .06em;
      text-transform: uppercase;
      display: flex;
      align-items: center;
      gap: 4px;
      box-shadow: 0 3px 12px rgba(255, 184, 0, .4);
      animation: badgePulse 2s ease-in-out infinite;
    }

    @keyframes badgePulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.04);
      }
    }

    .badge-dot {
      width: 5px;
      height: 5px;
      background: #001440;
      border-radius: 50%;
      animation: blink 1.2s ease-in-out infinite;
    }

    @keyframes blink {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: .3;
      }
    }

    /* ── Topo do card: loja + status ── */
    .card-top {
      padding: 14px 16px 12px;
      display: flex;
      align-items: flex-start;
      gap: 12px;
    }

    /* Avatar da loja */
    .loja-avatar {
      width: 46px;
      height: 46px;
      border-radius: 12px;
      overflow: hidden;
      flex-shrink: 0;
      background: linear-gradient(135deg, var(--blue), #002B80);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      border: 1px solid var(--border);
    }

    .loja-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .card-top-info {
      flex: 1;
      min-width: 0;
      padding-right: 70px;
      /* espaço para badge */
    }

    .card-loja-nome {
      font-size: 15px;
      font-weight: 700;
      color: white;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 2px;
    }

    .card-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      color: var(--text-muted);
    }

    .card-meta-sep {
      opacity: .4;
    }

    .card-num {
      font-family: monospace;
    }

    /* Pill de status */
    .status-pill {
      flex-shrink: 0;
      align-self: flex-start;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 5px 12px;
      border-radius: 50px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .02em;
    }

    .sp-delivered {
      background: rgba(0, 201, 177, .15);
      color: var(--teal);
      border: 1px solid rgba(0, 201, 177, .3);
    }

    .sp-progress {
      background: rgba(255, 184, 0, .15);
      color: var(--gold);
      border: 1px solid rgba(255, 184, 0, .3);
    }

    .sp-cancelled {
      background: rgba(255, 59, 59, .15);
      color: var(--red);
      border: 1px solid rgba(255, 59, 59, .3);
    }

    .sp-nao-pago {
      background: rgba(255, 59, 59, .15);
      color: #ff6b6b;
      border: 1px solid rgba(255, 59, 59, .3);
      animation: pillPulse 2s ease-in-out infinite;
    }

    .sp-dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: currentColor;
      flex-shrink: 0;
    }

    /* ── Tracking bar ── */
    .tracking-bar {
      margin: 0 16px 12px;
      padding: 11px 14px;
      border-radius: 12px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: 13px;
    }

    .tb-progress {
      background: rgba(255, 184, 0, .10);
      border-left: 3px solid var(--gold);
    }

    .tb-delivered {
      background: var(--teal-dim);
      border-left: 3px solid var(--teal);
    }

    .tb-nao-pago {
      background: rgba(255, 59, 59, .10);
      border-left: 3px solid var(--red);
    }

    .tb-cancelled {
      background: rgba(255, 59, 59, .08);
      border-left: 3px solid rgba(255, 59, 59, .5);
    }

    .tb-icon {
      font-size: 18px;
      flex-shrink: 0;
      line-height: 1;
    }

    .tb-text {
      font-weight: 600;
      margin-bottom: 2px;
    }

    .tb-sub {
      font-size: 11px;
      color: var(--text-muted);
      line-height: 1.4;
    }

    /* ── Itens ── */
    .card-items {
      padding: 0 16px 12px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .item-row {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
    }

    .item-thumb {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      flex-shrink: 0;
      overflow: hidden;
      background: linear-gradient(135deg, #0A2472, #0E6BA8);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
    }

    .item-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .item-qty {
      font-size: 11px;
      font-weight: 800;
      color: var(--teal);
      background: var(--teal-dim);
      border: 1px solid var(--teal-border);
      padding: 2px 7px;
      border-radius: 50px;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .item-name {
      flex: 1;
      color: var(--text-2);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .item-price {
      font-size: 11px;
      color: var(--text-muted);
      flex-shrink: 0;
    }

    .items-more {
      font-size: 11px;
      color: var(--text-muted);
      padding-left: 42px;
    }

    /* Previsão de entrega */
    .entrega-row {
      margin: 0 16px 10px;
      background: var(--teal-dim);
      border: 1px solid var(--teal-border);
      border-radius: 10px;
      padding: 9px 12px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 600;
      color: var(--teal);
    }

    /* ── Divisor ── */
    .card-divider {
      height: 1px;
      background: var(--border);
      margin: 0 16px;
    }

    /* ── Footer do card ── */
    .card-footer {
      padding: 12px 16px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }

    .footer-total {}
    
    .ft-label {
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 2px;
    }

    .ft-value {
      font-size: 20px;
      font-weight: 800;
      color: var(--teal);
      line-height: 1;
    }

    .ft-pagamento {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 3px;
    }

    .footer-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    /* Botões de ação */
    .act-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 9px 16px;
      border-radius: 50px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all .18s;
      white-space: nowrap;
      text-decoration: none;
    }

    .act-btn:hover {
      transform: translateY(-2px);
    }

    .act-btn:active {
      transform: scale(.97);
    }

    .ab-teal {
      background: var(--teal-dim);
      color: var(--teal);
      border: 1px solid var(--teal-border);
    }

    .ab-teal:hover {
      background: rgba(0, 201, 177, .2);
      box-shadow: 0 4px 16px rgba(0, 201, 177, .25);
    }

    .ab-ghost {
      background: var(--surface);
      color: var(--text-2);
      border: 1px solid var(--border);
    }

    .ab-ghost:hover {
      background: var(--surface-2);
    }

    .ab-red {
      background: rgba(255, 59, 59, .15);
      color: #ff6b6b;
      border: 1px solid rgba(255, 59, 59, .3);
      animation: pillPulse 2s ease-in-out infinite;
    }

    .ab-red:hover {
      background: rgba(255, 59, 59, .25);
      box-shadow: 0 4px 16px rgba(255, 59, 59, .25);
    }

    .ab-gold {
      background: rgba(255, 184, 0, .15);
      color: var(--gold);
      border: 1px solid rgba(255, 184, 0, .3);
    }

    .ab-gold:hover {
      background: rgba(255, 184, 0, .25);
    }

    /* ================================================================
   EMPTY STATE
   ================================================================ */
    .empty-state {
      display: none;
      text-align: center;
      padding: 64px 32px;
    }

    .empty-state.show {
      display: block;
    }

    .empty-icon {
      font-size: 72px;
      opacity: .4;
      animation: floatY 3s ease-in-out infinite;
      margin-bottom: 20px;
    }

    @keyframes floatY {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-12px);
      }
    }

    .empty-title {
      font-family: 'Syne', sans-serif;
      font-size: 20px;
      font-weight: 800;
      margin-bottom: 8px;
    }

    .empty-sub {
      font-size: 14px;
      color: var(--text-muted);
      line-height: 1.6;
      margin-bottom: 28px;
    }

    .empty-cta {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--teal);
      color: #001440;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      font-weight: 700;
      padding: 13px 28px;
      border-radius: 50px;
      text-decoration: none;
      transition: all .2s;
    }

    .empty-cta:hover {
      filter: brightness(1.08);
      transform: translateY(-2px);
    }

    /* ================================================================
   BOTTOM NAV
   ================================================================ */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 300;
      background: rgba(0, 12, 38, .97);
      backdrop-filter: blur(28px) saturate(180%);
      -webkit-backdrop-filter: blur(28px) saturate(180%);
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-around;
      padding: 10px 0;
      padding-bottom: calc(10px + env(safe-area-inset-bottom));
      box-shadow: 0 -4px 28px rgba(0, 0, 0, .45);
    }

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      color: var(--text-muted);
      font-size: 11px;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      transition: color .18s;
      padding: 0 18px;
    }

    .nav-item.active {
      color: var(--teal);
    }

    .nav-icon {
      width: 42px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50px;
      font-size: 20px;
      transition: background .18s;
    }

    .nav-item.active .nav-icon {
      background: rgba(0, 201, 177, .14);
    }

    /* ================================================================
   MODAL — cancelamento
   ================================================================ */
    .modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(0, 0, 0, .75);
      backdrop-filter: blur(8px);
      display: none;
      align-items: flex-end;
      justify-content: center;
      padding: 0;
      animation: fadeIn .2s ease;
    }

    .modal-overlay.show {
      display: flex;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    .modal-sheet {
      background: #001A4A;
      border: 1px solid var(--border-2);
      border-radius: 28px 28px 0 0;
      width: 100%;
      max-width: 540px;
      max-height: 90vh;
      overflow-y: auto;
      animation: sheetUp .3s cubic-bezier(.32, .72, 0, 1);
      padding-bottom: env(safe-area-inset-bottom);
    }

    @media(min-width:560px) {
      .modal-overlay {
        align-items: center;
        padding: 20px;
      }

      .modal-sheet {
        border-radius: 28px;
        max-height: 85vh;
      }
    }

    @keyframes sheetUp {
      from {
        transform: translateY(40px);
        opacity: 0;
      }

      to {
        transform: none;
        opacity: 1;
      }
    }

    /* Handle drag */
    .sheet-handle {
      width: 40px;
      height: 4px;
      background: rgba(255, 255, 255, .15);
      border-radius: 2px;
      margin: 12px auto 0;
    }

    .sheet-header {
      padding: 20px 24px 16px;
      text-align: center;
      border-bottom: 1px solid var(--border);
    }

    .sheet-icon {
      font-size: 48px;
      margin-bottom: 12px;
    }

    .sheet-title {
      font-family: 'Syne', sans-serif;
      font-size: 20px;
      font-weight: 800;
      margin-bottom: 4px;
    }

    .sheet-sub {
      font-size: 13px;
      color: var(--text-2);
    }

    .sheet-body {
      padding: 20px 24px;
    }

    .sheet-footer {
      padding: 0 24px 20px;
      display: flex;
      gap: 10px;
    }

    .form-label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-2);
      margin-bottom: 7px;
    }

    .form-select,
    .form-textarea {
      width: 100%;
      background: rgba(255, 255, 255, .07);
      border: 1.5px solid var(--border);
      padding: 12px 15px;
      border-radius: 12px;
      color: white;
      font-size: 14px;
      font-family: 'DM Sans', sans-serif;
      transition: border-color .2s;
      margin-bottom: 16px;
    }

    .form-select option {
      background: #001A4A;
    }

    .form-textarea {
      resize: vertical;
      min-height: 90px;
    }

    .form-select:focus,
    .form-textarea:focus {
      outline: none;
      border-color: var(--teal-border);
      background: rgba(255, 255, 255, .10);
    }

    .form-textarea::placeholder {
      color: var(--text-muted);
    }

    .warning-box {
      background: rgba(255, 184, 0, .10);
      border-left: 3px solid var(--gold);
      border-radius: 0 10px 10px 0;
      padding: 11px 14px;
      font-size: 12px;
      color: var(--text-2);
      line-height: 1.5;
      margin-bottom: 16px;
    }

    .warning-box strong {
      display: block;
      color: var(--gold);
      margin-bottom: 3px;
      font-size: 13px;
    }

    .sheet-btn {
      flex: 1;
      padding: 13px 20px;
      border-radius: 14px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: all .2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .sb-cancel {
      background: var(--surface);
      color: var(--text-2);
      border: 1px solid var(--border);
    }

    .sb-cancel:hover {
      background: var(--surface-2);
    }

    .sb-danger {
      background: linear-gradient(135deg, #FF4444, #CC0000);
      color: white;
    }

    .sb-danger:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(255, 68, 68, .35);
    }

    .sb-danger:disabled {
      opacity: .5;
      cursor: not-allowed;
    }

    .spinner {
      width: 18px;
      height: 18px;
      border: 2.5px solid rgba(255, 255, 255, .3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin .8s linear infinite;
      flex-shrink: 0;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* Toast de mensagem */
    .toast {
      position: fixed;
      bottom: calc(88px + env(safe-area-inset-bottom));
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: #0D2B5E;
      border: 1px solid var(--border-2);
      color: white;
      padding: 13px 22px;
      border-radius: 50px;
      font-size: 14px;
      font-weight: 600;
      z-index: 1100;
      white-space: nowrap;
      opacity: 0;
      transition: all .3s;
      pointer-events: none;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
      max-width: calc(100vw - 40px);
    }

    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .toast.success {
      border-color: var(--teal-border);
    }

    .toast.error {
      border-color: rgba(255, 59, 59, .4);
    }

    /* ================================================================
   ÍCONE SVG (substitui emojis)
   ================================================================ */
    .icon {
      width: 20px;
      height: 20px;
      object-fit: contain;
      flex-shrink: 0;
    }