/* Leal3D V49 — temas padronizados */

/* Avatar */
.saas-profile-icon { display:block; width:48%; height:48%; }
.saas-avatar { color:#fff; }

/* Cabeçalho: conta e tema em duas colunas paralelas */
.brand-area > .saas-account-button {
  grid-column:3 !important;
  margin-left:0 !important;
}

.brand-area > .theme-switcher {
  grid-column:4 !important;
  justify-self:end !important;
  align-self:center !important;
  width:auto !important;
  min-width:82px !important;
  height:max(36px, calc(var(--brand-logo-width, 155px) * .238)) !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  cursor:pointer;
}

.theme-switcher-content {
  width:100% !important;
  height:100% !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-end !important;
  justify-content:center !important;
  gap:3px !important;
}

.theme-switcher-track {
  position:relative;
  display:block;
  width:34px !important;
  height:16px !important;
  flex:0 0 16px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--bg-input);
  box-shadow:inset 0 1px 2px rgba(0,0,0,.18);
}

.theme-switcher-thumb {
  position:absolute;
  top:2px !important;
  left:2px !important;
  width:10px !important;
  height:10px !important;
  display:block;
  border-radius:50%;
  background:var(--text-main);
  transition:transform .22s ease, background .22s ease;
}

.theme-switcher-label {
  color:var(--secondary) !important;
  font-size:.60rem !important;
  font-weight:700 !important;
  line-height:1.1 !important;
  white-space:nowrap !important;
}

.theme-switcher-sun,
.theme-switcher-moon { display:none !important; }

.theme-switcher:focus-visible {
  outline:2px solid var(--secondary);
  outline-offset:3px;
  border-radius:7px;
}

/* Rodapé */
.footer-bottom {
  display:grid !important;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
}
.footer-contact { color:var(--text-muted); text-decoration:none; transition:color .2s ease; }
.footer-contact:hover { color:var(--text-main); }
.footer-credit { text-align:right; }

/* Controle de aparência no painel */
.admin-theme-editor-control {
  display:grid;
  grid-template-columns:minmax(310px,1fr) repeat(2,minmax(180px,.55fr));
  gap:14px;
  align-items:end;
  margin:0 0 18px;
  padding:16px;
  border:1px solid var(--border-soft);
  border-radius:12px;
  background:rgba(var(--secondary-rgb),.055);
}
.admin-theme-editor-control > div { align-self:center; }
.admin-theme-editor-control strong { display:block; font-size:.88rem; }
.admin-theme-editor-control span,
.admin-theme-editor-control p { color:var(--text-muted); font-size:.7rem; line-height:1.55; }
.admin-theme-editor-control label { display:grid; gap:6px; color:var(--text-label); font-size:.72rem; }
.admin-theme-editor-control select {
  width:100%;
  padding:9px 10px;
  border:1px solid var(--border);
  border-radius:8px;
  background:var(--bg-input);
  color:var(--text-main);
}
.admin-theme-editor-control p { grid-column:1/-1; margin:0; }

/* Paleta clara global */
html[data-theme="light"] {
  color-scheme:light;
  --brand-main:#18181b;
  --bg-body:#f4f4f5;
  --bg-shell:rgba(255,255,255,.96);
  --bg-panel:#f4f4f5;
  --bg-panel-deep:#ffffff;
  --bg-input:#ffffff;
  --bg-input-hover:#f4f4f5;
  --header-gray:#e4e4e7;
  --header-hover:#d4d4d8;
  --text-main:#18181b;
  --text-label:#27272a;
  --text-muted:#71717a;
  --border:#d4d4d8;
  --border-soft:rgba(24,24,27,.11);
  --shadow-soft:0 24px 70px rgba(24,24,27,.14);
}

html[data-theme="light"] .theme-switcher-thumb {
  transform:translateX(18px) !important;
  background:var(--primary);
}
html[data-theme="light"] img[src$="leal3d.svg"] { content:url('/assets/logos/leal3d-light.svg'); }
html[data-theme="light"] .workflow { background:rgba(24,24,27,.025); }

html[data-theme="light"] .session,
html[data-theme="light"] .drop,
html[data-theme="light"] .status,
html[data-theme="light"] .stage,
html[data-theme="light"] .measure-input,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select {
  border-color:var(--border);
  background-color:var(--bg-panel-deep);
  color:var(--text-main);
}

html[data-theme="light"] .saas-account-button {
  background:transparent !important;
  color:var(--text-main) !important;
}
html[data-theme="light"] .saas-account-main { color:var(--text-main) !important; }
html[data-theme="light"] .saas-modal { background:rgba(24,24,27,.42); }
html[data-theme="light"] .saas-modal-dialog,
html[data-theme="light"] .saas-paywall-card {
  background:var(--bg-panel-deep) !important;
  border-color:var(--border-soft) !important;
  color:var(--text-main);
}
html[data-theme="light"] .saas-modal-close { background:rgba(24,24,27,.07); color:var(--text-main); }
html[data-theme="light"] .saas-auth-tabs { background:#f4f4f5; }
html[data-theme="light"] .saas-auth-tabs button.active { background:#e4e4e7; color:var(--text-main); }
html[data-theme="light"] .saas-auth-view input { background:var(--bg-input); color:var(--text-main); }
html[data-theme="light"] .saas-account-grid > div,
html[data-theme="light"] .saas-account-actions button,
html[data-theme="light"] .saas-benefits span {
  background:rgba(24,24,27,.04);
  border-color:var(--border-soft);
}
html[data-theme="light"] .saas-price { color:var(--text-main); }

/* Painel administrativo totalmente claro quando o site está no modo claro */
html[data-theme="light"] .admin-modal {
  background:rgba(39,39,42,.42);
}

html[data-theme="light"] .admin-dialog {
  border-color:#d4d4d8;
  background:#ffffff;
  box-shadow:0 36px 110px rgba(24,24,27,.26);
  color:#18181b;
}

html[data-theme="light"] .admin-head {
  border-bottom-color:#e4e4e7;
  background:#ffffff;
}

html[data-theme="light"] .admin-head h2,
html[data-theme="light"] .admin-panel-heading h3,
html[data-theme="light"] .admin-label-style-head strong,
html[data-theme="light"] .admin-section-title {
  color:#18181b;
}

html[data-theme="light"] .admin-head p,
html[data-theme="light"] .admin-panel-heading p,
html[data-theme="light"] .admin-label-style-head span,
html[data-theme="light"] .admin-feedback {
  color:#71717a;
}

html[data-theme="light"] .admin-head > button {
  border-color:#d4d4d8;
  background:#f4f4f5;
  color:#27272a;
}
html[data-theme="light"] .admin-head > button:hover { background:#e4e4e7; }

html[data-theme="light"] .admin-form-layout {
  background:#f4f4f5;
}

html[data-theme="light"] .admin-nav {
  border-right-color:#e4e4e7;
  background:#fafafa;
}

html[data-theme="light"] .admin-nav button {
  color:#71717a;
}
html[data-theme="light"] .admin-nav button strong { color:#3f3f46; }
html[data-theme="light"] .admin-nav button:hover { background:#f4f4f5; }
html[data-theme="light"] .admin-nav button.active {
  border-color:rgba(var(--secondary-rgb),.34);
  background:rgba(var(--secondary-rgb),.08);
  color:#047857;
}
html[data-theme="light"] .admin-nav button.active strong { color:#059669; }

html[data-theme="light"] .admin-panels {
  background:#ffffff;
}

html[data-theme="light"] .admin-background,
html[data-theme="light"] .admin-label-style,
html[data-theme="light"] .admin-tool {
  border-color:#e4e4e7;
  background:#ffffff;
}

html[data-theme="light"] .admin-label-style-head,
html[data-theme="light"] .admin-section {
  border-color:#e4e4e7;
}

html[data-theme="light"] .admin-background-fields label,
html[data-theme="light"] .admin-label-style-grid label,
html[data-theme="light"] .admin-tool label {
  color:#52525b;
}

html[data-theme="light"] .admin-background-fields input,
html[data-theme="light"] .admin-background-fields select,
html[data-theme="light"] .admin-label-style-grid input,
html[data-theme="light"] .admin-tool input,
html[data-theme="light"] .admin-theme-editor-control select {
  border-color:#d4d4d8;
  background:#ffffff;
  color:#18181b;
}

html[data-theme="light"] .admin-field-note {
  border-color:#d4d4d8;
  background:#fafafa;
  color:#71717a;
}

html[data-theme="light"] .admin-inline-actions button {
  border-color:#d4d4d8;
  background:#f4f4f5;
  color:#27272a;
}

html[data-theme="light"] .admin-range-meta output {
  border-color:#d4d4d8;
  background:#f4f4f5;
  color:#27272a;
}

html[data-theme="light"] .admin-banner-border-preview {
  background:#f4f4f5;
  color:#27272a;
}

html[data-theme="light"] .admin-model-summary {
  background:rgba(var(--secondary-rgb),.08);
}
html[data-theme="light"] .admin-model-summary strong { color:#065f46; }

html[data-theme="light"] .admin-savebar {
  border-top-color:#e4e4e7;
  background:#ffffff;
  box-shadow:0 -12px 30px rgba(24,24,27,.08);
}

html[data-theme="light"] .admin-open-button { background:#e4e4e7; color:#27272a; }

/* Responsivo */
@media (max-width:900px) {
  .admin-theme-editor-control { grid-template-columns:1fr; }
  .admin-theme-editor-control p { grid-column:auto; }
}

@media (max-width:760px) {
  .brand-area > .theme-switcher {
    min-width:72px !important;
    margin-left:2px !important;
  }
}

@media (max-width:620px) {
  .theme-switcher-label { font-size:.56rem !important; }
  .brand-area > .theme-switcher { min-width:66px !important; }
}

@media (max-width:520px) {
  .brand-area > .theme-switcher {
    min-width:36px !important;
  }
  .theme-switcher-label { display:none !important; }
}

@media (max-width:700px) {
  .footer-bottom { grid-template-columns:1fr; text-align:center; }
  .footer-credit { text-align:center; }
}
