  :root {
    --bg: #091018;
    --surface: rgba(10, 20, 30, 0.82);
    --surface-2: #111d2b;
    --surface-3: #18283a;
    --border: rgba(196, 210, 228, 0.14);
    --accent: #4f8cff;
    --accent-2: #19c7a3;
    --accent-3: #ff7b54;
    --text: #f4f7fb;
    --muted: #9eb0c4;
    --danger: #ff6b6b;
    --warning: #ffca5c;
    --success: #19c7a3;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  [hidden] { display: none !important; }

  .is-hidden { display: none !important; }
  .is-block { display: block !important; }
  .is-flex { display: flex !important; }
  .is-grid { display: grid !important; }
  .is-inline-flex { display: inline-flex !important; }
  .is-invisible { visibility: hidden !important; }
  .cursor-pointer { cursor: pointer; }
  .field-no-margin { margin-bottom: 0 !important; }
  .mt-06 { margin-top: 0.6rem !important; }
  .mt-045 { margin-top: 0.45rem !important; }
  .mt-055 { margin-top: 0.55rem !important; }
  .card-title-tight { margin-bottom: 0 !important; }
  .badge-fail {
    background: rgba(255,107,107,0.14) !important;
    border-color: rgba(255,107,107,0.28) !important;
    color: #ffc0c0 !important;
  }
  .warning-text { color: #ffe29a !important; }

  body {
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    line-height: 1.5;
    background:
      radial-gradient(circle at top left, rgba(79,140,255,0.26), transparent 32%),
      radial-gradient(circle at top right, rgba(25,199,163,0.20), transparent 28%),
      linear-gradient(180deg, #071019 0%, #09131c 45%, #0b1621 100%);
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.15));
  }

  .shell {
    width: min(100%, 560px);
    margin: 12px auto 28px;
    padding: 0 0.55rem;
    position: relative;
    z-index: 1;
  }

  .mobile-bottom-nav {
    display: none;
  }

  body.app-shell-active .mobile-bottom-nav {
    display: grid !important;
  }

  .mobile-step-nav,
  .mobile-dashboard-summary,
  .mobile-history-summary,
  .mobile-billing-summary,
  .mobile-settings-summary {
    display: none;
  }

  .btn {
    border: none;
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
  }

  .btn:hover { transform: translateY(-1px); opacity: 0.94; }

  body:not(.app-shell-active) #auth-view .btn,
  body:not(.app-shell-active) .pricing-section .btn,
  body:not(.app-shell-active) .legal-content .actions .btn,
  body:not(.app-shell-active) .topbar-right .btn {
    width: 100%;
  }

  .btn-primary { background: linear-gradient(135deg, var(--accent), #6ca5ff); color: white; }
  .btn-success { background: linear-gradient(135deg, #17b895, var(--accent-2)); color: white; }
  .btn-danger { background: linear-gradient(135deg, #f35d7a, var(--danger)); color: white; }
  .btn-ghost {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text);
  }

  .panel {
    border: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(18px);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  #auth-view {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
  }

  .hero {
    order: 2;
    padding: 1.3rem 1.15rem;
    background:
      radial-gradient(circle at top left, rgba(79,140,255,0.22), transparent 38%),
      linear-gradient(180deg, rgba(17,29,43,0.92), rgba(10,20,30,0.96));
    border-top: 1px solid var(--border);
  }

  .hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--muted);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    margin-bottom: 0.8rem;
  }

  .hero h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.9rem, 9vw, 2.8rem);
    line-height: 0.96;
    max-width: 100%;
    letter-spacing: -0.03em;
  }

  .hero p {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.94rem;
    max-width: none;
  }

  .hero-offer {
    margin-top: 1rem;
    display: grid;
    gap: 0.4rem;
    padding: 0.8rem 0.9rem;
    max-width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 202, 92, 0.32);
    background: linear-gradient(135deg, rgba(255, 202, 92, 0.18), rgba(255, 123, 84, 0.12));
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
  }

  .hero-offer strong {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    color: #fff2bf;
    line-height: 1;
  }

  .hero-offer span {
    color: var(--text);
    font-size: 0.86rem;
  }

  .hero-metrics {
    margin-top: 0.85rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .hero-metric {
    display: grid;
    gap: 0.12rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
  }

  .hero-metric strong {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    line-height: 1.05;
  }

  .hero-metric span {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.9rem;
  }

  .hero-proof {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 0.8rem;
  }

  .install-banner {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    display: grid;
    gap: 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(79,140,255,0.22);
    background: linear-gradient(135deg, rgba(79,140,255,0.12), rgba(25,199,163,0.08));
  }

  .install-banner strong {
    display: block;
    font-family: 'Syne', sans-serif;
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
  }

  .install-banner span {
    color: #d7e5f5;
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .proof-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    color: #d7e5f5;
    font-size: 0.78rem;
  }

  .hero-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .hero-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.85rem 0.9rem;
    background: rgba(255,255,255,0.035);
  }

  .hero-card strong {
    display: block;
    font-family: 'Syne', sans-serif;
    margin-bottom: 0.35rem;
    font-size: 0.96rem;
  }

  .hero-card span {
    color: var(--muted);
    font-size: 0.82rem;
  }

  .auth-box {
    order: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  }

  .auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.35rem;
    margin-bottom: 1.2rem;
  }

  .auth-tab {
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    padding: 0.85rem 1rem;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    cursor: pointer;
  }

  .auth-tab.active {
    background: rgba(79,140,255,0.18);
    color: white;
  }

  .auth-pane { display: none; }
  .auth-pane.active { display: block; }

  .auth-box h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.7rem;
    margin-bottom: 0.45rem;
  }

  .auth-box .subtitle {
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: 0.88rem;
  }

  .field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .field {
    margin-bottom: 1rem;
  }

  .field.full { grid-column: 1 / -1; }

  .field-row {
    display: grid;
    gap: 0.75rem;
    align-items: stretch;
  }

  .field-row .field {
    flex: 1;
    margin-bottom: 0;
  }

  .field-help {
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.8rem;
  }

  label {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }

  input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    border-radius: 14px;
    padding: 0.88rem 0.95rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.18s ease, transform 0.18s ease;
  }

  input:focus, textarea:focus, select:focus {
    border-color: rgba(79,140,255,0.7);
    transform: translateY(-1px);
  }

  select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.4rem;
  }

  .alert {
    display: none;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-size: 0.9rem;
  }

  .alert-success {
    background: rgba(25,199,163,0.1);
    border: 1px solid rgba(25,199,163,0.28);
    color: var(--success);
  }

  .alert-error {
    background: rgba(255,107,107,0.1);
    border: 1px solid rgba(255,107,107,0.28);
    color: #ffc0c0;
  }

  .alert-warning {
    background: rgba(255,202,92,0.1);
    border: 1px solid rgba(255,202,92,0.28);
    color: #ffe29a;
  }

  #app-view { display: none; margin-top: 24px; }

  .nav-tabs {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }

  .tab-btn {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--muted);
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    cursor: pointer;
  }

  .tab-btn.active {
    background: linear-gradient(135deg, rgba(79,140,255,0.22), rgba(25,199,163,0.18));
    color: white;
    border-color: rgba(79,140,255,0.38);
  }

  .page { display: none; }
  .page.active { display: block; }

  .hero-strip {
    padding: 1.45rem 1.6rem;
    margin-bottom: 1rem;
  }

  .hero-strip h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.55rem, 2.3vw, 2.4rem);
    margin-bottom: 0.3rem;
  }

  .hero-strip p {
    color: var(--muted);
    max-width: 65ch;
  }

  .card-grid {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 1rem;
    align-items: start;
  }

  .stack { display: grid; gap: 1rem; }

  .app-grid {
    display: grid;
    gap: 1rem;
  }

  .card {
    padding: 1.35rem;
  }

  .card-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    font-family: 'Syne', sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #eef6ff;
  }

  .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }

  .card-head .card-title {
    margin-bottom: 0;
  }

  .mobile-section-toggle {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    padding: 0.45rem 0.78rem;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-section-body {
    display: grid;
    gap: 0.9rem;
  }

  .row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .text-muted {
    color: var(--muted);
    font-size: 0.9rem;
  }

  .gabarito-grid, .resp-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .q-item, .resp-item, .stat-box, .mini-card {
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 16px;
  }

  .q-item {
    padding: 0.75rem 0.55rem;
    text-align: center;
  }

  .q-num, .rnum {
    color: var(--muted);
    font-size: 0.74rem;
    margin-bottom: 0.45rem;
  }

  .q-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .opt-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
  }

  .opt-btn.selected {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
  }

  .actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .payment-primary {
    margin-top: 0.35rem;
  }

  .payment-alt {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.28);
  }

  .payment-alt summary {
    list-style: none;
    cursor: pointer;
  }

  .payment-alt summary::-webkit-details-marker {
    display: none;
  }

  .payment-alt-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .payment-alt-label::after {
    content: '+';
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    color: #dbe8ff;
    font-size: 0.85rem;
    line-height: 1;
  }

  .payment-alt[open] .payment-alt-label::after {
    content: '-';
  }

  .payment-alt-body {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.7rem;
  }

  .payment-alt-copy {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .prova-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-2);
    margin-bottom: 0.8rem;
  }

  .prova-card.selected {
    border-color: rgba(79,140,255,0.5);
    background: linear-gradient(135deg, rgba(79,140,255,0.12), rgba(25,199,163,0.08));
  }

  .prova-card.selectable {
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease;
  }

  .prova-card.selectable:hover {
    transform: translateY(-1px);
    border-color: rgba(79,140,255,0.45);
  }

  .prova-info { flex: 1; min-width: 0; }

  .prova-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .prova-score {
    text-align: right;
  }

  .prova-nome {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    margin-bottom: 0.22rem;
  }

  .prova-meta {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
  }

  .history-item {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-2);
  }

  .history-item-main {
    width: 100%;
    display: grid;
    gap: 0.45rem;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
    color: inherit;
    cursor: pointer;
  }

  .history-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .history-item-copy {
    min-width: 0;
    display: grid;
    gap: 0.14rem;
  }

  .history-item-title {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    line-height: 1.05;
  }

  .history-item-subtitle,
  .history-item-meta {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
  }

  .history-item-score {
    min-width: 3.9rem;
    display: grid;
    justify-items: end;
    gap: 0.08rem;
    text-align: right;
  }

  .history-item-score strong {
    font-size: 1.2rem;
    line-height: 1;
  }

  .history-item-score span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .history-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.08rem;
  }

  .history-item-note {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .history-item-actions,
  .workspace-drawer-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  .history-item-delete {
    margin-left: auto;
  }

  .badge {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(79,140,255,0.18);
    color: #dbe8ff;
    border: 1px solid rgba(79,140,255,0.22);
    white-space: nowrap;
  }

  .badge-success {
    background: rgba(25,199,163,0.12);
    color: #a7f1df;
    border-color: rgba(25,199,163,0.25);
  }

  .badge-warning {
    background: rgba(255,202,92,0.12);
    color: #ffe29a;
    border-color: rgba(255,202,92,0.24);
  }

  .badge-danger {
    background: rgba(255,107,107,0.12);
    color: #ffc0c0;
    border-color: rgba(255,107,107,0.24);
  }

  .badge-muted {
    background: rgba(158,176,196,0.12);
    color: #d4deea;
    border-color: rgba(158,176,196,0.24);
  }

  .upload-zone {
    position: relative;
    padding: 2.3rem 1.2rem;
    text-align: center;
    border: 2px dashed rgba(255,255,255,0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
    overflow: hidden;
  }

  .capture-guide {
    position: absolute;
    inset: 14px;
    pointer-events: none;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 0 999px rgba(5, 12, 20, 0.12);
  }

  .capture-guide-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(76%, 280px);
    aspect-ratio: 1 / 1.38;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 0 0 999px rgba(7, 14, 24, 0.16);
  }

  .capture-guide-frame::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(255,255,255,0.34);
  }

  .capture-guide-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #8be8d5;
    border-style: solid;
    border-width: 0;
  }

  .capture-guide-corner.tl {
    top: -3px;
    left: -3px;
    border-top-width: 4px;
    border-left-width: 4px;
    border-top-left-radius: 10px;
  }

  .capture-guide-corner.tr {
    top: -3px;
    right: -3px;
    border-top-width: 4px;
    border-right-width: 4px;
    border-top-right-radius: 10px;
  }

  .capture-guide-corner.bl {
    bottom: -3px;
    left: -3px;
    border-bottom-width: 4px;
    border-left-width: 4px;
    border-bottom-left-radius: 10px;
  }

  .capture-guide-corner.br {
    bottom: -3px;
    right: -3px;
    border-bottom-width: 4px;
    border-right-width: 4px;
    border-bottom-right-radius: 10px;
  }

  .capture-guide-label {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(7, 14, 24, 0.72);
    border: 1px solid rgba(255,255,255,0.12);
    color: #d9e5f4;
    font-size: 0.77rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .upload-zone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
  }

  .upload-icon {
    font-size: 2.7rem;
    display: block;
    margin-bottom: 0.8rem;
  }

  .capture-actions {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
  }

  .webcam-panel {
    display: none;
    margin-top: 1rem;
    padding: 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(79,140,255,0.18);
    background: linear-gradient(180deg, rgba(79,140,255,0.1), rgba(79,140,255,0.03));
  }

  .webcam-panel.active {
    display: block;
  }

  .webcam-stage {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(8,13,24,0.88), rgba(12,20,32,0.96));
  }

  .webcam-video {
    display: block;
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    background: #09131c;
  }

  .webcam-panel .capture-guide {
    inset: 10px;
    border-radius: 16px;
    box-shadow: none;
  }

  .webcam-panel .capture-guide-frame {
    width: min(74%, 300px);
  }

  .webcam-help {
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .webcam-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
  }

  .photo-tips {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
  }

  .photo-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
  }

  .photo-pill {
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 0.8rem;
  }

  .photo-pill.good {
    border-color: rgba(25,199,163,0.25);
    background: rgba(25,199,163,0.12);
    color: #b9f8ea;
  }

  .photo-tip-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  }

  .photo-tip-card.good {
    border-color: rgba(25,199,163,0.2);
    background: linear-gradient(180deg, rgba(25,199,163,0.11), rgba(25,199,163,0.03));
  }

  .photo-tip-card.avoid {
    border-color: rgba(255,202,92,0.24);
    background: linear-gradient(180deg, rgba(255,202,92,0.11), rgba(255,202,92,0.03));
  }

  .photo-tip-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Syne', sans-serif;
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
  }

  .photo-tip-card ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .photo-examples {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
  }

  .photo-example {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
  }

  .photo-example.good {
    border-color: rgba(25,199,163,0.24);
  }

  .photo-example.bad {
    border-color: rgba(255,107,107,0.22);
  }

  .photo-example-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-family: 'Syne', sans-serif;
    font-size: 0.92rem;
  }

  .photo-badge-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
  }

  .photo-example.good .photo-badge-dot {
    background: linear-gradient(180deg, #42e2be, #19c7a3);
    box-shadow: 0 0 0 5px rgba(25,199,163,0.12);
  }

  .photo-example.bad .photo-badge-dot {
    background: linear-gradient(180deg, #ff8c8c, #ff6b6b);
    box-shadow: 0 0 0 5px rgba(255,107,107,0.12);
  }

  .photo-frame {
    position: relative;
    height: 180px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background:
      radial-gradient(circle at top left, rgba(255,255,255,0.08), transparent 35%),
      linear-gradient(180deg, rgba(8,13,24,0.88), rgba(12,20,32,0.96));
  }

  .photo-frame::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 14px;
    border: 2px dashed rgba(255,255,255,0.14);
  }

  .photo-sheet {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 112px;
    height: 146px;
    border-radius: 12px;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,246,255,0.96));
    transform: translate(-50%, -50%);
    box-shadow: 0 14px 32px rgba(0,0,0,0.28);
  }

  .photo-sheet::before {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    top: 18px;
    bottom: 18px;
    border-radius: 8px;
    background:
      radial-gradient(circle, rgba(25,199,163,0.55) 0 32%, transparent 36%) 0 0 / 22px 22px,
      linear-gradient(180deg, rgba(6,16,28,0.1), rgba(6,16,28,0.04));
  }

  .photo-example.bad .photo-sheet {
    transform: translate(-50%, -50%) rotate(-13deg) scale(1.04);
    filter: blur(1.2px);
    opacity: 0.82;
  }

  .photo-glare,
  .photo-crop-mask {
    position: absolute;
    pointer-events: none;
  }

  .photo-example.good .photo-glare,
  .photo-example.good .photo-crop-mask {
    display: none;
  }

  .photo-glare {
    inset: 0;
    background: linear-gradient(125deg, transparent 18%, rgba(255,255,255,0.34) 48%, transparent 64%);
  }

  .photo-crop-mask {
    inset: 0;
    box-shadow: inset 28px -28px 0 rgba(8,13,24,0.9);
  }

  .photo-caption {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
  }

  @media (max-width: 720px) {
    .photo-examples {
      grid-template-columns: 1fr;
    }
  }

  .preview-check {
    display: none;
    margin-top: 0.9rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(79,140,255,0.22);
    background: linear-gradient(180deg, rgba(79,140,255,0.12), rgba(79,140,255,0.04));
  }

  .preview-check strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
  }

  .preview-check p {
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.5;
  }

  #preview-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 18px;
    display: block;
  }

  .preview-stage {
    display: none;
    position: relative;
    margin-top: 1rem;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(8,13,24,0.88), rgba(12,20,32,0.96));
  }

  .preview-stage .capture-guide {
    inset: 10px;
    border-radius: 16px;
    box-shadow: none;
    border-color: rgba(255,255,255,0.06);
  }

  .preview-stage .capture-guide-frame {
    width: min(72%, 300px);
    border-color: rgba(139,232,213,0.68);
    box-shadow: 0 0 0 999px rgba(5, 12, 20, 0.12);
  }

  .preview-stage .capture-guide-label {
    bottom: 10px;
    background: rgba(7, 14, 24, 0.76);
  }

  .preview-adaptive-guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .preview-adaptive-guide svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  .preview-adaptive-guide polygon {
    fill: rgba(25, 199, 163, 0.12);
    stroke: rgba(139, 232, 213, 0.96);
    stroke-width: 3;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 10px rgba(25,199,163,0.18));
  }

  .preview-adaptive-guide.warn polygon {
    fill: rgba(255, 202, 92, 0.12);
    stroke: rgba(255, 221, 136, 0.95);
    filter: drop-shadow(0 0 10px rgba(255,202,92,0.18));
  }

  .preview-adaptive-guide.error polygon {
    fill: rgba(255, 107, 107, 0.1);
    stroke: rgba(255, 138, 138, 0.95);
    filter: drop-shadow(0 0 10px rgba(255,107,107,0.16));
  }

  .preview-guide-chip {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.48rem 0.72rem;
    border-radius: 999px;
    background: rgba(7, 14, 24, 0.82);
    border: 1px solid rgba(255,255,255,0.1);
    color: #dff9f1;
    font-size: 0.78rem;
    line-height: 1;
    backdrop-filter: blur(6px);
  }

  .preview-adaptive-guide.warn .preview-guide-chip {
    color: #ffe4a3;
  }

  .preview-adaptive-guide.error .preview-guide-chip {
    color: #ffc1c1;
  }

  .loading {
    display: none;
    text-align: center;
    padding: 1.3rem 0.5rem 0.2rem;
    color: var(--muted);
  }

  .spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.12);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.8rem;
  }

  @keyframes spin { to { transform: rotate(360deg); } }

  .resultado-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.1rem;
  }

  .nota-circle {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 4px solid rgba(25,199,163,0.65);
    background: radial-gradient(circle at top, rgba(25,199,163,0.16), rgba(25,199,163,0.04));
  }

  .nota-wrap { text-align: center; }

  .nota-val {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 800;
  }

  .nota-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
  }

  .stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
  }

  .stat-box {
    min-width: 104px;
    padding: 0.9rem 1rem;
    text-align: center;
  }

  .stat-val {
    font-family: 'Syne', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
  }

  .stat-lbl {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .review-panel {
    display: none;
    margin: 0.2rem 0 1rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255,202,92,0.24);
    background: linear-gradient(180deg, rgba(255,202,92,0.08), rgba(255,202,92,0.03));
  }

  .review-panel.active { display: block; }

  .review-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 0.45rem;
    color: #ffe29a;
  }

  .review-copy {
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .review-list {
    margin-top: 0.7rem;
    padding-left: 1rem;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.5;
  }

  .review-meta {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
  }

  .review-actions {
    margin-top: 0.85rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  .correction-stage-card {
    margin-bottom: 1rem;
  }

  .correction-stage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
  }

  .correction-stage-kicker {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
  }

  .correction-stage-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    line-height: 1.05;
    margin-bottom: 0.32rem;
  }

  .correction-stage-copy {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
    max-width: 60ch;
  }

  .correction-stage-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  .uncertain-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.9rem;
  }

  .uncertain-item {
    padding: 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(8,13,24,0.45);
  }

  .uncertain-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .uncertain-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
  }

  .uncertain-actions .opt-btn {
    min-width: 56px;
  }

  .uncertain-reason {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.5;
  }

  .guide-stack {
    display: grid;
    gap: 0.95rem;
  }

  .guide-head {
    margin-bottom: 1rem;
    padding: 1rem 1.05rem 1.05rem;
    border-radius: 20px;
    border: 1px solid rgba(79, 140, 255, 0.22);
    background:
      radial-gradient(circle at top right, rgba(25,199,163,0.16), transparent 38%),
      linear-gradient(135deg, rgba(79,140,255,0.16), rgba(255,255,255,0.04));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  }

  .guide-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.36rem 0.68rem;
    border-radius: 999px;
    background: rgba(8, 16, 24, 0.42);
    border: 1px solid rgba(255,255,255,0.08);
    color: #d8e8fb;
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .guide-head strong {
    display: block;
    margin-top: 0.85rem;
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    color: #ffffff;
  }

  .guide-head p {
    margin-top: 0.45rem;
    color: #d1deec;
    font-size: 0.94rem;
    line-height: 1.6;
  }

  .guide-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: start;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)),
      rgba(11, 20, 30, 0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  }

  .guide-number {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #071019;
    background: linear-gradient(180deg, #ffe39f, #ffbf5b);
    box-shadow: 0 10px 22px rgba(255, 191, 91, 0.22);
  }

  .guide-step strong {
    display: block;
    margin-bottom: 0.3rem;
    color: #f7fbff;
    font-size: 0.98rem;
  }

  .guide-step p {
    margin: 0;
    color: #b4c4d6;
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .tour-launch {
    margin-top: 0.9rem;
  }

  .tour-overlay {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 80;
  }

  .tour-overlay.active {
    display: block;
  }

  .tour-overlay.active .tour-card {
    animation: tour-card-in 0.22s ease;
  }

  .tour-card {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: min(420px, calc(100vw - 2rem));
    padding: 1.1rem;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.14);
    background: linear-gradient(180deg, rgba(13,19,33,0.98), rgba(8,12,21,0.98));
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    z-index: 81;
  }

  @keyframes tour-card-in {
    from {
      opacity: 0;
      transform: translateY(16px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .tour-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
  }

  .tour-kicker {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffd27a;
  }

  .tour-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.2rem;
    cursor: pointer;
  }

  .tour-card h3 {
    margin: 0 0 0.35rem;
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
  }

  .tour-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.93rem;
  }

  .tour-progress {
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .tour-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .tour-actions-group {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  .resp-item {
    padding: 0.75rem 0.55rem;
    text-align: center;
  }

  .resp-item.certa {
    border-color: rgba(25,199,163,0.35);
    background: rgba(25,199,163,0.07);
  }

  .resp-item.errada {
    border-color: rgba(255,107,107,0.35);
    background: rgba(255,107,107,0.07);
  }

  .rgab {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
  }

  .raluno {
    color: var(--muted);
    font-size: 0.72rem;
    margin-top: 0.2rem;
  }

  .empty {
    text-align: center;
    padding: 2.2rem 1rem;
    color: var(--muted);
    border: 1px dashed rgba(255,255,255,0.13);
    border-radius: 18px;
    background: rgba(255,255,255,0.02);
  }

  .empty strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.35rem;
  }

  .profile-list {
    display: grid;
    gap: 0.7rem;
  }

  .profile-item {
    display: grid;
    gap: 0.18rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-2);
  }

  .profile-item strong {
    font-family: 'Syne', sans-serif;
    font-size: 0.84rem;
  }

  .profile-item span {
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.45;
  }

  .billing-summary {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
  }

  .billing-required-copy {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0.25rem 0 1rem;
  }

  .pix-payment-card {
    display: grid;
    gap: 1rem;
  }

  .pix-payment-copy {
    display: grid;
    gap: 0.55rem;
    color: var(--muted);
    line-height: 1.5;
  }

  .pix-payment-copy strong {
    color: #eef5ff;
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
  }

  .pix-payment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.82rem;
  }

  .pix-payment-qr {
    display: flex;
    justify-content: center;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(79,140,255,0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  }

  .pix-payment-qr img {
    width: min(100%, 280px);
    height: auto;
    display: block;
    border-radius: 18px;
    background: #ffffff;
    padding: 0.85rem;
  }

  .pix-payment-code {
    display: grid;
    gap: 0.45rem;
  }

  .pix-payment-code label {
    color: #d7e5f5;
    font-size: 0.84rem;
    font-weight: 700;
  }

  .pix-payment-code textarea {
    min-height: 120px;
    resize: vertical;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: #eef5ff;
    font: inherit;
    line-height: 1.45;
  }

  .route-summary {
    display: grid;
    gap: 0.75rem;
  }

  .settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    gap: 1rem;
    align-items: start;
  }

  .settings-form {
    display: grid;
    gap: 1rem;
  }

  .settings-lock {
    display: grid;
    gap: 0.85rem;
  }

  .settings-lock .mini-card {
    padding: 1rem;
  }

  .settings-note {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(79,140,255,0.2);
    background: linear-gradient(180deg, rgba(79,140,255,0.1), rgba(79,140,255,0.03));
    color: #d7e5f5;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .billing-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .ops-kpis {
    margin-bottom: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ops-sections {
    margin-bottom: 1rem;
  }

  .ops-card {
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
  }

  .ops-events {
    display: grid;
    gap: 0.8rem;
  }

  .billing-note {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
  }

  .billing-note-success {
    color: #a7f1df;
    background: rgba(25,199,163,0.1);
    border-color: rgba(25,199,163,0.24);
  }

  .billing-note-warning {
    color: #ffe29a;
    background: rgba(255,202,92,0.1);
    border-color: rgba(255,202,92,0.24);
  }

  .billing-note-danger {
    color: #ffc0c0;
    background: rgba(255,107,107,0.1);
    border-color: rgba(255,107,107,0.24);
  }

  .billing-note-muted {
    color: #d4deea;
    background: rgba(158,176,196,0.1);
    border-color: rgba(158,176,196,0.2);
  }

  .pricing-section {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.85rem;
  }

  .pricing-header {
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
  }

  .pricing-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.5rem, 2.2vw, 2.3rem);
    margin-bottom: 0.4rem;
  }

  .pricing-header p {
    color: var(--muted);
    max-width: none;
    font-size: 0.94rem;
  }

  .pricing-focus {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 0.45rem;
  }

  .pricing-metrics,
  .plan-grid {
    display: grid;
    gap: 1rem;
  }

  .pricing-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .plan-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.18);
  }

  .plan-card.featured {
    border-color: rgba(79,140,255,0.45);
    background:
      radial-gradient(circle at top right, rgba(79,140,255,0.16), transparent 36%),
      linear-gradient(180deg, rgba(17,29,43,0.96), rgba(10,20,30,0.96));
    box-shadow: 0 22px 50px rgba(8, 16, 28, 0.32);
    transform: none;
  }

  .plan-card.featured::after {
    content: 'Plano recomendado';
    position: static;
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, #ffe39f, #ffbf5b);
    color: #071019;
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transform: none;
    border-radius: 999px;
  }

  .plan-kicker {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--muted);
    font-size: 0.76rem;
    margin-bottom: 0.8rem;
  }

  .plan-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
  }

  .plan-anchor {
    margin-top: 0.2rem;
    color: #dce8f8;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0.9rem 0 0.5rem;
  }

  .plan-price strong {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
  }

  .plan-price span {
    color: var(--muted);
    font-size: 0.9rem;
  }

  .plan-price-note {
    margin-top: 0.2rem;
    color: #d8e5f6;
    font-size: 0.82rem;
  }

  .plan-list {
    margin: 0.8rem 0 1rem;
    padding-left: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
    flex: 1;
  }

  .plan-footnote {
    margin-top: 0.95rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .payment-primary .btn {
    width: 100%;
  }

  .payment-alt .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-top: 0.9rem;
    padding: 1rem;
    background: rgba(7, 15, 24, 0.62);
    border-radius: 18px;
  }

  .site-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    align-items: start;
  }

  .site-footer h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    letter-spacing: 0.04em;
  }

  .site-footer p,
  .site-footer li {
    color: #90a4bb;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .site-footer ul {
    list-style: none;
    display: grid;
    gap: 0.12rem;
  }

  .site-footer a,
  .legal-content a {
    color: var(--accent);
    text-decoration: none;
  }

  .site-footer a:hover,
  .legal-content a:hover {
    text-decoration: underline;
  }

  .site-footer-tag {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.55rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    color: #b9c9d9;
    font-size: 0.72rem;
  }

  .topbar {
    padding: 1rem 1.05rem;
    display: grid;
    gap: 0.85rem;
  }

  .brand {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
  }

  .brand-mark {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(79,140,255,0.24), rgba(25,199,163,0.18));
    border: 1px solid rgba(255,255,255,0.08);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .brand-copy {
    display: grid;
    gap: 0.12rem;
  }

  .brand-copy h1 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    line-height: 1;
  }

  .brand-copy p {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .topbar-right {
    display: grid;
  }

  .legal-shell {
    max-width: 560px;
  }

  .legal-grid {
    display: grid;
    gap: 1rem;
  }

  .legal-content {
    display: grid;
    gap: 1rem;
  }

  .legal-content h3 {
    margin: 0.25rem 0 0;
    font-size: 1rem;
  }

  .legal-content p {
    margin: 0;
  }

  .legal-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.45rem;
  }

  .green { color: var(--success); }
  .red { color: #ff9595; }
  .yellow { color: var(--warning); }
  .mb1 { margin-bottom: 1rem; }
  .mt1 { margin-top: 1rem; }

  @media (max-width: 980px) {
    #auth-view,
    .card-grid,
    .settings-grid,
    .plan-grid,
    .pricing-metrics,
    .billing-kpis,
    .ops-kpis,
    .site-footer-grid {
      grid-template-columns: 1fr;
    }

    .hero {
      border-right: none;
      border-bottom: 1px solid var(--border);
    }

    .plan-card.featured {
      transform: none;
    }

    .plan-card.featured::after {
      top: 14px;
      right: 14px;
      padding: 0.35rem 0.75rem;
      transform: none;
      border-radius: 999px;
    }

    .payment-alt .actions {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 720px) {
    .shell {
      width: min(100%, calc(100% - 18px));
      margin-top: 10px;
    }

    .nav-tabs {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .row,
    .field-grid,
    .field-row,
    .resultado-header {
      grid-template-columns: 1fr;
    }

    .field-row {
      display: grid;
    }

    .gabarito-grid,
    .resp-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-grid {
      grid-template-columns: 1fr;
    }

    .hero,
    .auth-box,
    .hero-strip,
    .card {
      padding: 1.1rem;
    }

    .hero {
      padding: 1.3rem 1.15rem;
    }

    .hero h2 {
      font-size: clamp(1.9rem, 9vw, 2.8rem);
      max-width: 100%;
      line-height: 0.96;
    }

    .hero p,
    .pricing-header p,
    .hero-strip p {
      font-size: 0.94rem;
    }

    .hero-offer {
      display: grid;
      gap: 0.35rem;
      width: 100%;
    }

    .hero-actions,
    .hero-proof,
    .pricing-focus {
      display: grid;
      grid-template-columns: 1fr;
    }

    .hero-card {
      min-height: 0;
    }

    .pricing-header,
    .site-footer {
      padding: 1.1rem;
    }

    .plan-card {
      padding: 1.1rem;
    }

    .plan-card.featured::after {
      position: static;
      display: inline-flex;
      width: fit-content;
      margin-bottom: 0.85rem;
    }

    .btn,
    .tab-btn {
      width: 100%;
    }

    .actions {
      display: grid;
      grid-template-columns: 1fr;
    }

    .payment-alt .actions {
      grid-template-columns: 1fr;
    }
  }

  @media (max-width: 460px) {
    .nav-tabs,
    .auth-tabs {
      grid-template-columns: 1fr;
    }

    .gabarito-grid,
    .resp-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-strip,
    .pricing-header,
    .card,
    .site-footer {
      border-radius: 20px;
    }

    .plan-price strong {
      font-size: 1.8rem;
    }
  }

  html,
  body {
    width: 100%;
    height: 100%;
  }

  .app-view {
    display: none;
  }

  .app-workspace {
    height: 100%;
    min-height: 0;
  }

  .app-utility-row,
  .app-kpi-rail,
  .app-notification-rail {
    display: grid;
  }

  .app-kpi-card,
  .app-notification-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
  }

  .app-kpi-card {
    padding: 0.9rem 0.95rem;
  }

  .app-kpi-label,
  .app-filter-label {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .app-kpi-value {
    margin-top: 0.35rem;
    font-family: 'Syne', sans-serif;
    font-size: 1.12rem;
    color: var(--text);
    line-height: 1.05;
  }

  .app-kpi-value.green { color: #89f0d9; }
  .app-kpi-value.yellow { color: #ffe29a; }
  .app-kpi-value.red { color: #ff9e9e; }

  .app-kpi-detail {
    margin-top: 0.28rem;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .app-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
  }

  .app-filter-chip {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    padding: 0.58rem 0.82rem;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
  }

  .app-filter-chip.active {
    color: var(--text);
    border-color: rgba(79, 140, 255, 0.34);
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.18), rgba(25, 199, 163, 0.14));
  }

  .app-notification-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .app-notification-card {
    padding: 0.8rem 0.9rem;
    display: grid;
    gap: 0.25rem;
  }

  .app-notification-card strong {
    font-size: 0.9rem;
  }

  .app-notification-card span {
    color: var(--muted);
    font-size: 0.82rem;
  }

  .app-notification-card.success {
    border-color: rgba(25, 199, 163, 0.24);
    background: linear-gradient(135deg, rgba(25, 199, 163, 0.16), rgba(255, 255, 255, 0.03));
  }

  .app-notification-card.warning {
    border-color: rgba(255, 202, 92, 0.24);
    background: linear-gradient(135deg, rgba(255, 202, 92, 0.14), rgba(255, 255, 255, 0.03));
  }

  .app-notification-card.danger {
    border-color: rgba(255, 107, 107, 0.24);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(255, 255, 255, 0.03));
  }

  .app-notification-card.neutral {
    background: rgba(255, 255, 255, 0.04);
  }

  .workspace-drawer {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
  }

  .workspace-drawer.open {
    display: block;
  }

  .workspace-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 16, 0.62);
    backdrop-filter: blur(6px);
  }

  .workspace-drawer-panel {
    position: absolute;
    top: 1.5vh;
    right: 1.2vw;
    bottom: 1.5vh;
    width: min(34vw, 520px);
    min-width: 320px;
    padding: 1.15rem 1rem 1rem;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.9rem;
    background: rgba(7, 15, 24, 0.96);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
    overflow: hidden;
  }

  .workspace-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
  }

  .workspace-drawer-kicker {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
  }

  .workspace-drawer-head h3 {
    font-family: 'Syne', sans-serif;
    line-height: 1;
  }

  .workspace-drawer-head h3 {
    font-size: clamp(1.2rem, 1.6vw, 1.7rem);
  }

  .workspace-drawer-close {
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
  }

  .workspace-drawer-tabs {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
  }

  .workspace-drawer-tabs button {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    padding: 0.52rem 0.82rem;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
  }

  .workspace-drawer-tabs button.active {
    color: var(--text);
    border-color: rgba(79, 140, 255, 0.4);
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.16), rgba(25, 199, 163, 0.12));
  }

  .workspace-drawer-body {
    min-height: 0;
    overflow: auto;
    padding-right: 0.25rem;
    display: grid;
    gap: 0.9rem;
    align-content: start;
  }

  .workspace-drawer-section,
  .workspace-drawer-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.95rem;
  }

  .workspace-drawer-section strong,
  .workspace-drawer-card strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
  }

  .workspace-drawer-meta {
    display: grid;
    gap: 0.6rem;
  }

  .workspace-drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .workspace-drawer-grid .mini-card {
    padding: 0.8rem;
  }

  .workspace-drawer-list {
    display: grid;
    gap: 0.6rem;
  }

  .workspace-drawer-list-item {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.75rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .workspace-drawer-actions {
    justify-content: stretch;
  }

  .workspace-drawer-actions .btn {
    width: 100%;
  }

  body.app-shell-active {
    overflow: auto;
    --bg: #eef3f8;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --surface-3: #edf2f7;
    --border: rgba(15, 23, 42, 0.08);
    --text: #152538;
    --muted: #66778c;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    background:
      radial-gradient(circle at top left, rgba(47, 111, 236, 0.08), transparent 26%),
      radial-gradient(circle at top right, rgba(23, 184, 149, 0.06), transparent 24%),
      linear-gradient(180deg, #f4f7fb 0%, #eef3f8 100%);
  }

  body.app-shell-active::before {
    opacity: 0.12;
  }

  body.app-shell-active .shell {
    width: min(100%, 560px);
    min-height: 100dvh;
    height: auto;
    margin: 0 auto;
    padding: calc(0.4rem + env(safe-area-inset-top, 0px)) 0.75rem calc(8rem + env(safe-area-inset-bottom, 0px));
    display: block;
    overflow: visible;
    align-items: start;
  }

  body.app-shell-active #auth-view,
  body.app-shell-active #pricing-section,
  body.app-shell-active .site-footer {
    display: none !important;
  }

  body.app-shell-active .app-view {
    display: block;
    min-width: 0;
    min-height: 0;
    padding-bottom: calc(9rem + env(safe-area-inset-bottom, 0px));
    scroll-padding-top: calc(2.5rem + env(safe-area-inset-top, 0px));
  }

  body.app-shell-active .app-workspace {
    display: grid;
    grid-template-rows: none;
    gap: 0.75rem;
  }

  body.app-shell-active .app-kpi-rail {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
  }

  body.app-shell-active .app-utility-row {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0.85rem;
    align-items: start;
  }

  body.app-shell-active .app-quick-filters {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #f9fbfd);
    padding: 0.9rem 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  body.app-shell-active .app-kpi-card,
  body.app-shell-active .app-notification-card {
    background: linear-gradient(180deg, #ffffff, #f9fbfd);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  body.app-shell-active .app-filter-chip {
    background: #f3f6fa;
    border-color: rgba(15, 23, 42, 0.08);
    color: #5d6e81;
  }

  body.app-shell-active .app-filter-chip.active {
    color: #1f4f97;
    border-color: #d0def8;
    background: linear-gradient(135deg, #edf4ff, #f4fbf8);
  }

  .workspace-toggle-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #f4f7fb;
  }

  .workspace-toggle-btn {
    min-height: 2.5rem !important;
    padding: 0.55rem 0.82rem !important;
    border-radius: 999px !important;
    font-size: 0.8rem !important;
    background: transparent !important;
  }

  .workspace-toggle-btn.is-selected {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.18), rgba(25, 199, 163, 0.12)) !important;
    border-color: rgba(79, 140, 255, 0.32) !important;
    color: var(--text) !important;
  }

  body.app-shell-active .app-stage {
    min-height: 0;
    overflow: visible;
  }

  body.app-shell-active .page {
    display: none;
  }

  body.app-shell-active .page.active {
    display: grid;
    grid-template-rows: none;
    gap: 0.75rem;
    height: auto;
    min-height: 0;
    overflow: visible;
    align-content: start;
  }

  body.app-shell-active #page-historico.active {
    grid-template-rows: auto auto auto;
  }

  body.app-shell-active .hero-strip {
    margin-bottom: 0;
    padding: 1rem 1.15rem;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff, #f9fbfd);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  body.app-shell-active .hero-strip h2 {
    font-size: clamp(1.2rem, 1.45vw, 1.55rem);
    margin-bottom: 0.25rem;
  }

  body.app-shell-active .hero-strip p {
    max-width: 72ch;
    font-size: 0.88rem;
  }

  body.app-shell-active .card-grid,
  body.app-shell-active .settings-grid {
    min-height: 0;
    overflow: visible;
    align-items: stretch;
  }

  body.app-shell-active .card-grid {
    grid-template-columns: 1fr;
  }

  body.app-shell-active .settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body.app-shell-active .stack {
    min-height: 0;
    overflow: visible;
    padding-right: 0;
    align-content: start;
  }

  body.app-shell-active .card,
  body.app-shell-active .panel {
    border-radius: 24px;
  }

  body.app-shell-active .card {
    padding: 1rem 1rem 0.95rem;
    background: linear-gradient(180deg, #ffffff, #fdfefe);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  }

  body.app-shell-active .card-title {
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    color: #203247;
  }

  body.app-shell-active .row,
  body.app-shell-active .field-grid {
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }

  body.app-shell-active .field-row,
  body.app-shell-active .billing-kpis,
  body.app-shell-active .ops-kpis,
  body.app-shell-active .stats-row,
  body.app-shell-active .photo-examples {
    grid-template-columns: 1fr;
  }

  body.app-shell-active .field {
    margin-bottom: 0.75rem;
  }

  body.app-shell-active input,
  body.app-shell-active select,
  body.app-shell-active textarea {
    min-height: 2.9rem;
    background: #f7f9fc;
    border-color: rgba(15, 23, 42, 0.08);
    color: #152538;
  }

  body.app-shell-active .actions {
    gap: 0.55rem;
  }

  body.app-shell-active .actions .btn {
    padding: 0.82rem 1rem;
  }

  body.app-shell-active .stats-row,
  body.app-shell-active .billing-kpis,
  body.app-shell-active .ops-kpis {
    gap: 0.7rem;
  }

  body.app-shell-active .gabarito-grid,
  body.app-shell-active .resp-grid {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 0.55rem;
  }

  body.app-shell-active .q-item,
  body.app-shell-active .resp-item,
  body.app-shell-active .stat-box,
  body.app-shell-active .mini-card,
  body.app-shell-active .prova-card {
    border-radius: 18px;
    border-color: rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  }

  body.app-shell-active #page-professor .stack,
  body.app-shell-active #page-correcao .stack,
  body.app-shell-active #page-billing .stack,
  body.app-shell-active #page-settings .stack {
    max-height: 100%;
  }

  body.app-shell-active #tour-guide-card {
    min-height: 0;
  }

  body.app-shell-active #historico-list,
  body.app-shell-active #lista-gabaritos,
  body.app-shell-active #sel-provas-list,
  body.app-shell-active #billing-pix-content,
  body.app-shell-active #billing-boleto-content,
  body.app-shell-active #billing-summary-page,
  body.app-shell-active #ops-diagnostics,
  body.app-shell-active .pricing-embed,
  body.app-shell-active #workspace-drawer-body {
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }

  body.app-shell-active #page-historico > .card.panel:last-child,
  body.app-shell-active #page-ops .card.panel:first-child {
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto;
  }

  body.app-shell-active .pricing-embed .plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  body.app-shell-active .pricing-embed .plan-card {
    padding: 1rem;
    border-radius: 20px;
  }

  body.app-shell-active .pricing-embed .plan-card .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  body.app-shell-active .pricing-embed .plan-card .actions .btn,
  body.app-shell-active .pix-payment-card .actions .btn,
  body.app-shell-active .payment-alt .actions .btn {
    width: 100%;
  }

  body.app-shell-active #lista-gabaritos,
  body.app-shell-active #sel-provas-list {
    display: grid;
    gap: 0.65rem;
  }

  body.app-shell-active .route-summary {
    gap: 0.65rem;
  }

  body.app-shell-active .review-actions,
  body.app-shell-active .uncertain-actions,
  body.app-shell-active .pix-payment-card .actions,
  body.app-shell-active .payment-alt .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  body.app-shell-active #page-correcao .card-grid {
    grid-template-columns: 1fr;
  }

  body.app-shell-active .correction-stage-card {
    margin-bottom: 0;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, #ffffff, #f9fbfd);
  }

  body.app-shell-active .correction-stage-grid {
    grid-template-columns: 1fr;
  }

  body.app-shell-active #page-correcao[data-correction-state="capturing"] .photo-examples,
  body.app-shell-active #page-correcao[data-correction-state="capturing"] .photo-tips,
  body.app-shell-active #page-correcao[data-correction-state="analyzing"] .photo-examples,
  body.app-shell-active #page-correcao[data-correction-state="analyzing"] .photo-tips,
  body.app-shell-active #page-correcao[data-correction-state="review"] .photo-examples,
  body.app-shell-active #page-correcao[data-correction-state="review"] .photo-tips,
  body.app-shell-active #page-correcao[data-correction-state="ready"] .photo-examples,
  body.app-shell-active #page-correcao[data-correction-state="ready"] .photo-tips,
  body.app-shell-active #page-correcao[data-correction-state="retake"] .photo-examples {
    display: none;
  }

  body.app-shell-active #page-correcao[data-correction-state="review"] #tour-guide-card,
  body.app-shell-active #page-correcao[data-correction-state="ready"] #tour-guide-card {
    opacity: 0.78;
  }

  body.app-shell-active label {
    color: #516173;
    font-weight: 700;
  }

  body.app-shell-active .prova-card {
    align-items: flex-start;
    margin-bottom: 0.65rem;
  }

  body.app-shell-active .prova-card.selected {
    border-color: rgba(47, 111, 236, 0.35);
    background: linear-gradient(180deg, #f4f8ff, #ffffff);
  }

  body.app-shell-active .prova-nome {
    color: #122338;
  }

  body.app-shell-active .prova-meta {
    color: #67788d;
  }

  body.app-shell-active .history-item {
    background: linear-gradient(180deg, #ffffff, #f9fbfd);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  body.app-shell-active .history-item-title {
    color: #122338;
  }

  body.app-shell-active .history-item-subtitle,
  body.app-shell-active .history-item-meta,
  body.app-shell-active .history-item-score span {
    color: #67788d;
  }

  body.app-shell-active .badge {
    background: #eef4ff;
    color: #315a9e;
    border-color: #d9e6ff;
  }

  body.app-shell-active .badge-success {
    background: #eafaf6;
    color: #167a63;
    border-color: #cdeee5;
  }

  body.app-shell-active .badge-warning {
    background: #fff7e8;
    color: #946200;
    border-color: #f6e3ba;
  }

  body.app-shell-active .badge-danger {
    background: #fff0f0;
    color: #b14545;
    border-color: #f3c9c9;
  }

  body.app-shell-active .badge-muted {
    background: #f2f5f8;
    color: #617286;
    border-color: #dbe3eb;
  }

  body.app-shell-active .empty {
    border-color: #d8e1ea;
    background: #f8fafc;
    color: #68798d;
  }

  body.app-shell-active .empty strong {
    color: #152538;
  }

  body.app-shell-active .profile-item {
    background: #f9fbfd;
    border-color: rgba(15, 23, 42, 0.07);
  }

  body.app-shell-active .profile-item strong {
    color: #1e3147;
  }

  body.app-shell-active .profile-item span {
    color: #66778c;
  }

  body.app-shell-active .review-panel {
    border-color: #f0ddb0;
    background: linear-gradient(180deg, #fffaf0, #fffdfa);
  }

  body.app-shell-active .review-title {
    color: #9a6a09;
  }

  body.app-shell-active .review-copy {
    color: #27374a;
  }

  body.app-shell-active .review-list,
  body.app-shell-active .uncertain-reason {
    color: #66778c;
  }

  body.app-shell-active .uncertain-item {
    border-color: rgba(15, 23, 42, 0.08);
    background: #f9fbfd;
  }

  body.app-shell-active .guide-head {
    border-color: #d8e6ff;
    background:
      radial-gradient(circle at top right, rgba(23, 184, 149, 0.10), transparent 42%),
      linear-gradient(135deg, rgba(47, 111, 236, 0.10), rgba(255, 255, 255, 0.98));
    box-shadow: none;
  }

  body.app-shell-active .guide-kicker {
    background: #edf4ff;
    border-color: #d5e4ff;
    color: #2d5a9a;
  }

  body.app-shell-active .guide-head strong,
  body.app-shell-active .guide-step strong {
    color: #1d3147;
  }

  body.app-shell-active .guide-head p,
  body.app-shell-active .guide-step p {
    color: #617286;
  }

  body.app-shell-active .guide-step {
    border-color: rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  }

  body.app-shell-active .guide-number {
    color: #ffffff;
    background: linear-gradient(180deg, #2f6fec, #275fd0);
    box-shadow: 0 10px 20px rgba(47, 111, 236, 0.18);
  }

  body.app-shell-active .mobile-step-nav {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.1rem 0 0.25rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body.app-shell-active .mobile-step-nav::-webkit-scrollbar {
    display: none;
  }

  body.app-shell-active .mobile-step-chip {
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f3f6fa;
    color: #5d6e81;
    border-radius: 999px;
    padding: 0.62rem 0.85rem;
    white-space: nowrap;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
  }

  body.app-shell-active .mobile-section-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  body.app-shell-active .mobile-section-collapsed .mobile-section-body {
    display: none;
  }

  body.app-shell-active #page-professor > .hero-strip,
  body.app-shell-active #page-historico > .hero-strip,
  body.app-shell-active #page-billing > .hero-strip,
  body.app-shell-active #page-settings > .hero-strip {
    display: none;
  }

  body.app-shell-active .mobile-bottom-nav {
    position: fixed;
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 75;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    padding: 0.42rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(16px);
  }

  body.app-shell-active .mobile-nav-link {
    border: none;
    background: transparent;
    color: #64758b;
    min-height: 3.3rem;
    padding: 0.38rem 0.2rem;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.18rem;
    border-radius: 14px;
    font: inherit;
    cursor: pointer;
  }

  body.app-shell-active .mobile-nav-link.active {
    background: linear-gradient(180deg, #edf4ff, #f4fbf8);
    color: #1f4f97;
  }

  body.app-shell-active .mobile-nav-icon {
    font-size: 1rem;
    line-height: 1;
  }

  body.app-shell-active .mobile-nav-label {
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  body.app-shell-active .workspace-drawer-panel {
    top: auto;
    right: 0.75rem;
    left: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    width: auto;
    min-width: 0;
    min-height: 52dvh;
    max-height: 80dvh;
    border-radius: 22px;
    padding: 0.9rem 0.85rem 1rem;
  }

  body.app-shell-active .settings-note {
    border-color: #d7e6ff;
    background: linear-gradient(180deg, #f3f7ff, #f8fbff);
    color: #4b607a;
  }

  body.app-shell-active .billing-note {
    background: #f9fbfd;
    border-color: rgba(15, 23, 42, 0.07);
    color: #617286;
  }

  body.app-shell-active .billing-note-success {
    background: #ebfaf6;
    border-color: #cdeee5;
    color: #197660;
  }

  body.app-shell-active .billing-note-warning {
    background: #fff8ec;
    border-color: #f4e3bc;
    color: #946200;
  }

  body.app-shell-active .billing-note-danger {
    background: #fff1f1;
    border-color: #f0cccc;
    color: #b14545;
  }

  body.app-shell-active .billing-note-muted {
    background: #f2f5f8;
    border-color: #dce4ec;
    color: #617286;
  }

  body.app-shell-active .upload-zone {
    background: #f8fafc;
    border-color: #d8e1ea;
  }

  body.app-shell-active .tour-card {
    border-color: rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 252, 0.99));
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  }

  body.app-shell-active .tour-kicker {
    color: #2d5a9a;
  }

  body.app-shell-active #page-correcao[data-correction-state="analyzing"] #tour-guide-card .guide-stack,
  body.app-shell-active #page-correcao[data-correction-state="review"] #tour-guide-card .guide-stack,
  body.app-shell-active #page-correcao[data-correction-state="ready"] #tour-guide-card .guide-stack {
    display: none;
  }

  body.app-shell-active #page-correcao[data-correction-state="analyzing"] #tour-guide-card .guide-head p,
  body.app-shell-active #page-correcao[data-correction-state="review"] #tour-guide-card .guide-head p,
  body.app-shell-active #page-correcao[data-correction-state="ready"] #tour-guide-card .guide-head p {
    margin-bottom: 0;
  }

  body.app-shell-active #resultado-section {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  body.app-shell-active .photo-tips,
  body.app-shell-active .photo-examples {
    grid-template-columns: 1fr;
  }

  body.app-shell-active #preview-stage {
    min-height: min(30vh, 280px);
    max-height: min(30vh, 280px);
  }

  body.app-shell-active .tour-overlay {
    inset: 0;
  }

  @media (max-width: 1180px) {
    body.app-shell-active .shell {
      grid-template-columns: clamp(212px, 24vw, 280px) minmax(0, 1fr);
    }

    body.app-shell-active .app-utility-row,
    body.app-shell-active .app-kpi-rail {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .workspace-drawer-panel {
      width: min(44vw, 520px);
    }
  }

  @media (max-width: 1040px) {
    body.app-shell-active .shell {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
    }
  }

  @media (max-width: 920px) {
    body.app-shell-active .shell {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
      padding: 1vh 1vw;
    }

    body.app-shell-active .app-workspace {
      grid-template-rows: auto auto;
    }

    body.app-shell-active .app-notification-rail {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .card-grid,
    body.app-shell-active .settings-grid {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .mobile-section-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    body.app-shell-active .mobile-section-collapsed .mobile-section-body {
      display: none;
    }

    body.app-shell-active .row,
    body.app-shell-active .field-grid,
    body.app-shell-active .field-row,
    body.app-shell-active .billing-kpis,
    body.app-shell-active .ops-kpis,
    body.app-shell-active .stats-row {
      grid-template-columns: 1fr 1fr;
    }

    body.app-shell-active .field-row,
    body.app-shell-active .stats-row {
      display: grid;
    }

    body.app-shell-active .workspace-drawer-panel {
      top: 1vh;
      right: 1vw;
      bottom: 1vh;
      left: 1vw;
      width: auto;
      min-width: 0;
    }

    body.app-shell-active #page-professor[data-split-view="primary"] .stack-secondary,
    body.app-shell-active #page-correcao[data-split-view="primary"] .stack-secondary,
    body.app-shell-active #page-billing[data-split-view="primary"] .stack-secondary,
    body.app-shell-active #page-settings[data-split-view="primary"] .stack-secondary {
      display: none;
    }

    body.app-shell-active #page-professor[data-split-view="secondary"] .stack-primary,
    body.app-shell-active #page-correcao[data-split-view="secondary"] .stack-primary,
    body.app-shell-active #page-billing[data-split-view="secondary"] .stack-primary,
    body.app-shell-active #page-settings[data-split-view="secondary"] .stack-primary-card {
      display: none;
    }
  }

  @media (max-width: 680px) {
    body.app-shell-active .shell {
      padding: 0.5rem;
      gap: 0.5rem;
    }

    body.app-shell-active .app-filter-label {
      font-size: 0.68rem;
    }

    body.app-shell-active .mobile-section-toggle {
      min-height: 2.25rem;
      border-color: rgba(15, 23, 42, 0.08);
      background: #f5f8fc;
      color: #5e7084;
    }

    body.app-shell-active .mobile-section-body {
      gap: 0.75rem;
    }

    body.app-shell-active .mobile-section-collapsed {
      gap: 0;
    }

    body.app-shell-active .mobile-section-collapsed .card-head {
      margin-bottom: 0;
    }

    body.app-shell-active #dashboard-account-summary .mobile-section-body,
    body.app-shell-active #dashboard-automation-card .mobile-section-body,
    body.app-shell-active #dashboard-proof-list .mobile-section-body,
    body.app-shell-active #tour-select-prova .mobile-section-body,
    body.app-shell-active #tour-aluno .mobile-section-body,
    body.app-shell-active #tour-foto .mobile-section-body,
    body.app-shell-active #resultado-section .mobile-section-body,
    body.app-shell-active #tour-guide-card .mobile-section-body,
    body.app-shell-active #billing-summary-card .mobile-section-body,
    body.app-shell-active #billing-pix-card .mobile-section-body,
    body.app-shell-active #billing-boleto-card .mobile-section-body,
    body.app-shell-active #billing-required-card .mobile-section-body,
    body.app-shell-active #billing-guide-card .mobile-section-body,
    body.app-shell-active #billing-plan-catalog-card .mobile-section-body,
    body.app-shell-active #settings-summary-card .mobile-section-body,
    body.app-shell-active #settings-guidance-card .mobile-section-body,
    body.app-shell-active #settings-privacy-card .mobile-section-body {
      gap: 0.7rem;
    }

    body.app-shell-active #settings-guidance-card {
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 18px;
      background: linear-gradient(180deg, #ffffff, #f9fbfd);
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
      padding: 0.85rem;
    }

    body.app-shell-active #settings-guidance-card .mini-card {
      background: #f7fafe;
    }

    body.app-shell-active .app-kpi-rail,
    body.app-shell-active .app-notification-rail {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .app-kpi-card,
    body.app-shell-active .app-notification-card,
    body.app-shell-active .app-quick-filters,
    body.app-shell-active .hero-strip,
    body.app-shell-active .card {
      border-radius: 18px;
    }

    body.app-shell-active .row,
    body.app-shell-active .field-grid,
    body.app-shell-active .field-row,
    body.app-shell-active .billing-kpis,
    body.app-shell-active .ops-kpis,
    body.app-shell-active .stats-row {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .field-row,
    body.app-shell-active .stats-row {
      display: grid;
    }

    .workspace-toggle-group {
      width: 100%;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      border-radius: 18px;
    }

    .workspace-toggle-btn {
      width: 100%;
      min-height: 2.7rem !important;
      border-radius: 14px !important;
      font-size: 0.74rem !important;
    }

    body.app-shell-active .workspace-drawer-grid {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .workspace-drawer-panel {
      top: auto;
      right: 0.5rem;
      left: 0.5rem;
      bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
      min-height: 52dvh;
      max-height: 78dvh;
      border-radius: 20px;
      padding: 0.85rem 0.8rem 1rem;
    }

    .correction-stage-grid {
      grid-template-columns: 1fr;
    }

    .correction-stage-actions {
      justify-content: stretch;
    }

    .correction-stage-actions .btn {
      width: 100%;
    }

    body.app-shell-active .actions {
      display: grid;
      grid-template-columns: 1fr;
    }

    body.app-shell-active .actions .btn,
    body.app-shell-active .prova-actions .btn {
      width: 100%;
    }

    body.app-shell-active .prova-actions {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr;
      justify-content: stretch;
    }

    body.app-shell-active .prova-score {
      text-align: left;
    }

    body.app-shell-active .prova-card {
      gap: 0.65rem;
      padding: 0.8rem 0.82rem;
      border-radius: 16px;
    }

    body.app-shell-active .history-item {
      gap: 0.6rem;
      padding: 0.82rem;
      border-radius: 18px;
      margin-bottom: 0.65rem;
    }

    body.app-shell-active .history-item-top {
      gap: 0.7rem;
    }

    body.app-shell-active .history-item-title {
      font-size: 0.94rem;
    }

    body.app-shell-active .history-item-subtitle,
    body.app-shell-active .history-item-meta,
    body.app-shell-active .history-item-note {
      font-size: 0.76rem;
      line-height: 1.35;
    }

    body.app-shell-active .history-item-score {
      min-width: 3.35rem;
    }

    body.app-shell-active .history-item-score strong {
      font-size: 1.05rem;
    }

    body.app-shell-active .history-item-score span {
      font-size: 0.64rem;
    }

    body.app-shell-active .history-item-badges {
      gap: 0.35rem;
    }

    body.app-shell-active .history-item-actions {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 0.45rem;
      align-items: stretch;
    }

    body.app-shell-active .history-item-actions .btn {
      min-height: 2.55rem;
    }

    body.app-shell-active .history-item-delete {
      margin-left: 0;
      min-width: 5.8rem;
      padding-inline: 0.85rem;
    }

    body.app-shell-active .prova-nome {
      font-size: 0.92rem;
      margin-bottom: 0.18rem;
    }

    body.app-shell-active .prova-meta {
      font-size: 0.76rem;
      line-height: 1.35;
    }

    body.app-shell-active .profile-item {
      padding: 0.72rem 0.8rem;
      border-radius: 14px;
    }

    body.app-shell-active .profile-item strong {
      font-size: 0.78rem;
    }

    body.app-shell-active .profile-item span {
      font-size: 0.78rem;
      line-height: 1.35;
    }

    body.app-shell-active .mini-card {
      padding: 0.72rem;
    }

    body.app-shell-active .mini-card span {
      font-size: 0.76rem;
      line-height: 1.32;
    }

    body.app-shell-active .mobile-section-toggle {
      padding-inline: 0.68rem;
      font-size: 0.68rem;
    }

    body.app-shell-active #dashboard-proof-form .card-head,
    body.app-shell-active #dashboard-answer-key .card-head,
    body.app-shell-active #dashboard-account-summary .card-head,
    body.app-shell-active #dashboard-automation-card .card-head,
    body.app-shell-active #dashboard-proof-list .card-head,
    body.app-shell-active #tour-select-prova .card-head,
    body.app-shell-active #tour-aluno .card-head,
    body.app-shell-active #tour-foto .card-head,
    body.app-shell-active #resultado-section .card-head,
    body.app-shell-active #tour-guide-card .card-head,
    body.app-shell-active #billing-summary-card .card-head,
    body.app-shell-active #billing-pix-card .card-head,
    body.app-shell-active #billing-boleto-card .card-head,
    body.app-shell-active #billing-required-card .card-head,
    body.app-shell-active #billing-guide-card .card-head,
    body.app-shell-active #billing-plan-catalog-card .card-head,
    body.app-shell-active #settings-form-card .card-head,
    body.app-shell-active #settings-summary-card .card-head,
    body.app-shell-active #settings-guidance-card .card-head,
    body.app-shell-active #settings-privacy-card .card-head {
      margin-bottom: 0.75rem;
    }

    body.app-shell-active .gabarito-grid,
    body.app-shell-active .resp-grid {
      grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    }

    body.app-shell-active #preview-stage {
      min-height: 180px;
      max-height: 180px;
    }

    body.app-shell-active .app-view {
      padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px));
      scroll-padding-top: calc(5.9rem + env(safe-area-inset-top, 0px));
    }

    body.app-shell-active #page-correcao .hero-strip {
      display: none;
    }

    body.app-shell-active #page-professor > .hero-strip {
      display: none;
    }

    body.app-shell-active #page-historico > .hero-strip {
      display: none;
    }

    body.app-shell-active #page-billing > .hero-strip,
    body.app-shell-active #page-settings > .hero-strip {
      display: none;
    }

    body.app-shell-active .mobile-dashboard-summary {
      display: block;
    }

    body.app-shell-active .mobile-history-summary {
      display: block;
    }

    body.app-shell-active .mobile-billing-summary,
    body.app-shell-active .mobile-settings-summary {
      display: block;
    }

    body.app-shell-active .mobile-home-card {
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 18px;
      background: linear-gradient(180deg, #ffffff, #f9fbfd);
      box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
      padding: 0.85rem;
    }

    body.app-shell-active .mobile-home-kicker {
      color: #7a8a9e;
      font-size: 0.64rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin-bottom: 0.22rem;
    }

    body.app-shell-active .mobile-home-title {
      color: #152538;
      font-family: 'Syne', sans-serif;
      font-size: 1rem;
      line-height: 1.08;
    }

    body.app-shell-active .mobile-home-copy {
      color: #64758b;
      font-size: 0.84rem;
      line-height: 1.45;
      margin-top: 0.32rem;
    }

    body.app-shell-active .mobile-home-stats {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.45rem;
      margin-top: 0.7rem;
    }

    body.app-shell-active .mobile-home-stats .mini-card {
      padding: 0.7rem 0.55rem;
      text-align: center;
    }

    body.app-shell-active .mobile-home-stats .mini-card strong {
      display: block;
      font-family: 'Syne', sans-serif;
      font-size: 1rem;
      color: #152538;
    }

    body.app-shell-active .mobile-home-stats .mini-card span {
      display: block;
      color: #6b7c90;
      font-size: 0.7rem;
      margin-top: 0.12rem;
    }

    body.app-shell-active .mobile-home-status {
      margin-top: 0.6rem;
      display: grid;
      gap: 0.35rem;
      color: #66778c;
      font-size: 0.78rem;
    }

    body.app-shell-active #page-correcao .stack-primary {
      gap: 0.75rem;
    }

    body.app-shell-active #page-historico .card.panel {
      margin-bottom: 0;
    }

    body.app-shell-active #page-billing .stack-primary,
    body.app-shell-active #page-settings .stack-primary,
    body.app-shell-active #page-settings .stack-secondary {
      gap: 0.75rem;
    }

    body.app-shell-active .stat-box {
      padding: 0.78rem 0.72rem;
    }

    body.app-shell-active .stat-val {
      font-size: 1.02rem;
    }

    body.app-shell-active .stat-lbl {
      font-size: 0.7rem;
    }

    body.app-shell-active .btn,
    body.app-shell-active .mobile-step-chip,
    body.app-shell-active .app-filter-chip,
    body.app-shell-active .workspace-toggle-btn {
      min-height: 2.8rem;
    }

    body.app-shell-active .badge {
      padding: 0.38rem 0.62rem;
      font-size: 0.72rem;
    }

    body.app-shell-active .review-actions,
    body.app-shell-active .uncertain-actions,
    body.app-shell-active .pix-payment-card .actions,
    body.app-shell-active .payment-alt .actions {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .uncertain-item,
    body.app-shell-active .review-panel,
    body.app-shell-active .pix-payment-card,
    body.app-shell-active .pricing-embed .plan-card {
      border-radius: 18px;
    }

    body.app-shell-active .pix-payment-qr {
      padding: 0.8rem;
    }

    body.app-shell-active .pix-payment-code textarea {
      min-height: 104px;
    }

    body.app-shell-active .pricing-embed .plan-card {
      padding: 0.9rem;
    }

    body.app-shell-active .pricing-embed .plan-card h3 {
      font-size: 1.12rem;
    }

    body.app-shell-active .pricing-embed .plan-price strong {
      font-size: 1.7rem;
    }

    body.app-shell-active .pricing-embed .plan-list {
      margin: 0.8rem 0 0.95rem;
      font-size: 0.84rem;
      line-height: 1.45;
    }

    body.app-shell-active .pricing-embed .plan-footnote,
    body.app-shell-active .plan-price-note,
    body.app-shell-active .billing-required-copy,
    body.app-shell-active .review-copy,
    body.app-shell-active .uncertain-reason,
    body.app-shell-active .review-list {
      font-size: 0.8rem;
      line-height: 1.42;
    }

    body.app-shell-active .pricing-embed .plan-card.featured::after {
      right: -48px;
      padding: 0.38rem 2.2rem;
      font-size: 0.64rem;
    }

    body.app-shell-active .mobile-step-nav {
      display: flex;
      gap: 0.45rem;
      overflow-x: auto;
      padding: 0.1rem 0 0.25rem;
      scrollbar-width: none;
    }

    body.app-shell-active .mobile-step-nav::-webkit-scrollbar {
      display: none;
    }

    body.app-shell-active .mobile-step-chip {
      border: 1px solid rgba(15, 23, 42, 0.08);
      background: #f3f6fa;
      color: #5d6e81;
      border-radius: 999px;
      padding: 0.62rem 0.85rem;
      white-space: nowrap;
      font: inherit;
      font-size: 0.76rem;
      font-weight: 700;
      cursor: pointer;
      box-shadow: none;
    }

    body.app-shell-active .mobile-bottom-nav {
      position: fixed;
      left: 0.5rem;
      right: 0.5rem;
      bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
      z-index: 75;
      display: grid !important;
      grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
      gap: 0.35rem;
      padding: 0.45rem;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.96);
      box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
      backdrop-filter: blur(16px);
    }

    body.app-shell-active .mobile-nav-link {
      border: none;
      background: transparent;
      color: #64758b;
      min-height: 3.4rem;
      padding: 0.4rem 0.2rem;
      display: grid;
      justify-items: center;
      align-content: center;
      gap: 0.18rem;
      border-radius: 14px;
      font: inherit;
      cursor: pointer;
    }

    body.app-shell-active .mobile-nav-link.active {
      background: linear-gradient(180deg, #edf4ff, #f4fbf8);
      color: #1f4f97;
    }

    body.app-shell-active .mobile-nav-icon {
      font-size: 1rem;
      line-height: 1;
    }

    body.app-shell-active .mobile-nav-label {
      font-size: 0.68rem;
      font-weight: 700;
      line-height: 1;
      white-space: nowrap;
    }
  }

  @media (max-width: 480px) {
    body.app-shell-active .shell {
      padding: 0.4rem;
    }

    body.app-shell-active .hero-strip,
    body.app-shell-active .card,
    body.app-shell-active .panel {
      border-radius: 16px;
    }

    body.app-shell-active input,
    body.app-shell-active select,
    body.app-shell-active textarea,
    body.app-shell-active .btn {
      min-height: 2.7rem;
    }

    body.app-shell-active .workspace-toggle-group {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .workspace-toggle-btn {
      min-height: 2.5rem !important;
    }

    body.app-shell-active .mobile-bottom-nav {
      left: 0.35rem;
      right: 0.35rem;
      bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
      gap: 0.2rem;
      padding: 0.35rem;
    }

    body.app-shell-active .mobile-nav-link {
      min-height: 3.1rem;
      border-radius: 12px;
    }

    body.app-shell-active .mobile-nav-label {
      font-size: 0.62rem;
    }

    body.app-shell-active .workspace-drawer-panel {
      left: 0.35rem;
      right: 0.35rem;
      bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
      max-height: 82dvh;
      border-radius: 16px;
      padding: 0.72rem 0.7rem 0.85rem;
    }

    body.app-shell-active .history-item-actions {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .history-item-delete {
      min-width: 0;
    }

    body.app-shell-active .mobile-home-stats {
      grid-template-columns: 1fr;
    }

    body.app-shell-active .pricing-embed .plan-card.featured::after {
      display: none;
    }

    body.app-shell-active .pricing-embed .plan-card,
    body.app-shell-active .pix-payment-card,
    body.app-shell-active .review-panel,
    body.app-shell-active .uncertain-item {
      border-radius: 16px;
    }

    body.app-shell-active .pricing-embed .plan-price {
      margin: 0.7rem 0 0.45rem;
    }

    body.app-shell-active .pricing-embed .plan-price strong {
      font-size: 1.5rem;
    }

    body.app-shell-active .pricing-embed .plan-kicker,
    body.app-shell-active .plan-anchor,
    body.app-shell-active .plan-footnote,
    body.app-shell-active .review-list,
    body.app-shell-active .review-copy,
    body.app-shell-active .uncertain-reason,
    body.app-shell-active .billing-required-copy {
      font-size: 0.76rem;
      line-height: 1.38;
    }

    body.app-shell-active .mobile-home-status,
    body.app-shell-active .review-meta,
    body.app-shell-active .pix-payment-meta {
      font-size: 0.74rem;
    }

    body.app-shell-active .pix-payment-qr img {
      width: min(100%, 220px);
      padding: 0.65rem;
      border-radius: 14px;
    }

    body.app-shell-active .pix-payment-code textarea {
      min-height: 92px;
      padding: 0.78rem 0.82rem;
    }
  }

  @media (max-height: 860px) {
    body.app-shell-active .shell {
      padding: 0.8vh 0.8vw;
      gap: 0.8vw;
    }

    body.app-shell-active .hero-strip p {
      font-size: 0.82rem;
      line-height: 1.35;
    }

    .workspace-toggle-btn {
      min-height: 2.35rem !important;
      padding: 0.45rem 0.7rem !important;
    }

    body.app-shell-active .hero-strip {
      padding: 0.8rem 1rem;
      border-radius: 20px;
    }

    body.app-shell-active .correction-stage-card {
      padding: 0.82rem 0.9rem;
    }

    body.app-shell-active .correction-stage-title {
      font-size: 1.02rem;
    }

    body.app-shell-active .correction-stage-copy {
      font-size: 0.84rem;
    }

    body.app-shell-active .card,
    body.app-shell-active .panel {
      border-radius: 20px;
    }

    body.app-shell-active .card {
      padding: 0.82rem 0.85rem 0.8rem;
    }

    body.app-shell-active .card-title {
      margin-bottom: 0.65rem;
    }

    body.app-shell-active .field,
    body.app-shell-active .row,
    body.app-shell-active .field-grid,
    body.app-shell-active .stack {
      gap: 0.62rem;
    }

    body.app-shell-active input,
    body.app-shell-active select,
    body.app-shell-active textarea {
      min-height: 2.6rem;
    }

    body.app-shell-active .btn {
      padding-top: 0.72rem;
      padding-bottom: 0.72rem;
    }

    body.app-shell-active .guide-head p,
    body.app-shell-active .photo-caption,
    body.app-shell-active .photo-tip-card ul,
    body.app-shell-active .photo-tip-card .photo-tip-title + ul {
      font-size: 0.8rem;
    }

    body.app-shell-active .guide-stack,
    body.app-shell-active .route-summary,
    body.app-shell-active .profile-list {
      gap: 0.55rem;
    }

    body.app-shell-active .guide-step {
      gap: 0.65rem;
      padding: 0.72rem;
    }

    body.app-shell-active .guide-number {
      width: 1.8rem;
      height: 1.8rem;
      min-width: 1.8rem;
    }

    body.app-shell-active .photo-examples,
    body.app-shell-active .photo-tips {
      gap: 0.55rem;
    }

    body.app-shell-active .workspace-drawer-panel {
      border-radius: 24px;
      padding: 0.9rem;
    }
  }

  @media (max-height: 760px) {
    body.app-shell-active .hero-strip p,
    body.app-shell-active .guide-head p {
      display: block;
    }

    body.app-shell-active .photo-checklist {
      display: flex;
    }

    body.app-shell-active .photo-examples,
    body.app-shell-active .photo-tips {
      display: grid;
    }

    body.app-shell-active .hero-strip {
      padding: 0.68rem 0.9rem;
    }

    body.app-shell-active .hero-strip h2 {
      font-size: 1.08rem;
      margin-bottom: 0.12rem;
    }

    body.app-shell-active .correction-stage-copy {
      display: block;
    }

    .workspace-toggle-group {
      padding: 0.22rem;
      gap: 0.22rem;
    }

    body.app-shell-active .card {
      padding: 0.72rem;
    }

    body.app-shell-active .card-title {
      font-size: 0.74rem;
    }

    body.app-shell-active .stats-row,
    body.app-shell-active .billing-kpis,
    body.app-shell-active .ops-kpis,
    body.app-shell-active .actions {
      gap: 0.5rem;
    }

    body.app-shell-active .stat-box,
    body.app-shell-active .mini-card,
    body.app-shell-active .prova-card,
    body.app-shell-active .q-item,
    body.app-shell-active .resp-item {
      border-radius: 16px;
    }

    body.app-shell-active .guide-stack,
    body.app-shell-active #historico-list,
    body.app-shell-active #lista-gabaritos,
    body.app-shell-active #sel-provas-list,
    body.app-shell-active #billing-summary-page,
    body.app-shell-active #ops-diagnostics {
      max-height: none;
    }

    body.app-shell-active #preview-stage {
      min-height: min(22vh, 180px);
      max-height: min(22vh, 180px);
    }

    body.app-shell-active .workspace-drawer-head h3 {
      font-size: 1.15rem;
    }
  }

  @media (max-width: 920px) and (max-height: 760px) {
  }

  @media (max-width: 480px) {
    body.app-shell-active .shell {
      padding-inline: 0.45rem;
    }

    body.app-shell-active .mobile-bottom-nav,
    body.app-shell-active .workspace-drawer-panel {
      border-radius: 16px;
    }

    body.app-shell-active .mobile-bottom-nav {
      left: 0.45rem;
      right: 0.45rem;
    }

    body.app-shell-active .mobile-home-stats {
      grid-template-columns: 1fr;
    }
  }
