/* ============================================================
   AGENDA FÁCIL — PERFIL PROFISSIONAL NOVO V770
   Visual apenas. Não altera rotas, formulários, ids, names,
   Pix, agenda, clientes, serviços ou banco.
   ============================================================ */

body.professional-theme{
  --af770-gold:#d4a574;
  --af770-gold-light:#e8c9a0;
  --af770-gold-dark:#b8895a;
  --af770-bg:#0f0f0f;
  --af770-card:#1a1a1a;
  --af770-card2:#222222;
  --af770-text:#f5f5f5;
  --af770-muted:#8a8a8a;
  --af770-border:#2a2a2a;
  --af770-green:#4ade80;
  --af770-red:#ef4444;
  --af770-sidebar:280px;
  --af770-topbar:72px;
  --af770-radius:16px;
  --af770-shadow:0 12px 34px rgba(0,0,0,.22);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif!important;
  background:var(--af770-bg)!important;
  color:var(--af770-text)!important;
  min-height:100vh!important;
  margin:0!important;
  padding:0!important;
  overflow-x:hidden!important;
}

body.professional-theme *,
body.professional-theme *::before,
body.professional-theme *::after{box-sizing:border-box}

body.professional-theme a{color:inherit}
body.professional-theme img{max-width:100%}

/* ===== SVG ===== */
body.professional-theme .af-v770-icon{
  width:20px;height:20px;display:block;flex:0 0 auto;
  stroke:currentColor;fill:none;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;
}
body.professional-theme [data-af-v770-icon]{
  width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
body.professional-theme .af-pro-sidebar-v770{
  position:fixed!important;left:0!important;top:0!important;bottom:0!important;
  width:var(--af770-sidebar)!important;height:100vh!important;
  z-index:900!important;margin:0!important;padding:0!important;
  display:flex!important;flex-direction:column!important;
  background:var(--af770-card)!important;border:0!important;border-right:1px solid var(--af770-border)!important;
  box-shadow:none!important;overflow:hidden!important;color:var(--af770-text)!important;
}
body.professional-theme .af-side-header-v770{
  min-height:82px!important;padding:20px 22px!important;border-bottom:1px solid var(--af770-border)!important;
  display:flex!important;align-items:center!important;gap:12px!important;background:var(--af770-card)!important;
}
body.professional-theme .af-side-logo-v770{
  width:42px!important;height:42px!important;border-radius:11px!important;flex:0 0 42px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  background:linear-gradient(135deg,var(--af770-gold-light),var(--af770-gold-dark))!important;
  color:#1a1108!important;font-family:"Cormorant Garamond",Georgia,serif!important;font-size:21px!important;font-weight:700!important;
  box-shadow:0 8px 22px rgba(212,165,116,.16)!important;
}
body.professional-theme .af-side-brand-copy-v770{min-width:0!important;line-height:1.05!important}
body.professional-theme .af-side-brand-copy-v770 b{
  display:block!important;color:var(--af770-text)!important;font-family:"Cormorant Garamond",Georgia,serif!important;
  font-size:23px!important;font-weight:600!important;white-space:nowrap!important;
}
body.professional-theme .af-side-brand-copy-v770 small{
  display:block!important;margin-top:4px!important;color:var(--af770-gold)!important;font-size:9px!important;font-weight:700!important;
  letter-spacing:2.2px!important;text-transform:uppercase!important;
}
body.professional-theme .af-side-scroll-v770{
  flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;
  padding:18px 14px 24px!important;scrollbar-width:thin!important;scrollbar-color:#343434 transparent!important;
}
body.professional-theme .af-side-scroll-v770::-webkit-scrollbar{width:4px!important}
body.professional-theme .af-side-scroll-v770::-webkit-scrollbar-thumb{background:#343434!important;border-radius:4px!important}
body.professional-theme .af-side-group-v770{margin:0 0 22px!important}
body.professional-theme .af-side-group-v770:last-child{margin-bottom:2px!important}
body.professional-theme .af-side-group-v770 .pro-side-section{
  display:block!important;margin:0 0 8px!important;padding:0 12px!important;height:auto!important;min-height:0!important;
  color:var(--af770-muted)!important;background:none!important;border:0!important;
  font-size:10px!important;font-weight:700!important;line-height:1.2!important;letter-spacing:1.2px!important;text-transform:uppercase!important;
}
body.professional-theme .af-side-group-v770>a{
  width:100%!important;min-height:42px!important;margin:0 0 2px!important;padding:10px 12px!important;
  display:flex!important;align-items:center!important;gap:12px!important;position:relative!important;
  border:0!important;border-left:3px solid transparent!important;border-radius:10px!important;
  background:transparent!important;box-shadow:none!important;text-decoration:none!important;
  color:#dedbd7!important;font-size:14px!important;font-weight:500!important;line-height:1.25!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease!important;
}
body.professional-theme .af-side-group-v770>a:hover{
  background:rgba(212,165,116,.08)!important;color:var(--af770-gold-light)!important;
}
body.professional-theme .af-side-group-v770>a.active{
  background:linear-gradient(90deg,rgba(212,165,116,.16),rgba(212,165,116,.03))!important;
  border-left-color:var(--af770-gold)!important;color:var(--af770-gold-light)!important;font-weight:650!important;
}
body.professional-theme .af-side-group-v770>a>[data-af-v770-icon]{color:inherit!important}
body.professional-theme .af-new-badge-v770{
  margin-left:auto!important;padding:2px 7px!important;border-radius:999px!important;
  background:var(--af770-gold)!important;color:#1a1108!important;font-style:normal!important;font-size:9px!important;font-weight:800!important;
}
body.professional-theme .af-side-unread-v770{
  margin-left:auto!important;min-width:20px!important;height:20px!important;padding:0 6px!important;border-radius:999px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  background:var(--af770-red)!important;color:#fff!important;font-style:normal!important;font-size:10px!important;font-weight:800!important;
}
body.professional-theme .af-side-footer-v770{
  min-height:78px!important;padding:16px 18px!important;border-top:1px solid var(--af770-border)!important;
  display:flex!important;align-items:center!important;gap:11px!important;background:#171717!important;
}
body.professional-theme .af-side-user-avatar-v770{
  width:42px!important;height:42px!important;min-width:42px!important;border-radius:50%!important;object-fit:cover!important;
  border:1px solid var(--af770-gold)!important;background:var(--af770-card2)!important;
}
body.professional-theme .af-side-user-letter-v770{
  display:flex!important;align-items:center!important;justify-content:center!important;color:var(--af770-gold-light)!important;
  font-family:"Cormorant Garamond",Georgia,serif!important;font-size:20px!important;font-weight:700!important;
}
body.professional-theme .af-side-user-copy-v770{flex:1 1 auto!important;min-width:0!important;line-height:1.15!important}
body.professional-theme .af-side-user-copy-v770 b{display:block!important;color:#fff!important;font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.professional-theme .af-side-user-copy-v770 small{display:block!important;margin-top:4px!important;color:var(--af770-muted)!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.professional-theme .af-side-logout-v770{
  width:36px!important;height:36px!important;flex:0 0 36px!important;border-radius:10px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  color:#aaa!important;background:#202020!important;border:1px solid #303030!important;text-decoration:none!important;
}
body.professional-theme .af-side-logout-v770:hover{color:var(--af770-gold-light)!important;border-color:rgba(212,165,116,.42)!important}

/* ============================================================
   TOPBAR
   ============================================================ */
body.professional-theme > .af-pro-topbar-v770{
  position:fixed!important;left:var(--af770-sidebar)!important;right:0!important;top:0!important;
  width:auto!important;height:var(--af770-topbar)!important;min-height:var(--af770-topbar)!important;
  z-index:850!important;margin:0!important;padding:0 32px!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;
  background:rgba(26,26,26,.97)!important;border:0!important;border-bottom:1px solid var(--af770-border)!important;
  box-shadow:none!important;backdrop-filter:blur(10px)!important;
}
body.professional-theme .af-pro-page-title-v770{
  margin:0!important;padding:0!important;order:1!important;color:var(--af770-text)!important;
  font-family:"Cormorant Garamond",Georgia,serif!important;font-size:26px!important;font-weight:600!important;line-height:1!important;
}
body.professional-theme .af-pro-top-actions-v770{order:3!important;margin-left:auto!important;display:flex!important;align-items:center!important;gap:10px!important}
body.professional-theme .af-pro-icon-btn-v770{
  width:40px!important;height:40px!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;
  background:var(--af770-card2)!important;border:1px solid var(--af770-border)!important;color:var(--af770-text)!important;text-decoration:none!important;
  transition:.16s ease!important;
}
body.professional-theme .af-pro-icon-btn-v770:hover{border-color:var(--af770-gold)!important;color:var(--af770-gold-light)!important;transform:translateY(-1px)!important}
body.professional-theme .af-pro-nav-source-v770{display:none!important}
body.professional-theme .af-pro-mobile-brand-v770{display:none!important}

/* ============================================================
   CONTENT SHELL
   ============================================================ */
body.professional-theme > main.container{
  position:relative!important;width:auto!important;max-width:none!important;min-height:100vh!important;
  margin:0 0 0 var(--af770-sidebar)!important;padding:104px 32px 42px!important;
  background:var(--af770-bg)!important;color:var(--af770-text)!important;
}
body.professional-theme > main.container>*{max-width:100%!important}
body.professional-theme .container .page-title,
body.professional-theme main.container>h1:first-child{color:var(--af770-text)!important}

/* ============================================================
   GLOBAL TYPOGRAPHY / CARDS
   ============================================================ */
body.professional-theme h1,
body.professional-theme h2,
body.professional-theme h3,
body.professional-theme h4,
body.professional-theme h5{color:var(--af770-text)!important}
body.professional-theme h1,
body.professional-theme h2{font-family:"Cormorant Garamond",Georgia,serif!important}
body.professional-theme p,
body.professional-theme small,
body.professional-theme .muted,
body.professional-theme .sub{color:var(--af770-muted)!important}

body.professional-theme .card,
body.professional-theme .form-card,
body.professional-theme .notice:not(.danger):not(.warn),
body.professional-theme .listitem,
body.professional-theme .app-shortcut,
body.professional-theme .appointment-pro,
body.professional-theme .support-card,
body.professional-theme .chat-card,
body.professional-theme [class*="panel-card"],
body.professional-theme [class*="settings-card"]{
  background:var(--af770-card)!important;color:var(--af770-text)!important;
  border:1px solid var(--af770-border)!important;border-radius:var(--af770-radius)!important;
  box-shadow:var(--af770-shadow)!important;
}
body.professional-theme .card,
body.professional-theme .form-card{padding:22px!important}
body.professional-theme .card:hover,
body.professional-theme .app-shortcut:hover{border-color:rgba(212,165,116,.34)!important}

/* Inputs */
body.professional-theme input,
body.professional-theme select,
body.professional-theme textarea{
  background:var(--af770-card2)!important;color:var(--af770-text)!important;
  border:1px solid #343434!important;border-radius:10px!important;box-shadow:none!important;
  outline:none!important;
}
body.professional-theme input::placeholder,
body.professional-theme textarea::placeholder{color:#727272!important}
body.professional-theme input:focus,
body.professional-theme select:focus,
body.professional-theme textarea:focus{border-color:var(--af770-gold)!important;box-shadow:0 0 0 3px rgba(212,165,116,.10)!important}
body.professional-theme label{color:#c9c4be!important}

/* Buttons */
body.professional-theme .btn.primary,
body.professional-theme button.primary,
body.professional-theme .btn-primary,
body.professional-theme .primary.btn,
body.professional-theme [class*="save-btn"]{
  background:linear-gradient(135deg,var(--af770-gold-light),var(--af770-gold))!important;
  color:#24170d!important;border:1px solid rgba(255,255,255,.10)!important;border-radius:11px!important;
  box-shadow:0 8px 22px rgba(212,165,116,.16)!important;font-weight:700!important;
}
body.professional-theme .btn:not(.primary),
body.professional-theme .btn-secondary,
body.professional-theme button:not(.primary):not([class*="danger"]):not([class*="cancel"]){
  border-color:#373737!important;border-radius:10px!important;
}
body.professional-theme .btn.ghost,
body.professional-theme .btn.secondary,
body.professional-theme .btn-secondary{
  background:#202020!important;color:var(--af770-text)!important;border:1px solid #343434!important;
}
body.professional-theme .btn.ghost:hover,
body.professional-theme .btn.secondary:hover,
body.professional-theme .btn-secondary:hover{border-color:var(--af770-gold)!important;color:var(--af770-gold-light)!important}

/* Table */
body.professional-theme table{background:transparent!important;color:var(--af770-text)!important}
body.professional-theme th{color:var(--af770-muted)!important;border-color:#303030!important;background:#181818!important}
body.professional-theme td{color:#e7e4e0!important;border-color:#282828!important;background:transparent!important}
body.professional-theme tr:hover td{background:#1d1d1d!important}
body.professional-theme .table-wrap{border-color:var(--af770-border)!important;border-radius:12px!important;background:var(--af770-card)!important}

/* statuses / notices */
body.professional-theme .badge,
body.professional-theme .pill{border-radius:999px!important}
body.professional-theme .notice.warn{background:#2a2214!important;border-color:#5f4a22!important;color:#f2d38d!important}
body.professional-theme .notice.danger{background:#2a1717!important;border-color:#5c2929!important;color:#ffb0b0!important}
body.professional-theme .flash{border-radius:12px!important;background:#1d1d1d!important;border:1px solid #333!important;color:#eee!important;box-shadow:var(--af770-shadow)!important}
body.professional-theme .flash.success{border-color:#28573a!important;color:#88e8aa!important}
body.professional-theme .flash.error{border-color:#633030!important;color:#ffaaaa!important}

/* generic separators */
body.professional-theme hr{border:0!important;border-top:1px solid var(--af770-border)!important}

/* ============================================================
   DASHBOARD / HOME — preserva os dados reais, muda só o visual
   ============================================================ */
body.professional-theme .app-profile-head{
  background:transparent!important;border:0!important;box-shadow:none!important;padding:0 0 18px!important;margin:0!important;
}
body.professional-theme .app-profile-logo{border:2px solid var(--af770-gold)!important;background:var(--af770-card2)!important}
body.professional-theme .app-profile-copy h1{font-family:"Cormorant Garamond",Georgia,serif!important;color:var(--af770-text)!important}
body.professional-theme .app-profile-copy small{color:var(--af770-muted)!important}
body.professional-theme .app-icon-btn{background:var(--af770-card2)!important;border:1px solid #343434!important;color:var(--af770-gold-light)!important}

body.professional-theme #afActivationV38,
body.professional-theme .activation-card,
body.professional-theme [id*="Activation"]{
  background:linear-gradient(145deg,#1d1a18,#141414)!important;border-color:rgba(212,165,116,.30)!important;color:var(--af770-text)!important;
}
body.professional-theme .af-act-head-v38 h2{color:var(--af770-gold-light)!important}

body.professional-theme .stats{gap:16px!important}
body.professional-theme .stat{
  background:var(--af770-card)!important;border:1px solid var(--af770-border)!important;border-radius:16px!important;
  box-shadow:var(--af770-shadow)!important;color:var(--af770-text)!important;
}
body.professional-theme .stat-icon,
body.professional-theme .app-shortcut-icon,
body.professional-theme .metric-icon{color:var(--af770-gold)!important}

body.professional-theme .app-hero-card{
  border-radius:20px!important;border:1px solid rgba(212,165,116,.28)!important;
  background:linear-gradient(120deg,#ead1b0 0%,#d4a574 55%,#9d7148 100%)!important;
  box-shadow:0 18px 44px rgba(126,88,52,.22)!important;color:#24170d!important;
}
body.professional-theme .app-hero-card h1,
body.professional-theme .app-hero-card h2,
body.professional-theme .app-hero-card h3,
body.professional-theme .app-hero-card p,
body.professional-theme .app-hero-card span,
body.professional-theme .app-hero-card strong,
body.professional-theme .app-hero-card b{color:#2a1a0e!important}

body.professional-theme .appointment-pro,
body.professional-theme .appointment,
body.professional-theme [class*="appointment-card"]{
  background:#191919!important;border:1px solid #2e2e2e!important;color:var(--af770-text)!important;
}

/* ============================================================
   SPECIAL MODULES — unify legacy light blocks
   ============================================================ */
body.professional-theme [style*="background:#fff"],
body.professional-theme [style*="background: #fff"],
body.professional-theme [style*="background:white"],
body.professional-theme [style*="background: white"]{
  background-color:var(--af770-card)!important;
}
body.professional-theme [style*="color:#172033"],
body.professional-theme [style*="color: #172033"],
body.professional-theme [style*="color:#111"],
body.professional-theme [style*="color: #111"]{color:var(--af770-text)!important}

body.professional-theme .wa-panel,
body.professional-theme [class*="whatsapp-card"],
body.professional-theme [class*="finance-card"],
body.professional-theme [class*="report-card"],
body.professional-theme [class*="security-card"],
body.professional-theme [class*="manual-card"],
body.professional-theme [class*="feedback-v35"] .box,
body.professional-theme [class*="feedback-v35"] .hero,
body.professional-theme [class*="client-card"],
body.professional-theme [class*="team-card"],
body.professional-theme [class*="service-card"]{
  background:var(--af770-card)!important;border-color:var(--af770-border)!important;color:var(--af770-text)!important;
}

/* Feedback old white card injected by base */
body.professional-theme #afFeedbackMaisV351{
  background:var(--af770-card)!important;border-color:var(--af770-border)!important;box-shadow:var(--af770-shadow)!important;
}
body.professional-theme #afFeedbackMaisV351 strong{color:var(--af770-text)!important}
body.professional-theme #afFeedbackMaisV351 small{color:var(--af770-muted)!important}

/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
body.professional-theme .mobile-bottom-nav{display:none!important}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1100px){
  body.professional-theme{--af770-sidebar:248px}
  body.professional-theme > .af-pro-topbar-v770{padding:0 24px!important}
  body.professional-theme > main.container{padding-left:24px!important;padding-right:24px!important}
  body.professional-theme .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:800px){
  body.professional-theme{--af770-sidebar:0px;--af770-topbar:0px;padding-bottom:74px!important;background:#0f0f10!important}
  body.professional-theme .af-pro-sidebar-v770{display:none!important}
  body.professional-theme > .af-pro-topbar-v770{display:none!important}
  body.professional-theme .af-pro-mobile-brand-v770{display:flex!important;align-items:center!important;gap:9px!important;min-width:0!important;order:1!important}
  body.professional-theme .af-pro-mobile-logo-v770{
    width:36px!important;height:36px!important;flex:0 0 36px!important;border-radius:9px!important;display:flex!important;align-items:center!important;justify-content:center!important;
    background:linear-gradient(135deg,var(--af770-gold-light),var(--af770-gold-dark))!important;color:#1a1108!important;
    font-family:"Cormorant Garamond",Georgia,serif!important;font-size:18px!important;font-weight:700!important;
  }
  body.professional-theme .af-pro-mobile-copy-v770{display:flex!important;flex-direction:column!important;min-width:0!important;line-height:1!important}
  body.professional-theme .af-pro-mobile-copy-v770 b{font-family:"Cormorant Garamond",Georgia,serif!important;font-size:18px!important;color:#fff!important;white-space:nowrap!important}
  body.professional-theme .af-pro-mobile-copy-v770 small{margin-top:3px!important;color:var(--af770-gold)!important;font-size:8px!important;font-weight:800!important;letter-spacing:1.5px!important;text-transform:uppercase!important}
  body.professional-theme .af-pro-page-title-v770{display:none!important}
  body.professional-theme .af-pro-top-actions-v770{order:3!important;gap:7px!important}
  body.professional-theme .af-pro-icon-btn-v770{width:38px!important;height:38px!important}
  body.professional-theme > main.container{
    width:100%!important;max-width:100%!important;margin:0!important;padding:14px 14px 96px!important;min-height:100vh!important;background:#0f0f10!important;
  }
  body.professional-theme .mobile-bottom-nav{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:1000!important;
    min-height:68px!important;padding:7px max(6px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;align-items:center!important;
    background:#141416!important;border-top:1px solid #303034!important;box-shadow:0 -8px 26px rgba(0,0,0,.28)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  body.professional-theme .mobile-bottom-nav>a{
    min-width:0!important;height:54px!important;padding:5px 2px!important;margin:0!important;border:0!important;border-radius:10px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;
    color:#777!important;background:transparent!important;text-decoration:none!important;position:relative!important;
  }
  body.professional-theme .mobile-bottom-nav>a.active{color:var(--af770-gold-light)!important;background:rgba(212,165,116,.08)!important}
  body.professional-theme .mobile-bottom-nav>a>span{width:22px!important;height:22px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:0!important;color:inherit!important}
  body.professional-theme .mobile-bottom-nav>a>b{font-size:9px!important;font-weight:650!important;color:inherit!important;white-space:nowrap!important}
  body.professional-theme .mobile-bottom-nav>a>i{
    position:absolute!important;top:2px!important;right:18%!important;min-width:17px!important;height:17px!important;padding:0 4px!important;border-radius:999px!important;
    background:var(--af770-red)!important;color:#fff!important;font-size:9px!important;font-style:normal!important;display:flex!important;align-items:center!important;justify-content:center!important;
  }
  body.professional-theme .card,
  body.professional-theme .form-card{padding:16px!important;border-radius:14px!important}
  body.professional-theme .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body.professional-theme h1{font-size:28px!important}
  body.professional-theme h2{font-size:23px!important}
  body.professional-theme .table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  body.professional-theme table{min-width:640px!important}
}

@media (max-width:480px){
  body.professional-theme > main.container{padding-left:12px!important;padding-right:12px!important}
  body.professional-theme .stats{grid-template-columns:1fr 1fr!important}
  body.professional-theme .stat{min-width:0!important;padding:14px 10px!important}
  body.professional-theme .grid2,
  body.professional-theme .grid3{grid-template-columns:1fr!important}
  body.professional-theme .af-pro-top-actions-v770 .af-pro-icon-btn-v770:first-child{display:none!important}
}
