/* =====================================================================
   MASSCODE — Design System
   Dark premium. Sem build, sem dependências: só CSS puro.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-main: #09090b;
  --bg-sec: #18181b;
  --card: #111113;
  --card-hover: #16161a;
  --border: #27272a;
  --border-strong: #3f3f46;

  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --text-faint: #52525b;

  --blue: #2263f8;
  --purple: #6323f7;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --orange: #f97316;

  --grad: linear-gradient(90deg, var(--purple), var(--blue));
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .8);
  --shadow-glow: 0 10px 40px -10px rgba(59, 130, 246, .18);

  --header-h: 76px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: #fff; }

img, svg, video { max-width: 100%; display: block; }
svg { flex-shrink: 0; width: 16px; height: 16px; }

/* Tamanhos de ícone usados por icon('nome', 'w-4 h-4') */
.w-3 { width: 12px; }  .h-3 { height: 12px; }
.w-4 { width: 16px; }  .h-4 { height: 16px; }
.w-5 { width: 20px; }  .h-5 { height: 20px; }
.w-6 { width: 24px; }  .h-6 { height: 24px; }
.w-8 { width: 32px; }  .h-8 { height: 32px; }
.w-10 { width: 40px; } .h-10 { height: 40px; }
svg.filled { fill: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

::selection { background: rgba(34, 99, 248, .35); color: #fff; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- Layout */

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; }
.container-wide { max-width: 1480px; }

.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }

.stack > * + * { margin-top: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 auto; min-width: 0; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }

/* ---- Layouts de página (conteúdo + barra lateral) --------------------
   Todos colapsam para uma coluna em telas menores. Nunca defina
   grid-template-columns inline: media query não alcança estilo inline. */
.layout-main,
.layout-wide,
.layout-sidebar,
.layout-profile,
.layout-split {
  display: grid;
  gap: 20px;
  align-items: start;
}
.layout-main    { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.layout-wide    { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.layout-sidebar { grid-template-columns: 250px minmax(0, 1fr); }
.layout-profile { grid-template-columns: 280px minmax(0, 1fr); }
.layout-split   { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Grupos de campos que precisam de larguras diferentes entre si */
.grid-address    { display: grid; gap: 14px; grid-template-columns: 2fr 1fr; }
.grid-address-3  { display: grid; gap: 14px; grid-template-columns: 2fr 1fr 1fr; }
.grid-city       { display: grid; gap: 14px; grid-template-columns: 1fr 1fr 90px; }
.grid-label-side { display: grid; gap: 14px; grid-template-columns: 150px minmax(0, 1fr); }
.grid-rating     { display: grid; gap: 24px; grid-template-columns: 180px minmax(0, 1fr); align-items: start; }

.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-10 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.relative { position: relative; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-1, .clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-1 { -webkit-line-clamp: 1; } .clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; }

/* --------------------------------------------------------------- Tipografia */

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--blue);
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}

.text-gradient {
  background: linear-gradient(100deg, #fff 20%, #a1a1aa);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.pulse-dot { position: relative; display: inline-flex; width: 8px; height: 8px; }
.pulse-dot::before {
  content: ''; position: absolute; inset: 0; border-radius: 999px;
  background: var(--blue); opacity: .75; animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}
.pulse-dot::after { content: ''; position: relative; width: 8px; height: 8px; border-radius: 999px; background: var(--blue); }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }

/* --------------------------------------------------------------- Superfícies */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.card-sm { padding: 16px; border-radius: var(--radius); }
.card-hover { transition: border-color .25s, transform .25s, box-shadow .25s; }
.card-hover:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.glass {
  background: rgba(24, 24, 27, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
}

.panel { background: var(--bg-sec); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* Coluna lateral que acompanha a rolagem (desliga sozinha no mobile) */
.sticky-side { position: sticky; top: calc(var(--header-h) + 20px); }
.sticky-bottom { position: sticky; bottom: 16px; z-index: 10; }

/* --------------------------------------------------------------- Botões */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: opacity .18s, background .18s, border-color .18s, transform .12s;
  background: var(--bg-sec); color: var(--text); text-decoration: none;
}
.btn:hover { color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }

.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(34, 99, 248, .8); }
.btn-primary:hover { opacity: .92; }
.btn-white { background: #fff; color: #000; }
.btn-white:hover { background: #e4e4e7; color: #000; }
.btn-outline { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-sec); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-sec); color: #fff; }
.btn-green { background: var(--green); color: #052e16; }
.btn-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, .2); color: #fecaca; }

/* Estado de carregamento: o bot ão vira spinner e trava novos cliques */
.btn.is-loading { pointer-events: none; cursor: default; }
.btn.is-loading .btn-spinner {
  width: 15px; height: 15px; flex-shrink: 0;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 999px; animation: btn-spin .65s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Aviso de processamento longo (checkout, publicação de projeto) */
.processing-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center; padding: 24px;
  background: rgba(9, 9, 11, .88);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.processing-box {
  width: 100%; max-width: 380px; text-align: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px 26px; box-shadow: var(--shadow);
}
.processing-spinner {
  width: 42px; height: 42px; margin: 0 auto 18px;
  border: 3px solid var(--border); border-top-color: var(--blue);
  border-radius: 999px; animation: btn-spin .8s linear infinite;
}
.processing-box h3 { font-size: 17px; margin-bottom: 8px; }
.processing-box p { font-size: 13.5px; color: var(--text-muted); margin: 0; }
.processing-warning {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--amber);
}

.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px; border-radius: 10px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--bg-sec); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer; transition: all .18s;
}
.icon-btn:hover { color: #fff; border-color: var(--border-strong); }
.icon-btn.is-active { color: var(--blue); border-color: rgba(34, 99, 248, .4); background: rgba(34, 99, 248, .12); }

/* --------------------------------------------------------------- Badges */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 7px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--bg-sec); border: 1px solid var(--border); color: var(--text-muted);
}
.badge-blue   { background: rgba(34, 99, 248, .14);  border-color: rgba(34, 99, 248, .3);  color: #93b4fd; }
.badge-purple { background: rgba(99, 35, 247, .16);  border-color: rgba(99, 35, 247, .32); color: #c4b5fd; }
.badge-green  { background: rgba(34, 197, 94, .13);  border-color: rgba(34, 197, 94, .3);  color: #86efac; }
.badge-amber  { background: rgba(245, 158, 11, .13); border-color: rgba(245, 158, 11, .3); color: #fcd34d; }
.badge-red    { background: rgba(239, 68, 68, .13);  border-color: rgba(239, 68, 68, .3);  color: #fca5a5; }
.badge-orange { background: rgba(249, 115, 22, .14); border-color: rgba(249, 115, 22, .3); color: #fdba74; }

.tag {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  background: var(--bg-sec); border: 1px solid var(--border);
  font-size: 11px; font-weight: 500; color: #d4d4d8;
}

/* --------------------------------------------------------------- Formulários */

.field { margin-bottom: 18px; }
.label { display: block; font-size: 12.5px; font-weight: 600; color: #d4d4d8; margin-bottom: 7px; }
.label .req { color: var(--red); }
.hint { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg-main); border: 1px solid var(--border); border-radius: 11px;
  color: var(--text); font-size: 14px; transition: border-color .18s, box-shadow .18s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(34, 99, 248, .16);
}
.input.has-error, .select.has-error, .textarea.has-error { border-color: var(--red); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 38px; cursor: pointer;
}
.select option { background: var(--bg-sec); }

.input-group { position: relative; }
.input-group .input { padding-left: 40px; }
.input-group > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }

.field-error { color: #fca5a5; font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 5px; }

/* Campo de senha com botão de mostrar/ocultar */
.password-field { position: relative; display: block; }
.password-field .input { padding-right: 44px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 32px; height: 32px;
  padding: 0; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text-faint); transition: color .16s, background .16s;
}
.password-toggle:hover { color: var(--text); background: var(--bg-sec); }
.password-toggle svg { width: 17px; height: 17px; }

.checkbox, .radio { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 13.5px; color: #d4d4d8; }
.checkbox input, .radio input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }

.switch-list { display: flex; flex-direction: column; gap: 10px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 500; color: var(--text-muted); transition: all .18s;
}
.chip:hover { border-color: var(--border-strong); color: #fff; }
.chip input { display: none; }
.chip.is-active, .chip input:checked + span { color: #fff; }
.chip.is-active { background: rgba(34, 99, 248, .14); border-color: rgba(34, 99, 248, .45); color: #93b4fd; }

.file-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 28px 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--bg-main); color: var(--text-dim); transition: all .2s;
}
.file-drop:hover, .file-drop.is-dragging { border-color: var(--blue); background: rgba(34, 99, 248, .05); color: #93b4fd; }
.file-drop input[type="file"] { display: none; }

/* --------------------------------------------------------------- Navbar */

.navbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(9, 9, 11, .82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.navbar-inner > * { min-width: 0; }
.navbar-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.03em; flex-shrink: 0; }
.navbar-logo span:not(.mark) { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar-logo-img { height: 34px; width: auto; max-width: 190px; object-fit: contain; }
.navbar-logo .mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; font-size: 15px; color: #fff; box-shadow: 0 4px 14px -4px rgba(99, 35, 247, .8);
}
.navbar-menu { display: block; }
.navbar-links { display: flex; align-items: center; gap: 22px; font-size: 13.5px; font-weight: 500; color: var(--text-muted); }
.navbar-links a.is-active { color: #fff; }
.navbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.navbar-search-mobile, .navbar-mobile-cta { display: none; }

.navbar-search { position: relative; }
.navbar-search .input { width: 210px; padding: 8px 14px 8px 36px; border-radius: 999px; font-size: 12.5px; background: var(--card); }
.navbar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }

.nav-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
}

.menu-toggle { display: none; }

/* Dropdown do usuário */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; z-index: 70;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 7px; display: none;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border-radius: 9px; border: 0; background: none; cursor: pointer;
  font-size: 13.5px; color: var(--text-muted); text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-sec); color: #fff; }
.dropdown-head { padding: 10px 11px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }

.avatar { border-radius: 999px; object-fit: cover; background: var(--bg-sec); flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 104px; height: 104px; border: 3px solid var(--bg-main); }

/* --------------------------------------------------------------- Hero */

.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 999px; pointer-events: none; z-index: 0;
}
.hero::before { top: -120px; left: -160px; width: 520px; height: 520px; background: rgba(34, 99, 248, .11); filter: blur(120px); }
.hero::after { bottom: -200px; right: -140px; width: 620px; height: 620px; background: rgba(99, 35, 247, .11); filter: blur(150px); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: .98; margin-bottom: 20px; }
.hero-lead { color: var(--text-muted); font-size: 17px; max-width: 480px; margin-bottom: 30px; }
.hero-stats { display: flex; gap: 40px; border-top: 1px solid var(--border); padding-top: 26px; margin-top: 42px; }
.hero-stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.hero-stat-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }

.float-stack { position: relative; height: 500px; }
.float-card { position: absolute; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 16px; }
.float-a { top: 6%; right: 2%; width: 300px; transform: rotate(-4deg); z-index: 3; animation: floatY 7s ease-in-out infinite; }
.float-b { top: 46%; left: 2%; width: 268px; transform: rotate(6deg); z-index: 2; animation: floatY 8s ease-in-out infinite reverse; }
.float-c {
  bottom: 8%; right: 12%; z-index: 4; padding: 9px 18px; border-radius: 999px;
  background: var(--grad); border: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  transform: rotate(-10deg); animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY { 0%, 100% { translate: 0 -10px; } 50% { translate: 0 10px; } }

.mini-chart { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.mini-chart i { display: block; width: 15px; border-radius: 3px 3px 0 0; background: var(--blue); }

/* --------------------------------------------------------------- Cards de projeto */

.project-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.project-card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-card:hover .project-title { color: #7ba4ff; }

.project-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-sec); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--card), transparent 55%); opacity: .85; }
.project-thumb-top { position: absolute; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; align-items: flex-start; z-index: 2; }

.project-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.project-title { font-size: 15px; font-weight: 600; line-height: 1.3; transition: color .2s; }
.project-price { font-family: var(--font-display); font-weight: 700; font-size: 15px; white-space: nowrap; }
.project-price .old { color: var(--text-faint); font-size: 12px; text-decoration: line-through; font-weight: 400; margin-right: 5px; }
.project-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin: 8px 0 12px; }
.project-meta {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--text-dim);
}

.project-card.is-list { flex-direction: row; }
.project-card.is-list .project-thumb { width: 260px; aspect-ratio: auto; flex-shrink: 0; }

.fav-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 999px; cursor: pointer; color: #fff;
  background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px); transition: all .2s;
}
.fav-btn:hover { background: rgba(0, 0, 0, .6); }
.fav-btn.is-active { background: rgba(34, 99, 248, .22); border-color: rgba(34, 99, 248, .45); color: #7ba4ff; }
.fav-btn.is-active svg { fill: currentColor; }

.stars { display: inline-flex; gap: 1px; color: var(--amber); }
.stars svg { width: 13px; height: 13px; }
.stars svg.filled { fill: currentColor; }
.stars.lg svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------- Painel */

.dash { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 26px; align-items: start; padding: 26px 0 60px; }
.dash > * { min-width: 0; }

.dash-nav { position: sticky; top: calc(var(--header-h) + 20px); }
.dash-nav-group + .dash-nav-group { margin-top: 22px; }
.dash-nav-title { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); padding: 0 12px; margin-bottom: 8px; font-weight: 700; }
.dash-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; color: var(--text-muted); margin-bottom: 2px; transition: all .16s;
}
.dash-nav a:hover { background: var(--bg-sec); color: #fff; }
.dash-nav a.is-active { background: rgba(34, 99, 248, .12); color: #93b4fd; font-weight: 600; }
.dash-nav a .count { margin-left: auto; font-size: 10.5px; background: var(--bg-sec); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 26px; margin-bottom: 4px; }
.page-head p { color: var(--text-muted); font-size: 13.5px; margin: 0; }

.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: 27px; font-weight: 700; margin-top: 6px; line-height: 1.1; }
.stat-delta { font-size: 11.5px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.stat-delta.up { color: #86efac; } .stat-delta.down { color: #fca5a5; }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-sec); border: 1px solid var(--border); color: var(--text-muted); }

/* --------------------------------------------------------------- Tabelas */

.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
table.table th {
  text-align: left; padding: 12px 16px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 700; border-bottom: 1px solid var(--border); background: var(--bg-sec); white-space: nowrap;
}
table.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); color: #d4d4d8; vertical-align: middle; }
table.table tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover td { background: rgba(255, 255, 255, .015); }

/* --------------------------------------------------------------- Alertas */

.alert {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 16px; border-radius: var(--radius); font-size: 13.5px; line-height: 1.55;
  border: 1px solid var(--border); background: var(--card); color: #d4d4d8; margin-bottom: 16px;
}
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: rgba(34, 197, 94, .09);  border-color: rgba(34, 197, 94, .28);  color: #bbf7d0; }
.alert-error   { background: rgba(239, 68, 68, .09);  border-color: rgba(239, 68, 68, .28);  color: #fecaca; }
.alert-warning { background: rgba(245, 158, 11, .09); border-color: rgba(245, 158, 11, .28); color: #fde68a; }
.alert-info    { background: rgba(34, 99, 248, .09);  border-color: rgba(34, 99, 248, .28);  color: #bfdbfe; }

.flash-stack { position: fixed; top: calc(var(--header-h) + 14px); right: 20px; z-index: 200; width: min(370px, calc(100vw - 40px)); }
.flash-stack .alert { box-shadow: var(--shadow); animation: slideIn .32s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

.empty-state { text-align: center; padding: 56px 24px; color: var(--text-dim); }
.empty-state .empty-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px;
  display: grid; place-items: center; background: var(--bg-sec); border: 1px solid var(--border); color: var(--text-faint);
}
.empty-state h3 { color: #e4e4e7; font-size: 17px; }

/* --------------------------------------------------------------- Abas */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs a, .tabs button {
  padding: 11px 16px; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font-size: 13.5px; font-weight: 500; color: var(--text-dim); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover, .tabs button:hover { color: #fff; }
.tabs a.is-active, .tabs button.is-active { color: #fff; border-bottom-color: var(--blue); font-weight: 600; }

/* ------------------------------------------------- Filtros do marketplace */

.filters-body { display: block; }
.filters-toggle {
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 10px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text);
}
.filters-toggle .chev { transition: transform .2s; color: var(--text-dim); }
.filters-panel.is-open .filters-toggle .chev { transform: rotate(180deg); }

/* --------------------------------------------------------------- Paginação */

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 11px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--card); font-size: 13px; color: var(--text-muted);
}
.pagination a:hover { border-color: var(--border-strong); color: #fff; }
.pagination .is-active { background: rgba(34, 99, 248, .14); border-color: rgba(34, 99, 248, .45); color: #93b4fd; font-weight: 600; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* --------------------------------------------------------------- Modal */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px);
  padding: 24px; overflow-y: auto;
}
.modal-backdrop.is-open { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  width: 100%; max-width: 560px; margin: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow); animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-lg { max-width: 760px; }

/* --------------------------------------------------------------- Produto */

.product-gallery { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-sec); }
.product-gallery-main { aspect-ratio: 16 / 9; background: #000; }
.product-gallery-main img, .product-gallery-main iframe, .product-gallery-main video { width: 100%; height: 100%; object-fit: contain; border: 0; }
.product-gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--card); }
.product-gallery-thumbs button {
  width: 84px; height: 54px; flex-shrink: 0; padding: 0; cursor: pointer; overflow: hidden;
  border: 1.5px solid var(--border); border-radius: 8px; background: var(--bg-sec);
}
.product-gallery-thumbs button.is-active { border-color: var(--blue); }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.buy-box { position: sticky; top: calc(var(--header-h) + 20px); }
.buy-price { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; }

.spec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { color: var(--text-dim); }
.spec-row .v { color: #e4e4e7; font-weight: 500; text-align: right; }

.prose { color: #d4d4d8; font-size: 14.5px; line-height: 1.75; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: #fff; margin: 1.6em 0 .6em; }
.prose h2 { font-size: 1.4rem; } .prose h3 { font-size: 1.15rem; }
.prose > :first-child { margin-top: 0; }
.prose a { color: #7ba4ff; text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; }
.prose code { background: var(--bg-sec); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: .88em; font-family: ui-monospace, Menlo, Consolas, monospace; }
.prose pre { background: var(--bg-sec); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; margin: 1.2em 0; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote { border-left: 3px solid var(--blue); padding-left: 16px; margin: 1.2em 0; color: var(--text-muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 13.5px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose th { background: var(--bg-sec); }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #d4d4d8; }
.feature-list svg { color: var(--green); flex-shrink: 0; margin-top: 3px; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 10px; overflow: hidden; }
.faq-item summary { padding: 15px 18px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--text-dim); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .faq-body { padding: 0 18px 16px; color: var(--text-muted); font-size: 13.5px; }

/* --------------------------------------------------------------- Checkout */

.pay-methods { display: grid; gap: 10px; }
.pay-method {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--card); transition: all .18s;
}
.pay-method:hover { border-color: var(--border-strong); }
.pay-method.is-active { border-color: var(--blue); background: rgba(34, 99, 248, .07); }
.pay-method input { display: none; }
.pay-method .pm-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-sec); border: 1px solid var(--border); color: var(--text-muted); flex-shrink: 0; }
.pay-method.is-active .pm-icon { color: #93b4fd; border-color: rgba(34, 99, 248, .4); }
.pay-method .pm-name { font-weight: 600; font-size: 14px; }
.pay-method .pm-desc { font-size: 12px; color: var(--text-dim); }

.pix-box { text-align: center; }
.pix-qr { width: 232px; height: 232px; margin: 0 auto 18px; padding: 12px; background: #fff; border-radius: var(--radius); }
.pix-qr img { width: 100%; height: 100%; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; }

.order-summary { position: sticky; top: calc(var(--header-h) + 20px); }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 13.5px; color: var(--text-muted); }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; font-size: 17px; font-weight: 700; color: #fff; font-family: var(--font-display); }

.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-faint); }
.step .num {
  width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--card); font-size: 11.5px; font-weight: 700;
}
.step.is-active { color: #fff; }
.step.is-active .num { background: var(--grad); border-color: transparent; color: #fff; }
.step.is-done .num { background: rgba(34, 197, 94, .15); border-color: rgba(34, 197, 94, .4); color: #86efac; }
.step-sep { width: 26px; height: 1px; background: var(--border); }

/* --------------------------------------------------------------- Inbox */

.inbox { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; height: 620px; background: var(--card); }
.inbox-list { border-right: 1px solid var(--border); overflow-y: auto; }
.inbox-item { display: flex; gap: 11px; padding: 13px 15px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.inbox-item:hover { background: var(--bg-sec); }
.inbox-item.is-active { background: rgba(34, 99, 248, .1); }
.inbox-thread { display: flex; flex-direction: column; min-width: 0; }
.inbox-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.inbox-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.inbox-compose { border-top: 1px solid var(--border); padding: 13px 16px; display: flex; gap: 10px; align-items: flex-end; }

.bubble { max-width: 76%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; word-break: break-word; }
.bubble-in { align-self: flex-start; background: var(--bg-sec); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.bubble-out { align-self: flex-end; background: rgba(34, 99, 248, .16); border: 1px solid rgba(34, 99, 248, .3); border-bottom-right-radius: 5px; }
.bubble-time { font-size: 10.5px; color: var(--text-faint); margin-top: 5px; }

/* --------------------------------------------------------------- Notificações */

.notif-item { display: flex; gap: 13px; padding: 15px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 10px; }
.notif-item.is-unread { border-color: rgba(34, 99, 248, .35); background: rgba(34, 99, 248, .05); }
.notif-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--bg-sec); border: 1px solid var(--border); }

/* --------------------------------------------------------------- Perfil público */

.profile-cover { height: 220px; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(120deg, #1a1a2e, #16213e); border: 1px solid var(--border); }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-head { display: flex; align-items: flex-end; gap: 20px; margin-top: -52px; padding: 0 24px; position: relative; z-index: 2; flex-wrap: wrap; }

/* --------------------------------------------------- Telas de acesso */

.auth-split { min-height: 100vh; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-aside {
  position: relative; overflow: hidden; display: grid; place-items: center; padding: 40px;
  background: var(--bg-sec); border-left: 1px solid var(--border);
}
.auth-glow { position: absolute; border-radius: 999px; filter: blur(120px); pointer-events: none; }
.auth-glow-a { top: -100px; right: -120px; width: 460px; height: 460px; background: rgba(99, 35, 247, .18); }
.auth-glow-b { bottom: -140px; left: -100px; width: 420px; height: 420px; background: rgba(34, 99, 248, .16); }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); min-height: 100dvh; }
  .auth-aside { display: none; }
  .auth-form { align-items: start; padding: 32px 20px 56px; }
}

/* --------------------------------------------------------------- Rodapé */

.footer { border-top: 1px solid var(--border); background: var(--bg-main); padding: 54px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 36px; }
.footer h4 { font-family: var(--font); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { font-size: 13.5px; color: var(--text-muted); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-faint); }
.social-links { display: flex; gap: 9px; }
.social-links a { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--border); color: var(--text-muted); }
.social-links a:hover { color: #fff; border-color: var(--border-strong); }

/* --------------------------------------------------------------- Voltar ao topo */

.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 42px; height: 42px; border-radius: 999px; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border); color: var(--text-muted); box-shadow: var(--shadow);
}
.back-to-top.is-visible { display: flex; }
.back-to-top:hover { color: #fff; border-color: var(--border-strong); }

/* --------------------------------------------------------------- Barra de progresso */

.progress { height: 7px; border-radius: 999px; background: var(--bg-sec); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--grad); }

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; max-width: 100%; overflow-x: auto; }
.bar-chart .bar {
  flex: 1 1 0; min-width: 22px; /* min-width:auto faria as barras estourarem a tela */
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  height: 100%; justify-content: flex-end;
}
.bar-chart .bar > i { display: block; width: 100%; max-width: 46px; border-radius: 7px 7px 0 0; background: var(--grad); min-height: 4px; transition: height .5s ease; }
.bar-chart .bar > small { font-size: 10.5px; color: var(--text-faint); white-space: nowrap; }

/* --------------------------------------------------------------- Responsivo */

/* Nada pode estourar a largura da tela */
img, video, iframe, table, pre, canvas, svg { max-width: 100%; }
p, h1, h2, h3, h4, h5, li, td, th, a, span, div { overflow-wrap: break-word; }
.mono, code, .copy-field input { word-break: break-all; }

@media (max-width: 1180px) {
  .layout-sidebar, .layout-profile { grid-template-columns: 220px minmax(0, 1fr); }

  /* Entre ~900px e 1180px a barra fica apertada: a busca sai primeiro,
     já que ela reaparece dentro do menu no mobile. */
  .navbar-search-desktop { display: none; }
  .navbar-links { gap: 16px; }
  .navbar-inner > .flex { gap: 20px !important; }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .float-stack { display: none; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
  .dash-nav-group { display: flex; gap: 6px; }
  .dash-nav-group + .dash-nav-group { margin-top: 0; }
  .dash-nav-title { display: none; }
  .dash-nav a { white-space: nowrap; margin-bottom: 0; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Conteúdo + barra lateral viram uma coluna só */
  .layout-main, .layout-wide, .layout-sidebar, .layout-profile { grid-template-columns: minmax(0, 1fr); }
  .buy-box, .order-summary, .sticky-side { position: static !important; }
}

@media (max-width: 900px) {
  .navbar-menu, .navbar-search-desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .navbar-cta-desktop { display: none; }

  .navbar.is-open .navbar-menu {
    display: block;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    padding: 14px 20px 18px;
    background: var(--bg-main); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .navbar.is-open .navbar-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  }
  .navbar.is-open .navbar-links a { padding: 10px 0; width: 100%; font-size: 15px; }
  .navbar.is-open .navbar-search-mobile { display: block; margin-bottom: 14px; }
  .navbar.is-open .navbar-search-mobile .input { width: 100%; }
  .navbar.is-open .navbar-mobile-cta { display: block; margin-top: 14px; }
  .navbar.is-open .navbar-mobile-cta .btn { width: 100%; }

  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--border); }
  .inbox-messages { min-height: 340px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card.is-list { flex-direction: column; }
  .project-card.is-list .project-thumb { width: 100%; aspect-ratio: 16 / 10; }
  .bubble { max-width: 88%; }
}

@media (max-width: 760px) {
  .layout-split, .grid-address, .grid-address-3, .grid-city,
  .grid-label-side, .grid-rating { grid-template-columns: minmax(0, 1fr); }

  /* Filtros do marketplace viram um bloco recolhível */
  .filters-toggle { display: flex; }
  .filters-title { display: none; }
  .filters-body { display: none; }
  .filters-panel.is-open .filters-body { display: block; }

  .page-head { flex-direction: column; align-items: stretch; }
  .page-head form, .page-head .btn { width: 100%; }
  .page-head .navbar-search .input { width: 100% !important; }

  .profile-head { margin-top: -34px; padding: 0 12px; }
  .avatar-xl { width: 84px; height: 84px; }
  .profile-cover { height: 150px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 44px 0; }
  .section-sm { padding: 32px 0; }
  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: minmax(0, 1fr); }
  .grid-auto-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
  .hero { padding: 48px 0 40px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-stat-value { font-size: 21px; }
  .card { padding: 16px; }
  .modal-backdrop { padding: 12px; }
  .modal-body, .modal-head, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .flash-stack { left: 12px; right: 12px; width: auto; top: calc(var(--header-h) + 8px); }
  .dash { padding-top: 18px; }
  .dash-nav { position: static; }
  .steps { gap: 6px; font-size: 11px; }
  .step-sep { width: 14px; }
  .buy-price { font-size: 28px; }
  .copy-field { flex-direction: column; }
  .copy-field .btn { width: 100%; }
  .pix-qr { width: min(232px, 100%); height: auto; aspect-ratio: 1; }
  .tabs { gap: 0; }
  .tabs a, .tabs button { padding: 10px 12px; font-size: 12.5px; }
  .product-gallery-thumbs button { width: 68px; height: 44px; }
  .bar-chart { height: 150px; gap: 6px; }
  .bar-chart .bar > small { font-size: 9.5px; }
  .empty-state { padding: 40px 16px; }

  /* Evita o zoom automático do iOS ao focar um campo */
  .input, .select, .textarea { font-size: 16px; }
}

@media (max-width: 420px) {
  .navbar-logo span:not(.mark) { display: none; }
  .navbar-logo-img { max-width: 130px; }
  .navbar-actions { gap: 6px; }
  .btn { padding: 9px 16px; }
  .btn-lg { padding: 12px 20px; font-size: 14px; }
  .grid-auto-sm { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .avatar-xl { width: 72px; height: 72px; }
  h1 { font-size: 26px; }
}

@media print {
  .navbar, .footer, .back-to-top, .flash-stack, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
