@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #070910;
  --panel: #0f1320;
  --panel-2: #151a2b;
  --line: #242839;
  --text: #111827;
  --muted: #697386;
  --white: #ffffff;
  --primary: #7c3cff;
  --primary-2: #a855f7;
  --green: #18b981;
  --danger: #e05252;
  --shadow: 0 16px 40px rgba(17, 24, 39, .12);
  --card: #ffffff;
  --border: #e6e8f0;
  --accent: #6d22e8;
}

* { box-sizing: border-box; }
html { font-family: var(--font-sans); }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: #f7f7fa;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
textarea { resize: vertical; }

.site-header {
  height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(20px, 6vw, 110px);
  background: #05060a;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); }
.brand.center { justify-content: center; color: var(--text); }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--primary);
  border-radius: 8px;
  color: var(--primary-2);
  font-size: 22px;
}
.brand strong, .brand small { display: block; line-height: 1; }
.brand small { color: #b8abc9; margin-top: 3px; }
.site-nav { display: flex; gap: clamp(20px, 4vw, 46px); font-weight: 700; font-size: 14px; }
.site-nav a { opacity: .86; padding: 30px 0 25px; border-bottom: 3px solid transparent; }
.site-nav a.active, .site-nav a:hover { opacity: 1; border-color: var(--primary); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.text-link { color: #f4f4f6; font-weight: 700; font-size: 14px; }

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: var(--white); background: linear-gradient(135deg, #6d22e8, #a855f7); box-shadow: 0 10px 22px rgba(124,60,255,.26); }
.btn-outline { border-color: rgba(124,60,255,.55); color: var(--primary); background: #fff; }
.btn-outline-dark { color: var(--white); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.03); }
.btn-ghost { border-color: #d9dbe7; background: #fff; color: #323748; }
.btn-danger { color: #fff; background: linear-gradient(135deg, #c0392b, #e05252); border-color: transparent; box-shadow: 0 8px 20px rgba(224,82,82,.25); }
.btn-danger:hover { background: linear-gradient(135deg, #a93226, #c0392b); }
.btn-small { min-height: 32px; padding: 0 12px; font-size: 12px; }

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.18fr);
  gap: 36px;
  align-items: center;
  padding: 46px clamp(20px, 7vw, 120px) 44px;
  background:
    radial-gradient(circle at 66% 55%, rgba(124,60,255,.42), transparent 34%),
    linear-gradient(90deg, #090d16 0%, #0b0d15 48%, #090b12 100%);
  color: var(--white);
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; max-width: 690px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #d9c7ff;
  background: rgba(124,60,255,.14);
  border: 1px solid rgba(124,60,255,.22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.hero h1 {
  margin: 22px 0 16px;
  max-width: 650px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: .98;
  letter-spacing: 0;
}
.hero h1 span { display: block; color: var(--primary-2); }
.hero p { max-width: 520px; color: #cfd3dc; font-size: 18px; line-height: 1.7; }
.hero-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}
.hero-benefits div { display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; align-items: center; min-width: 0; }
.hero-benefits strong, .hero-benefits small { grid-column: 2; }
.hero-benefits small { color: #aeb4c4; margin-top: 4px; }
.icon-box {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(124,60,255,.13);
  border: 1px solid rgba(124,60,255,.18);
  border-radius: 8px;
  color: var(--primary-2);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.social-proof { display: flex; align-items: center; gap: 18px; margin-top: 24px; color: #f7f7fb; font-size: 14px; }
.avatars {
  width: 94px;
  height: 32px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 16px 16px, #f2c29b 0 12px, transparent 13px),
    radial-gradient(circle at 39px 16px, #d9a27d 0 12px, transparent 13px),
    radial-gradient(circle at 62px 16px, #c0c7d2 0 12px, transparent 13px),
    radial-gradient(circle at 85px 16px, #b9805f 0 12px, transparent 13px);
}
.rating { color: #e8fff5; }
.hero-media { position: relative; min-height: 480px; display: grid; place-items: center; }
.hero-media img {
  width: min(720px, 100%);
  max-height: 540px;
  object-fit: contain;
  filter: drop-shadow(0 32px 70px rgba(0,0,0,.65));
}

.how-section {
  background: #fff;
  padding: 28px clamp(18px, 6vw, 110px);
  border-bottom: 1px solid #e9e9ef;
}
.how-section h2, .plans-band h2, .section h2 { margin: 0 0 22px; text-align: center; font-size: 26px; }
.how-section h2::after, .plans-band h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 8px;
  background: var(--primary);
  margin: 10px auto 0;
}
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1080px; margin: 0 auto; }
.steps div { display: grid; grid-template-columns: 54px 1fr; gap: 7px 14px; align-items: center; }
.steps span { grid-row: span 2; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 8px; background: #f2eaff; color: var(--primary); font-weight: 900; }
.steps p { margin: 0; color: var(--muted); line-height: 1.45; }

.section, .plans-band, .page { padding: 46px clamp(18px, 6vw, 110px); }
.plans-band { background: #f7f7fa; }
.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; max-width: 1180px; margin: 0 auto; }
.plan-card {
  position: relative;
  background: #fff;
  border: 1px solid #e6e4ee;
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.plan-card.featured { border-color: var(--primary); box-shadow: 0 18px 48px rgba(124,60,255,.18); }
.badge { position: absolute; top: 12px; right: 12px; background: #efe7ff; color: var(--primary); padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 900; }
.price { margin: 14px 0; font-size: 28px; font-weight: 900; }
.price span { color: var(--muted); font-size: 14px; margin-left: 4px; font-weight: 500; }
.plan-card ul { padding: 0; margin: 8px 0 24px; list-style: none; color: #536071; line-height: 2; }
.plan-card .btn { margin-top: auto; width: 100%; }

.page-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.page-header h1 { margin: 0 0 8px; font-size: 38px; }
.page-header p { color: var(--muted); margin: 0; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; }
input, textarea, select, .mp-field {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d9dbe7;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  color: #161b28;
}
.mp-field { padding: 10px; }
label { display: grid; gap: 7px; font-weight: 700; color: #303747; }

.file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.file-card { background: #fff; border: 1px solid #e8e8ef; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.file-cover { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #111827, #3d2470); display: grid; place-items: center; color: #fff; font-weight: 900; }
.file-cover.large { aspect-ratio: 1 / 1; border-radius: 8px; }
.file-cover img, .file-cover video { width: 100%; height: 100%; object-fit: cover; }
.file-card-body { padding: 18px; }
.file-card h3 { margin: 8px 0; }
.file-card small, .muted { color: var(--muted); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.card-tags span { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 8px; background: #f2eaff; color: var(--primary); font-size: 12px; font-weight: 800; }

.file-detail { display: grid; grid-template-columns: minmax(0, 1fr) 430px; gap: 30px; }
.detail-media { display: grid; gap: 14px; }
.detail-media img, .detail-media video { border-radius: 8px; box-shadow: var(--shadow); width: 100%; }
.detail-copy { background: #fff; border: 1px solid #e8e8ef; border-radius: 8px; padding: 26px; align-self: start; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0; }
.spec-grid div { background: #f7f7fb; border: 1px solid #e8e8ef; border-radius: 8px; padding: 12px; }
.spec-grid strong, .spec-grid span { display: block; }
.spec-grid span { color: var(--muted); margin-top: 4px; }

.checkout-page, .waiting-page { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 26px; max-width: 1120px; margin: 0 auto; }
.checkout-summary, .checkout-box, .panel, .stat-card {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.checkout-summary { background: #111827; color: #fff; }
.checkout-summary p, .checkout-summary li { color: #d1d5db; }
.checkout-summary ul { padding-left: 18px; line-height: 1.8; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.tabs button { border: 1px solid #d9dbe7; background: #fff; border-radius: 8px; padding: 11px; font-weight: 900; cursor: pointer; }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; }
.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qr { width: 260px; margin: 0 auto 20px; }
.status-pill { display: inline-flex; padding: 7px 12px; border-radius: 8px; background: #fff; color: var(--primary); font-weight: 900; }

.auth-bg { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top, rgba(124,60,255,.25), transparent 30%), #080b13; padding: 20px; }
.auth-card, .install-card { width: min(440px, 100%); background: #fff; padding: 30px; border-radius: 8px; box-shadow: var(--shadow); }
.install-card { width: min(900px, 100%); }
.auth-card h1 { text-align: center; }
.auth-card p { text-align: center; }
.auth-flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); }
.install-note { display: grid; gap: 6px; background: #f7f7fb; border: 1px solid #e8e8ef; border-radius: 8px; padding: 14px; }

/* ── Layouts base ── */
.account-body, .admin-body { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f0f2f8; }
.account-sidebar, .admin-sidebar { background: #080b14; color: #fff; padding: 20px 16px; position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; gap: 0; }
.account-main, .admin-main { padding: 28px 32px; min-width: 0; }
.account-top, .admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.account-top h1 { font-size: 22px; margin: 0; }

/* Sidebar usuario */
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 6px; }
.side-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#6d22e8,#a855f7); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.side-user strong { display: block; font-size: 14px; }
.side-user small { font-size: 11px; color: #8892a4; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }

/* Nav lateral */
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; flex: 1; }
.side-nav-item { display: flex; align-items: center; gap: 10px; color: #b0b8cc; padding: 10px 12px; border-radius: 8px; font-size: 14px; transition: background .15s, color .15s; text-decoration: none; }
.side-nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav-item.active { background: rgba(109,34,232,.25); color: #c084fc; font-weight: 600; }
.snav-icon { font-size: 16px; width: 22px; text-align: center; }
.side-logout-wrap { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.side-logout { width: 100%; text-align: left; color: #8892a4; padding: 10px 12px; border-radius: 8px; background: transparent; border: 0; cursor: pointer; font-size: 13px; }
.side-logout:hover { background: rgba(255,255,255,.07); color: #fff; }

/* ── Hero do dashboard ── */
.acct-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.acct-hero-card { background: #fff; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.acct-hero-label { font-size: 12px; color: #8892a4; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.acct-hero-value { font-size: 28px; font-weight: 800; color: #111827; line-height: 1.1; }
.acct-hero-value small { font-size: 16px; font-weight: 400; color: #8892a4; }
.acct-hero-card small { font-size: 12px; color: #8892a4; }
.acct-hero-link { font-size: 13px; color: #6d22e8; font-weight: 600; margin-top: 4px; text-decoration: none; }
.acct-hero-link:hover { text-decoration: underline; }
.acct-status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.acct-cancel-link { background: none; border: none; color: #e53e3e; font-size: 11px; cursor: pointer; padding: 0; margin-top: 6px; text-align: left; }
.acct-cancel-link:hover { text-decoration: underline; }

/* Barra de progresso */
.acct-progress-bar { height: 6px; background: #e8eaf0; border-radius: 99px; margin: 6px 0 4px; overflow: hidden; }
.acct-progress-fill { height: 100%; border-radius: 99px; transition: width .4s; }

/* Quick actions */
.acct-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.acct-quick-card { background: linear-gradient(135deg,#6d22e8,#a855f7); color: #fff; border-radius: 12px; padding: 18px 20px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: transform .15s, box-shadow .15s; }
.acct-quick-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(109,34,232,.3); }
.acct-quick-card span { font-size: 24px; }
.acct-quick-card strong { font-size: 15px; font-weight: 700; }
.acct-quick-card small { font-size: 12px; opacity: .8; }
.acct-quick-card:nth-child(2) { background: linear-gradient(135deg,#0ea5e9,#38bdf8); }
.acct-quick-card:nth-child(3) { background: linear-gradient(135deg,#059669,#34d399); }

/* Section genérica */
.acct-section { margin-bottom: 32px; }
.acct-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.acct-section-head h2 { font-size: 17px; margin: 0; }
.acct-section-head a { font-size: 13px; color: #6d22e8; font-weight: 600; }

/* Grid de arquivos do dashboard */
.acct-file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.acct-file-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.acct-file-cover { display: block; aspect-ratio: 4/3; overflow: hidden; background: #1a1d2e; }
.acct-file-cover img, .acct-file-cover video { width: 100%; height: 100%; object-fit: cover; }
.acct-file-cover > span:not(.acct-new-badge) { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #6d22e8; font-size: 20px; }
.acct-file-info { padding: 10px 12px 4px; flex: 1; }
.acct-file-info a { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.3; display: block; }
.acct-file-info small { font-size: 11px; color: #8892a4; }
.acct-file-card form { padding: 8px 12px 12px; }

/* Sem plano */
.acct-no-plan { text-align: center; padding: 60px 20px; background: #fff; border-radius: 16px; max-width: 480px; margin: 40px auto; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.acct-no-plan-icon { font-size: 48px; margin-bottom: 16px; }
.acct-no-plan h2 { margin: 0 0 8px; }
.acct-no-plan p { color: #8892a4; margin-bottom: 20px; }

/* ── Minha Biblioteca ── */
.acct-lib-desc { color: #6b7280; margin-bottom: 20px; font-size: 14px; }
.acct-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.acct-lib-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; flex-direction: column; transition: box-shadow .15s; }
.acct-lib-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.acct-lib-cover { display: block; aspect-ratio: 1; overflow: hidden; background: #1a1d2e; position: relative; }
.acct-lib-cover img, .acct-lib-cover video { width: 100%; height: 100%; object-fit: cover; }
.acct-lib-cover > span:not(.acct-lib-badge-com) { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #6d22e8; font-size: 22px; }
.acct-lib-badge-com { position: absolute; top: 6px; right: 6px; background: #f59e0b; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.acct-lib-body { padding: 10px 12px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.acct-lib-body small { font-size: 11px; }
.acct-lib-body a { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.3; }
.acct-lib-date { font-size: 11px; color: #8892a4; margin-top: 2px; }
.acct-lib-dl { padding: 8px 12px 12px; }

/* ── Calculadora ── */
.calc-wrap { max-width: 1100px; }
.calc-intro { color: #6b7280; margin-bottom: 24px; font-size: 14px; }
.calc-body { display: grid; grid-template-columns: 1fr 400px; gap: 24px; align-items: start; }
.calc-inputs { display: flex; flex-direction: column; gap: 16px; }
.calc-section { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 14px; }
.calc-section h3 { margin: 0; font-size: 15px; color: #1e293b; }
.calc-section label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: #374151; }
.calc-section select, .calc-section input[type="number"] { padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; background: #f8fafc; }
.calc-section select:focus, .calc-section input:focus { outline: 2px solid #6d22e8; border-color: #6d22e8; }
.calc-slider-row { display: flex; align-items: center; gap: 12px; }
.calc-slider-row input[type="range"] { flex: 1; accent-color: #6d22e8; }
.calc-slider-row strong { min-width: 48px; text-align: right; font-size: 15px; color: #6d22e8; }

/* Resultado */
.calc-result { background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 24px; }
.calc-result-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.calc-result-header h3 { margin: 0; }
.calc-result-header small { color: #8892a4; font-size: 11px; }
.calc-result-rows { display: flex; flex-direction: column; gap: 0; }
.calc-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.calc-row span { color: #6b7280; }
.calc-row strong { font-weight: 600; color: #1e293b; }
.calc-row-sub { background: #f8fafc; padding: 8px 10px; border-radius: 6px; margin: 4px 0; border: none; }
.calc-row-sub span { font-weight: 600; color: #374151; }
.calc-row-total { border-top: 2px solid #e2e8f0; border-bottom: none; padding-top: 12px; margin-top: 4px; }
.calc-row-total span { font-weight: 700; font-size: 14px; color: #111827; }
.calc-row-total strong { font-size: 16px; color: #111827; }
.calc-price-box { background: linear-gradient(135deg,#6d22e8,#a855f7); border-radius: 12px; padding: 16px; text-align: center; margin: 16px 0; color: #fff; }
.calc-price-box small { font-size: 12px; opacity: .85; display: block; margin-bottom: 4px; }
.calc-price-value { font-size: 32px; font-weight: 800; line-height: 1.1; }
.calc-price-box #r-margin { font-size: 12px; opacity: .8; margin-top: 4px; }
.calc-breakdown h4 { font-size: 13px; margin: 0 0 10px; color: #374151; }
.calc-units { display: flex; flex-direction: column; gap: 6px; }
.calc-unit-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #f8fafc; border-radius: 8px; font-size: 13px; }
.calc-unit-row span { min-width: 28px; color: #8892a4; }
.calc-unit-row strong { flex: 1; font-weight: 700; }
.calc-unit-row small { color: #22c55e; font-weight: 600; }
.calc-tip { margin-top: 14px; padding: 10px 14px; border-radius: 8px; border-left: 3px solid #6d22e8; background: #f8f5ff; font-size: 12px; color: #374151; }

@media (max-width: 900px) {
  .account-body { grid-template-columns: 1fr; }
  .account-sidebar { height: auto; position: relative; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .side-nav { flex-direction: row; margin-top: 0; }
  .side-user { display: none; }
  .acct-hero { grid-template-columns: 1fr 1fr; }
  .acct-quick { grid-template-columns: 1fr 1fr; }
  .calc-body { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { font-size: 24px; }
.admin-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-form .full, .admin-form h2 { grid-column: 1 / -1; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.inline-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.mini-form { display: grid; gap: 8px; min-width: 220px; }
.mini-form select { min-height: 34px; padding: 6px 8px; }
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.rules-grid div { background: #f7f7fb; padding: 12px; border-radius: 8px; border: 1px solid #e8e8ef; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 16px; }
.panel-head h2, .import-connect h2 { margin: 0 0 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* File create form */
.file-create-panel { padding: 22px; }
.file-create-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.file-create-head h2 { margin: 3px 0 0; font-size: 22px; color: #111827; }
.file-create-kicker {
  display: inline-flex;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.file-create-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef9f5;
  color: #087e58;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.file-create-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.file-form-section {
  min-width: 0;
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-top: 1px solid #ececf2;
}
.file-form-section:first-of-type { border-top: 0; padding-top: 0; }
.file-form-section legend {
  margin-bottom: 12px;
  padding: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}
.file-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.file-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.file-form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-span-2 { grid-column: span 2; }
.field-span-3 { grid-column: 1 / -1; }
.file-create-form label { min-width: 0; }
.file-create-form input,
.file-create-form select,
.file-create-form textarea {
  width: 100%;
  min-width: 0;
}
.file-create-form textarea { min-height: 112px; resize: vertical; }
.file-upload-field input[type="file"] {
  min-height: 46px;
  padding: 10px;
  border: 1px dashed #b8a4ef;
  background: #fbf9ff;
}
.file-flag-grid,
.file-plan-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.file-flag-grid label,
.file-plan-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #e2e5ed;
  border-radius: 8px;
  background: #fff;
  color: #303747;
  font-size: 13px;
  font-weight: 800;
}
.file-flag-grid input,
.file-plan-grid input {
  width: 16px;
  min-height: 16px;
}
.file-form-section small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}
.file-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
  border-top: 1px solid #ececf2;
}

/* File tabs */
.file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 12px;
}
.file-toolbar-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #111827;
}
.file-toolbar-title strong { font-size: 14px; }
.file-toolbar-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.file-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.file-tabs { display: flex; gap: 4px; margin: 20px 0 0; border-bottom: 2px solid #e8e9f0; }
.file-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 6px 6px 0 0; transition: color .15s, border-color .15s, background .15s; display: flex; align-items: center; gap: 7px; text-decoration: none; }
.file-tab:hover { color: var(--primary); background: #f5f3ff; }
.file-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: #f9f7ff; }
.file-tab-count { font-size: 11px; font-weight: 700; background: #ece8f8; color: var(--primary); padding: 1px 7px; border-radius: 20px; min-width: 20px; text-align: center; }
.file-tab.active .file-tab-count { background: var(--primary); color: #fff; }

/* Paginação de arquivos */
.file-pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 20px 0 10px; }
.file-pagination-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid #e0e0ea; background: #fff; color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.file-pagination-btn:hover { background: #f5f3ff; color: var(--primary); border-color: var(--primary); }
.file-pagination-btn.file-pagination-current { background: var(--primary); color: #fff; border-color: var(--primary); pointer-events: none; }
.file-pagination-btn.file-pagination-disabled { opacity: .4; pointer-events: none; }
.file-pagination-ellipsis { padding: 0 4px; color: var(--muted); font-size: 14px; }
.file-pagination-info { margin-left: 8px; font-size: 12px; color: var(--muted); }

/* Paginação pública (/biblioteca e outras páginas públicas) */
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 32px 0 16px; justify-content: center; }
.pagination-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid #e0e0ea; background: #fff; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.pagination-btn:hover { background: #f5f3ff; color: var(--primary); border-color: var(--primary); }
.pagination-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); pointer-events: none; }
.pagination-ellipsis { padding: 0 4px; color: var(--muted); font-size: 16px; }
.pagination-info { width: 100%; text-align: center; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Barra de seleção em massa */
.bulk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff8e6; border: 1px solid #f0d080; border-radius: 10px; padding: 10px 16px; margin: 10px 0 0; }
.bulk-bar-check { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.bulk-count { font-size: 13px; color: var(--muted); flex: 1; }
.btn-danger { background: #e53e3e; color: #fff; border-color: #e53e3e; }
.btn-danger:hover:not(:disabled) { background: #c0392b; border-color: #c0392b; }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }

/* Checkbox nos cards */
.file-card-checkbox { position: absolute; top: 10px; left: 10px; z-index: 2; display: none; cursor: pointer; }
.file-card-checkbox input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }
.bulk-mode .file-card-checkbox { display: flex; }
.file-admin-card { position: relative; }
.file-admin-card:has(.bulk-checkbox:checked) { outline: 2px solid var(--primary); background: #f9f7ff; }

/* Status toast (inline, above the list) */
.file-status-toast { padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; margin: 10px 0 0; }
.file-status-toast-success { background: #d4f5e0; color: #1a7a44; }
.file-status-toast-error { background: #fde8e8; color: #c0392b; }

.file-admin-list { display: grid; gap: 14px; margin-top: 12px; min-width: 0; }
.file-admin-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #e8e8ef;
  border-left: 5px solid #cfd3dc;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.file-admin-card.status-published { border-left-color: var(--green); }
.file-admin-card.status-draft { border-left-color: var(--primary); }
.file-admin-card.status-hidden { border-left-color: #9098aa; }
.file-admin-summary {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.file-admin-cover {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  overflow: hidden;
  background: #f2eaff;
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.file-admin-cover img, .file-admin-cover video { width: 100%; height: 100%; object-fit: cover; }
.file-admin-info { min-width: 0; }
.file-admin-title { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.file-admin-title h3 { margin: 0; font-size: 18px; }
.file-admin-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 13px; }
.file-admin-meta > * { display: inline-flex; align-items: center; min-width: 0; }
.file-admin-meta > *:not(:last-child)::after { content: "/"; margin-left: 8px; color: #c5cad6; }
.file-meta-edit { position: relative; margin: 0; gap: 0; }
.file-meta-trigger {
  min-height: 24px;
  max-width: 190px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 1px 5px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.file-meta-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta-trigger:hover, .file-meta-trigger:focus-visible {
  background: #f2eaff;
  color: var(--primary);
  outline: none;
}
.file-meta-edit select {
  display: none;
  width: auto;
  max-width: 210px;
  min-height: 28px;
  padding: 3px 28px 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.file-meta-edit.is-open select { display: block; }
.file-meta-edit.is-open .file-meta-trigger { display: none; }
.file-meta-edit.is-saving { opacity: .65; }
.file-meta-static { min-height: 24px; }
.file-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.badge-file-published { background: #e7fbf2; color: #087e58; }
.badge-file-draft { background: #f2eaff; color: var(--primary); }
.badge-file-hidden { background: #eef0f6; color: #465064; }
.file-edit-panel { margin-top: 14px; border-top: 1px solid #ececf2; padding-top: 12px; }
.file-edit-panel summary { cursor: pointer; color: var(--primary); font-weight: 900; }
.file-edit-form { margin-top: 14px; }
.file-edit-form small { color: var(--muted); font-weight: 600; }
.ia-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  border-radius: 4px;
  padding: 0 6px;
  letter-spacing: .02em;
}
.ia-badge-inline {
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 4px;
}
.file-ai-panel {
  min-width: 0;
  border-top: 1px solid #ede9fe;
  margin-top: 8px;
  padding-top: 2px;
}
.file-ai-panel > summary {
  font-size: 12px;
  color: #9098aa;
  cursor: pointer;
  padding: 7px 2px;
  user-select: none;
}
.file-ai-panel.has-suggestion > summary {
  color: #b45309;
  font-weight: 800;
}
.ai-panel-body { min-width: 0; padding: 10px 2px 6px; }
.ai-diff-grid {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 6px 8px;
  align-items: start;
  margin-bottom: 10px;
  max-width: 100%;
}
.ai-diff-row { display: contents; }
.ai-diff-label {
  min-width: 0;
  padding-top: 4px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 900;
}
.ai-diff-current {
  min-width: 0;
  color: #8b95a7;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ai-diff-arrow {
  min-width: 0;
  padding-top: 3px;
  color: #c4c9d4;
  text-align: center;
  font-size: 12px;
}
.ai-diff-suggested {
  min-width: 0;
  border-radius: 6px;
  background: #fff7d6;
  color: #4b3a08;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ai-confidence {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
}
.ai-confidence-bar {
  flex: 1;
  height: 6px;
  min-width: 80px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.ai-confidence-bar > div { height: 100%; border-radius: 6px; transition: width .3s; }
.ai-reason {
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.import-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.import-stat { background: #fff; border: 1px solid #e8e8ef; border-radius: 8px; padding: 18px; box-shadow: var(--shadow); }
.import-stat span { display: block; color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.import-stat strong { display: block; margin-top: 8px; font-size: 28px; }
.import-connect { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.import-connect code { display: inline-block; max-width: 100%; word-break: break-all; color: #323748; }
.import-connect-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.import-details summary { cursor: pointer; font-weight: 900; }
.import-link-form { margin-top: 16px; }
.import-default-form { align-items: end; }
.import-list { display: grid; gap: 14px; margin-top: 18px; }
.import-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  background: #fff;
  border: 1px solid #e8e8ef;
  border-left: 5px solid #cfd3dc;
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.import-card.status-queued, .import-card.status-downloaded { border-left-color: var(--primary); }
.import-card.status-imported { border-left-color: var(--green); }
.import-card.status-error { border-left-color: var(--danger); }
.import-card.status-image_only { border-left-color: #2f8cff; }
.import-card-main { display: flex; gap: 14px; min-width: 0; }
.import-file-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2eaff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}
.import-card-content { min-width: 0; }
.import-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-title-row h3 { margin: 0; font-size: 18px; }
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 8px; background: #eef0f6; color: #465064; font-size: 12px; font-weight: 900; }
.badge-queued, .badge-downloaded { background: #f2eaff; color: var(--primary); }
.badge-imported { background: #e7fbf2; color: #087e58; }
.badge-error { background: #ffecec; color: #ad2c2c; }
.badge-image_only { background: #eaf3ff; color: #1d64c5; }
.badge-ai { background: #e8fff5; color: #087e58; }
.import-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 13px; }
.import-meta span:not(:last-child)::after { content: "/"; margin-left: 8px; color: #c5cad6; }
.import-message { margin: 12px 0 0; color: #303747; line-height: 1.45; }
.ai-suggestion { display: grid; gap: 4px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #f2fbf7; border: 1px solid #c9f2df; color: #155c43; font-size: 13px; line-height: 1.45; }
.ai-suggestion small { color: #276d54; }
.import-manual-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a4a00; line-height: 1.45; font-size: 13px; }
.import-source-link, .import-linked { display: inline-block; margin-top: 10px; color: var(--primary); font-weight: 800; }
.import-card-actions { display: grid; gap: 10px; align-content: start; }
.import-card-form { display: grid; gap: 10px; }
.import-select-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.import-select-grid select { min-height: 38px; padding: 8px 10px; }
.import-toggle { display: inline-flex; grid-template-columns: none; align-items: center; gap: 8px; color: #303747; }
.import-toggle input { width: 18px; min-height: 18px; }
.import-card-actions .btn { width: 100%; }
.manual-upload { border: 1px solid #e0d7fb; background: #fbf9ff; border-radius: 8px; padding: 10px; }
.manual-upload summary { cursor: pointer; color: var(--primary); font-weight: 900; }
.manual-upload-form { display: grid; gap: 10px; margin-top: 12px; }
.manual-upload-form input[type="file"] { min-height: 42px; padding: 9px; border: 1px dashed #b8a4ef; background: #fff; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 11px; border-bottom: 1px solid #ececf2; vertical-align: top; }
th { color: #465064; font-size: 12px; text-transform: uppercase; }
td small { display: block; color: var(--muted); margin-top: 4px; }
.flash-wrap { position: fixed; z-index: 40; top: 88px; left: 50%; transform: translateX(-50%); width: min(680px, calc(100% - 30px)); }
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 10px; background: #fff; border: 1px solid #e1e3ea; box-shadow: var(--shadow); }
.flash-success { border-color: rgba(24,185,129,.35); color: #087e58; }
.flash-error { border-color: rgba(224,82,82,.35); color: #ad2c2c; }
.empty-state { text-align: center; padding: 70px 20px; max-width: 720px; margin: 0 auto; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 32px clamp(18px, 6vw, 110px); background: #090b12; color: #e5e7eb; }
.footer p { color: #aeb4c4; }
.footer-links { display: flex; gap: 18px; align-items: center; }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; height: auto; padding: 16px 20px; gap: 14px; }
  .site-nav { grid-column: 1 / -1; overflow-x: auto; justify-content: start; }
  .site-nav a { padding: 10px 0; }
  .hero, .checkout-page, .waiting-page, .file-detail, .home-community-section { grid-template-columns: 1fr; }
  .hero-media { min-height: 320px; }
  .hero-benefits, .steps, .plans-grid, .file-grid, .stat-grid, .admin-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-body, .admin-body { grid-template-columns: 1fr; }
  .account-sidebar, .admin-sidebar { position: static; height: auto; }
  .admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-form-grid,
  .file-form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-form-grid.two { grid-template-columns: 1fr; }
  .field-span-2,
  .field-span-3 { grid-column: 1 / -1; }
  .import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-connect { display: grid; }
  .import-connect-actions { justify-content: start; }
  .file-admin-summary { grid-template-columns: 64px minmax(0, 1fr); }
  .file-admin-actions { grid-column: 1 / -1; justify-content: start; }
  .import-card { grid-template-columns: 1fr; }
  .import-select-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .header-actions { grid-column: 1 / -1; justify-content: stretch; }
  .header-actions .btn, .header-actions .text-link { flex: 1; text-align: center; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: 42px; }
  .home-community-section { padding: 42px 18px; }
  .home-community-copy h2 { font-size: 26px; }
  .hero-benefits, .steps, .plans-grid, .file-grid, .stat-grid, .form-grid, .admin-form, .rules-grid, .import-summary, .import-select-grid { grid-template-columns: 1fr; }
  .file-create-head,
  .file-toolbar { align-items: stretch; flex-direction: column; }
  .file-create-chip { align-self: start; white-space: normal; }
  .file-form-grid,
  .file-form-grid.two,
  .file-form-grid.four { grid-template-columns: 1fr; }
  .file-form-actions,
  .file-toolbar-actions { justify-content: stretch; }
  .file-form-actions .btn,
  .file-toolbar-actions .btn { width: 100%; }
  .ai-diff-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ai-diff-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 8px 0;
    border-bottom: 1px solid #f0eef8;
  }
  .ai-diff-row:last-child { border-bottom: 0; }
  .ai-diff-arrow { display: none; }
  .file-admin-summary { grid-template-columns: 1fr; }
  .file-admin-cover { width: 58px; height: 58px; }
  .import-card-main { display: grid; }
  .import-file-icon { width: 46px; height: 46px; flex-basis: 46px; }
  .page-header { display: block; }
  .filter-bar { margin-top: 18px; }
  .footer { display: block; }
  .footer-links { margin-top: 14px; }
}

/* =========================================
   MODERN ADMIN ENHANCEMENTS
   ========================================= */

/* Sidebar */
.admin-sidebar {
  background: linear-gradient(180deg, #0d0f1f 0%, #0a0c18 100%);
  border-right: 1px solid rgba(124,60,255,.15);
  display: flex;
  flex-direction: column;
}
.admin-brand {
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding-bottom: 18px;
  margin-bottom: 6px;
}
.side-nav { margin-top: 8px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b0b8d0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.side-nav a:hover { background: rgba(124,60,255,.12); color: #fff; border-left-color: rgba(124,60,255,.4); }
.side-nav a.active { background: rgba(124,60,255,.18); color: #fff; border-left-color: var(--primary); font-weight: 700; }
.nav-icon { font-size: 15px; flex-shrink: 0; }
.nav-label {
  display: block;
  padding: 14px 12px 4px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #4a5270;
}
.admin-sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 16px;
}
.admin-user-block { display: flex; align-items: center; gap: 10px; padding: 4px 4px 12px; }
.admin-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d22e8, #a855f7);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
}
.admin-user-info strong { display: block; color: #fff; font-size: 13px; line-height: 1.2; }
.admin-user-info small { color: #6672a0; font-size: 11px; }
.admin-logout-btn {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  color: #8896b8;
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}
.admin-logout-btn:hover { background: rgba(224,82,82,.1); color: #e05252; border-color: rgba(224,82,82,.25); }

/* Stat cards with top accent */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #6d22e8, #a855f7);
}
.stat-card-revenue::before { background: linear-gradient(90deg, #18b981, #34d399); }
.stat-card-monthly::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card-active::before { background: linear-gradient(90deg, #6d22e8, #a855f7); }
.stat-card-expired::before { background: linear-gradient(90deg, #9ca3af, #d1d5db); }
.stat-card-customers::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card-downloads::before { background: linear-gradient(90deg, #3b82f6, #818cf8); }
.stat-card-pending::before { background: linear-gradient(90deg, #f97316, #fb923c); }
.stat-card-abuse::before { background: linear-gradient(90deg, #e05252, #f87171); }
.stat-card span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.stat-card strong { font-size: 28px; display: block; margin-top: 8px; }

/* Quick action cards on dashboard */
.dash-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.dash-action-card {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 8px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  transition: border-color .15s, transform .15s;
  color: var(--text);
}
.dash-action-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.dash-action-icon { font-size: 22px; margin-bottom: 4px; }
.dash-action-card strong { display: block; font-size: 14px; }
.dash-action-card small { color: var(--muted); font-size: 12px; }

/* Settings form */
.settings-form { display: block; }
.settings-section {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.settings-section-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f6;
}
.settings-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #f2eaff;
  border-radius: 10px;
  flex-shrink: 0;
}
.settings-section-head h2 { margin: 0 0 4px; font-size: 17px; }
.settings-section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.settings-fields .col-span-3 { grid-column: 1 / -1; }
.secret-wrap { position: relative; }
.secret-set-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #087e58;
  background: #e7fbf2;
  border: 1px solid #c4f0dc;
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 4px;
}
.secret-empty-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #9a4a00;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 4px;
}
.settings-save-bar {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 4px;
}

/* AI provider blocks */
.ai-providers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ai-provider-block {
  border: 2px solid #e8e8ef;
  border-radius: 10px;
  padding: 18px;
  display: grid;
  gap: 10px;
  transition: border-color .15s, opacity .15s;
}
.ai-provider-block-active {
  border-color: var(--primary);
  background: #fdf9ff;
}
.ai-provider-block-paused {
  opacity: .55;
  background: #fafafa;
}
.ai-provider-block-paused:hover { opacity: .8; }
.ai-provider-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
}
.ai-provider-toggle input[type="radio"] {
  width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.ai-provider-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.ai-provider-toggle-label strong { font-size: 16px; }
.ai-badge-active {
  font-size: 11px;
  font-weight: 800;
  color: #087e58;
  background: #e7fbf2;
  border: 1px solid #c4f0dc;
  border-radius: 6px;
  padding: 2px 9px;
}
.ai-badge-paused {
  font-size: 11px;
  font-weight: 800;
  color: #9098aa;
  background: #f0f2f5;
  border: 1px solid #e0e3ea;
  border-radius: 6px;
  padding: 2px 9px;
}
.ai-provider-desc {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.ai-provider-fields {
  display: grid;
  gap: 10px;
}
.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
@media (max-width: 760px) {
  .ai-providers-grid { grid-template-columns: 1fr; }
}

/* Admin top bar */
.admin-top h1 { font-size: 22px; margin: 0; }

@media (max-width: 980px) {
  .dash-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dash-actions { grid-template-columns: 1fr; }
  .settings-fields { grid-template-columns: 1fr; }
  .settings-fields .col-span-3 { grid-column: 1; }
}

/* =========================================
   TELEGRAM IMPORT PAGE
   ========================================= */

/* Control bar */
.tg-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.tg-stats { display: flex; gap: 22px; }
.tg-stat { text-align: center; }
.tg-stat strong { display: block; font-size: 22px; line-height: 1; }
.tg-stat span { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.tg-stat-ready strong { color: var(--primary); }
.tg-stat-ai strong { color: #087e58; }
.tg-stat-error strong { color: var(--danger); }
.tg-control-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Setup panel */
.tg-setup-panel {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 8px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.tg-setup-panel > summary {
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
  color: #465064;
  list-style: none;
  user-select: none;
}
.tg-setup-panel > summary::-webkit-details-marker { display: none; }
.tg-setup-panel[open] > summary { border-bottom: 1px solid #f0f0f6; }
.tg-setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 16px 18px;
}
.tg-setup-block { display: grid; gap: 8px; align-content: start; }
.tg-setup-block strong { font-size: 14px; }
.tg-setup-desc { font-size: 13px; color: var(--muted); }
.tg-alert { font-size: 12px; font-weight: 800; color: #9a4a00; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 6px; padding: 4px 8px; }
.tg-webhook-url { display: block; font-size: 11px; color: #465064; background: #f5f5fa; padding: 6px 8px; border-radius: 6px; word-break: break-all; }
.tg-link-form { display: grid; gap: 6px; }
.tg-link-form textarea { min-height: 60px; font-size: 12px; }

/* Import card list */
.tg-list { display: grid; gap: 12px; }
.tg-card {
  display: grid;
  grid-template-columns: 116px minmax(0,1fr) 200px;
  gap: 0;
  background: #fff;
  border: 1px solid #e8e8ef;
  border-left: 4px solid #d1d5db;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  align-items: stretch;
}
.tg-card.status-queued, .tg-card.status-downloaded { border-left-color: var(--primary); }
.tg-card.status-error { border-left-color: var(--danger); }
.tg-card.status-image_only { border-left-color: #3b82f6; }
.tg-card.status-link_only { border-left-color: #f59e0b; }
.tg-card.tg-card-done { border-left-color: var(--green); opacity: .75; }

/* Cover */
.tg-card-cover {
  width: 116px;
  aspect-ratio: 1 / 1;
  align-self: start;
  display: grid;
  place-items: center;
  background: #070910;
  overflow: hidden;
  flex-shrink: 0;
}
.tg-card-cover img, .tg-card-cover video { width: 100%; height: 100%; object-fit: contain; }
.tg-ext-badge { font-size: 13px; font-weight: 900; color: var(--primary); text-transform: uppercase; }

/* Body */
.tg-card-body { padding: 14px 16px; min-width: 0; display: grid; align-content: start; gap: 6px; }
.tg-card-head { display: grid; gap: 4px; }
.tg-card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tg-card-title h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.tg-card-meta { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.tg-card-meta span:not(:last-child)::after { content: "·"; margin-left: 6px; }

/* AI block */
.tg-ai-block { background: #f2fbf7; border: 1px solid #c9f2df; border-radius: 6px; padding: 10px 12px; display: grid; gap: 6px; }
.tg-ai-desc { margin: 0; font-size: 13px; color: #1c4a36; line-height: 1.4; }
.tg-ai-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tg-ai-tags span { background: #d1fae5; color: #065f46; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.tg-ai-reason { font-size: 11px; color: #276d54; }

/* Notes */
.tg-note { margin: 0; font-size: 12px; line-height: 1.45; padding: 6px 10px; border-radius: 6px; background: #f7f7fb; color: #465064; }
.tg-note-warn { background: #fff7ed; color: #9a4a00; }
.tg-note-info { background: #eaf3ff; color: #1d64c5; }

/* Linked */
.tg-linked { margin: 0; font-size: 12px; color: var(--green); font-weight: 700; }
.tg-linked a { color: inherit; text-decoration: underline; }

/* Actions column */
.tg-card-actions {
  border-left: 1px solid #f0f0f6;
  padding: 12px;
  display: grid;
  gap: 7px;
  align-content: start;
  background: #fafafa;
}
.tg-import-form, .tg-upload-form { display: grid; gap: 6px; }
.tg-import-selects { display: grid; gap: 5px; }
.tg-import-selects select { min-height: 34px; padding: 5px 8px; font-size: 12px; }
.tg-check { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #465064; }
.tg-check input { width: 14px; min-height: 14px; }
.btn.full { width: 100%; }

/* Upload panel */
.tg-upload-panel { border: 1px solid #e0d7fb; background: #fbf9ff; border-radius: 6px; padding: 8px 10px; }
.tg-upload-panel summary { cursor: pointer; font-size: 12px; font-weight: 900; color: var(--primary); }
.tg-upload-form { margin-top: 8px; }
.tg-upload-form input[type="file"] { font-size: 12px; min-height: 36px; padding: 6px; border: 1px dashed #b8a4ef; background: #fff; border-radius: 6px; }
.tg-upload-progress { display: grid; gap: 4px; }
.tg-upload-progress[hidden] { display: none; }
.tg-upload-progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #ece8f8; border: 1px solid #ded5f4; }
.tg-upload-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6d22e8, #18b981); transition: width .18s ease; }
.tg-upload-progress small { font-size: 11px; color: #465064; line-height: 1.35; overflow-wrap: anywhere; }
.tg-upload-progress.is-success .tg-upload-progress-track { border-color: rgba(24,185,129,.35); background: #e9fbf4; }
.tg-upload-progress.is-success small { color: #087e58; font-weight: 800; }
.tg-upload-progress.is-error .tg-upload-progress-track { border-color: rgba(224,82,82,.35); background: #fff1f1; }
.tg-upload-progress.is-error .tg-upload-progress-track span { background: var(--danger); }
.tg-upload-progress.is-error small { color: #ad2c2c; font-weight: 800; }
.tg-upload-form .btn[disabled] { cursor: progress; opacity: .72; transform: none; }
.tg-card-uploaded { border-left-color: var(--green); opacity: .58; transition: opacity .2s ease; }
.tg-toast-wrap { position: fixed; z-index: 80; top: 88px; right: 18px; width: min(380px, calc(100% - 36px)); display: grid; gap: 8px; }
.tg-toast { margin: 0; }

@media (max-width: 980px) {
  .tg-card { grid-template-columns: 88px minmax(0,1fr); }
  .tg-card-cover { width: 88px; }
  .tg-card-actions { grid-column: 1 / -1; border-left: none; border-top: 1px solid #f0f0f6; grid-template-columns: repeat(2, 1fr); }
  .tg-setup-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tg-card { grid-template-columns: 76px 1fr; }
  .tg-card-cover { width: 76px; }
  .tg-card-actions { grid-template-columns: 1fr; }
  .tg-control-bar { flex-direction: column; align-items: stretch; }
  .tg-stats { justify-content: space-between; }
}

/* ============================================================
   Duplicate Detection Page
   ============================================================ */
.dup-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dup-hero-body h2 { margin: 0 0 4px; font-size: 18px; }
.dup-hero-body p { margin: 0; color: var(--muted); font-size: 13px; max-width: 520px; }
.dup-scan-form { flex-shrink: 0; }
.dup-scan-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.dup-summary-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #f9f7ff; border: 1px solid #e0d7fb; border-radius: 10px; margin-bottom: 16px; font-size: 13px; font-weight: 600; color: var(--primary); flex-wrap: wrap; }

.dup-group { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.dup-group-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #f9f7ff; border-bottom: 1px solid #e8e9f0; flex-wrap: wrap; }
.dup-group-label { font-weight: 700; font-size: 12px; background: var(--primary); color: #fff; padding: 2px 8px; border-radius: 20px; }
.dup-group-reason { font-size: 13px; color: #323748; flex: 1; }
.dup-group-count { font-size: 12px; color: var(--muted); margin-left: auto; }
.dup-group-clear { border: 0; background: transparent; color: #6d22e8; font-size: 12px; font-weight: 900; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.dup-group-clear:hover { background: #f2eaff; }

.dup-cards { display: flex; flex-direction: column; }
.dup-card { display: grid; grid-template-columns: 96px 1fr auto; gap: 0; border-bottom: 1px solid #f0f0f6; transition: background .15s; align-items: stretch; }
.dup-card:last-child { border-bottom: none; }
.dup-card-keep { background: #f3fcf6; border-left: 3px solid #1a7a44; }
.dup-card-delete { background: #fff9f9; border-left: 3px solid #e05252; }
.dup-card-skip { background: #fff; border-left: 3px solid #d9dbe7; }

.dup-card-cover { width: 96px; height: 96px; background: #f0f0f6; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #999; overflow: hidden; flex-shrink: 0; text-align: center; line-height: 1.3; }
.dup-card-cover img, .dup-card-cover video { width: 100%; height: 100%; object-fit: cover; }
.dup-no-cover { font-size: 10px; color: #bbb; text-align: center; padding: 4px; }

.dup-card-info { padding: 10px 14px; min-width: 0; overflow: hidden; }
.dup-card-title { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.dup-card-title strong { font-size: 13px; }
.dup-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.dup-card-meta span { font-size: 11px; color: var(--muted); }

.dup-badge-suggested { font-size: 10px; background: #fff3cd; color: #7a5200; padding: 2px 7px; border-radius: 20px; font-weight: 700; white-space: nowrap; }
.dup-badge-nocover { font-size: 10px; background: #f0f0f6; color: #888; padding: 2px 7px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.dup-badge-source { font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 800; white-space: nowrap; }
.dup-badge-file { background: #e7fbf2; color: #087e58; }
.dup-badge-telegram { background: #eaf3ff; color: #1d64c5; }

/* Coluna de decisão — radio "Manter" e checkbox de processamento */
.dup-card-decision { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 12px 14px; border-left: 1px solid #f0f0f6; min-width: 160px; }
.dup-keep-btn { cursor: pointer; user-select: none; }
.dup-keep-btn input[type="radio"] { display: none; }
.dup-keep-label { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 8px; border: 2px solid #d9dbe7; background: #fff; font-size: 12px; font-weight: 700; color: #888; cursor: pointer; transition: all .15s; text-align: center; }
.dup-keep-label:hover { border-color: #1a7a44; color: #1a7a44; background: #f3fcf6; }
.dup-keep-btn input[type="radio"]:checked + .dup-keep-label { border-color: #1a7a44; background: #d4f5e0; color: #1a7a44; }
.dup-keep-icon { font-size: 16px; line-height: 1; flex-shrink: 0; }
.dup-card-delete .dup-keep-btn input[type="radio"]:not(:checked) + .dup-keep-label { border-color: #e8d5d5; background: #fff5f5; color: #c0392b; }
.dup-card-delete .dup-keep-label:hover { border-color: #1a7a44; color: #1a7a44; background: #f3fcf6; }
.dup-process-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid #fca5a5; border-radius: 8px; background: #fff5f5; color: #b91c1c; font-size: 12px; font-weight: 700; cursor: pointer; }
.dup-process-btn input { width: 14px; height: 14px; flex-shrink: 0; accent-color: #e05252; }
.dup-process-btn input:disabled + span { color: #8b95a7; }
.dup-card-keep .dup-process-btn { border-color: #d9dbe7; background: #f8fafc; color: #8b95a7; cursor: not-allowed; }
.dup-card-skip .dup-process-btn { border-color: #d9dbe7; background: #fff; color: #465064; }

.dup-actions-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; box-shadow: 0 -4px 16px rgba(0,0,0,.08); margin-top: 8px; flex-wrap: wrap; }
.dup-selected-info { font-size: 14px; font-weight: 600; color: #c0392b; }

@media (max-width: 700px) {
  .dup-card { grid-template-columns: 72px 1fr; }
  .dup-card-decision { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; min-width: 0; padding: 8px 12px; border-left: none; border-top: 1px solid #f0f0f6; }
  .dup-hero { flex-direction: column; align-items: flex-start; }
  .dup-scan-actions, .dup-scan-actions form, .dup-scan-actions .btn { width: 100%; }
}

/* Promo / desconto nos cards de plano */
.plan-card { position: relative; }
.promo-tag { position: absolute; top: -10px; right: 14px; background: #e53e3e; color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 20px; letter-spacing: .4px; }
.price-original { display: block; font-size: 13px; color: var(--muted); text-decoration: line-through; margin-bottom: 2px; font-weight: 400; }

/* Botao de perigo */
.btn-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fca5a5; color: #7f1d1d; }

/* Consent checkbox — LGPD */
.consent-label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13px; color: #444; line-height: 1.5; }
.consent-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: #6d22e8; width: 16px; height: 16px; cursor: pointer; }

/* =====================================================================
   AI Chat — Consultor IA
   ===================================================================== */
.ai-chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 100px); max-height: 820px; min-height: 480px; }

.ai-chat-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(135deg, #6d22e8 0%, #4f46e5 100%); border-radius: 14px 14px 0 0; color: #fff; }
.ai-chat-avatar { font-size: 32px; line-height: 1; }
.ai-chat-header strong { font-size: 16px; }
.ai-chat-header small { display: block; font-size: 12px; opacity: .8; margin-top: 1px; }
.ai-plan-badge { margin-left: auto; background: rgba(255,255,255,.2); border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }

.ai-chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; background: #f8f8fc; border-left: 1px solid #e8e9f0; border-right: 1px solid #e8e9f0; scroll-behavior: smooth; }

.ai-msg { display: flex; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-bot { justify-content: flex-start; }
.ai-msg-error { justify-content: flex-start; }

.ai-msg-bubble { max-width: 78%; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.ai-msg-user .ai-msg-bubble { background: #6d22e8; color: #fff; border-bottom-right-radius: 4px; }
.ai-msg-bot .ai-msg-bubble { background: #fff; border: 1px solid #e8e9f0; border-bottom-left-radius: 4px; color: #1a1a2e; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.ai-msg-error .ai-msg-bubble { background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c; border-bottom-left-radius: 4px; font-size: 13px; }

.ai-msg-bubble p { margin: 0 0 8px; }
.ai-msg-bubble p:last-child { margin-bottom: 0; }
.ai-msg-bubble h3, .ai-msg-bubble h4 { margin: 10px 0 4px; font-size: 14px; }
.ai-msg-bubble ul, .ai-msg-bubble ol { margin: 6px 0; padding-left: 20px; }
.ai-msg-bubble li { margin-bottom: 4px; }
.ai-msg-bubble strong { font-weight: 700; }
.ai-code { background: #1e1e2e; color: #cdd6f4; padding: 10px 14px; border-radius: 8px; overflow-x: auto; font-size: 12px; margin: 8px 0; }
.ai-inline-code { background: #f0ecff; color: #6d22e8; padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: monospace; }

/* Typing indicator */
.ai-typing { display: flex; gap: 5px; align-items: center; padding: 14px 18px !important; }
.ai-typing span { width: 7px; height: 7px; background: #6d22e8; border-radius: 50%; animation: ai-bounce 1.2s infinite ease-in-out; }
.ai-typing span:nth-child(1) { animation-delay: 0s; }
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Suggestion chips */
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; background: #f8f8fc; border-left: 1px solid #e8e9f0; border-right: 1px solid #e8e9f0; }
.ai-suggestion-btn { background: #fff; border: 1px solid #d4b8fc; color: #6d22e8; border-radius: 20px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.ai-suggestion-btn:hover { background: #f0ecff; border-color: #6d22e8; }

/* Input area */
.ai-chat-form { background: #fff; border: 1px solid #e8e9f0; border-top: none; border-radius: 0 0 14px 14px; padding: 12px 16px; }
.ai-chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.ai-chat-input { flex: 1; border: 1px solid #e8e9f0; border-radius: 10px; padding: 10px 14px; font-size: 14px; font-family: inherit; resize: none; line-height: 1.5; background: #f8f8fc; transition: border-color .2s; outline: none; min-height: 42px; max-height: 160px; overflow-y: auto; }
.ai-chat-input:focus { border-color: #6d22e8; background: #fff; }
.ai-send-btn { width: 42px; height: 42px; border-radius: 10px; background: #6d22e8; color: #fff; border: none; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .2s, opacity .2s; }
.ai-send-btn:hover { background: #5a1bc4; }
.ai-send-btn:disabled { opacity: .5; cursor: not-allowed; }
#ai-loading-icon { font-size: 10px; letter-spacing: 2px; animation: ai-pulse 1s infinite; }
@keyframes ai-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.ai-footer-note { display: block; font-size: 11px; color: #94a3b8; margin-top: 6px; text-align: center; }

@media (max-width: 600px) {
  .ai-chat-wrap { height: calc(100vh - 80px); max-height: none; }
  .ai-msg-bubble { max-width: 90%; }
  .ai-suggestions { padding: 10px 14px; }
}
.consent-label a { color: #6d22e8; text-decoration: underline; }

/* ── Feature A: Wishlist ─────────────────────────────────────── */
.wish-form { margin-top: 12px; }
.wish-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border: 2px solid #d4b8fc; border-radius: 20px; background: #fff; color: #6d22e8; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.wish-btn:hover { background: #f0ecff; border-color: #6d22e8; }
.wish-btn.active { background: #6d22e8; border-color: #6d22e8; color: #fff; }
.wish-btn.active:hover { background: #5a1bc4; border-color: #5a1bc4; }
.wish-login-hint { font-size: 13px; color: #64748b; margin-top: 10px; }
.wish-login-hint a { color: #6d22e8; text-decoration: underline; }
.card-wish-form { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.card-wish-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.9); border: 1px solid #e8e9f0; color: #64748b; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, color .15s; line-height: 1; }
.card-wish-btn:hover { background: #f0ecff; color: #6d22e8; border-color: #d4b8fc; }
.card-wish-btn.active { background: #fff0f0; color: #e53e3e; border-color: #fca5a5; }
.file-card { position: relative; }

/* ── Feature B: Cost modal ───────────────────────────────────── */
.cost-calc-trigger { margin-top: 12px; }
.cost-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cost-modal { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 560px; position: relative; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.cost-modal h3 { font-size: 16px; font-weight: 700; margin: 0 0 18px; padding-right: 28px; color: #1e1b4b; }
.cost-modal-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #e8e9f0; background: #f8f8fc; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; color: #64748b; }
.cost-modal-close:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.mini-calc-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.mini-calc-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #374151; flex: 1; min-width: 110px; }
.mini-calc-row input, .mini-calc-row select { border: 1px solid #e8e9f0; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: inherit; outline: none; transition: border-color .2s; }
.mini-calc-row input:focus, .mini-calc-row select:focus { border-color: #6d22e8; }
.mini-calc-results { border-top: 1px solid #e8e9f0; margin-top: 14px; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.mini-calc-result { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #374151; padding: 4px 0; }
.mini-calc-result-total { border-top: 1px solid #e8e9f0; padding-top: 8px; font-weight: 700; }
.mini-calc-result-price strong { color: #6d22e8; font-size: 18px; }

/* ── Feature C: Filament presets ─────────────────────────────── */
.fil-presets-section { background: #faf8ff; border: 1px solid #e9e3ff; border-radius: 12px; }
.fil-chips-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 28px; }
.fil-preset-chip { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid #c4b5fd; border-radius: 20px; background: #fff; padding: 4px 10px; font-size: 13px; color: #5b21b6; cursor: pointer; transition: background .15s; }
.fil-preset-chip:hover { background: #f0ecff; }
.fil-chip-label { cursor: pointer; font-weight: 600; }
.fil-chip-remove { background: none; border: none; color: #a78bfa; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.fil-chip-remove:hover { color: #dc2626; }
.fil-add-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fil-add-form input[type=text] { flex: 2; min-width: 130px; border: 1px solid #e8e9f0; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: inherit; }
.fil-add-form input[type=number] { flex: 1; min-width: 90px; border: 1px solid #e8e9f0; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: inherit; }
.fil-empty-hint { font-size: 12px; color: #94a3b8; }

/* ── Feature D: Print log ────────────────────────────────────── */
.log-stats-bar { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.log-stat { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; padding: 14px 20px; flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 2px; }
.log-stat strong { font-size: 24px; font-weight: 800; color: #6d22e8; }
.log-stat span { font-size: 12px; color: #64748b; }
.log-form-wrap { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; margin-bottom: 20px; }
.log-form-wrap summary { padding: 14px 20px; cursor: pointer; font-weight: 700; color: #1e1b4b; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; }
.log-form-wrap summary::-webkit-details-marker { display: none; }
.log-form { padding: 0 20px 20px; }
.log-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.log-field-wide { grid-column: 1 / -1; }
.log-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #374151; }
.log-form-grid input, .log-form-grid select, .log-form-grid textarea { border: 1px solid #e8e9f0; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; transition: border-color .2s; outline: none; }
.log-form-grid input:focus, .log-form-grid select:focus, .log-form-grid textarea:focus { border-color: #6d22e8; }
.log-result-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: #374151; }
.log-result-radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.log-result-radio { display: flex; align-items: center; gap: 4px; cursor: pointer; font-weight: 400; font-size: 13px; }
.log-result-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.log-result-badge.success { background: #dcfce7; color: #166534; }
.log-result-badge.fail { background: #fee2e2; color: #991b1b; }
.log-result-badge.partial { background: #fef9c3; color: #92400e; }
.log-table-wrap { overflow-x: auto; }
.log-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e8e9f0; }
.log-table th { background: #f8f8fc; padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e8e9f0; }
.log-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.log-table tr:last-child td { border-bottom: none; }
.log-table tr:hover td { background: #faf8ff; }
.log-notes { max-width: 200px; color: #64748b; font-size: 12px; }

/* ── Feature E: Collections ──────────────────────────────────── */
.col-create-bar { margin-bottom: 20px; }
.col-create-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col-emoji-input { width: 60px; border: 1px solid #e8e9f0; border-radius: 8px; padding: 8px 10px; font-size: 18px; text-align: center; outline: none; font-family: inherit; }
.col-name-input { flex: 1; min-width: 180px; border: 1px solid #e8e9f0; border-radius: 8px; padding: 8px 12px; font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s; }
.col-name-input:focus { border-color: #6d22e8; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.col-card { background: #fff; border: 1px solid #e8e9f0; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.col-card:hover { box-shadow: 0 4px 20px rgba(109,34,232,.1); transform: translateY(-2px); }
.col-card-inner { display: flex; align-items: center; gap: 14px; padding: 18px; text-decoration: none; color: inherit; flex: 1; }
.col-card-emoji { font-size: 32px; line-height: 1; flex-shrink: 0; }
.col-card-info { display: flex; flex-direction: column; gap: 3px; }
.col-card-info strong { font-size: 15px; color: #1e1b4b; }
.col-card-info span { font-size: 12px; color: #64748b; }
.col-card-actions { display: flex; gap: 8px; padding: 0 14px 14px; }
.col-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #64748b; margin-bottom: 20px; }
.col-breadcrumb a { color: #6d22e8; text-decoration: none; font-weight: 600; }
.col-breadcrumb a:hover { text-decoration: underline; }
.col-breadcrumb span { color: #94a3b8; }

/* ── Shared account lib grid (wishlist + collections) ────────── */
.acct-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.acct-lib-card { background: #fff; border: 1px solid #e8e9f0; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.acct-lib-cover { display: block; aspect-ratio: 4/3; overflow: hidden; background: #f1f5f9; }
.acct-lib-cover img, .acct-lib-cover video { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.acct-lib-card:hover .acct-lib-cover img, .acct-lib-card:hover .acct-lib-cover video { transform: scale(1.04); }
.acct-lib-info { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.acct-lib-cat { font-size: 11px; font-weight: 700; color: #6d22e8; text-transform: uppercase; letter-spacing: .05em; }
.acct-lib-info h3 { font-size: 14px; font-weight: 700; color: #1e1b4b; margin: 0; line-height: 1.4; }
.acct-lib-info h3 a { color: inherit; text-decoration: none; }
.acct-lib-info h3 a:hover { color: #6d22e8; }
.acct-lib-date { font-size: 11px; color: #94a3b8; }
.acct-lib-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.btn-sm { padding: 5px 12px !important; font-size: 12px !important; }

/* =====================================================================
   Reviews / Avaliacoes
   ===================================================================== */
.detail-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; }
.stars-display { color: #f59e0b; font-size: 18px; letter-spacing: 1px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.wish-form { display: inline; }
.wish-btn { background: #fff; border: 1px solid #d4b8fc; color: #6d22e8; border-radius: 20px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.wish-btn:hover, .wish-btn.active { background: #f0ecff; border-color: #6d22e8; }
.wish-btn.active { color: #e53e3e; border-color: #fca5a5; background: #fff5f5; }
.wish-login-hint { font-size: 12px; color: #94a3b8; }
.cost-calc-trigger { font-size: 12px; }
.add-to-col-wrap { position: relative; }
.add-col-dropdown { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: #fff; border: 1px solid #e8e9f0; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 200px; z-index: 50; overflow: hidden; }
.add-col-dropdown.open { display: block; }
.add-col-dropdown form button { display: block; width: 100%; text-align: left; padding: 10px 16px; background: none; border: none; border-bottom: 1px solid #f5f5fa; cursor: pointer; font-size: 13px; }
.add-col-dropdown form button:hover { background: #f8f8fc; }
.add-col-manage { display: block; padding: 9px 16px; font-size: 12px; color: #6d22e8; text-decoration: none; }
.add-col-manage:hover { background: #f8f8fc; }
.version-badge { background: #f0ecff; color: #6d22e8; border: 1px solid #d4b8fc; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.changelog-details { margin: 10px 0; border: 1px solid #e8e9f0; border-radius: 8px; overflow: hidden; }
.changelog-details summary { padding: 8px 14px; cursor: pointer; font-size: 13px; font-weight: 600; color: #6d22e8; background: #f8f8fc; }
.changelog-details div { padding: 12px 14px; font-size: 13px; color: #444; background: #fff; }
.reviews-section { padding: 40px 0 0; }
.reviews-title { display: flex; align-items: center; gap: 10px; font-size: 20px; margin-bottom: 24px; }
.reviews-count { background: #6d22e8; color: #fff; border-radius: 20px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.review-card { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; padding: 16px; }
.review-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.review-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #6d22e8, #4f46e5); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.review-stars { color: #f59e0b; font-size: 14px; margin-top: 2px; }
.review-comment { font-size: 13px; color: #444; margin: 0; line-height: 1.6; }
.review-photo { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-top: 10px; }
.review-photo-link { display: block; }
.review-form-wrap { margin-top: 32px; padding: 24px; background: #f8f8fc; border-radius: 14px; border: 1px solid #e8e9f0; max-width: 560px; }
.review-form-wrap h3 { margin: 0 0 16px; font-size: 16px; }
.star-picker { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin-bottom: 4px; }
.star-btn { background: none; border: none; font-size: 28px; color: #d1d5db; cursor: pointer; padding: 0; line-height: 1; }
.star-btn.active { color: #f59e0b; }
.star-btn:hover, .star-btn:hover ~ .star-btn { color: #f59e0b; }
.review-photo-label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-top: 10px; }
.review-photo-label input { margin-top: 4px; }
.review-submitted { margin-top: 20px; padding: 14px 18px; background: #f0ecff; border-radius: 10px; font-size: 14px; color: #6d22e8; }

/* =====================================================================
   Profitability / Rentabilidade
   ===================================================================== */
.profit-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.profit-stat { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; padding: 16px; text-align: center; }
.profit-stat small { display: block; font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.profit-stat strong { font-size: 18px; color: #1a1a2e; }
.profit-stat-highlight { border-color: #6d22e8; background: linear-gradient(135deg, #f8f4ff, #f0ecff); }
.profit-stat-highlight strong { color: #6d22e8; }
.profit-form-wrap { margin-bottom: 24px; border: 1px solid #e8e9f0; border-radius: 12px; overflow: hidden; }
.profit-form-wrap summary { padding: 14px 20px; font-size: 14px; font-weight: 700; cursor: pointer; background: #f8f8fc; color: #6d22e8; }
.profit-form { padding: 20px; background: #fff; }
.profit-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.profit-table-wrap { overflow-x: auto; }
.profit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.profit-table th { padding: 10px 12px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; border-bottom: 2px solid #f0f0f6; white-space: nowrap; }
.profit-table td { padding: 10px 12px; border-bottom: 1px solid #f5f5fa; vertical-align: middle; }
.profit-table tr:hover td { background: #fafafa; }
.profit-pos { color: #22c55e; font-weight: 700; }
.profit-neg { color: #e53e3e; font-weight: 700; }

/* =====================================================================
   Notifications / Alertas de categoria
   ===================================================================== */
.notif-prefs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.notif-pref-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 2px solid #e8e9f0; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; font-size: 14px; font-weight: 600; }
.notif-pref-item input { display: none; }
.notif-pref-item:hover { border-color: #d4b8fc; background: #faf9ff; }
.notif-pref-item.active { border-color: #6d22e8; background: #f0ecff; color: #6d22e8; }

/* =====================================================================
   Referral / Indicacoes
   ===================================================================== */
.referral-wrap { max-width: 640px; }
.referral-hero { text-align: center; padding: 28px 0 20px; }
.referral-hero-icon { font-size: 48px; margin-bottom: 10px; }
.referral-hero h2 { font-size: 22px; margin: 0 0 8px; }
.referral-hero p { color: #555; }
.referral-link-card { background: #f8f8fc; border: 1px solid #e8e9f0; border-radius: 14px; padding: 20px; margin: 16px 0; }
.referral-link-card label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; display: block; margin-bottom: 8px; }
.referral-link-row { display: flex; gap: 10px; }
.referral-link-input { flex: 1; padding: 10px 14px; border: 1px solid #e8e9f0; border-radius: 8px; font-size: 13px; background: #fff; color: #1a1a2e; }
.referral-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.referral-stat { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; padding: 16px; text-align: center; }
.referral-stat strong { display: block; font-size: 22px; margin-bottom: 4px; }
.referral-stat small { font-size: 12px; color: #94a3b8; }
.referral-stat-green strong { color: #22c55e; }
.referral-stat-purple strong { color: #6d22e8; }
.referral-list { margin-top: 24px; }
.referral-list h3 { font-size: 15px; margin-bottom: 12px; }

/* =====================================================================
   Challenge / Desafio mensal
   ===================================================================== */
.challenge-hero { background: linear-gradient(135deg, #6d22e8 0%, #4f46e5 100%); color: #fff; border-radius: 16px; padding: 32px; margin-bottom: 28px; }
.challenge-prize-badge { display: inline-block; background: rgba(255,255,255,.2); border-radius: 20px; padding: 4px 14px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.challenge-hero h2 { font-size: 24px; margin: 0 0 10px; }
.challenge-hero p { opacity: .9; margin: 0 0 14px; }
.challenge-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.challenge-meta span { background: rgba(255,255,255,.15); border-radius: 8px; padding: 5px 12px; }
.challenge-meta a { color: #fff; }
.challenge-submit-wrap { background: #f8f8fc; border-radius: 14px; border: 1px solid #e8e9f0; padding: 24px; margin-bottom: 28px; }
.challenge-submit-wrap h3 { margin: 0 0 8px; }
.challenge-photo-label input { display: none; }
.challenge-photo-drop { border: 2px dashed #d4b8fc; border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; color: #6d22e8; font-size: 14px; font-weight: 600; margin-top: 8px; transition: background .15s; }
.challenge-photo-drop:hover { background: #f0ecff; }
.challenge-form { }
.challenge-submitted { padding: 16px 20px; background: #f0ecff; border-radius: 10px; color: #6d22e8; font-weight: 600; margin-bottom: 20px; }
.challenge-winner-banner { font-size: 18px; margin-bottom: 12px; }
.challenge-my-photo { width: 100%; max-width: 320px; border-radius: 10px; display: block; margin-top: 12px; }
.challenge-gallery-section h3 { font-size: 16px; margin-bottom: 16px; }
.submission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.submission-card { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; overflow: hidden; position: relative; }
.submission-card.submission-winner { border-color: #f59e0b; box-shadow: 0 0 0 2px #fef3c7; }
.submission-winner-crown { position: absolute; top: 8px; left: 8px; background: #f59e0b; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }
.submission-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.submission-meta { padding: 10px 12px; }
.submission-meta strong { font-size: 13px; }
.submission-meta p { font-size: 12px; color: #555; margin: 4px 0 0; }
.submission-meta small { font-size: 11px; color: #94a3b8; }

/* =====================================================================
   Admin reviews
   ===================================================================== */
.reviews-admin-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.review-admin-card { background: #fff; border: 1px solid #e8e9f0; border-radius: 12px; padding: 16px; }
.review-admin-card.approved { border-left: 4px solid #22c55e; }
.review-admin-card.rejected { border-left: 4px solid #e53e3e; opacity: .7; }
.review-admin-card.pending { border-left: 4px solid #f59e0b; }
.review-admin-header { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.review-stars-small { color: #f59e0b; font-size: 14px; }
.review-admin-comment { font-size: 13px; color: #444; margin: 0 0 10px; }
.review-admin-photo { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.admin-tab-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; }
.admin-tab { padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; text-decoration: none; color: #555; background: #f0f0f6; border: 1px solid #e8e9f0; }
.admin-tab:hover, .admin-tab.active { background: #6d22e8; color: #fff; border-color: #6d22e8; }
.badge { display: inline-block; background: #f59e0b; color: #fff; border-radius: 20px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.badge-green { background: #22c55e; }
.badge-red { background: #e53e3e; }

@media (max-width: 600px) {
  .profit-stats { grid-template-columns: 1fr 1fr; }
  .referral-stats { grid-template-columns: 1fr; }
  .submission-grid { grid-template-columns: 1fr 1fr; }
  .detail-actions { flex-direction: column; align-items: flex-start; }
}

/* ── Printer info badge (calculator) ───────────────────────────── */
.printer-info-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #f7f2ff;
  border: 1px solid #e4d9ff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 12px;
}
.pib-name { font-weight: 700; color: #3d1a7a; flex-basis: 100%; font-size: 13px; }
.pib-vol, .pib-watts, .pib-price, .pib-life {
  background: #fff;
  border: 1px solid #e4d9ff;
  border-radius: 20px;
  padding: 2px 8px;
  color: #5a3a9e;
  font-weight: 600;
}
.pib-type { padding: 2px 8px; border-radius: 20px; font-weight: 700; font-size: 11px; }
.pib-type.fdm    { background: #e7fbf2; color: #087e58; }
.pib-type.resin  { background: #eaf3ff; color: #1d64c5; }

/* ── Professional Admin Dashboard ─────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 10px 10px 0 0;
}
.kpi-mrr::before      { background: linear-gradient(90deg,#18b981,#34d399); }
.kpi-subs::before     { background: linear-gradient(90deg,#6d22e8,#a855f7); }
.kpi-users::before    { background: linear-gradient(90deg,#f59e0b,#fbbf24); }
.kpi-revenue::before  { background: linear-gradient(90deg,#3b82f6,#60a5fa); }
.kpi-downloads::before{ background: linear-gradient(90deg,#3b82f6,#818cf8); }
.kpi-churn::before    { background: linear-gradient(90deg,#f97316,#fb923c); }
.kpi-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #8b92a5; margin-bottom: 6px; }
.kpi-value { font-size: 30px; font-weight: 900; color: #1a1a2e; line-height: 1.15; }
.kpi-sub   { font-size: 12px; color: #8b92a5; margin-top: 4px; }
.kpi-delta { font-size: 12px; font-weight: 700; margin-top: 5px; }
.delta-up   { color: #16a34a; }
.delta-down { color: #dc2626; }
.delta-warn { color: #d97706; }
.text-danger { color: #dc2626; }

/* Chart cards */
.dash-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-chart-card {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.dash-chart-full {
  width: 100%;
  margin-bottom: 16px;
}
.dash-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 14px;
}
.dash-chart-body { position: relative; height: 200px; }
.dash-chart-full .dash-chart-body { height: 160px; }

/* Data tables */
.dash-tables-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-table-card {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
}
.dash-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid #f1f2f7;
}
.dash-table-card .admin-table { margin: 0; border-radius: 0; border: none; box-shadow: none; }
.dash-table-card .admin-table th,
.dash-table-card .admin-table td { padding: 10px 14px; font-size: 13px; }

/* Payment badges */
.pay-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.status-approved { background: #e7fbf2; color: #087e58; }
.status-pending  { background: #fef9ec; color: #b45309; }
.status-rejected { background: #ffecec; color: #ad2c2c; }
.status-cancelled{ background: #f3f4f6; color: #6b7280; }
.status-new      { background: #eaf3ff; color: #1d64c5; }
.pay-method-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.pay-pix    { background: #e8fff5; color: #087e58; }
.pay-card   { background: #eaf3ff; color: #1d64c5; }
.pay-boleto { background: #fef9ec; color: #b45309; }

/* Activity feed */
.activity-feed { padding: 8px 0; max-height: 380px; overflow-y: auto; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #f7f8fc;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.activity-payment { background: #eaf3ff; }
.activity-signup  { background: #e8fff5; }
.activity-content { flex: 1; min-width: 0; }
.activity-desc { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-badge { font-size: 10px; padding: 2px 6px; border-radius: 10px; flex-shrink: 0; }

/* Top files list */
.top-files-list { padding: 8px 0; }
.top-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid #f7f8fc;
}
.top-file-row:last-child { border-bottom: none; }
.top-file-rank { width: 22px; text-align: center; font-size: 12px; font-weight: 800; color: #9ca3af; flex-shrink: 0; }
.top-file-cover {
  width: 40px; height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f4f6;
}
.top-file-no-cover {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #9ca3af;
}
.top-file-info { flex: 1; min-width: 0; }
.top-file-title { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.top-file-title:hover { color: var(--primary); }
.top-file-count { text-align: right; flex-shrink: 0; }
.top-file-count strong { display: block; font-size: 15px; font-weight: 900; }
.top-file-count small { color: #9ca3af; font-size: 11px; }

/* Recent signups list */
.recent-signups-list { padding: 8px 0; }
.signup-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #f7f8fc;
}
.signup-row:last-child { border-bottom: none; }
.signup-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d22e8, #a855f7);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px;
  flex-shrink: 0;
}
.signup-info { flex: 1; min-width: 0; }
.signup-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signup-info small { color: #9ca3af; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.signup-meta { text-align: right; flex-shrink: 0; }
.signup-meta small { display: block; color: #9ca3af; font-size: 11px; margin-top: 3px; }

/* Quick action buttons */
.dash-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.dash-qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #e8e8ef;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: border-color .15s, background .15s;
}
.dash-qa-btn:hover { border-color: var(--primary); background: #f7f2ff; color: var(--primary); }

@media (max-width: 1100px) {
  .kpi-grid          { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dash-charts-row   { grid-template-columns: 1fr; }
  .dash-tables-row   { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 22px; }
}

/* ── Library card upgrades ──────────────────────────────────────── */
.file-card-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.fc-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(4px);
  letter-spacing: .02em;
}
.fc-badge-hot       { background: rgba(239,68,68,.9); color: #fff; }
.fc-badge-new       { background: rgba(34,197,94,.9); color: #fff; }
.fc-badge-exclusive { background: rgba(109,34,232,.9); color: #fff; }

.file-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 6px;
  font-size: 12px;
}
.fc-stars { display: flex; align-items: center; gap: 2px; }
.fc-stars .st { font-size: 12px; line-height: 1; }
.fc-stars .st-full  { color: #f59e0b; }
.fc-stars .st-half  { color: #f59e0b; opacity: .6; }
.fc-stars .st-empty { color: #d1d5db; }
.fc-stars small { color: #9ca3af; margin-left: 2px; }
.fc-dl-count { color: #6b7280; font-weight: 600; }

.diff-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.diff-facil, .diff-easy    { background: #e7fbf2; color: #087e58; }
.diff-medio, .diff-medium  { background: #fef9ec; color: #b45309; }
.diff-dificil, .diff-hard  { background: #ffecec; color: #ad2c2c; }
.tag-commercial { background: #eaf3ff; color: #1d64c5; }

.filter-bar select[name="ordenar"] { min-width: 130px; }

/* ── Maker Score Banner ─────────────────────────────────────────── */
.maker-score-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #3d1a7a 0%, #6d22e8 60%, #a855f7 100%);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  color: #fff;
  flex-wrap: wrap;
}
.msb-level { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.msb-icon { font-size: 36px; line-height: 1; }
.msb-level-name { font-size: 20px; font-weight: 900; }
.msb-level-label { font-size: 11px; opacity: .8; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.msb-score { flex: 1; min-width: 160px; }
.msb-score-value { font-size: 28px; font-weight: 900; }
.msb-score-value small { font-size: 14px; opacity: .8; }
.msb-score-bar { background: rgba(255,255,255,.2); border-radius: 20px; height: 6px; margin: 6px 0 4px; overflow: hidden; }
.msb-score-fill { height: 100%; border-radius: 20px; background: #fff; transition: width .6s ease; }
.msb-score small { font-size: 11px; opacity: .75; }
.msb-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.msb-stat { text-align: center; }
.msb-stat strong { display: block; font-size: 18px; font-weight: 900; }
.msb-stat small { font-size: 11px; opacity: .8; }

/* ── Account quick actions (expanded) ──────────────────────────── */
.acct-quick {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.acct-quick-card span { font-size: 22px; display: block; margin-bottom: 4px; }

/* ── Novidades section ──────────────────────────────────────────── */
.acct-section-sub { color: var(--muted); font-size: 13px; margin: -10px 0 14px; }
.acct-file-card-new { border-color: #22c55e; }
.acct-file-cover { position: relative; }
.acct-new-badge {
  position: absolute; top: 6px; left: 6px;
  width: auto; height: auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: #22c55e; color: #fff;
  font-size: 10px; font-weight: 900;
  padding: 2px 6px; border-radius: 10px;
  letter-spacing: .04em;
  line-height: 1.2;
  z-index: 1;
}
.file-mini-stars { color: #f59e0b; font-size: 11px; }

@media (max-width: 960px) {
  .acct-quick { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .maker-score-banner { gap: 14px; }
}
@media (max-width: 600px) {
  .acct-quick { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .msb-stats { gap: 10px; }
  .maker-score-banner { padding: 16px; }
}

/* ── Community Feed ─────────────────────────────────────────────── */
.community-wrap { max-width: 680px; margin: 0 auto; }
.community-upload-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 28px; }
.community-upload-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.cup-drop-zone { border: 2px dashed var(--border); border-radius: 10px; min-height: 120px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; transition: border-color .2s; }
.cup-drop-zone:hover, .cup-drop-zone.drag-over { border-color: var(--accent); background: rgba(109,34,232,.04); }
.cup-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.cup-drop-label { text-align: center; padding: 20px; pointer-events: none; }
.cup-drop-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.cup-drop-label span { display: block; font-weight: 600; color: var(--text); }
.cup-drop-label small { color: var(--muted); font-size: 12px; }
.cup-preview { width: 100%; max-height: 300px; object-fit: cover; display: none; border-radius: 8px; }
.cup-caption { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; resize: vertical; margin-top: 12px; font-family: inherit; }
.cup-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.cup-hint { color: var(--muted); font-size: 12px; }
.community-locked { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 40px 24px; margin-bottom: 28px; }
.community-locked-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.community-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.community-empty span { font-size: 40px; display: block; margin-bottom: 10px; }
.comm-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.comm-card-pending { opacity: .85; }
.comm-status-badge { background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; padding: 6px 14px; text-align: center; }
.comm-rejected .comm-status-badge { background: #fee2e2; color: #991b1b; }
.comm-photo-wrap { background: #f3f4f6; }
.comm-photo { width: 100%; max-height: 500px; object-fit: cover; display: block; }
.comm-body { padding: 14px 16px; }
.comm-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.comm-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.comm-user-info strong { display: block; font-size: 14px; font-weight: 700; }
.comm-user-info small { color: var(--muted); font-size: 12px; }
.comm-delete-form { margin-left: auto; }
.comm-delete-btn { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 6px; }
.comm-delete-btn:hover { color: #ef4444; background: #fee2e2; }
.comm-caption { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
.comm-actions { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.comm-like-btn { background: none; border: none; font-size: 18px; cursor: pointer; display: flex; align-items: center; gap: 4px; color: var(--muted); padding: 4px 8px; border-radius: 8px; transition: all .15s; }
.comm-like-btn:hover, .comm-like-btn.liked { color: #ef4444; background: #fee2e2; }
.comm-like-count { font-size: 13px; font-weight: 700; }
.comm-comment-count { color: var(--muted); font-size: 13px; font-weight: 600; }
.comm-comments { display: flex; flex-direction: column; gap: 8px; }
.comm-comment { font-size: 13px; line-height: 1.4; }
.comm-comment strong { font-weight: 700; margin-right: 6px; }
.comm-comment-form { display: flex; gap: 6px; margin-top: 8px; }
.comm-comment-input { flex: 1; border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 13px; outline: none; }
.comm-comment-input:focus { border-color: var(--accent); }
.comm-comment-btn { background: var(--accent); color: #fff; border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 13px; flex-shrink: 0; }

/* ── Ranking ─────────────────────────────────────────────────────── */
.ranking-wrap { max-width: 860px; margin: 0 auto; }
.ranking-my-pos { background: var(--accent); color: #fff; border-radius: 12px; padding: 14px 20px; margin-bottom: 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 15px; }
.ranking-my-pos-zero { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.ranking-my-num { font-size: 26px; font-weight: 900; }
.ranking-my-score { font-size: 16px; font-weight: 700; opacity: .9; }
.ranking-podium { display: flex; align-items: flex-end; justify-content: center; gap: 16px; margin-bottom: 36px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; text-align: center; }
.podium-crown { font-size: 24px; margin-bottom: 4px; }
.podium-avatar { width: 52px; height: 52px; border-radius: 50%; background: #94a3b8; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; margin-bottom: 8px; border: 3px solid #e2e8f0; }
.podium-avatar-1 { width: 64px; height: 64px; font-size: 26px; border-color: #fbbf24; }
.podium-me { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(109,34,232,.3); }
.podium-name { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.podium-score { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.podium-stand { font-size: 13px; font-weight: 800; padding: 8px 18px; border-radius: 10px 10px 0 0; width: 100%; min-width: 80px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.podium-stand-1 { background: #fbbf24; color: #78350f; min-height: 70px; align-items: flex-end; padding-bottom: 10px; }
.podium-stand-2 { background: #e2e8f0; color: #475569; min-height: 50px; align-items: flex-end; padding-bottom: 10px; }
.podium-stand-3 { background: #fed7aa; color: #9a3412; min-height: 36px; align-items: flex-end; padding-bottom: 10px; }
.podium-medal { font-size: 18px; }
.ranking-table-wrap { overflow-x: auto; margin-bottom: 28px; }
.ranking-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ranking-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 12px; border-bottom: 2px solid var(--border); }
.ranking-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ranking-row-me td { background: rgba(109,34,232,.06); font-weight: 600; }
.ranking-pos { font-weight: 700; color: var(--muted); }
.ranking-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ranking-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.ranking-you { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 10px; }
.ranking-pts-month strong { font-size: 15px; color: var(--accent); }
.ranking-pts-total { color: var(--muted); }
.ranking-level-badge { font-size: 12px; font-weight: 700; }
.ranking-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.ranking-empty span { font-size: 40px; display: block; margin-bottom: 10px; }
.ranking-legend { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-top: 28px; }
.ranking-legend h3 { font-size: 14px; font-weight: 700; margin: 0 0 14px; }
.ranking-legend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 10px; margin-bottom: 10px; }
.rleg-item { display: flex; flex-direction: column; gap: 2px; }
.rleg-pts { font-size: 16px; font-weight: 800; color: var(--accent); }
.rleg-item span:last-child { font-size: 12px; color: var(--muted); }
.rleg-note { font-size: 12px; color: var(--muted); margin: 0; }

/* ── Admin community moderation ──────────────────────────────────── */
.comm-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.comm-admin-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.comm-admin-card.status-pending { border-color: #fbbf24; }
.comm-admin-card.status-rejected { opacity: .7; }
.comm-admin-photo-wrap { position: relative; }
.comm-admin-photo { width: 100%; height: 180px; object-fit: cover; display: block; }
.comm-admin-status { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.comm-admin-status-pending  { background: #fef3c7; color: #92400e; }
.comm-admin-status-approved { background: #d1fae5; color: #065f46; }
.comm-admin-status-rejected { background: #fee2e2; color: #991b1b; }
.comm-admin-meta { padding: 10px 12px; }
.comm-admin-user strong { font-size: 13px; font-weight: 700; display: block; }
.comm-admin-user small { color: var(--muted); font-size: 11px; }
.comm-admin-caption { font-size: 12px; color: var(--muted); margin: 6px 0 8px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.comm-admin-stats { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.comm-admin-actions { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
.btn-approve { flex: 1; background: #22c55e; color: #fff; border: none; border-radius: 8px; padding: 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-approve:hover { background: #16a34a; }
.btn-reject { flex: 1; background: #ef4444; color: #fff; border: none; border-radius: 8px; padding: 7px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-reject:hover { background: #dc2626; }
.filter-badge { background: #ef4444; color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 4px; }

/* ── Admin Featured Packs ────────────────────────────────────────── */
.pack-admin-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.pack-admin-header { display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start; }
.pack-admin-cover { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.pack-admin-info { flex: 1; }
.pack-admin-info strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pack-admin-info p { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.pack-admin-files h4 { font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.pack-file-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pack-file-item { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.pack-file-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.pack-file-item span { flex: 1; }
.btn-link-danger { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 16px; padding: 2px 6px; border-radius: 6px; }
.btn-link-danger:hover { background: #fee2e2; }
.pack-add-form { display: flex; gap: 8px; margin-top: 10px; }
.pack-file-select { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.pack-no-files { font-size: 13px; color: var(--muted); margin: 0 0 10px; }

/* ── Home benefits section ───────────────────────────────────────── */
.benefits-section { padding: 64px clamp(18px, 6vw, 110px); background: #fff; border-top: 1px solid #eceef5; }
.section-heading { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.section-heading h2 { margin: 0 0 10px; font-size: 28px; color: #111827; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.6; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; max-width: 1120px; margin: 0 auto; }
.benefit-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 22px; box-shadow: 0 10px 28px rgba(17,24,39,.06); }
.benefit-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 8px; background: #f2eaff; color: var(--primary); font-size: 20px; font-weight: 900; }
.benefit-icon-shield::before { content: "\1F512"; }
.benefit-icon-down::before { content: "\2193"; }
.benefit-icon-chat::before { content: "\1F5E8"; }
.benefit-icon-calc::before { content: "\002B"; }
.benefit-icon-ai::before { content: "IA"; font-size: 13px; }
.benefit-icon-sales::before { content: "\0024"; }
.benefit-item strong { display: block; font-size: 15px; font-weight: 800; margin-bottom: 6px; color: #111827; }
.benefit-item p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }
.home-community-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); gap: 34px; align-items: center; padding: 66px clamp(18px, 6vw, 110px); background: #0a0d14; color: #fff; }
.home-community-copy { max-width: 720px; }
.home-community-copy h2 { margin: 18px 0 14px; font-size: 32px; line-height: 1.15; }
.home-community-copy p { margin: 0 0 18px; color: #cfd3dc; line-height: 1.7; }
.home-community-list { display: grid; gap: 10px; padding: 0; margin: 0 0 24px; list-style: none; color: #e8eaf1; }
.home-community-list li { position: relative; padding-left: 22px; line-height: 1.5; }
.home-community-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.home-community-panel { display: grid; gap: 12px; }
.home-community-panel div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 18px; }
.home-community-panel strong { display: block; font-size: 15px; margin-bottom: 5px; }
.home-community-panel span { color: #cfd3dc; font-size: 13px; line-height: 1.5; }

/* ── Library difficulty filter ───────────────────────────────────── */
.filter-bar select[name="dificuldade"] { min-width: 160px; }

/* ── Admin filter bar ────────────────────────────────────────────── */
.admin-filter-bar { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-tab { padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--border); text-decoration: none; transition: all .15s; }
.filter-tab.active, .filter-tab:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Featured Packs subscriber view ──────────────────────────────── */
.featured-packs-section { margin-bottom: 28px; }
.featured-packs-section h2 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.featured-packs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.featured-pack-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.fp-cover { height: 140px; background: linear-gradient(135deg, #6d22e8 0%, #a855f7 100%); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.fp-cover img { width: 100%; height: 100%; object-fit: cover; }
.fp-body { padding: 14px; }
.fp-body strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.fp-body p { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.fp-files { display: flex; gap: 6px; flex-wrap: wrap; }
.fp-file-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 600; }

@media (max-width: 600px) {
  .ranking-podium { gap: 8px; }
  .podium-avatar { width: 44px; height: 44px; font-size: 16px; }
  .podium-avatar-1 { width: 56px; height: 56px; }
  .ranking-my-pos { gap: 8px; font-size: 13px; }
  .comm-admin-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Account Experience Refresh
   ===================================================================== */
:root {
  --acct-bg: #f4f6fb;
  --acct-surface: #ffffff;
  --acct-surface-soft: #f8fafc;
  --acct-border: #e2e8f0;
  --acct-text: #0f172a;
  --acct-muted: #64748b;
  --acct-soft-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 14px 36px rgba(15, 23, 42, .08);
  --acct-hard-shadow: 0 22px 60px rgba(15, 23, 42, .14);
}

.account-body {
  grid-template-columns: 282px minmax(0, 1fr);
  background:
    linear-gradient(180deg, #f8fafc 0%, var(--acct-bg) 280px),
    var(--acct-bg);
  color: var(--acct-text);
}
.account-sidebar {
  background: #070b14;
  border-right: 1px solid rgba(148, 163, 184, .16);
  padding: 22px 18px;
  gap: 16px;
}
.account-sidebar .brand {
  width: 100%;
  padding: 0 6px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.account-sidebar .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(124,60,255,.12);
}
.side-user {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 12px;
  margin: 0;
}
.side-avatar, .comm-avatar, .ranking-avatar, .review-avatar {
  background: linear-gradient(135deg, #6d22e8, #14b8a6);
}
.side-user small { max-width: 172px; color: #94a3b8; }
.account-sidebar .side-nav {
  gap: 5px;
  margin-top: 0;
}
.account-sidebar .side-nav a,
.account-sidebar .side-nav-item {
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  color: #aab4c7;
}
.account-sidebar .side-nav a:hover,
.account-sidebar .side-nav-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.08);
  color: #fff;
}
.account-sidebar .side-nav a.active,
.account-sidebar .side-nav-item.active {
  background: #fff;
  border-color: #fff;
  color: #111827;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.account-sidebar .snav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.account-sidebar .active .snav-icon {
  background: #eef2ff;
  color: #6d22e8;
}
.side-logout-wrap {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 14px;
}
.side-logout {
  min-height: 42px;
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,.08);
}
.account-main {
  padding: 30px clamp(20px, 3vw, 42px) 56px;
}
.account-top {
  min-height: 86px;
  align-items: center;
  padding: 18px 22px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(15,23,42,.06);
  backdrop-filter: blur(12px);
}
.account-eyebrow {
  display: inline-flex;
  margin-bottom: 4px;
  color: #6d22e8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.account-top h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  color: var(--acct-text);
}
.account-top p {
  margin: 6px 0 0;
  max-width: 720px;
  color: var(--acct-muted);
  font-size: 13px;
}
.account-top-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.panel,
.acct-hero-card,
.acct-file-card,
.acct-lib-card,
.calc-section,
.calc-result,
.log-stat,
.log-form-wrap,
.log-table,
.profit-stat,
.profit-form-wrap,
.referral-link-card,
.referral-stat,
.challenge-submit-wrap,
.submission-card,
.ranking-legend,
.community-upload-card,
.comm-card,
.col-card,
.review-card,
.review-form-wrap {
  background: var(--acct-surface);
  border: 1px solid var(--acct-border);
  border-radius: 10px;
  box-shadow: var(--acct-soft-shadow);
}
.panel { padding: 18px; }
.acct-hero { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.acct-hero-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 22px;
}
.acct-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #6d22e8, #14b8a6);
}
.acct-hero-label { color: #748094; letter-spacing: .06em; }
.acct-hero-value { color: #111827; font-size: 30px; }
.acct-quick {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.acct-quick-card {
  min-height: 112px;
  border-radius: 10px;
  padding: 18px;
  background: #111827;
  box-shadow: var(--acct-soft-shadow);
}
.acct-quick-card:nth-child(2) { background: #0f766e; }
.acct-quick-card:nth-child(3) { background: #2563eb; }
.acct-quick-card:nth-child(4) { background: #7c3aed; }
.acct-quick-card:nth-child(5) { background: #b45309; }
.acct-quick-card:nth-child(6) { background: #be123c; }
.acct-section-head h2 {
  font-size: 19px;
  color: #111827;
}
.acct-section-sub,
.acct-lib-desc,
.calc-intro {
  color: var(--acct-muted);
  font-size: 14px;
  line-height: 1.6;
}
.acct-file-grid,
.acct-lib-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.acct-file-card,
.acct-lib-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.acct-file-card:hover,
.acct-lib-card:hover,
.col-card:hover,
.submission-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--acct-hard-shadow);
}
.acct-file-cover,
.acct-lib-cover {
  background: #111827;
}
.acct-file-info,
.acct-lib-body,
.acct-lib-info {
  padding: 14px;
}
.acct-file-info a,
.acct-lib-body a,
.acct-lib-info h3 {
  font-size: 14px;
  color: #111827;
}
.acct-lib-dl,
.acct-file-card form {
  padding: 0 14px 14px;
}

.account-main input, .account-main textarea, .account-main select, .account-main .mp-field,
.log-form-grid input,
.log-form-grid select,
.log-form-grid textarea,
.profit-form-grid input,
.profit-form-grid select,
.profit-form-grid textarea {
  border-color: #d9e0ea;
  background: #fff;
  border-radius: 8px;
}
.account-main input:focus,
.account-main textarea:focus,
.account-main select:focus {
  border-color: #6d22e8;
  outline: 3px solid rgba(109,34,232,.12);
}
.account-main .btn,
.account-main .btn-sm,
.account-main .btn-small,
.account-main .btn-primary,
.account-main .btn-outline {
  border-radius: 8px;
}
.account-main .btn-primary {
  background: #111827;
  box-shadow: 0 12px 24px rgba(17,24,39,.18);
}
.account-main .btn-primary:hover { background: #0f172a; }
.account-main .btn-outline,
.account-main .btn-ghost {
  border-color: #d9e0ea;
  color: #111827;
  background: #fff;
}

.calc-wrap,
.ranking-wrap,
.referral-wrap {
  max-width: 1180px;
}
.calc-body {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
}
.calc-section h3,
.calc-result-header h3,
.log-form-wrap summary,
.profit-form-wrap summary,
.challenge-submit-wrap h3,
.referral-list h3 {
  color: #111827;
}
.calc-price-box,
.challenge-hero,
.ranking-my-pos {
  background: linear-gradient(135deg, #111827, #334155);
}
.calc-result {
  top: 30px;
}
.log-stats-bar,
.profit-stats,
.referral-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.log-stat,
.profit-stat,
.referral-stat {
  text-align: left;
  padding: 18px;
}
.log-stat strong,
.profit-stat strong,
.referral-stat strong {
  color: #111827;
}
.profit-stat-highlight {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.profit-stat-highlight strong,
.referral-stat-green strong {
  color: #047857;
}
.profit-table,
.log-table,
.ranking-table {
  background: #fff;
  border: 1px solid var(--acct-border);
  border-radius: 10px;
  overflow: hidden;
}
.profit-table th,
.log-table th,
.ranking-table th,
.account-main table th {
  background: #f8fafc;
  color: #64748b;
}
.profit-table td,
.log-table td,
.ranking-table td,
.account-main table td {
  color: #243041;
}
.notif-prefs-grid {
  background: #fff;
  border: 1px solid var(--acct-border);
  border-radius: 10px;
  padding: 16px;
}
.notif-pref-item {
  border-width: 1px;
  background: #fff;
}
.notif-pref-item.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.referral-wrap {
  margin: 0 auto;
}
.referral-hero {
  background: #fff;
  border: 1px solid var(--acct-border);
  border-radius: 10px;
  padding: 28px;
  box-shadow: var(--acct-soft-shadow);
}
.referral-link-row {
  align-items: stretch;
}
.challenge-hero {
  border-radius: 10px;
  box-shadow: var(--acct-hard-shadow);
}
.challenge-photo-drop,
.cup-drop-zone {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.submission-card img {
  height: 220px;
}
.ranking-table-wrap {
  background: #fff;
  border: 1px solid var(--acct-border);
  border-radius: 10px;
  box-shadow: var(--acct-soft-shadow);
}
.ranking-table {
  border: 0;
}
.ai-chat-wrap {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--acct-soft-shadow);
}
.ai-chat-header {
  background: #111827;
  border-radius: 0;
}
.ai-chat-body,
.ai-suggestions {
  background: #f8fafc;
}
.ai-msg-user .ai-msg-bubble {
  background: #111827;
}
.ai-send-btn {
  background: #111827;
}

/* Community social feed */
.community-shell {
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(260px, 330px);
  gap: 28px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.community-feed-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.community-hero-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #1e293b);
  border-radius: 10px;
  box-shadow: var(--acct-hard-shadow);
}
.community-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.community-hero-card h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}
.community-hero-card p {
  margin: 0;
  max-width: 520px;
  color: #cbd5e1;
  line-height: 1.6;
}
.community-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 92px);
  gap: 10px;
}
.community-hero-stats div,
.community-mini-stats div {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 10px;
}
.community-hero-stats strong,
.community-mini-stats strong {
  display: block;
  font-size: 22px;
}
.community-hero-stats span,
.community-mini-stats span {
  display: block;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.25;
}
.community-composer {
  padding: 16px;
  margin: 0;
}
.composer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.composer-head strong {
  display: block;
  color: #111827;
}
.composer-head small {
  color: var(--acct-muted);
}
.comm-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d9e0ea;
}
.comm-avatar-lg {
  width: 46px;
  height: 46px;
}
.comm-avatar-xl {
  width: 64px;
  height: 64px;
  font-size: 22px;
}
.cup-drop-zone {
  min-height: 180px;
  border-style: dashed;
  border-radius: 10px;
}
.cup-drop-zone.has-preview {
  padding: 0;
  border-style: solid;
  background: #111827;
}
.cup-drop-zone:hover,
.cup-drop-zone.drag-over {
  background: #f1f5f9;
  border-color: #111827;
}
.cup-drop-label span {
  color: #111827;
  font-weight: 800;
}
.cup-preview {
  width: 100%;
  max-height: 420px;
  border-radius: 8px;
  object-fit: cover;
}
.cup-caption {
  min-height: 86px;
  margin-top: 12px;
  border-radius: 8px;
  background: #fff;
}
.cup-footer {
  margin-top: 12px;
}
.community-feed {
  display: grid;
  gap: 18px;
}
.comm-card {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
}
.comm-card-pending,
.comm-card-rejected {
  opacity: 1;
}
.comm-header {
  min-height: 66px;
  padding: 12px 14px;
  margin: 0;
  border-bottom: 1px solid var(--acct-border);
}
.comm-user-info strong {
  color: #111827;
}
.comm-user-info small {
  color: var(--acct-muted);
}
.comm-status-badge {
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fef3c7;
  color: #92400e;
}
.comm-status-badge.comm-rejected {
  background: #fee2e2;
  color: #991b1b;
}
.comm-delete-form {
  margin-left: 0;
}
.comm-delete-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.comm-photo-wrap {
  display: block;
  background: #020617;
}
.comm-photo {
  width: 100%;
  max-height: 720px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.comm-body {
  padding: 13px 14px 14px;
}
.comm-actions {
  gap: 8px;
  padding: 0;
  margin: 0 0 10px;
  border: 0;
}
.comm-like-btn,
.comm-comment-count {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  color: #111827;
  border: 1px solid var(--acct-border);
}
.comm-like-btn:hover,
.comm-like-btn.liked {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
}
.comm-action-icon {
  font-size: 18px;
  line-height: 1;
}
.comm-caption {
  margin: 8px 0 12px;
  color: #243041;
  line-height: 1.55;
}
.comm-caption strong {
  color: #111827;
}
.comm-comments {
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--acct-border);
}
.comm-comment {
  color: #334155;
  font-size: 13px;
}
.comm-comment strong {
  color: #111827;
}
.comm-comment-form {
  align-items: center;
  margin-top: 4px;
}
.comm-comment-input {
  min-height: 38px;
  border-radius: 999px;
  background: #f8fafc;
}
.comm-comment-btn {
  width: 38px;
  height: 38px;
  background: #111827;
}
.community-side-panel {
  position: sticky;
  top: 30px;
  display: grid;
  gap: 14px;
}
.community-profile-card,
.community-mini-stats,
.community-guidelines {
  background: #fff;
  border: 1px solid var(--acct-border);
  border-radius: 10px;
  box-shadow: var(--acct-soft-shadow);
}
.community-profile-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px;
  text-align: center;
}
.community-profile-card strong {
  color: #111827;
}
.community-profile-card span {
  color: var(--acct-muted);
  font-size: 13px;
}
.community-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
}
.community-mini-stats div {
  background: #111827;
  border: 0;
  border-radius: 0;
}
.community-mini-stats div + div {
  border-left: 1px solid rgba(255,255,255,.14);
}
.community-guidelines {
  padding: 18px;
}
.community-guidelines h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.community-guidelines ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--acct-muted);
  font-size: 13px;
  line-height: 1.45;
}
.community-guidelines li {
  position: relative;
  padding-left: 18px;
}
.community-guidelines li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #14b8a6;
}
.community-empty {
  background: #fff;
  border: 1px solid var(--acct-border);
  border-radius: 10px;
  box-shadow: var(--acct-soft-shadow);
}
.community-empty h3 {
  margin: 0 0 6px;
  color: #111827;
}
.community-empty p {
  margin: 0;
}

@media (max-width: 1180px) {
  .account-body {
    grid-template-columns: 248px minmax(0, 1fr);
  }
  .acct-quick {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .community-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .community-side-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .account-body {
    display: block;
  }
  .account-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(148,163,184,.18);
  }
  .account-sidebar .brand,
  .side-user {
    display: none;
  }
  .account-sidebar .side-nav {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .account-sidebar .side-nav a,
  .account-sidebar .side-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .side-logout-wrap {
    display: none;
  }
  .account-main {
    padding: 20px 16px 42px;
  }
  .account-top {
    display: grid;
    gap: 12px;
  }
  .account-top-action {
    width: 100%;
  }
  .acct-hero,
  .calc-body {
    grid-template-columns: 1fr;
  }
  .community-side-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .account-main {
    padding: 16px 12px 34px;
  }
  .account-top {
    padding: 16px;
  }
  .acct-quick,
  .acct-file-grid,
  .acct-lib-grid,
  .log-stats-bar,
  .profit-stats,
  .referral-stats {
    grid-template-columns: 1fr;
  }
  .community-hero-card {
    display: grid;
  }
  .community-hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  .comm-photo {
    max-height: 520px;
  }
  .cup-footer,
  .referral-link-row {
    display: grid;
  }
}
