@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

:root {
  --bg-body: #f1f5f9;
  --surface-card: #ffffff;
  --surface-muted: #f8fafc;
  --surface-sidebar: #0f172a;
  --surface-sidebar-hover: #1e293b;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --rose: #dc2626;
  --rose-soft: #fef2f2;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea, optgroup {
  font-family: inherit;
}

/* Lucide Icons Custom Styling */
[data-lucide], .lucide {
  width: 1.15em;
  height: 1.15em;
  stroke-width: 2px;
  vertical-align: -0.18em;
  display: inline-block;
}

.nav-link [data-lucide], .nav-link .lucide {
  width: 1.18rem;
  height: 1.18rem;
  margin-right: 0;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.btn [data-lucide], .btn .lucide {
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.4rem;
  vertical-align: -0.15em;
  display: inline-block;
}

.card-title [data-lucide], .card-title .lucide {
  width: 1.2em;
  height: 1.2em;
  margin-right: 0.45rem;
  vertical-align: -0.18em;
  color: var(--primary);
}

/* Layout Shell */
.app-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-block-size: 100dvh;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.sidebar {
  background: var(--surface-sidebar);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  border-inline-end: 1px solid #1e293b;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1.25rem;
  border-block-end: 1px solid #1e293b;
  margin-block-end: 1rem;
}

.brand-logo {
  inline-size: 40px;
  block-size: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.brand-title {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
}

.mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: #1e293b;
  padding: 0.3rem;
  border-radius: var(--radius-md);
  margin-block-end: 1.25rem;
}

.mode-btn {
  text-align: center;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mode-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  padding: 0.5rem 0.75rem 0.35rem;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-align: left;
}

.nav-link:hover {
  background: var(--surface-sidebar-hover);
  color: #fff;
}

.nav-link.active {
  background: rgba(37, 99, 235, 0.22);
  color: #60a5fa;
  font-weight: 600;
  border-inline-start: 3px solid #3b82f6;
}

.nav-link span:not(.nav-badge) {
  flex-grow: 0;
  text-align: left;
}

.nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  background: #334155;
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  line-height: 1.2;
}

.nav-badge.danger {
  background: #dc2626;
  color: #fff;
}

/* Main Content Area */
.main-area {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.topbar {
  background: var(--surface-card);
  border-block-end: 1px solid var(--border-color);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.topbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.db-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid #a7f3d0;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.content-container {
  padding: 1.5rem 1.75rem 3rem;
  max-inline-size: 1480px;
  inline-size: 100%;
  margin-inline: auto;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-block-end: 1.5rem;
}

.kpi-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Cards & Sections */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-block-end: 1.5rem;
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-block-end: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: var(--surface-muted);
}

.card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-body {
  padding: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.badge-active,
.badge-paid,
.badge-resolved {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid #a7f3d0;
}

.badge-pending,
.badge-open,
.badge-customer-reply {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid #fde68a;
}

.badge-suspended,
.badge-unpaid,
.badge-terminated,
.badge-high {
  background: var(--rose-soft);
  color: var(--rose);
  border: 1px solid #fecaca;
}

.badge-answered,
.badge-info {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--emerald);
  color: #fff;
}

.btn-success:hover {
  background: #047857;
}

.btn-warning {
  background: var(--amber);
  color: #fff;
}

.btn-danger {
  background: var(--rose);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-outline:hover {
  background: var(--surface-muted);
}

/* Alerts */
.alert {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-md);
  margin-block-end: 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.alert-success {
  background: var(--emerald-soft);
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background: var(--rose-soft);
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* ==========================================================================
   Modern Web Guidance: responsive-table
   Sticky headers + @container (width < 600px) stacked card transformation
   ========================================================================== */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 80vh);
  container-type: inline-size;
  border-radius: var(--radius-sm);
}

.table-wrapper:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

table.data-table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

table.data-table caption {
  text-align: start;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.65rem 1rem;
  background: var(--surface-muted);
  border-block-end: 1px solid var(--border-color);
}

/* Sticky column headers (desktop) */
table.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
}

table.data-table thead th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  text-align: start;
  border-block-end: 1px solid var(--border-color);
  white-space: nowrap;
}

/* Sticky row headers (desktop) */
table.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--surface-card);
  font-weight: 600;
  color: var(--text-main);
  padding: 0.8rem 1rem;
  text-align: start;
  border-block-end: 1px solid var(--border-color);
}

table.data-table tbody td {
  padding: 0.8rem 1rem;
  border-block-end: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

table.data-table tbody tr:hover th,
table.data-table tbody tr:hover td {
  background: #f8fafc;
}

@container (width < 600px) {
  table.data-table,
  table.data-table thead,
  table.data-table tbody,
  table.data-table tr,
  table.data-table th,
  table.data-table td {
    display: block;
  }

  table.data-table thead {
    /* MANDATORY: Hide column header from layout and screen readers */
    display: none;
  }

  table.data-table tr {
    margin-block-end: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  /* Sticky row headers at the top of each block/card */
  table.data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: #f1f5f9;
  }

  table.data-table td:nth-child(2)::before {
    content: var(--label-2, "Info") ": ";
    font-weight: 700;
    color: var(--text-main);
  }
  table.data-table td:nth-child(3)::before {
    content: var(--label-3, "Detalhe") ": ";
    font-weight: 700;
    color: var(--text-main);
  }
  table.data-table td:nth-child(4)::before {
    content: var(--label-4, "Valor") ": ";
    font-weight: 700;
    color: var(--text-main);
  }
  table.data-table td:nth-child(5)::before {
    content: var(--label-5, "Status") ": ";
    font-weight: 700;
    color: var(--text-main);
  }
  table.data-table td:nth-child(6)::before {
    content: var(--label-6, "Ações") ": ";
    font-weight: 700;
    color: var(--text-main);
  }
}

/* ==========================================================================
   Modern Web Guidance: light-dismiss-a-dialog
   Native <dialog closedby="any"> + backdrop styling
   ========================================================================== */
dialog {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  max-inline-size: 620px;
  inline-size: calc(100% - 2rem);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  background: var(--surface-card);
  color: var(--text-main);
}

dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.dialog-inner {
  padding: 1.5rem;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-end: 0.85rem;
  margin-block-end: 1rem;
  border-block-end: 1px solid var(--border-color);
}

.dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ==========================================================================
   Modern Web Guidance: validate-input-after-interaction
   :user-invalid, :user-valid, hints above inputs, and :has() rules
   ========================================================================== */
.field {
  margin-block-end: 1rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-block-end: 0.2rem;
}

.hint {
  display: block;
  color: #5f6368;
  font-size: 0.78rem;
  margin-block-end: 0.3rem;
}

.rules-list {
  color: #5f6368;
  font-size: 0.76rem;
  margin: 0 0 0.4rem 1.1rem;
  padding: 0;
}

.field input,
.field select,
.field textarea {
  inline-size: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-main);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}

.error-msg {
  display: none;
  color: #d93025;
  font-size: 0.8rem;
  margin-block-start: 0.25rem;
  font-weight: 500;
}

input:user-invalid,
input.user-invalid-fallback,
select:user-invalid,
textarea:user-invalid {
  border-color: #d93025;
  background-color: #fce8e6;
}

input:user-invalid + .error-msg,
input.user-invalid-fallback + .error-msg {
  display: block;
}

input:user-valid,
input.user-valid-fallback {
  border-color: #188038;
}

.field:has(input:user-invalid) .rules-list {
  color: #d93025;
  font-weight: 600;
}

.field:has(input:user-valid) .rules-list {
  display: none;
}

/* Usage Meter Bars */
.meter-bar {
  inline-size: 100%;
  block-size: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-block-start: 0.25rem;
}

.meter-fill {
  block-size: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 999px;
}

.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  word-break: break-all;
}

.whm-cmd-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ==========================================================================
   Modern Pricing & Plans Showcase
   ========================================================================== */
.pricing-cycle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0 2rem 0;
  gap: 0.65rem;
}

.pricing-cycle-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-cycle-switcher {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 4px;
  border-radius: 9999px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  gap: 2px;
}

.pricing-cycle-btn {
  border: none;
  background: transparent;
  padding: 0.45rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
}

.pricing-cycle-btn:hover {
  color: #0f172a;
}

.pricing-cycle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pricing-cycle-btn .discount-pill {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
  padding: 2px 7px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.pricing-cycle-btn .discount-pill.highlight {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
}

.pricing-cycle-btn.active .discount-pill {
  background: #10b981;
  color: #ffffff;
}

.pricing-cycle-btn.active .discount-pill.highlight {
  background: #0284c7;
  color: #ffffff;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-block-end: 2.25rem;
  align-items: stretch;
}

@media (max-width: 992px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -8px rgba(15, 23, 42, 0.12), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

.plan-card.popular {
  border: 2px solid #0284c7;
  box-shadow: 0 8px 24px -6px rgba(2, 132, 199, 0.22), 0 2px 4px rgba(2, 132, 199, 0.04);
}

.plan-card.popular:hover {
  box-shadow: 0 18px 34px -8px rgba(2, 132, 199, 0.32), 0 4px 8px rgba(2, 132, 199, 0.06);
}

.plan-popular-ribbon {
  background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.45rem 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.plan-header {
  padding: 1.5rem 1.5rem 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

.plan-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: 6px;
  margin-block-end: 0.5rem;
}

.plan-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.plan-pricing-box {
  padding: 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.plan-price-main {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-block-end: 0.35rem;
}

.plan-currency {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.plan-amount {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.03em;
}

.plan-period {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
}

.plan-billing-note {
  font-size: 0.8rem;
  color: #64748b;
  min-height: 1.3rem;
  line-height: 1.4;
}

.plan-billing-note .savings-text {
  color: #059669;
  font-weight: 700;
}

/* Alternative Cycle Compact Matrix */
.plan-cycles-table {
  margin-block-start: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.76rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.plan-cycle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #475569;
  padding: 2px 0;
  transition: color 0.15s ease;
}

.plan-cycle-row.active-row {
  font-weight: 700;
  color: #0284c7;
}

.plan-cycle-row .badge-mini {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
  margin-left: 0.25rem;
}

.plan-cycle-row.active-row .badge-mini {
  background: #0284c7;
  color: #ffffff;
}

/* Features section */
.plan-features-wrapper {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.plan-features-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-block-end: 0.85rem;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-grow: 1;
}

.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.45;
}

.plan-feature-icon {
  inline-size: 20px;
  block-size: 20px;
  min-inline-size: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-block-start: 1px;
  flex-shrink: 0;
}

.plan-feature-icon [data-lucide], .plan-feature-icon .lucide {
  inline-size: 13px;
  block-size: 13px;
  stroke-width: 2.5px;
  margin: 0;
}

.plan-footer {
  padding: 1.25rem 1.5rem 1.5rem 1.5rem;
  background: #fafbfc;
  border-top: 1px solid #f1f5f9;
}

.plan-select-btn {
  inline-size: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.plan-card.popular .plan-select-btn {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.plan-card.popular .plan-select-btn:hover {
  background: #0369a1;
}

/* ============================================================================
   Product Renewal Callouts & Expiration Alerts
   ============================================================================ */
.renewal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-block-end: 1rem;
  border: 1px solid transparent;
  flex-wrap: wrap;
}

.renewal-banner-urgent {
  background: #ecfdf5;
  border-color: #a7f3d0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.renewal-banner-danger {
  background: #fef2f2;
  border-color: #fecaca;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.renewal-banner-warning {
  background: #fffbeb;
  border-color: #fde68a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
}

.renewal-banner-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-inline-size: 260px;
}

.renewal-banner-icon {
  inline-size: 42px;
  block-size: 42px;
  min-inline-size: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.renewal-banner-urgent .renewal-banner-icon {
  background: #d1fae5;
  color: #059669;
}

.renewal-banner-danger .renewal-banner-icon {
  background: #fee2e2;
  color: #dc2626;
}

.renewal-banner-warning .renewal-banner-icon {
  background: #fef3c7;
  color: #d97706;
}

.renewal-banner-icon [data-lucide], .renewal-banner-icon .lucide {
  inline-size: 22px;
  block-size: 22px;
  stroke-width: 2.2px;
}

.renewal-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #09283c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.renewal-banner-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-block-start: 0.2rem;
}

.renewal-banner-action {
  flex-shrink: 0;
}

/* ============================================================================
   Dedicated Payment Flow (Produto -> Forma de Pagamento -> Tela Dedicada)
   ============================================================================ */
.payment-flow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.payment-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.payment-back-link:hover {
  background: var(--surface-muted);
  color: var(--primary);
  border-color: #cbd5e1;
}

/* Step Bar */
.checkout-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.5rem;
  margin-block-end: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
}

.step-item.active {
  color: #09283c;
  font-weight: 700;
}

.step-item.completed {
  color: var(--emerald);
}

.step-dot {
  inline-size: 26px;
  block-size: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.step-item.active .step-dot {
  background: #1863dc;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(24, 99, 220, 0.18);
}

.step-item.completed .step-dot {
  background: var(--emerald);
  color: #ffffff;
}

.step-item.completed .step-dot [data-lucide], .step-item.completed .step-dot .lucide {
  inline-size: 15px;
  block-size: 15px;
}

.step-line {
  flex: 1;
  block-size: 2px;
  background: #e2e8f0;
  margin: 0 1rem;
}

.step-line.active {
  background: var(--emerald);
}

/* Layout 2 Columns: Main Payment + Summary */
.payment-dedicated-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .payment-dedicated-layout {
    grid-template-columns: 1fr;
  }
}

/* Payment Method Selector Cards */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-block-end: 1.25rem;
}

.payment-method-card {
  background: var(--surface-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  text-align: left;
}

.payment-method-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.payment-method-card.active {
  border-color: #1863dc;
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgba(24, 99, 220, 0.15), var(--shadow-sm);
}

.payment-method-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-block-end: 0.6rem;
}

.payment-method-card-icon {
  inline-size: 38px;
  block-size: 38px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.payment-method-card.active .payment-method-card-icon {
  background: #1863dc;
  color: #ffffff;
}

.payment-method-card-icon [data-lucide], .payment-method-card-icon .lucide {
  inline-size: 20px;
  block-size: 20px;
}

.payment-method-card-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  text-transform: uppercase;
}

.payment-method-card.active .payment-method-card-pill.recommended {
  background: #d1fae5;
  color: #065f46;
}

.payment-method-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #09283c;
  margin-block-end: 0.25rem;
}

.payment-method-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Dedicated Panels */
.payment-dedicated-panel {
  display: none;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  animation: fadeInPanel 0.2s ease-in-out;
}

.payment-dedicated-panel.active {
  display: block;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--emerald);
  background: var(--emerald-soft);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-block-end: 0.75rem;
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #09283c;
  margin-block-end: 0.35rem;
}

.panel-subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-block-end: 1.25rem;
}

/* PIX Screen Specifics */
.pix-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-block-end: 1.25rem;
  text-align: center;
}

.pix-qr-frame {
  background: #ffffff;
  padding: 0.75rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid #cbd5e1;
  display: inline-block;
  margin-block-end: 0.75rem;
}

.pix-qr-image {
  inline-size: 210px;
  block-size: 210px;
  display: block;
  border-radius: 6px;
}

.pix-copia-cola-box {
  inline-size: 100%;
  display: flex;
  gap: 0.6rem;
  margin-block-end: 1.25rem;
  flex-wrap: wrap;
}

.pix-code-field {
  flex: 1;
  min-inline-size: 240px;
  padding: 0.65rem 0.85rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Payment Instructions Cards */
.payment-steps-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-block-end: 1.5rem;
}

.guide-step-card {
  background: var(--surface-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-size: 0.8rem;
}

.guide-step-num {
  inline-size: 22px;
  block-size: 22px;
  border-radius: 50%;
  background: #09283c;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-block-end: 0.4rem;
}

.guide-step-text {
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Card Form Specifics (autofill-payment-form guidance) */
.field-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-block-end: 0.25rem;
  display: block;
}

.card-security-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-block-start: 0.75rem;
  justify-content: center;
}

/* Order / Invoice Summary Card */
.payment-summary-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 1.5rem;
}

.summary-header {
  border-block-end: 1px solid var(--border-color);
  padding-block-end: 0.85rem;
  margin-block-end: 1rem;
}

.summary-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #09283c;
  margin: 0;
}

.summary-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-block-start: 0.2rem;
}

.summary-linked-product {
  background: var(--surface-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-block-end: 1rem;
}

.summary-product-domain {
  font-size: 0.95rem;
  font-weight: 700;
  color: #09283c;
}

.summary-product-plan {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.summary-product-cycle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-block-start: 0.2rem;
}

.summary-items-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  font-size: 0.82rem;
}

.summary-item-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-block-end: 1px dashed #e2e8f0;
  color: var(--text-secondary);
}

.summary-total-box {
  background: #09283c;
  color: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 1.25rem;
}

.summary-total-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7dd3fc;
  font-weight: 700;
}

.summary-total-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #01DBFE;
}

.summary-guarantees {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.summary-guarantees li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
}

.summary-guarantees [data-lucide], .summary-guarantees .lucide {
  inline-size: 14px;
  block-size: 14px;
  color: var(--emerald);
  flex-shrink: 0;
}



