:root {
  --app-navy: #061a38;
  --app-navy-light: #0c2c57;
  --app-bg: #f3f6fb;
  --app-surface: #fff;
  --app-primary: #1265ff;
  --app-primary-dark: #2d27dd;
  --app-text: #10203d;
  --app-muted: #67748a;
  --app-border: #dce3ed;
  --app-danger: #df4545;
  --app-success: #18a36a;
  --app-shadow: 0 12px 30px rgba(7, 27, 51, .07);
}

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

html,
body { min-width: 0; min-height: 100%; overflow-x: hidden; }

body { margin: 0; font-family: "DM Sans", sans-serif; }

button,
input,
select,
textarea { font: inherit; }

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 21px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Login */
.login-page { min-height: 100dvh; background: #081426; color: var(--app-text); }
.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}
.login-card {
  position: relative;
  width: min(100%, 430px);
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .32);
}
.login-hero {
  min-height: 175px;
  padding: 34px 30px 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, #126cff, #2918d9);
}
.login-brand { display: flex; flex-direction: column; line-height: 1; }
.login-brand strong { font-size: clamp(30px, 8vw, 38px); letter-spacing: -.045em; }
.login-brand span { margin-top: 8px; font-size: 14px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }
.login-hero p { margin: 22px 0 0; color: rgba(255, 255, 255, .88); font-size: 14px; }
.login-user-icon {
  position: absolute;
  top: 139px;
  left: 50%;
  translate: -50% 0;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: var(--app-primary);
  background: #fff;
  border: 6px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(11, 34, 76, .2);
}
.login-user-icon svg { width: 30px; height: 30px; }
.login-card #login-form { gap: 18px; padding: 58px 34px 20px; }
.login-card label { color: var(--app-text); font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.login-card input {
  min-height: 52px;
  margin-top: 7px;
  padding: 0 15px;
  color: var(--app-text);
  background: #fff;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  outline: none;
}
.login-card input:focus { border-color: var(--app-primary); box-shadow: 0 0 0 3px rgba(18, 101, 255, .12); }
.login-card .primary-button { min-height: 52px; margin-top: 4px; color: #fff; background: linear-gradient(135deg, #126cff, #2918d9); border-radius: 10px; }
.login-message { min-height: 24px; margin: 0; padding: 0 34px 25px; color: var(--app-danger); text-align: center; }

/* Admin shell */
.admin-page { min-height: 100dvh; color: var(--app-text); background: var(--app-bg); }
.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b7c8df;
  background: var(--app-navy);
}
.admin-page.is-authenticated .auth-loading { display: none; }
.admin-page .app-shell {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template: 74px minmax(0, 1fr) / 275px minmax(0, 1fr);
  background: var(--app-bg);
}
.bank-topbar {
  grid-area: 1 / 2;
  min-width: 0;
  min-height: 74px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-text);
  background: #fff;
  border-bottom: 1px solid var(--app-border);
}
.brand-lockup { display: grid; gap: 2px; text-align: center; }
.brand-lockup strong { color: var(--app-text); font-size: 15px; }
.brand-lockup small { color: var(--app-muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.menu-toggle,
.menu-close { display: none; }
.sidebar-overlay { display: none; }

/* Sidebar */
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 275px;
  height: 100dvh;
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--app-navy);
  border-right: 1px solid rgba(255, 255, 255, .10);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 120;
}
.sidebar-brand { display: block; }
.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.sidebar-logo-symbol {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #176cff, #2d27dd);
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 800;
}
.sidebar-logo-text { min-width: 0; display: grid; gap: 2px; }
.sidebar-logo-text strong { color: #fff; font-size: 1rem; font-weight: 800; line-height: 1.15; }
.sidebar-logo-text small { color: #8eb7eb; font-size: .58rem; font-weight: 700; letter-spacing: .2em; }
.sidebar-account { display: grid; gap: 5px; padding: 24px 8px 18px; }
.sidebar-account strong { color: #fff; font-size: .86rem; font-weight: 700; }
.sidebar-account span {
  max-width: 100%;
  overflow: hidden;
  color: #76a9e7;
  font-size: .76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-divider { width: 100%; height: 1px; flex: 0 0 1px; margin: 0 0 18px; background: rgba(255, 255, 255, .11); }
.sidebar-navigation { display: grid; gap: 6px; }
.sidebar-link {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #e5edf8;
  background: transparent;
  border: 0;
  border-radius: 11px;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}
.sidebar-link > span {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.sidebar-link > span:last-child { min-width: 0; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.sidebar-link .material-symbols-rounded {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #d7e4f4;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 21px;
}
.sidebar-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(21, 105, 246, .88), rgba(48, 43, 204, .78));
  box-shadow: inset 3px 0 0 #2c89ff;
}
.sidebar-link.is-active > span,
.sidebar-link.is-active .material-symbols-rounded { color: #fff; background: transparent; }
.sidebar-spacer { flex: 1 1 auto; min-height: 30px; }
.sidebar-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sidebar-tool-card.scheduled-shortcut { grid-column: 1 / -1; }
.sidebar-tool-card {
  min-width: 0;
  min-height: 66px;
  padding: 10px;
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: #fff;
  background: #0c2c57;
  border: 1px solid rgba(122, 169, 232, .26);
  border-radius: 11px;
  text-align: left;
  cursor: pointer;
}
.sidebar-tool-card .material-symbols-rounded {
  padding: 0;
  color: #dceaff;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 19px;
}
.sidebar-tool-card strong { min-width: 0; font-size: .74rem; line-height: 1.15; word-break: normal; overflow-wrap: normal; }
.sidebar-tool-card:hover { background: #113766; border-color: rgba(112, 177, 255, .48); }
.sidebar-bottom-divider { margin: 12px 0 10px; }
.sidebar-footer { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 8px; }
.sidebar-profile,
.sidebar-logout { min-width: 0; min-height: 48px; border-radius: 11px; }
.sidebar-profile {
  display: grid;
  place-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
}
.sidebar-profile .material-symbols-rounded { color: #d6e0ee; background: transparent; border: 0; font-size: 18px; line-height: 1; }
.sidebar-profile strong { margin-top: 4px; color: #fff; font-size: .7rem; line-height: 1; }
.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  background: #0b4564;
  border: 1px solid rgba(65, 191, 207, .3);
  cursor: pointer;
}
.sidebar-logout .material-symbols-rounded {
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 20px;
}
.sidebar-logout strong { color: #fff; font-size: .9rem; }
.sidebar-logout:hover { background: #12617f; }

/* Main content */
.bank-main {
  grid-area: 2 / 2;
  width: 100%;
  min-width: 0;
  padding: 26px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--app-bg);
}
.admin-section { display: none; width: 100%; max-width: 1180px; margin: 0 auto; }
.admin-section.is-active { display: block; }
.section-heading { width: 100%; margin: 0 0 20px; }
.section-heading > span {
  display: block;
  margin: 0 0 5px;
  color: var(--app-primary);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-heading > strong { display: block; margin: 0 0 6px; color: var(--app-text); font-size: clamp(1.65rem, 3vw, 2rem); line-height: 1.2; }
.section-heading > small { display: block; max-width: 700px; color: var(--app-muted); font-size: 14px; line-height: 1.5; }
.bank-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}
.bank-metrics .metric {
  min-width: 0;
  min-height: 104px;
  padding: 17px;
  display: grid;
  align-content: center;
  gap: 7px;
  color: var(--app-text);
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: none;
}
.bank-metrics .metric span { color: #6b7890; font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.bank-metrics .metric strong { min-width: 0; color: var(--app-text); font-size: 1.35rem; white-space: nowrap; }
.charge-card,
.sale-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px;
  color: var(--app-text);
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 17px;
  box-shadow: var(--app-shadow);
}
.sale-form,
.charge-form-grid {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.compact-sale-row { display: contents; }
.amount-field,
.amount-preview,
.sell-button,
.generate-button { grid-column: 1 / -1; }
.admin-page label { min-width: 0; display: flex; flex-direction: column; gap: 6px; color: #46546a; font-size: 12px; font-weight: 700; }
.admin-page label input,
.admin-page label select,
.admin-page label textarea,
#status-filter,
#type-filter {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--app-text);
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  outline: none;
}
.admin-page label input:focus,
.admin-page label select:focus,
.admin-page label textarea:focus { border-color: var(--app-primary); box-shadow: 0 0 0 3px rgba(18, 101, 255, .1); }
.amount-control {
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eef4ff;
  border: 1px solid #bcd0ff;
  border-radius: 11px;
}
.amount-control input { flex: 1; min-width: 0; padding: 0; color: var(--app-text); background: transparent; border: 0; font-size: 27px; outline: none; }
.amount-preview {
  min-height: 44px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--app-primary);
  background: #f2f6ff;
  border: 1px solid #d7e3ff;
  border-radius: 9px;
}
.primary-button,
.secondary-button,
.ghost-button { min-height: 44px; border-radius: 9px; cursor: pointer; }
.primary-button { color: #fff; background: linear-gradient(135deg, #126cff, #2918d9); border: 0; font-weight: 700; }
.secondary-button { color: var(--app-primary); background: #fff; border: 1px solid #bcd0ff; font-weight: 700; }
.ghost-button { color: var(--app-danger); background: #fff; border: 1px solid #efc3c3; }
.sell-button { min-height: 52px; }
.payment-output {
  width: 100%;
  min-height: 100px;
  margin: 18px 0 0;
  padding: 18px;
  display: grid;
  place-content: center;
  color: #69768b;
  background: #f6f8fc;
  border: 1px dashed #b8c5d6;
  border-radius: 14px;
  text-align: center;
}
.payment-output strong { color: #3b4960; }
.payment-output span { color: #69768b; }
.bank-panel {
  width: 100%;
  margin: 0;
  padding: 22px;
  color: var(--app-text);
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 17px;
  box-shadow: var(--app-shadow);
}
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-header .eyebrow { margin: 0 0 4px; color: var(--app-primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.panel-header h2 { margin: 0; color: var(--app-text); }
.filter-bar { display: flex; gap: 8px; }
.status-pill { padding: 5px 12px; color: var(--app-primary); background: #eaf1ff; border: 1px solid #cbdcff; border-radius: 20px; }
.product-card {
  color: var(--app-text);
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(17, 38, 78, .05);
}
.product-card h3 { color: var(--app-text); }
.product-card p { color: var(--app-muted); }
.product-meta .price { color: var(--app-primary); }
.image-editor-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; }
.product-image-preview { width: 180px; height: 180px; min-height: 0; aspect-ratio: auto; padding: 10px; display: grid; place-items: center; overflow: hidden; color: #8da0ba; background: #061a38; border: 1px dashed #cbd5e1; border-radius: 14px; }
.product-image-preview img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.product-image-preview.has-image > span { display: none; }
.admin-page #section-products .cards-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 18px; }
.admin-page #section-products .product-card { min-width: 0; padding: 14px; }
.admin-page #section-products .product-image { width: 100%; height: 170px; aspect-ratio: auto; padding: 10px; display: grid; place-items: center; overflow: hidden; color: #8fa7c8; background: #061a38; border-radius: 14px; }
.admin-page #section-products .product-image img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.admin-page #section-products .product-image.has-image > span { display: none; }
.admin-page #section-products .product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.product-category { min-height: 24px; padding: 4px 9px; display: inline-flex; align-items: center; color: #2854b8; background: #eef3ff; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.category-field { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.category-field .secondary-button,
.category-field .ghost-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.category-field .material-symbols-rounded { font-size: 18px; }
body.modal-open { overflow: hidden; }
.category-modal { position: fixed; inset: 0; z-index: 400; padding: 20px; display: grid; place-items: center; background: rgba(2, 10, 24, .68); }
.category-modal[hidden] { display: none; }
.category-modal-card { width: min(100%, 560px); max-height: min(720px, calc(100dvh - 40px)); padding: 22px; overflow-y: auto; color: var(--app-text); background: #fff; border: 1px solid var(--app-border); border-radius: 17px; box-shadow: 0 24px 70px rgba(2, 10, 24, .28); }
.category-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.category-modal-head .eyebrow { margin: 0 0 3px; color: var(--app-primary); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.category-modal-head h3 { margin: 0; font-size: 1.2rem; }
.category-modal-close { width: 40px; height: 40px; display: grid; place-items: center; color: var(--app-muted); background: #f4f6fa; border: 0; border-radius: 10px; cursor: pointer; }
.category-modal-card .modal-actions { margin-top: 14px; display: flex; gap: 8px; }
.category-modal-card .modal-actions button { padding-inline: 16px; }
.category-list-head { margin-top: 22px; padding-bottom: 9px; display: flex; align-items: center; justify-content: space-between; color: var(--app-muted); border-bottom: 1px solid var(--app-border); font-size: .78rem; }
.category-list { display: grid; }
.category-list-row { min-width: 0; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edf0f5; }
.category-list-row > strong { min-width: 0; overflow: hidden; color: var(--app-text); font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.category-list-row > div { display: flex; gap: 6px; }

/* Public checkout */
.checkout-page {
  --client-navy: #061a38;
  --client-navy-light: #0c2852;
  --client-background: #f3f6fb;
  --client-surface: #fff;
  --client-primary: #1265ff;
  --client-primary-dark: #2827da;
  --client-primary-soft: #edf3ff;
  --client-gradient: linear-gradient(135deg, #126cff, #2918d9);
  --client-text: #10203d;
  --client-muted: #68758b;
  --client-border: #dce4ef;
  --client-success: #16a36a;
  --client-warning: #e59b22;
  --client-danger: #df4545;
  --client-radius: 16px;
  --client-shadow: 0 18px 45px rgba(8, 24, 54, .12);
  min-height: 100dvh;
  color: var(--client-text);
  background: var(--client-background);
}

.checkout-app { width: 100%; max-width: none; min-height: 100dvh; margin: 0; display: flex; flex-direction: column; }
.client-topbar { min-height: 78px; display: flex; align-items: center; background: #fff; border-bottom: 1px solid var(--client-border); }
.client-topbar-inner { width: min(1120px, calc(100% - 32px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.checkout-back-link { display: inline-flex; align-items: center; gap: 6px; color: #1265ff; text-decoration: none; font-size: .86rem; font-weight: 800; }
.checkout-back-link:hover { color: #0b46b5; }
.checkout-back-link .material-symbols-rounded { font-size: 19px; }
.client-brand { min-width: 0; display: flex; align-items: center; gap: 12px; }
.client-brand-symbol { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; color: #fff; background: var(--client-gradient); border-radius: 12px; font-size: 1.25rem; font-weight: 800; }
.client-brand > div { min-width: 0; display: grid; gap: 2px; }
.client-brand strong { color: var(--client-text); font-size: 1rem; font-weight: 800; }
.client-brand small { color: var(--client-muted); font-size: .73rem; }
.payment-status-badge { min-height: 36px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 7px; color: #8b5d0b; background: #fff7e7; border: 1px solid #f0d59e; border-radius: 999px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.payment-status-badge .material-symbols-rounded { font-size: 18px; }
.payment-status-badge.status-customer_confirmed { color: #174f9c; background: #edf4ff; border-color: #c9dcfb; }
.payment-status-badge.status-admin_confirmed { color: #08764a; background: #eaf8f1; border-color: #bce7d2; }
.payment-status-badge.status-legacy { color: #38506f; background: #f0f4f9; border-color: #d9e2ee; }
.payment-status-badge.status-error { color: #a62f2f; background: #fff0f0; border-color: #f1c4c4; }
.checkout-container { width: min(1120px, calc(100% - 32px)); flex: 1; margin: 0 auto; padding: 28px 0 40px; }
.client-payment-app { width: 100%; max-width: none; margin: 0; display: block; }
.checkout-intro { max-width: 760px; margin: 0 0 20px; color: var(--client-muted); font-size: .9rem; line-height: 1.5; }
.checkout-payment-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); gap: 20px; align-items: start; }
.checkout-summary-card,
.checkout-pix-card { min-width: 0; padding: 22px; color: var(--client-text); background: var(--client-surface); border: 1px solid var(--client-border); border-radius: var(--client-radius); box-shadow: var(--client-shadow); }
.checkout-card-heading { display: flex; align-items: center; gap: 11px; }
.checkout-card-heading > .material-symbols-rounded { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; color: var(--client-primary); background: var(--client-primary-soft); border-radius: 11px; font-size: 23px; }
.checkout-card-heading > div { min-width: 0; display: grid; gap: 2px; }
.checkout-card-heading strong { color: var(--client-text); font-size: 1rem; }
.checkout-card-heading span { color: var(--client-muted); font-size: .75rem; }
.order-item-row,
.checkout-product-row { margin-top: 20px; padding-bottom: 18px; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 14px; border-bottom: 1px solid var(--client-border); }
.order-thumb,
.product-order-thumb,
.checkout-product-image {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--client-primary);
  background: #061a38;
  border: 1px solid #dce4ef;
  border-radius: 16px;
  padding: 6px;
}
.order-thumb img,
.product-order-thumb img,
.checkout-product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: scale(1.08);
}
.product-order-thumb,
.checkout-product-image {
  background: #061a38;
}
.product-order-thumb img,
.checkout-product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  transform: scale(1.08);
}
.order-thumb .product-fallback { display: grid; place-items: center; font-size: 30px; }
.order-thumb.has-image .product-fallback { display: none; }
.order-item-copy { min-width: 0; display: grid; gap: 4px; }
.order-item-copy strong { overflow: hidden; color: var(--client-text); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.order-item-copy span { color: var(--client-muted); font-size: .82rem; }
.order-item-copy small { color: #8290a5; font-size: .76rem; }
.order-item-copy .order-merchant { font-size: 1rem; font-weight: 800; }
.order-item-copy .order-product { color: #34445e; font-size: .86rem; font-weight: 600; }
.order-item-copy .order-customer { color: #8290a5; font-size: .75rem; }
.checkout-product-info strong,
.order-item-row .order-product { display: block; margin-bottom: 4px; color: #10203d; font-size: 1.05rem; font-weight: 800; }
.checkout-product-info span,
.order-item-row .order-customer { display: block; color: #6a778d; font-size: .88rem; line-height: 1.35; }
.checkout-details { margin: 4px 0 0; }
.checkout-details > div { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0f5; }
.checkout-details dt { display: flex; align-items: center; gap: 7px; color: var(--client-muted); font-size: .76rem; font-weight: 700; }
.checkout-details dt .material-symbols-rounded { color: #8493a8; font-size: 18px; }
.checkout-details dd { margin: 0; color: var(--client-text); font-size: .79rem; font-weight: 700; text-align: right; }
.payment-total-card { margin-top: 18px; padding: 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--client-primary-soft); border: 1px solid #cddcff; border-radius: 14px; }
.payment-total-card > div { min-width: 0; display: grid; gap: 4px; }
.payment-total-card span { color: var(--client-muted); font-size: .78rem; font-weight: 700; }
.payment-total-card small { color: #71809a; font-size: .68rem; }
.payment-total-card strong { color: var(--client-primary); font-family: "DM Mono", monospace; font-size: clamp(1.7rem, 4vw, 2.25rem); white-space: nowrap; }
.payment-timeline { position: relative; margin-top: 20px; display: grid; gap: 10px; }
.timeline-step { position: relative; min-height: 34px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; color: #95a1b2; }
.timeline-step:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: 13px; width: 2px; height: 16px; background: #dfe5ed; }
.timeline-step .material-symbols-rounded { width: 28px; height: 28px; display: grid; place-items: center; color: #8f9daf; background: #f0f3f7; border-radius: 50%; font-size: 17px; }
.timeline-step strong { font-size: .76rem; }
.timeline-step.is-complete { color: #168057; }
.timeline-step.is-complete .material-symbols-rounded { color: var(--client-success); background: #eaf8f1; }
.timeline-step.is-complete:not(:last-child)::after { background: #89d4b2; }
.timeline-step.is-current { color: var(--client-primary); }
.timeline-step.is-current .material-symbols-rounded { color: var(--client-primary); background: var(--client-primary-soft); }
.client-payment-app.is-confirmed .payment-total-card { background: #eaf8f1; border-color: #bce7d2; }
.client-payment-app.is-confirmed .payment-total-card strong { color: var(--client-success); }
.confirmed-banner { margin-bottom: 20px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; color: #08764a; background: #eaf8f1; border: 1px solid #bce7d2; border-radius: 14px; }
.confirmed-banner > .material-symbols-rounded { font-size: 30px; }
.confirmed-banner > div { display: grid; gap: 2px; }
.confirmed-banner strong { font-size: .95rem; }
.confirmed-banner span { font-size: .78rem; }
.qr-code-shell { width: fit-content; margin: 20px auto; padding: 16px; display: grid; justify-items: center; gap: 9px; color: var(--client-muted); background: #fff; border: 1px solid var(--client-border); border-radius: 16px; }
.qr-code-shell canvas { display: block; width: min(230px, 65vw); height: auto; aspect-ratio: 1; }
#qr-code-status { max-width: 250px; color: var(--client-muted); font-size: .7rem; text-align: center; }
.pix-copy-field { min-width: 0; padding: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; background: #f6f8fc; border: 1px solid var(--client-border); border-radius: 12px; }
.pix-code-preview { min-width: 0; padding-left: 7px; overflow: hidden; color: #617087; font-family: "DM Mono", monospace; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.copy-pix-button { min-width: 116px; min-height: 42px; padding: 0 13px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--client-primary); background: #fff; border: 1px solid #c9d8f7; border-radius: 9px; font-size: .75rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.copy-pix-button .material-symbols-rounded { font-size: 18px; }
.notify-payment-button { width: 100%; min-height: 50px; margin-top: 14px; padding: 10px 16px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: var(--client-gradient); border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; }
.notify-payment-button:disabled { cursor: default; opacity: .65; }
.client-payment-app.is-confirmed .notify-payment-button { background: var(--client-success); opacity: 1; }
.payment-instructions { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--client-border); }
.payment-instructions > strong { color: var(--client-text); font-size: .85rem; }
.payment-instructions ol { margin: 13px 0 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.payment-instructions li { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 8px; color: var(--client-muted); font-size: .75rem; line-height: 1.35; }
.payment-instructions li .material-symbols-rounded { color: var(--client-primary); font-size: 18px; }
.payment-security-note { margin-top: 18px; padding: 13px; display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 9px; color: #566780; background: #f6f8fc; border: 1px solid var(--client-border); border-radius: 11px; }
.payment-security-note > .material-symbols-rounded { color: var(--client-primary); font-size: 21px; }
.payment-security-note > div { min-width: 0; display: grid; gap: 2px; }
.payment-security-note strong { color: var(--client-text); font-size: .76rem; }
.payment-security-note span { font-size: .69rem; line-height: 1.35; }
.payment-status { display: none; margin-top: 16px; padding: 12px 14px; color: #31527d; background: #edf4ff; border: 1px solid #c9dcfb; border-radius: 10px; font-size: .75rem; line-height: 1.4; }
.payment-status.visible { display: block; }
.client-payment-app.is-confirmed .payment-status { color: #08764a; background: #eaf8f1; border-color: #bce7d2; }
.pix-unavailable { min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--client-muted); text-align: center; }
.pix-unavailable > .material-symbols-rounded { color: var(--client-warning); font-size: 42px; }
.pix-unavailable > div { display: grid; gap: 5px; }
.pix-unavailable strong { color: var(--client-text); }
.pix-unavailable span { max-width: 330px; font-size: .8rem; line-height: 1.5; }
.checkout-state-card { min-height: 230px; padding: 28px; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--client-muted); background: #fff; border: 1px solid var(--client-border); border-radius: var(--client-radius); box-shadow: var(--client-shadow); text-align: center; }
.checkout-state-card > .material-symbols-rounded { color: var(--client-primary); font-size: 38px; }
.checkout-state-card > div { display: grid; gap: 5px; }
.checkout-state-card strong { color: var(--client-text); }
.checkout-state-card span { font-size: .82rem; }
.checkout-state-card.is-loading > .material-symbols-rounded { animation: checkout-spin .8s linear infinite; }
.checkout-state-card.is-error > .material-symbols-rounded { color: var(--client-danger); }
@keyframes checkout-spin { to { rotate: 1turn; } }
.client-footer { margin-top: auto; padding: 22px 16px max(22px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 10px; color: #aebed3; background: var(--client-navy); text-align: center; }
.checkout-security { display: flex; align-items: center; gap: 10px; text-align: left; }
.checkout-security > .material-symbols-rounded { color: #8bb8f1; font-size: 25px; }
.checkout-security > div { display: grid; gap: 2px; }
.checkout-security strong { color: #fff; font-size: .78rem; }
.checkout-security span { font-size: .7rem; }
.client-footer > small { color: #8096b4; font-size: .66rem; }

@media (max-width: 899px) {
  .checkout-payment-layout { grid-template-columns: 1fr; }
  .admin-page .app-shell { grid-template: 74px minmax(0, 1fr) / 1fr; }
  .bank-topbar { grid-area: 1 / 1; justify-content: flex-start; padding: 12px 16px; }
  .brand-lockup { margin: 0 auto; }
  .menu-toggle {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    color: var(--app-text);
    background: transparent;
    border: 0;
    border-radius: 10px;
  }
  .menu-close {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 10px;
  }
  .app-sidebar { transform: translateX(-100%); transition: transform 220ms ease; }
  .admin-page.menu-open .app-sidebar { transform: translateX(0); }
  .admin-page.menu-open { overflow: hidden; }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(2, 10, 24, .64);
    border: 0;
    transition: opacity 220ms ease, visibility 220ms ease;
  }
  .admin-page.menu-open .sidebar-overlay { visibility: visible; opacity: 1; }
  .bank-main { grid-area: 2 / 1; }
}

@media (max-width: 700px) {
  .checkout-product-image,
  .product-order-thumb,
  .order-thumb { width: 82px; height: 82px; flex-basis: 82px; padding: 6px; }
  .checkout-product-row,
  .order-item-row { grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
  .client-topbar { padding: max(10px, env(safe-area-inset-top)) 0 10px; }
  .client-topbar-inner { align-items: flex-start; flex-direction: column; gap: 10px; }
  .payment-status-badge { align-self: flex-start; }
  .checkout-container { width: min(100% - 24px, 1120px); padding-top: 20px; }
  .checkout-summary-card,
  .checkout-pix-card { padding: 16px; }
  .payment-total-card { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pix-copy-field { grid-template-columns: 1fr; }
  .copy-pix-button { min-height: 48px; }
  .notify-payment-button { min-height: 50px; }
  .bank-main { padding: 16px; }
  .bank-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sale-form,
  .charge-form-grid { grid-template-columns: 1fr; }
  .amount-field,
  .amount-preview,
  .sell-button,
  .generate-button { grid-column: auto; }
  .panel-header { flex-direction: column; }
  .filter-bar { width: 100%; display: grid; grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .image-editor-row { grid-template-columns: 1fr; }
  .product-image-preview { width: 160px; height: 160px; margin: 0 auto; }
  .admin-page #section-products .cards-list { grid-template-columns: 1fr; }
  .category-field { grid-template-columns: 1fr 1fr; }
  .category-field select { grid-column: 1 / -1; }
  .category-modal { padding: 12px; }
  .category-modal-card { width: 100%; max-height: calc(100dvh - 24px); padding: 17px; }
}

.optional-boleto-toggle{grid-column:1/-1;display:flex!important;align-items:center;gap:10px}.optional-boleto-toggle input{width:20px;height:20px}.boleto-line-section{grid-column:1/-1;display:grid;gap:14px;padding:18px;border:1px solid #dce4ef;border-radius:14px;background:#f8fafc}.boleto-line-section[hidden]{display:none}.checkout-methods{display:grid;gap:14px;min-width:0}

/* =========================================================
   BOLETO OPCIONAL — MELHOR CONTRASTE E LEGIBILIDADE
   ========================================================= */

.optional-boleto-card {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  border: 1px solid #d8e2f0;
  border-radius: 16px;
  background: #f8faff;
  padding: 18px;
  color: #10203d;
}

.optional-boleto-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.optional-boleto-header .material-symbols-rounded {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 11px;
  background: #edf3ff;
  color: #1265ff;
  font-size: 21px;
}

.optional-boleto-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.optional-boleto-header strong {
  color: #10203d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.optional-boleto-header span:not(.material-symbols-rounded) {
  color: #5f6f87;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.optional-boleto-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.optional-boleto-info > div,
.boleto-meta-card {
  min-width: 0;
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px 16px;
  opacity: 1;
}

.optional-boleto-info > div span,
.boleto-meta-card span {
  color: #66758c;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.optional-boleto-info > div strong,
.boleto-meta-card strong {
  display: block;
  color: #10203d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  opacity: 1;
}

.optional-boleto-info input[readonly] {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #10203d;
  padding: 0;
  font-size: 1rem;
  font-weight: 800;
  opacity: 1;
  outline: none;
  box-shadow: none;
  -webkit-text-fill-color: #10203d;
}

.optional-boleto-info input[readonly]:disabled {
  color: #10203d;
  opacity: 1;
  -webkit-text-fill-color: #10203d;
}

.optional-boleto-info input[readonly]::placeholder {
  color: #7a879b;
  opacity: 1;
}

.optional-boleto-line {
  display: grid;
  gap: 10px;
}

.optional-boleto-line > span {
  color: #66758c;
  font-size: 0.76rem;
  font-weight: 700;
}

.optional-boleto-line code,
#client-boleto-line {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  background: #ffffff;
  color: #10203d;
  padding: 15px 16px;
  font-family: "DM Mono", monospace;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.65;
  opacity: 1;
}

#copy-boleto-line-button,
.copy-boleto-line-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #bcd0f5;
  border-radius: 12px;
  background: #ffffff;
  color: #1265ff;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

#copy-boleto-line-button:hover,
.copy-boleto-line-button:hover {
  border-color: #1265ff;
  background: #edf3ff;
}

#copy-boleto-line-button:active,
.copy-boleto-line-button:active {
  transform: scale(0.98);
}

#copy-boleto-line-button .material-symbols-rounded,
.copy-boleto-line-button .material-symbols-rounded {
  color: inherit;
  font-size: 20px;
}

.optional-boleto-card,
.optional-boleto-card * {
  text-shadow: none;
}

.optional-boleto-card [disabled] {
  opacity: 1;
}

@media (max-width: 600px) {
  .optional-boleto-card { padding: 16px; }
  .optional-boleto-info { grid-template-columns: 1fr; }
  .optional-boleto-line code,
  #client-boleto-line { font-size: 0.82rem; padding: 14px; }
}

@media (max-width: 390px) {
  .client-topbar-inner { width: calc(100% - 24px); }
  .client-brand strong { font-size: .92rem; }
  .checkout-details > div { align-items: flex-start; flex-direction: column; gap: 4px; padding: 10px 0; }
  .checkout-details dd { text-align: left; }
  .order-item-row { grid-template-columns: 82px minmax(0, 1fr); }
  .order-thumb { width: 82px; height: 82px; }
  .product-order-thumb,
  .checkout-product-image { width: 82px; height: 82px; flex-basis: 82px; padding: 6px; }
  .bank-main { padding-inline: 12px; }
  .charge-card,
  .sale-card,
  .bank-panel { padding: 16px; }
  .bank-metrics { gap: 10px; }
  .bank-metrics .metric { min-height: 96px; padding: 14px; }
  .login-shell { padding-inline: 12px; }
  .login-card #login-form,
  .login-message { padding-inline: 22px; }
}

.selected-customer-summary { display:grid; gap:4px; padding:14px 16px; border:1px solid #d8e2f0; border-radius:12px; background:#f8fbff; color:#66758c; }
.selected-customer-summary strong { color:#10203d; }
.selected-customer-summary span { font-size:.86rem; }
.customer-search-field { display:grid; gap:7px; margin:24px 0 14px; font-weight:700; }
.customers-list { display:grid; gap:12px; }
.customer-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:16px; padding:16px; border:1px solid #d8e2f0; border-radius:14px; background:#fff; }
.customer-row > div:first-child { display:grid; gap:3px; min-width:0; }
.customer-row span,.customer-row small { color:#66758c; overflow-wrap:anywhere; }
.customer-row .customer-link-warning { color:#9a6700; font-weight:800; margin-top:5px; }
@media (max-width:700px) { .customer-row { grid-template-columns:1fr; } .customer-row .row-actions { justify-content:flex-start; flex-wrap:wrap; } }

.client-access-warning { grid-column:1 / -1; color:#9a6700; background:#fff8db; border:1px solid #f3df96; border-radius:10px; padding:9px 11px; }
.possible-duplicate-warning { grid-column:1 / -1; color:#9a5b00; background:#fff4e5; border:1px solid #f2d3a0; border-radius:10px; padding:9px 11px; font-weight:800; }
.scheduled-charge-note { grid-column:1 / -1; color:#76510a; background:#fff8db; border:1px solid #f0dc91; border-radius:10px; padding:10px 12px; line-height:1.5; }
.charge-status-counters { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.charge-status-counters span { padding:6px 10px; border:1px solid #dce4ee; border-radius:999px; background:#f8fafc; color:#66758c; font-size:.78rem; }
.charge-status-counters strong { color:#0b1e3d; }
.badge.scheduled { color:#76510a; background:#fff3c4; border-color:#edd37b; }
.payment-row-actions { grid-column:1 / -1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
.payment-row-actions button { min-height:42px; display:inline-flex; align-items:center; justify-content:center; gap:7px; border:1px solid transparent; border-radius:10px; padding:9px 10px; font:inherit; font-size:.8rem; font-weight:800; cursor:pointer; }
.payment-row-actions .material-symbols-rounded { font-size:19px; }
.confirm-payment-button { background:#e7f8ef; color:#177245; border-color:#bce8d0 !important; }
.confirm-payment-button:disabled { opacity:.62; cursor:not-allowed; }
.retry-next-charge-button { background:#fff8db; color:#76510a; border-color:#f0dc91 !important; }
.open-charge-button { background:#f3f5f8; color:#34445c; border-color:#d7dee8 !important; }
.copy-client-portal-button,
.copy-charge-link-button { background:#edf5ff; color:#1265ff; border-color:#c9ddff !important; }
.send-charge-whatsapp-button { background:#16a34a; color:#fff; border-color:#15803d !important; }
.edit-scheduled-charge-button { background:#edf5ff; color:#075dcc; border-color:#bdd5ff !important; }
.release-scheduled-charge-button { background:#e7f8ef; color:#177245; border-color:#bce8d0 !important; }
.cancel-scheduled-charge-button { background:#fff4e5; color:#9a5b00; border-color:#f2d3a0 !important; }
.delete-payment-button { grid-column:1 / -1; background:#fff0f0; color:#bd2929; border-color:#f2c5c5 !important; }
.charge-management-actions { width:100%; min-width:0; display:flex; flex-wrap:wrap; align-items:stretch; gap:8px; }
.charge-management-actions > button { width:auto; min-width:0; max-width:100%; flex:1 1 180px; }
.charge-management-actions > .charge-actions-menu { width:auto; min-width:0; max-width:100%; flex:0 1 180px; }
.charge-actions-menu { position:relative; min-width:0; }
.charge-actions-menu summary { min-height:42px; display:flex; align-items:center; justify-content:center; gap:7px; border:1px solid #d7dee8; border-radius:10px; padding:9px 10px; background:#f8fafc; color:#34445c; font-size:.8rem; font-weight:800; cursor:pointer; list-style:none; }
.charge-actions-menu summary::-webkit-details-marker { display:none; }
.charge-actions-menu-list { position:absolute; z-index:30; top:calc(100% + 6px); right:0; width:min(280px,calc(100vw - 56px)); display:grid; gap:6px; padding:8px; border:1px solid #d7dee8; border-radius:12px; background:#fff; box-shadow:0 16px 36px rgba(2,8,31,.16); }
.charge-actions-menu-list button { width:100%; justify-content:flex-start; background:#fff; color:#34445c; border-color:#e1e7ef !important; }
.charge-actions-menu-list .cancel-charge-button { color:#9a5b00; background:#fff9ed; border-color:#f2d3a0 !important; }
.charge-actions-menu-list .delete-payment-button { grid-column:auto; color:#bd2929; background:#fff0f0; border-color:#f2c5c5 !important; }
.payment-row-actions button.is-loading { opacity:.58; cursor:wait; pointer-events:none; }
.client-charge-card.is-requested-payment { border-color:#1265ff; box-shadow:0 0 0 3px rgba(18,101,255,.16),0 14px 30px rgba(18,101,255,.12); animation:requested-payment-pulse 900ms ease-out; }
@keyframes requested-payment-pulse { from { transform:scale(.985); } to { transform:scale(1); } }
@media (max-width:900px) { .payment-row-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .payment-row-actions { grid-template-columns:1fr; } .delete-payment-button { grid-column:auto; } .charge-management-actions > button,.charge-management-actions > details { width:100%; max-width:100%; flex-basis:100%; } .charge-actions-menu summary { width:100%; max-width:100%; box-sizing:border-box; } .charge-actions-menu-list { left:0; right:auto; width:100%; max-width:100%; box-sizing:border-box; } }

/* Cards da lista de cobranças */
.subscription-row.charge-list-card {
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:16px;
  padding:18px;
  overflow:visible;
  border-color:#dce4ee;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 14px rgba(15,35,65,.045);
}
.charge-list-card > * { min-width:0; }
.charge-customer-header {
  min-width:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.charge-customer { min-width:0; display:grid; gap:7px; }
.charge-list-card .charge-customer > strong {
  color:var(--app-text);
  font-size:1.08rem;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.charge-customer-email {
  min-width:0;
  max-width:100%;
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--app-muted)!important;
}
.charge-customer-email > .material-symbols-rounded { flex:0 0 auto; font-size:18px; }
.charge-customer-email > span:last-child {
  min-width:0;
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.charge-customer-header > .badge { flex:0 0 auto; align-self:flex-start; }
.charge-service {
  min-width:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  padding:13px 14px;
  border:1px solid #e2e8f0;
  border-radius:11px;
  background:#f8faff;
}
.charge-service > div { min-width:0; display:flex; align-items:flex-start; gap:9px; }
.charge-service > div > .material-symbols-rounded { flex:0 0 auto; margin-top:1px; color:var(--app-primary); font-size:19px; }
.charge-service > div > span:last-child { min-width:0; display:grid; gap:3px; }
.charge-service small,
.charge-financial small { color:var(--app-muted); font-size:.7rem; line-height:1.25; }
.charge-list-card .charge-service strong {
  color:var(--app-text);
  font-size:.82rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.charge-financial {
  min-width:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.charge-financial > div {
  min-width:0;
  display:grid;
  align-content:start;
  gap:5px;
  padding:12px 13px;
  border:1px solid #e1e7ef;
  border-radius:10px;
  background:#fff;
}
.charge-list-card .charge-financial strong {
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--app-text);
  font-size:.88rem;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.charge-financial strong > .material-symbols-rounded { flex:0 0 auto; color:#6b7b91; font-size:18px; }
.charge-list-card .charge-financial .charge-amount strong {
  color:var(--app-primary);
  font-size:1.22rem;
  letter-spacing:-.02em;
}
.charge-list-card .scheduled-charge-note,
.charge-list-card .client-access-warning,
.charge-list-card .possible-duplicate-warning { margin:0; }
.charge-list-card .charge-management-actions {
  margin:0;
  padding-top:14px;
  border-top:1px solid #e5eaf1;
}
@media (max-width:700px) {
  .subscription-row.charge-list-card { padding:15px; gap:14px; }
  .charge-service { grid-template-columns:1fr; }
  .charge-financial { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .charge-financial .charge-amount { grid-column:1 / -1; }
}
@media (max-width:420px) {
  .charge-customer-header { gap:10px; }
  .charge-customer-header > .badge { padding-inline:7px; }
  .charge-financial { grid-template-columns:1fr; }
  .charge-financial .charge-amount { grid-column:auto; }
}

/* Professional billing platform */
.overview-section .eyebrow,.overview-card .eyebrow{margin:0 0 5px;color:var(--app-primary);font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.overview-header{margin-bottom:20px;display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.overview-header h1{margin:0;color:var(--app-text);font-size:clamp(1.8rem,4vw,2.35rem);letter-spacing:-.035em}.overview-header p:not(.eyebrow){max-width:700px;margin:7px 0;color:var(--app-muted)}.overview-date{display:block;margin-top:12px;color:#8793a6;font-size:.78rem;text-transform:capitalize}.overview-primary-action{min-height:48px;padding:0 18px;display:flex;align-items:center;gap:8px;white-space:nowrap}
.overview-metrics .metric{position:relative;overflow:hidden;align-content:start;min-height:138px;padding:19px}.overview-metrics .metric::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#94a3b8}.overview-metrics .metric-received::before{background:var(--app-success)}.overview-metrics .metric-pending::before{background:#e59b22}.overview-metrics .metric-overdue::before{background:var(--app-danger)}.overview-metrics .metric-rate::before{background:var(--app-primary)}.overview-metrics .metric span{display:flex;align-items:center;gap:7px}.overview-metrics .metric span i{font-size:19px}.overview-metrics .metric strong{margin-top:8px;font-size:clamp(1.25rem,2.2vw,1.55rem)}.overview-metrics .metric small{color:var(--app-muted);font-size:.76rem;line-height:1.35}
.payment-review-alert{margin-bottom:18px;padding:16px 18px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;color:#174f9c;background:#eef5ff;border:1px solid #c9dcfb;border-radius:14px}.payment-review-alert[hidden]{display:none}.payment-review-alert>span{font-size:25px}.payment-review-alert>div{display:grid;gap:2px}.payment-review-alert small{color:#607b9e}.payment-review-alert button{min-height:40px;padding:0 14px;color:#1265ff;background:#fff;border:1px solid #bad1f7;border-radius:9px;font-weight:800;cursor:pointer}
.overview-card{min-width:0;padding:20px;background:#fff;border:1px solid var(--app-border);border-radius:16px;box-shadow:var(--app-shadow)}.overview-card-heading{margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:16px}.overview-card h2{margin:0;font-size:1.05rem}.text-button{min-height:40px;padding:0 10px;color:var(--app-primary);background:transparent;border:0;font-weight:800;cursor:pointer}.quick-actions-card{margin-bottom:18px}.quick-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.quick-actions button{min-width:0;min-height:84px;padding:12px;display:grid;justify-items:start;align-content:center;gap:8px;color:#314159;background:#f8faff;border:1px solid #dde5f0;border-radius:12px;text-align:left;cursor:pointer}.quick-actions button:hover{color:var(--app-primary);background:#eef4ff;border-color:#bfd2f7}.quick-actions button span{color:var(--app-primary)}.quick-actions button strong{font-size:.78rem;line-height:1.25}.overview-content-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.9fr);gap:18px}.overview-list{display:grid}.overview-charge-row{min-width:0;padding:13px 0;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(110px,.75fr) auto auto;align-items:center;gap:13px;border-top:1px solid #edf1f6}.overview-charge-row:first-child{border-top:0}.overview-charge-row>div{min-width:0;display:grid;gap:3px}.overview-charge-row strong,.overview-charge-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overview-charge-row>div>span{color:var(--app-muted);font-size:.76rem}.overview-charge-row>button{min-height:38px;padding:0 10px;color:var(--app-primary);background:#fff;border:1px solid #c9d9f2;border-radius:9px;font-size:.72rem;font-weight:800;cursor:pointer}
.badge{display:inline-flex!important;align-items:center;justify-content:center;gap:5px;white-space:nowrap}.badge .material-symbols-rounded{font-size:16px}.badge.overdue{color:#b42318;background:#fff0ee;border-color:#f4c7c2}.badge.informed{color:#175cd3;background:#eff6ff;border-color:#bfdbfe}.badge.scheduled{color:#6941c6;background:#f4f0ff;border-color:#d9d0f7}
.charge-builder{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,.75fr);align-items:start;gap:24px}.charge-builder .payment-output{grid-column:1/-1}.form-section-label{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding-top:5px}.form-section-label>span{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;color:#fff;background:var(--app-primary);border-radius:9px;font-size:.78rem;font-weight:800}.form-section-label>div{display:grid;gap:2px}.form-section-label strong{font-size:.9rem}.form-section-label small{color:var(--app-muted);font-size:.73rem}.selected-customer-summary,.optional-boleto-toggle,.boleto-line-section,.generate-button{grid-column:1/-1}.generate-button{display:flex;align-items:center;justify-content:center;gap:8px}.charge-review{position:sticky;top:24px;padding:18px;background:#f8faff;border:1px solid #dce5f1;border-radius:14px}.charge-review .form-section-label{padding:0 0 14px;border-bottom:1px solid #dde5f0}.charge-review dl{margin:0;display:grid}.charge-review dl>div{padding:11px 0;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;border-bottom:1px solid #e5eaf1}.charge-review dt{color:var(--app-muted);font-size:.75rem}.charge-review dd{margin:0;max-width:58%;color:var(--app-text);font-size:.78rem;font-weight:800;text-align:right;overflow-wrap:anywhere}.charge-review .review-total{margin-top:8px;padding:14px;background:#eaf1ff;border:0;border-radius:10px}.charge-review .review-total dd{color:var(--app-primary);font-size:1.05rem}
.panel-subtitle{max-width:650px;margin:6px 0 0;color:var(--app-muted);font-size:.85rem;line-height:1.45}.filter-chips{margin-bottom:14px;display:flex;gap:7px;flex-wrap:wrap}.filter-chips button{min-height:40px;padding:0 13px;color:#5f6e83;background:#fff;border:1px solid #d9e1ec;border-radius:999px;font-size:.76rem;font-weight:800;cursor:pointer}.filter-chips button.is-active{color:#fff;background:var(--app-primary);border-color:var(--app-primary)}.charge-search-field{position:relative;margin-bottom:14px}.charge-search-field>span{position:absolute;z-index:1;top:50%;left:14px;translate:0 -50%;color:#8a97aa}.charge-search-field input{padding-left:44px!important}.payment-history-row>div small{color:var(--app-muted);font-size:.72rem}.payment-history-row .badge{min-height:30px;padding:5px 9px}
.customer-metrics{margin:0 0 18px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.customer-metrics article{padding:15px;display:grid;gap:5px;background:#f8faff;border:1px solid #e0e7f0;border-radius:12px}.customer-metrics span{color:var(--app-muted);font-size:.72rem;font-weight:700}.customer-metrics strong{font-size:1.35rem}.customer-editor-form{margin:0 0 20px;padding:18px;background:#f8faff;border:1px solid #dce4ef;border-radius:14px}.customer-editor-form[hidden]{display:none}.customer-row{grid-template-columns:minmax(180px,1.2fr) minmax(140px,.7fr) auto auto}.customer-financial{display:grid;gap:3px}.customer-financial span,.customer-financial small{font-size:.76rem}.customer-financial strong{font-size:.82rem}
.admin-page #section-products .product-image img{object-fit:cover}.admin-page #section-products .product-card p{display:-webkit-box;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.45}.admin-page #section-products .card-actions{display:flex;flex-wrap:wrap}.admin-page #section-products .card-actions button{flex:1 1 auto}
.receipt-success{display:flex;align-items:center;justify-content:center;gap:7px;color:#08764a!important;font-weight:800}.receipt-details{width:100%;margin:14px 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;text-align:left}.receipt-details>div{min-width:0;padding:11px;background:#fff;border:1px solid #dde5ef;border-radius:10px}.receipt-details dt{color:var(--app-muted);font-size:.68rem}.receipt-details dd{margin:4px 0 0;color:var(--app-text);font-size:.78rem;font-weight:800;overflow-wrap:anywhere}
@media(max-width:1050px){.overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.overview-content-grid{grid-template-columns:1fr}.charge-builder{grid-template-columns:1fr}.charge-review{position:static}.customer-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-row{grid-template-columns:minmax(0,1fr) minmax(140px,.7fr)}}
@media(max-width:700px){.overview-header{align-items:stretch;flex-direction:column}.overview-primary-action{width:100%;justify-content:center}.overview-metrics{grid-template-columns:1fr}.quick-actions{grid-template-columns:1fr}.quick-actions button{min-height:60px;grid-template-columns:28px minmax(0,1fr);align-items:center;justify-items:start}.overview-content-grid{gap:14px}.overview-card{padding:16px}.overview-charge-row{grid-template-columns:minmax(0,1fr) auto}.overview-charge-row>.badge{justify-self:start}.overview-charge-row>button{width:100%;grid-column:1/-1}.payment-review-alert{grid-template-columns:auto minmax(0,1fr)}.payment-review-alert button{grid-column:1/-1;width:100%}.charge-card,.sale-card{padding:16px}.charge-form-grid{grid-template-columns:1fr}.amount-field,.selected-customer-summary,.optional-boleto-toggle,.boleto-line-section,.generate-button,.form-section-label{grid-column:1}.filter-bar{width:100%;flex-direction:column}.filter-bar select{width:100%}.filter-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:5px}.filter-chips button{flex:0 0 auto}.customer-metrics{grid-template-columns:1fr 1fr}.customer-row{grid-template-columns:1fr}.customer-row .row-actions button{flex:1 1 140px}.receipt-details{grid-template-columns:1fr 1fr}.overview-card-heading{align-items:flex-start}.bank-main{padding-bottom:max(20px,env(safe-area-inset-bottom))}}
@media(max-width:420px){.customer-metrics{grid-template-columns:1fr}.overview-charge-row{grid-template-columns:1fr}.overview-charge-row>.badge{justify-self:start}}
