/* ===== THEME (igual ao print: dark + laranja) ===== */
:root{
  --bg0:#070A10;
  --bg1:#0B0F18;
  --panel:#0E1421;
  --panel2:#0C111B;
  --stroke:#1B2333;
  --stroke2:#253045;
  --text:#E9EEF7;
  --muted:#A9B3C4;
  --muted2:#7E8AA3;
  --accent:#FF7A18;
  --accent2:#FF9940;
  --green:#23C55E;

  --radius:18px;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --shadow2: 0 10px 30px rgba(0,0,0,.45);
}

[data-theme="light"]{
  --bg0:#F6F8FB;
  --bg1:#E9EEF5;
  --panel:#FFFFFF;
  --panel2:#F8FAFC;
  --stroke:#D8E0EC;
  --stroke2:#C5CFDD;
  --text:#111827;
  --muted:#475569;
  --muted2:#64748B;
  --shadow: 0 18px 50px rgba(15,23,42,.12);
  --shadow2: 0 10px 26px rgba(15,23,42,.10);
}

@font-face {
  font-family: "Material Icons Outlined";
  src: url("/icons/ui-pack/font/MaterialIconsOutlined-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===== BODY / BACKGROUND ===== */
body.subscription-page{
  min-height:100vh;
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 35% 18%, rgba(255,122,24,.12), transparent 60%),
    radial-gradient(900px 600px at 72% 22%, rgba(66,95,255,.10), transparent 60%),
    linear-gradient(135deg, var(--bg0), var(--bg1));
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 42px 20px;
}

html,
body{
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== WRAPPER ===== */
.subscription-wrapper{
  width:100%;
  max-width: 1200px;
  display:grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  min-width: 0;
}

/* ===== LEFT "SIDEBAR" FEEL ===== */
.brand-section{
  background: linear-gradient(180deg, rgba(255,122,24,.08), rgba(255,122,24,.02));
  border: 1px solid rgba(255,122,24,.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding: 22px 20px;
  position:relative;
  overflow:hidden;
}

.brand-section::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(550px 220px at 15% 20%, rgba(255,122,24,.18), transparent 55%);
  pointer-events:none;
}

.brand-chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius: 14px;
  background: rgba(14,20,33,.75);
  border: 1px solid var(--stroke);
  color: var(--accent);
  font-weight: 800;
  letter-spacing:.4px;
  position:relative;
  z-index:1;
}

.brand-logo{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display:block;
}

.brand-section h1{
  margin: 14px 0 8px;
  font-size: 30px;
  line-height:1.1;
  font-weight: 900;
  position:relative;
  z-index:1;
}

.brand-section p{
  margin:0;
  color: var(--muted);
  line-height:1.6;
  font-size: 14px;
  position:relative;
  z-index:1;
}

.trust-list{
  margin: 16px 0 0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  position:relative;
  z-index:1;
}

.trust-list li{
  list-style:none;
  display:flex;
  align-items:center;
  gap:10px;
  color: rgba(233,238,247,.88);
  font-size: 13px;
}

.trust-list li::before{
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content:"check_circle";
  color: var(--green);
}

/* ===== RIGHT PANEL ===== */
.plans-section{
  background: linear-gradient(180deg, rgba(14,20,33,.88), rgba(12,17,27,.88));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  min-width: 0;
}

.plans-header h2{
  margin:0;
  font-size: 22px;
  font-weight: 900;
}

.plans-header p{
  margin:6px 0 0;
  color: var(--muted2);
  font-size: 13px;
}

/* ===== PLANS GRID / CARDS ===== */
.plans-grid{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  min-width: 0;
}

.plan-card{
  border-radius: 16px;
  padding: 18px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  min-height: 310px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  position: relative;
  min-width: 0;
}

.plan-card:hover{
  transform: translateY(-6px);
  border-color: rgba(255,122,24,.35);
  box-shadow: 0 16px 42px rgba(0,0,0,.45);
}

.plan-card.featured{
  border: 2px solid rgba(255,122,24,.85);
  background: linear-gradient(180deg, rgba(255,122,24,.10), rgba(255,122,24,.03));
  box-shadow: 0 18px 55px rgba(255,122,24,.14);
}

.badge{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#111;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing:.4px;
  box-shadow: 0 10px 20px rgba(255,122,24,.25);
  white-space: nowrap;
}

.plan-label{
  color: var(--muted2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing:.6px;
  text-transform: uppercase;
}

.plan-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.plan-price{
  font-size: 28px;
  font-weight: 1000;
  margin: 2px 0 2px;
  color: var(--text);
}

.plan-card.featured .plan-price{
  color: var(--accent);
}

.plan-subtitle{
  margin:0;
  color: var(--muted2);
  font-size: 12px;
}

.plan-features{
  margin-top: 12px;
  color: rgba(233,238,247,.78);
  font-size: 12px;
  line-height: 1.7;
  min-height: 40px;
}

.plan-actions{
  display:grid;
  gap: 8px;
  margin-top: 14px;
}

.payment-methods{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 6px;
  background: rgba(255,255,255,.03);
}

.payment-method-btn{
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.payment-method-btn.is-active{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #111827;
}

.plan-features.featured{
  color: rgba(255,122,24,.95);
  font-weight: 800;
}

/* ===== BUTTONS ===== */
.plan-button,
.free-plan-button{
  width:100%;
  border:0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
  cursor:pointer;
  color:#111;
  background: linear-gradient(135deg, #3A4356, #2A3346);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  text-transform: none;
}

.feature-compare{
  margin-top: 18px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  padding: 14px 14px;
  overflow-x: auto;
}

.feature-compare h3{
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.feature-compare p{
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted2);
  line-height: 1.5;
}

.compare-grid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1.4fr repeat(4, 0.6fr);
  gap: 10px 12px;
  align-items:center;
  min-width: 700px;
}

.compare-head{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted2);
  font-weight: 900;
}

.compare-item{
  padding: 10px 0;
  border-top: 1px solid rgba(37,48,69,.55);
}

.compare-name{
  color: rgba(233,238,247,.88);
  font-size: 12px;
  line-height: 1.4;
}

.compare-yes{
  color: rgba(35,197,94,.95);
  display: grid;
  place-items: center;
}

.compare-no{
  color: rgba(169,179,196,.55);
  display: grid;
  place-items: center;
}

.compare-yes::before,
.compare-no::before{
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
}

.compare-yes::before{ content: "check"; }
.compare-no::before{ content: "remove"; }

.compare-cell{
  text-align:center;
  font-size: 12px;
}

.compare-text{
  color: rgba(233,238,247,.84);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.plan-button:hover{
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 28px rgba(0,0,0,.45);
}

.plan-button.featured{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 12px 26px rgba(255,122,24,.22);
}

/* ===== BENEFITS ===== */
.benefits-box{
  margin-top: 16px;
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255,122,24,.20);
  background: linear-gradient(180deg, rgba(255,122,24,.08), rgba(255,122,24,.02));
  color: rgba(233,238,247,.85);
  font-size: 12px;
  line-height: 1.6;
}

.benefits-box strong{
  color: rgba(255,153,64,.95);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.subscription-hero-actions {
  margin-top: 16px;
}

.is-subscription-hidden {
  display: none;
}

.primary-cta{
  background: linear-gradient(135deg, #ff7a18, #ff9940);
  color: #111827;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor:pointer;
  transition: all 0.2s ease;
  font-weight: 800;
}

.primary-cta:hover{
  filter: brightness(1.03);
}

/* ===== LOGOUT + ERROR ===== */
.ghost{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--stroke);
  color: rgba(233,238,247,.80);
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor:pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.ghost:hover{
  border-color: rgba(255,122,24,.35);
  color: var(--text);
}

#error-msg{
  margin-top: 8px;
  color: #ff6b6b;
  font-size: 12px;
  min-height: 16px;
  white-space: pre-wrap;
}

.subscription-toast-wrap{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1300;
  display: grid;
  gap: 10px;
  width: min(92vw, 360px);
}

.subscription-toast{
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: linear-gradient(180deg, rgba(14,20,33,.96), rgba(11,15,24,.96));
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  padding: 11px 12px;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.subscription-toast.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.subscription-toast.success{ border-color: rgba(35,197,94,.45); }
.subscription-toast.error{ border-color: rgba(255,107,107,.45); }
.subscription-toast.info{ border-color: rgba(255,122,24,.35); }

.cancel-confirm-modal{
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.56);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1200;
}

.cancel-confirm-modal.is-open{
  display: flex;
}

.cancel-confirm-dialog,
.pix-payment-dialog{
  width: min(100%, 460px);
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  padding: 22px;
  color: #111827;
}

.pix-payment-dialog{
  width: min(100%, 520px);
}

.subscription-details-dialog{
  width: min(100%, 760px);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: #0f1724;
  color: #e9eef7;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.subscription-details-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.subscription-details-eyebrow{
  display: block;
  margin-bottom: 7px;
  color: #ff9a4c;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.subscription-details-header h3{
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
}

.subscription-details-header p{
  margin: 7px 0 0;
  color: #a9b3c4;
  font-size: 13px;
  line-height: 1.5;
}

.subscription-details-close{
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  color: #e9eef7;
  cursor: pointer;
}

.subscription-details-close:hover{
  border-color: rgba(255, 122, 24, 0.58);
  color: #ff9a4c;
}

.subscription-details-close > span{
  font-size: 25px;
  line-height: 1;
}

.subscription-details-content{
  padding: 22px 24px;
}

.subscription-details-loading,
.subscription-details-error,
.subscription-details-empty{
  padding: 26px 18px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  color: #a9b3c4;
  text-align: center;
}

.subscription-details-error{
  display: grid;
  gap: 6px;
  color: #fca5a5;
}

.subscription-details-summary{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.subscription-details-plan,
.subscription-details-provider{
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 13px;
  background: rgba(148, 163, 184, 0.055);
}

.subscription-details-plan{
  display: grid;
  gap: 5px;
}

.subscription-details-plan > strong{
  font-size: 20px;
}

.subscription-details-plan small,
.subscription-details-provider small{
  color: #a9b3c4;
  line-height: 1.45;
}

.subscription-details-status{
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.subscription-details-provider{
  display: flex;
  align-items: center;
  gap: 12px;
}

.subscription-details-provider > span{
  color: #ff9a4c;
  font-size: 28px;
}

.subscription-details-provider > .subscription-details-provider-icon{
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(255, 122, 24, 0.4);
  border-radius: 50%;
  background: rgba(255, 122, 24, 0.1);
  font-size: 20px;
  font-weight: 800;
}

.subscription-details-provider div{
  display: grid;
  gap: 4px;
}

.subscription-details-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.subscription-details-grid > div{
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 11px;
  background: rgba(2, 6, 23, 0.24);
}

.subscription-details-grid span{
  color: #8f9bae;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.subscription-details-grid strong{
  overflow: hidden;
  color: #e9eef7;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-details-notice{
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  font-size: 12px;
  line-height: 1.5;
}

.subscription-details-history{
  margin-top: 20px;
}

.subscription-details-history-title{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.subscription-details-history-title span{
  color: #8f9bae;
  font-size: 11px;
}

.subscription-details-history-list{
  display: grid;
  gap: 7px;
}

.subscription-details-payment{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 13px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 10px;
}

.subscription-details-payment > span{
  min-width: 0;
  display: grid;
  gap: 3px;
}

.subscription-details-payment small{
  overflow: hidden;
  color: #8f9bae;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-details-payment em{
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.subscription-details-payment em[data-status="approved"],
.subscription-details-payment em[data-status="paid"]{
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.subscription-details-payment em[data-status="rejected"],
.subscription-details-payment em[data-status="cancelled"],
.subscription-details-payment em[data-status="canceled"]{
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.subscription-details-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  flex-wrap: wrap;
}

.subscription-details-actions button{
  min-height: 42px;
}

.subscription-details-cancel{
  border-color: rgba(239, 68, 68, 0.38) !important;
  color: #fca5a5 !important;
}

[data-theme="light"] .subscription-details-dialog{
  border-color: rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #111827;
}

[data-theme="light"] .subscription-details-header p,
[data-theme="light"] .subscription-details-plan small,
[data-theme="light"] .subscription-details-provider small,
[data-theme="light"] .subscription-details-history-title span,
[data-theme="light"] .subscription-details-payment small{
  color: #64748b;
}

[data-theme="light"] .subscription-details-close,
[data-theme="light"] .subscription-details-plan,
[data-theme="light"] .subscription-details-provider,
[data-theme="light"] .subscription-details-grid > div{
  background: #f8fafc;
  color: #111827;
}

[data-theme="light"] .subscription-details-grid strong{
  color: #111827;
}

.cancel-confirm-dialog h3,
.pix-payment-dialog h3{
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.cancel-confirm-dialog p,
.pix-payment-dialog p{
  margin: 0;
  color: #4b5563;
  line-height: 1.55;
}

.pix-qr{
  width: min(72vw, 260px);
  aspect-ratio: 1;
  margin: 16px auto 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.pix-qr img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pix-code{
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.16);
  padding: 10px;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #111827;
  box-sizing: border-box;
}

.pix-status{
  margin-top: 10px;
  min-height: 18px;
  font-size: 13px;
  color: #4b5563;
}

.pix-meta{
  margin-top: 12px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 10px;
  background: #f9fafb;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #374151;
}

.pix-meta-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pix-meta-row strong{
  color: #111827;
}

.pix-status.ok{
  color: #065f46;
}

.pix-status.warn{
  color: #92400e;
}

.pix-status.error{
  color: #991b1b;
}

.pix-payment-dialog .ghost{
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.2);
  color: #111827;
}

.pix-payment-dialog .ghost:hover{
  background: #f8fafc;
  border-color: rgba(255, 122, 24, 0.55);
  color: #111827;
}

.pix-payment-dialog .ghost:disabled{
  opacity: 0.72;
  color: #374151;
}

.cancel-confirm-actions{
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cancel-confirm-actions button{
  min-width: 150px;
}

body.modal-open{
  overflow: hidden;
}

@media (max-width: 680px){
  .subscription-details-modal{
    align-items: flex-end;
    padding: 0;
  }

  .subscription-details-dialog{
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .subscription-details-header,
  .subscription-details-content{
    padding-left: 18px;
    padding-right: 18px;
  }

  .subscription-details-summary,
  .subscription-details-grid{
    grid-template-columns: 1fr 1fr;
  }

  .subscription-details-provider{
    grid-column: 1 / -1;
  }

  .subscription-details-actions{
    padding: 14px 18px 18px;
  }

  .subscription-details-actions button{
    flex: 1 1 100%;
  }
}

.subscription-notice{
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(35,197,94,.38);
  background: linear-gradient(180deg, rgba(35,197,94,.14), rgba(35,197,94,.06));
  color: rgba(233,238,247,.95);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.6;
}

.subscription-notice strong{
  display: block;
  color: #91f7b5;
  margin-bottom: 4px;
  font-size: 12px;
}

.cancel-protocol-box {
  margin-top: 12px;
  padding: 10px;
  border-radius: 7px;
  background: rgba(255, 122, 24, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cancel-protocol-label {
  margin-bottom: 4px;
  color: var(--muted2);
  font-size: 11px;
}

.cancel-protocol-code {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
}

.cancel-protocol-copy {
  flex: 0 0 auto;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #111827;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  white-space: nowrap;
}

.cancel-receipt-actions {
  margin-top: 12px;
}

.download-receipt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: #35c55e;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
}

.download-receipt-icon {
  margin-right: 6px;
}

.subscribe-cookie-consent {
  position: fixed;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 9999;
  max-width: 920px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(255, 122, 24, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.98), rgba(17, 24, 39, 0.98));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: #f6f7fb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subscribe-cookie-copy {
  color: #d7dce7;
  font-size: 10px;
  line-height: 1.3;
}

.subscribe-cookie-copy strong {
  display: block;
  margin-bottom: 2px;
  color: #ffb347;
}

.subscribe-cookie-actions {
  display: flex;
  gap: 4px;
}

.subscribe-cookie-btn {
  flex: 1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  padding: 6px 7px;
}

.subscribe-cookie-btn--ghost {
  border: 1px solid rgba(177, 184, 197, 0.5);
  background: transparent;
  color: #e5e7eb;
}

.subscribe-cookie-btn--primary {
  border: 0;
  background: linear-gradient(135deg, #ff7a18, #ff9940);
  color: #111827;
}

.confirm-overlay{
  position: fixed;
  inset: 0;
  background: rgba(4,8,14,.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1200;
}

.confirm-dialog{
  width: 100%;
  max-width: 520px;
  border-radius: 18px;
  border: 1px solid var(--stroke2);
  background: linear-gradient(180deg, rgba(14,20,33,.98), rgba(11,15,24,.98));
  box-shadow: 0 26px 64px rgba(0,0,0,.58);
  overflow: hidden;
}

.confirm-head{
  padding: 16px 18px;
  border-bottom: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.confirm-title{
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
}

.confirm-close{
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  border-radius: 10px;
  min-width: 34px;
  height: 34px;
  cursor: pointer;
}

.confirm-body{
  padding: 18px;
  color: rgba(233,238,247,.88);
  font-size: 13px;
  line-height: 1.65;
}

.confirm-warning{
  border: 1px solid rgba(255,153,64,.30);
  background: linear-gradient(180deg, rgba(255,153,64,.12), rgba(255,153,64,.05));
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 10px;
  color: rgba(255,221,193,.95);
}

.confirm-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 18px 18px;
}

.confirm-btn-secondary,
.confirm-btn-danger{
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
}

.confirm-btn-secondary{
  background: rgba(255,255,255,.06);
  color: rgba(233,238,247,.9);
  border: 1px solid var(--stroke);
}

.confirm-btn-danger{
  background: linear-gradient(135deg, #ff7a18, #ff9940);
  color: #111827;
}

[data-theme="light"] body.subscription-page{
  background:
    linear-gradient(135deg, var(--bg0), var(--bg1));
}

[data-theme="light"] .brand-section{
  background: linear-gradient(180deg, rgba(255,122,24,.10), rgba(255,255,255,.92));
  border-color: rgba(255,122,24,.24);
}

[data-theme="light"] .brand-chip,
[data-theme="light"] .plans-section,
[data-theme="light"] .plan-card,
[data-theme="light"] .feature-compare{
  background: var(--panel);
  border-color: var(--stroke);
}

[data-theme="light"] .plans-section,
[data-theme="light"] .plan-card{
  box-shadow: var(--shadow2);
}

[data-theme="light"] .plan-card.featured{
  background: linear-gradient(180deg, rgba(255,122,24,.12), rgba(255,255,255,.98));
  border-color: rgba(255,122,24,.68);
  box-shadow: 0 18px 42px rgba(255,122,24,.16);
}

[data-theme="light"] .trust-list li,
[data-theme="light"] .plan-features,
[data-theme="light"] .compare-name,
[data-theme="light"] .benefits-box,
[data-theme="light"] .confirm-body{
  color: var(--muted);
}

[data-theme="light"] .plan-features.featured,
[data-theme="light"] .benefits-box strong{
  color: #b45309;
}

[data-theme="light"] .payment-methods,
[data-theme="light"] .ghost,
[data-theme="light"] .confirm-btn-secondary{
  background: #f8fafc;
  border-color: var(--stroke);
  color: var(--text);
}

[data-theme="light"] .plan-button:not(.featured),
[data-theme="light"] .free-plan-button{
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #111827;
  box-shadow: 0 10px 20px rgba(15,23,42,.10);
}

[data-theme="light"] .compare-item{
  border-top-color: rgba(148,163,184,.35);
}

[data-theme="light"] .subscription-notice{
  color: #14532d;
  background: linear-gradient(180deg, rgba(34,197,94,.15), rgba(34,197,94,.08));
}

[data-theme="light"] .confirm-dialog,
[data-theme="light"] .subscription-toast{
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px){
  .subscription-wrapper{ grid-template-columns: 1fr; }
  .plans-grid{ grid-template-columns: 1fr; }
  .compare-grid{ grid-template-columns: 1fr repeat(4, .72fr); }
}

@media (max-width: 768px){
  body.subscription-page{
    align-items: flex-start;
    padding: 14px 10px;
  }

  .subscription-wrapper{
    gap: 12px;
  }

  .brand-section,
  .plans-section{
    padding: 14px 12px;
    border-radius: 14px;
  }

  .brand-section h1{
    font-size: 28px;
    line-height: 1.08;
  }

  .brand-section p,
  .trust-list li,
  .plans-header p{
    font-size: 14px;
    line-height: 1.5;
  }

  .plans-header h2{
    font-size: 22px;
  }

  .plans-grid{
    grid-template-columns: 1fr;
    margin-top: 14px;
    max-height: min(70vh, 620px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .plan-card{
    min-height: auto;
    padding: 14px 12px;
    max-width: 100%;
    overflow-x: hidden;
    border-radius: 14px;
  }

  .plan-price{
    font-size: 30px;
    line-height: 1.05;
    margin-top: 4px;
    margin-bottom: 4px;
  }

  .plan-subtitle,
  .plan-features,
  .compare-name{
    font-size: 13px;
    line-height: 1.5;
  }

  .plan-features{
    min-height: auto;
    margin-top: 10px;
  }

  .plan-actions{
    gap: 10px;
    margin-top: 12px;
  }

  .plan-button{
    min-height: 48px;
    height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 12px;
    touch-action: manipulation;
  }

  .action-buttons{
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .action-buttons > button,
  .action-buttons > .primary-cta,
  .primary-cta,
  .ghost{
    width: 100%;
    min-height: 48px;
    height: 48px;
    font-size: 16px;
    justify-content: center;
  }

  .feature-compare{
    margin-top: 14px;
    padding: 12px;
  }

  .compare-grid{
    min-width: 500px;
    gap: 8px 10px;
  }

  .compare-item{
    padding: 8px 0;
  }
}

@media (max-width: 560px){
  .plans-grid{
    max-height: min(66vh, 560px);
  }

  .plan-title-row{
    justify-content: space-between;
    align-items: flex-start;
  }

  .brand-chip{
    font-size: 13px;
    padding: 8px 12px;
  }

  .brand-section h1{
    font-size: 24px;
  }

  .badge{
    font-size: 9px;
    padding: 5px 8px;
  }

  .plan-price{
    font-size: 26px;
  }

  .plan-button{
    font-size: 15px;
    min-height: 48px;
    height: 48px;
  }

  .compare-grid{
    min-width: 460px;
  }
}

/* ===== PLANOS / UPGRADES - layout desktop refinado ===== */
body.subscription-page.plans-upgrade-page {
  align-items: flex-start;
  justify-content: center;
  padding: 24px 28px 42px;
  box-sizing: border-box;
}

.plans-upgrade-page {
  box-sizing: border-box;
}

.plans-upgrade-page .subscription-wrapper {
  display: block;
  max-width: 1280px;
  margin: 0 auto;
}

.plans-upgrade-page *,
.plans-upgrade-page *::before,
.plans-upgrade-page *::after {
  box-sizing: border-box;
}

.subscription-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.subscription-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.subscription-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.subscription-back {
  width: auto;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.subscription-back:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.subscription-main {
  display: grid;
  gap: 20px;
}

.subscription-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: start;
  gap: 32px;
  margin-left: 0;
  padding-left: 0;
}

.subscription-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subscription-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 122, 24, 0.8);
}

.plans-upgrade-page #subscription-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: 0;
}

.plans-upgrade-page #subscription-title .accent {
  color: var(--accent);
}

.plans-upgrade-page #subscription-desc {
  max-width: 470px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.plans-upgrade-page .subscription-hero-actions {
  display: none !important;
}

.payment-panel {
  display: grid;
  gap: 10px;
  padding-top: 30px;
}

.payment-panel .payment-methods {
  margin-top: 0;
  min-height: 58px;
  border-radius: 9px;
  padding: 7px;
  background: rgba(14, 20, 33, 0.72);
  backdrop-filter: blur(12px);
}

.payment-panel .payment-method-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 7px;
}

.payment-panel .payment-method-btn::before {
  font-family: "Material Icons Outlined";
  font-size: 19px;
}

.payment-panel .payment-method-btn[data-payment-method="card"]::before {
  content: "credit_card";
}

.payment-panel .payment-method-btn[data-payment-method="pix"]::before {
  content: none;
}

.payment-panel .pix-method-icon {
  width: 20px;
  height: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  transform: rotate(45deg);
  color: #16c7d8;
  flex: 0 0 20px;
  margin-right: 2px;
  opacity: 1;
}

.payment-panel .pix-method-icon span {
  display: block;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 10px rgba(22, 199, 216, 0.22);
}

.payment-panel .payment-method-btn.is-active .pix-method-icon {
  color: var(--accent);
}

.payment-panel .payment-method-btn.is-active {
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.payment-security {
  color: var(--muted2);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.plans-upgrade-page .plans-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.plans-upgrade-page .plans-header {
  display: none;
}

.plans-upgrade-page .plans-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.plans-upgrade-page .plan-card {
  min-height: 338px;
  padding: 22px 20px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 23, 36, 0.88), rgba(11, 16, 26, 0.9));
  border-color: rgba(51, 65, 85, 0.62);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.plans-upgrade-page .plan-card:hover {
  transform: translateY(-3px);
}

.plans-upgrade-page .plan-card.featured {
  border: 2px solid rgba(255, 122, 24, 0.92);
  background:
    radial-gradient(360px 220px at 50% 0%, rgba(255, 122, 24, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(20, 24, 33, 0.92), rgba(12, 16, 25, 0.95));
  box-shadow: 0 20px 55px rgba(255, 122, 24, 0.16);
}

.plans-upgrade-page .plan-card--current {
  background:
    radial-gradient(420px 280px at 18% 0%, rgba(255, 122, 24, 0.15), transparent 65%),
    linear-gradient(180deg, rgba(39, 27, 25, 0.84), rgba(12, 16, 25, 0.94));
  border-color: rgba(255, 122, 24, 0.34);
}

.plans-upgrade-page .plan-card--free {
  background:
    radial-gradient(360px 220px at 24% 0%, rgba(34, 197, 94, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(13, 22, 32, 0.92), rgba(10, 16, 26, 0.94));
  border-color: rgba(34, 197, 94, 0.32);
}

.plans-upgrade-page .plan-card--free.is-current-free {
  border-color: rgba(34, 197, 94, 0.62);
  box-shadow: 0 18px 48px rgba(34, 197, 94, 0.12);
}

.plans-upgrade-page .plan-label {
  color: var(--muted2);
  font-size: 12px;
}

.plans-upgrade-page .plan-card--current .plan-label,
.plans-upgrade-page .featured .plan-label,
.plans-upgrade-page .featured .compare-head {
  color: var(--accent);
}

.plans-upgrade-page .plan-title {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 920;
  letter-spacing: 0;
}

.plans-upgrade-page .plan-price {
  margin: 14px 0 0;
  font-size: 28px;
  letter-spacing: 0;
}

.plans-upgrade-page .plan-price small {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

.plans-upgrade-page .plan-price-prefix {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
}

.plans-upgrade-page .plan-subtitle {
  margin-top: 12px;
  min-height: 45px;
  font-size: 13px;
  line-height: 1.5;
}

.plans-upgrade-page .plan-features {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
  min-height: 92px;
  color: rgba(233, 238, 247, 0.86);
  line-height: 1.35;
}

.plans-upgrade-page .plan-features span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.plans-upgrade-page .plan-features span::before {
  content: "check_circle";
  font-family: "Material Icons Outlined";
  color: var(--accent);
  font-size: 16px;
}

.plans-upgrade-page .plan-card--free .plan-features span::before {
  color: #22c55e;
}

.plans-upgrade-page .plan-card[data-plan-code="fiscal"] .plan-features span::before,
.plans-upgrade-page .compare-grid .compare-yes:nth-child(5n) {
  color: #12b5c9;
}

.plans-upgrade-page .badge {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid var(--accent);
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
  box-shadow: none;
  border-radius: 6px;
}

.plans-upgrade-page .plan-card--current .badge {
  color: #ffb347;
}

.plans-upgrade-page .plan-actions {
  margin-top: 20px;
}

.plans-upgrade-page .plan-actions .plan-button:not(:first-child) {
  display: none;
}

.plans-upgrade-page .plan-button,
.plans-upgrade-page .free-plan-button,
.plans-upgrade-page .current-plan-action,
.plans-upgrade-page .current-plan-details {
  min-height: 46px;
  border-radius: 7px;
  font-size: 13px;
}

.plans-upgrade-page .plan-button,
.plans-upgrade-page .free-plan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(22, 30, 45, 0.86);
  color: var(--text);
  border: 1px solid rgba(51, 65, 85, 0.72);
}

.plans-upgrade-page .plan-button::after,
.plans-upgrade-page .free-plan-button::after,
.plans-upgrade-page .current-plan-action::after {
  content: "chevron_right";
  font-family: "Material Icons Outlined";
  color: var(--accent);
  margin-left: auto;
  font-size: 18px;
}

.plans-upgrade-page .free-plan-button {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(20, 83, 45, 0.22);
}

.plans-upgrade-page .free-plan-button::after {
  color: #22c55e;
}

.plans-upgrade-page .free-plan-button.is-current {
  cursor: default;
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.58);
  background: rgba(22, 101, 52, 0.28);
}

.plans-upgrade-page .plan-button.featured {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #111827;
  box-shadow: 0 16px 32px rgba(255, 122, 24, 0.28);
}

.plans-upgrade-page .plan-button.featured::after {
  color: #111827;
}

.current-plan-card-text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.current-plan-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-inline: 42px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #111827;
  font-weight: 900;
  cursor: pointer;
}

.current-plan-details {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-inline: 16px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(22, 30, 45, 0.72);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.plans-upgrade-page .current-plan-action::after {
  position: absolute;
  right: 18px;
  margin-left: 0;
}

.plans-upgrade-page .feature-compare {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 23, 36, 0.86), rgba(11, 16, 26, 0.9));
}

.plans-upgrade-page .feature-compare h3 {
  font-size: 16px;
}

.plans-upgrade-page .feature-compare p {
  display: none;
}

.plans-upgrade-page .compare-grid {
  grid-template-columns: minmax(260px, 1.45fr) repeat(4, minmax(105px, 0.58fr));
  gap: 0;
  min-width: 880px;
}

.plans-upgrade-page .compare-head,
.plans-upgrade-page .compare-item {
  padding: 10px 8px;
}

.plans-upgrade-page .compare-head {
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.plans-upgrade-page .compare-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.plans-upgrade-page .compare-name::before {
  content: "info";
  font-family: "Material Icons Outlined";
  color: var(--muted2);
  font-size: 17px;
}

.plans-upgrade-page .compare-yes {
  color: var(--accent);
}

.plans-upgrade-page .compare-no {
  color: rgba(169, 179, 196, 0.55);
}

.plans-upgrade-page .compare-text {
  color: rgba(233, 238, 247, 0.82);
  text-transform: none;
}

[data-theme="light"] .plans-upgrade-page .plan-card,
[data-theme="light"] .plans-upgrade-page .feature-compare,
[data-theme="light"] .payment-panel .payment-methods {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--stroke);
}

[data-theme="light"] .plans-upgrade-page .plan-card--current,
[data-theme="light"] .plans-upgrade-page .plan-card.featured {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.98));
}

[data-theme="light"] .plans-upgrade-page .plan-button,
[data-theme="light"] .plans-upgrade-page .free-plan-button,
[data-theme="light"] .current-plan-details {
  background: #f8fafc;
  color: var(--text);
}

[data-theme="light"] .plans-upgrade-page .plan-features,
[data-theme="light"] .plans-upgrade-page .compare-name,
[data-theme="light"] .plans-upgrade-page .compare-text {
  color: rgba(17, 24, 39, 0.86);
}

[data-theme="light"] .plans-upgrade-page .plan-features,
[data-theme="light"] .plans-upgrade-page .compare-head,
[data-theme="light"] .plans-upgrade-page .compare-item {
  border-color: var(--stroke);
}

@media (max-width: 1180px) {
  .subscription-hero {
    margin-left: 0;
    grid-template-columns: 1fr;
  }
  .payment-panel {
    max-width: 520px;
    padding-top: 0;
  }
  .plans-upgrade-page .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  html,
  body.subscription-page {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  html:has(body.subscription-page.plans-upgrade-page) {
    display: block;
    min-height: 100dvh;
    height: auto !important;
    max-height: none !important;
    padding: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.subscription-page.plans-upgrade-page {
    display: block;
    min-height: 100dvh;
    height: auto !important;
    max-height: none !important;
    padding: 14px 12px max(28px, env(safe-area-inset-bottom));
    overflow-x: hidden !important;
    overflow-y: auto !important;
    touch-action: pan-y;
  }

  body.subscription-page.plans-upgrade-page:not(:has(.cancel-confirm-modal.is-open)) {
    overflow-y: auto !important;
  }

  .plans-upgrade-page .subscription-wrapper,
  .plans-upgrade-page .subscription-main,
  .plans-upgrade-page .plans-section,
  .plans-upgrade-page .plans-grid {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  .subscription-topbar {
    margin-bottom: 18px;
  }

  .subscription-brand {
    min-width: 0;
  }

  .subscription-back {
    width: auto;
    min-width: 0;
    min-height: 40px;
    height: auto;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .subscription-hero {
    gap: 18px;
  }

  .plans-upgrade-page #subscription-title {
    font-size: clamp(30px, 12vw, 40px);
  }

  .plans-upgrade-page #subscription-desc {
    font-size: 14px;
  }

  .payment-panel .payment-methods {
    width: 100%;
  }

  .plans-upgrade-page .plans-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .plans-upgrade-page .plan-card {
    min-height: auto;
  }

  .plans-upgrade-page .feature-compare {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
}
