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

/* ==========================================================================
   DEVFLUX BIO — DESIGN SYSTEM EDITORIAL IMPECCABLE (ANTI-SLOP)
   Inspirado no design artesanal, limpo e sofisticado de estúdio suíço
   ========================================================================== */

:root {
  --bg: #f5f5f1;
  --surface: #ffffff;
  --ink: #242824;
  --muted: #797e77;
  --line: #e3e6df;
  --line-focus: #8fbd66;
  
  /* Acentos de Estúdio */
  --green: #c7f397;
  --green-dark: #223618;
  --green-soft: #edf3e7;
  --purple: #8d73ee;
  --purple-soft: #eee9ff;
  --amber-soft: #ffedcf;
  --amber-dark: #916d36;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  font-synthesis: none;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
  transition: all 0.18s ease;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   BOTÕES & AÇÕES GERAIS
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green);
  color: var(--green-dark);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-secondary:hover:not(:disabled) {
  background: #fbfbf9;
  border-color: #d2d6cd;
}

.btn-danger-outline {
  padding: 8px 12px;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.btn-danger-outline:hover {
  background: #fef2f2;
}

/* ==========================================================================
   LAYOUT GERAL: SIDEBAR + MAIN AREA
   ========================================================================== */
.workspace {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Fixa à Esquerda */
.sidebar {
  width: 250px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 32px 24px 24px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin-bottom: 36px;
}

.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--green);
  color: var(--green-dark);
  width: 38px;
  height: 38px;
  font-size: 20px;
  font-weight: 800;
}

.nav-section-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #91998c;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-left: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 4px;
  transition: background 0.15s ease;
}

.nav-item:hover {
  background: #f8faf5;
}

.nav-item.active {
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 700;
}

.nav-item .icon {
  font-size: 16px;
}

.nav-item .count-pill {
  margin-left: auto;
  background: #ffffff;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--line);
}

/* Card de Dica de Venda de Placas NFC na Sidebar */
.sidebar-box {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
  background: linear-gradient(135deg, #f3f6ee 0%, #ffffff 100%);
  margin-bottom: 20px;
}

.sidebar-box span.badge-tip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #657e4e;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.sidebar-box strong {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  display: block;
}

.sidebar-box p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 6px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 11px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--purple-soft);
  color: var(--purple);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-info strong {
  font-size: 11px;
  color: var(--ink);
}

.user-info span {
  font-size: 9px;
  color: var(--muted);
}

/* Área Principal */
.main-content {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 0 44px 44px;
}

/* Topbar */
.topbar {
  height: 80px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb strong {
  color: var(--ink);
}

.system-status {
  font-size: 11px;
  color: #6c7565;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #8caa6a;
  border-radius: 50%;
  display: inline-block;
}

/* Título Editorial da Página */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 36px 0 28px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--ink);
  margin-bottom: 6px;
}

.page-header h1 span {
  color: #799d54;
}

.page-header p {
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================================
   ESTATÍSTICAS EM CARDS BRANCOS
   ========================================================================== */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  position: relative;
}

.stat-box .label {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  display: block;
}

.stat-box .number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin: 14px 0 8px;
  display: block;
}

.stat-box .caption {
  font-size: 11px;
  color: #8a9086;
}

/* ==========================================================================
   GRID DE CLIENTES / COLEÇÃO
   ========================================================================== */
.collection-section {
  margin-top: 36px;
}

.collection-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.collection-top h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.collection-top p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.clients-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.client-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.client-item:hover {
  border-color: #ced6c6;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.client-cover-art {
  height: 140px;
  position: relative;
  padding: 16px;
  background-color: #1a1e1b;
  background-size: cover;
  background-position: center;
}

.status-badge {
  padding: 5px 9px;
  font-size: 9px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-block;
}

.status-badge.live {
  background: var(--green);
  color: var(--green-dark);
}

.status-badge.paused {
  background: var(--amber-soft);
  color: var(--amber-dark);
}

.client-avatar-monogram {
  position: absolute;
  left: 20px;
  bottom: 16px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
}

.client-avatar-monogram img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-details {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.eyebrow-category {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.client-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 6px 0 4px;
}

.client-desc {
  font-size: 11px;
  color: #798375;
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.client-bottom-bar {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mrr-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.mrr-tag small {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  display: block;
}

.actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card "+ Criar Novo Estabelecimento" */
.create-new-card {
  min-height: 280px;
  border: 1px dashed #cbd5c1;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #f0f4ea;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  padding: 20px;
}

.create-new-card:hover {
  background: #e8efe0;
  border-color: #9dbb7d;
  transform: translateY(-2px);
}

.create-plus-icon {
  width: 44px;
  height: 44px;
  background: #dfe8d4;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--green-dark);
}

.create-new-card strong {
  font-size: 16px;
  font-weight: 600;
}

.create-new-card small {
  font-size: 11px;
  color: #7d8b72;
}

/* ==========================================================================
   VIEW 2: EDITOR VISUAL SPLIT-SCREEN (ESTILO BIO.SITE)
   ========================================================================= */
.editor-wrapper {
  padding-top: 28px;
}

.editor-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.editor-header-bar h1 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.8px;
}

.editor-header-bar .slug-url {
  font-size: 12px;
  color: #718067;
  margin-top: 4px;
}

.editor-grid-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: start;
  gap: 40px;
}

.editor-panel-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  gap: 20px;
  overflow-x: auto;
}

.tab-link {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 18px 0;
  border-bottom: 2px solid transparent;
  color: #81897a;
}

.tab-link.active {
  color: #29381c;
  border-color: #8ebc64;
  font-weight: 700;
}

.tab-pane {
  padding: 28px;
}

.field-group {
  margin-bottom: 20px;
}

.field-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}

.input-text, .select-box, .textarea-box {
  display: block;
  width: 100%;
  border: 1px solid #dfe4d9;
  border-radius: 9px;
  background: #fdfdfc;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 12px;
  outline: none;
  transition: all 0.15s ease;
}

.input-text:focus, .select-box:focus, .textarea-box:focus {
  border-color: var(--line-focus);
  box-shadow: 0 0 0 3px rgba(199, 243, 151, 0.3);
}

.field-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Celular / Mockup iPhone */
.phone-sticky-container {
  position: sticky;
  top: 24px;
}

.phone-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: #929a89;
  margin-bottom: 14px;
}

.phone-casing {
  position: relative;
  border: 8px solid #20241f;
  border-radius: 40px;
  background: #20241f;
  padding-top: 18px;
  box-shadow: 0 25px 60px rgba(39, 61, 19, 0.12);
  overflow: hidden;
  max-width: 320px;
  margin: 0 auto;
}

.phone-speaker-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 10px;
  background: #0f110e;
  border-radius: 10px;
  z-index: 10;
}

.phone-screen-iframe {
  height: 560px;
  width: 100%;
  border: none;
  background: #000;
  border-radius: 8px 8px 30px 30px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 36, 20, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  max-width: 460px;
  width: calc(100% - 32px);
  padding: 32px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.15);
}

.modal-dialog h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.modal-dialog p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 1050px) {
  .sidebar { width: 80px; padding: 24px 12px; align-items: center; }
  .sidebar-brand span, .nav-section-label, .sidebar-box, .user-info, .sidebar-brand small, .nav-item .count-pill { display: none; }
  .main-content { margin-left: 80px; width: calc(100% - 80px); padding: 0 24px 30px; }
  .editor-grid-split { grid-template-columns: 1fr; }
  .phone-sticky-container { position: static; width: 320px; margin: 30px auto 0; }
}

@media (max-width: 680px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; width: 100%; padding: 0 16px 24px; }
  .stats-strip { grid-template-columns: 1fr; }
  .field-grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DEVFLUX BIO — SEÇÕES & CARDS MODULARES (BUILDER ESTILO BIO.SITE)
   ========================================================================== */

#btnToggleAuthPassword:hover {
  color: var(--ink);
  transform: scale(1.08);
}

.sections-builder-top {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.add-section-toolbar {
  background: var(--bg);
  border: 1px dashed #d5d9cf;
  border-radius: 10px;
  padding: 14px;
}

.add-section-btn-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
}

.btn-add-sec {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  transition: all 0.15s ease;
  text-align: center;
}

.btn-add-sec .sec-icon {
  font-size: 16px;
}

.btn-add-sec:hover {
  background: var(--green-soft);
  border-color: var(--line-focus);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.sections-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Card individual de uma Seção no Editor */
.sec-block-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: border-color 0.2s ease;
}

.sec-block-card:hover {
  border-color: #cbd2c5;
}

.sec-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fafaf8;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.sec-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-reorder-arrow {
  width: 20px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
}

.btn-reorder-arrow:hover:not(:disabled) {
  background: var(--green-soft);
  color: var(--green-dark);
  border-color: var(--line-focus);
}

.sec-type-pill {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--purple-soft);
  color: var(--purple);
}

.sec-type-pill.text-type {
  background: var(--amber-soft);
  color: var(--amber-dark);
}

.sec-header-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.sec-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sec-del {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #fee2e2;
  color: #dc2626;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
}

.btn-sec-del:hover {
  background: #fef2f2;
}

.sec-block-body {
  padding: 18px;
}

/* Seletor de Formato do Layout de Cards */
.layout-picker-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}

.layout-picker-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

.layout-pill-btn {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.layout-pill-btn.active {
  background: var(--green);
  border-color: var(--green-dark);
  color: var(--green-dark);
  font-weight: 700;
}

/* Lista de Cards da Seção */
.cards-editor-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.card-item-editor {
  display: flex;
  gap: 14px;
  background: #fafaf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  position: relative;
  align-items: flex-start;
}

.card-image-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 80px;
}

.card-thumb-box {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: #eee;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-thumb-empty {
  font-size: 24px;
  color: #a0a69a;
}

.btn-upload-thumb {
  width: 100%;
  padding: 5px 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

.btn-upload-thumb:hover {
  background: var(--green-soft);
  border-color: var(--line-focus);
}

.card-inputs-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.card-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-item-del-btn {
  background: none;
  border: none;
  color: #999;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}

.card-item-del-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

.btn-add-card-to-sec {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--line-focus);
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-add-card-to-sec:hover {
  background: #dff0d4;
  border-style: solid;
}

