/* ============================================================
   Fazedoria SGE — Tema (FazOS Design System, oficial)
   Fontes: Sora (display) · Plus Jakarta Sans (UI) · JetBrains Mono
   Primária #0E6FF0 · Accent cyan #19B5FD · Navy #0A2350 / #04102A
   Aplica no Desk (área interna) e nas páginas web/login/portal.
   ============================================================ */

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

:root {
  /* ---- Tokens FazOS ---- */
  --fz-navy-900:#04102A; --fz-navy-800:#07193A; --fz-navy-700:#0A2350; --fz-navy-600:#103063; --fz-navy-500:#1B4486;
  --fz-blue-700:#0B57D0; --fz-blue-600:#0E6FF0; --fz-blue-500:#1E88FF;
  --fz-cyan-500:#11A8F0; --fz-cyan-400:#19B5FD; --fz-cyan-300:#5CCBFF; --fz-cyan-200:#A6E2FF;
  --fz-white:#FFFFFF; --fz-gray-50:#F2F6FC; --fz-gray-100:#E8EFF8; --fz-gray-200:#D8E2F1;
  --fz-gray-300:#BCCBE0; --fz-gray-400:#94A6C0; --fz-gray-500:#64748B; --fz-gray-600:#475569; --fz-gray-700:#334155;
  --fz-grad-os: linear-gradient(95deg, #0E6FF0 0%, #19B5FD 100%);
  --fz-font-display:'Sora','Plus Jakarta Sans',system-ui,sans-serif;
  --fz-font-sans:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --fz-font-mono:'JetBrains Mono','SF Mono',ui-monospace,monospace;
  --fz-shadow-sm:0 2px 6px rgba(10,35,80,.07);
  --fz-shadow-md:0 8px 24px rgba(10,35,80,.09);
  --fz-shadow-lg:0 18px 48px rgba(10,35,80,.12);

  /* ---- Sobrescreve a paleta azul do Frappe ---- */
  --primary:#0E6FF0; --primary-color:#0E6FF0;
  --blue-400:#1E88FF; --blue-500:#0E6FF0; --blue-600:#0B57D0; --blue-700:#0B57D0;
  --text-color:#0A2350; --heading-color:#0A2350; --text-muted:#64748B;
  --text-on-primary:#fff;
  --border-radius:10px; --border-radius-sm:6px; --border-radius-md:14px; --border-radius-lg:20px; --border-radius-full:999px;
  --bg-color:#F2F6FC; --fg-color:#FFFFFF; --card-bg:#FFFFFF;
  --navbar-bg:#FFFFFF; --fg-hover-color:#E8EFF8;
}

/* ---- Tipografia ---- */
body, .desk, .navbar, input, button, select, textarea, .form-control,
.control-value, .ellipsis, .modal, .page-body {
  font-family: var(--fz-font-sans) !important;
  color: var(--fz-navy-700);
}
h1,h2,h3,h4,h5,.page-title,.title-text,.page-head .title-text,.modal-title,.section-head {
  font-family: var(--fz-font-display) !important;
  font-weight: 700; letter-spacing: -0.01em;
}
.dt-cell__content,.dt-instance .dt-cell,table.table td,.grid-static-col,
.indicator-pill,.list-row-col,.report-summary .summary-value,.number-card .widget-content {
  font-family: var(--fz-font-mono); font-feature-settings:"tnum";
}

/* ---- Fundo geral ---- */
body { background-color: var(--fz-gray-50) !important; }
.layout-main-section, .page-body, .layout-main { background-color: var(--fz-gray-50); }

/* ---- Botões primários ---- */
.btn-primary,.btn-primary:focus,.btn.btn-primary {
  background-color: var(--fz-blue-600) !important;
  border-color: var(--fz-blue-600) !important;
  color:#fff !important; border-radius:10px !important; font-weight:600;
}
.btn-primary:hover,.btn.btn-primary:hover {
  background-color: var(--fz-blue-700) !important; border-color: var(--fz-blue-700) !important;
}
.btn { border-radius:10px !important; }
.btn-default { border-radius:10px !important; }

/* ---- Links / acentos ---- */
a,.text-primary,.ql-editor a { color: var(--fz-blue-600); }
.indicator-pill.blue,.indicator.blue::before { color: var(--fz-blue-600); }
::selection { background: var(--fz-cyan-200); color: var(--fz-navy-700); }

/* ============================================================
   SIDEBAR DO DESK → NAVY (DS) — ALTO CONTRASTE
   ============================================================ */
.desk-sidebar, .standard-sidebar, .layout-side-section .sidebar-menu,
.body-sidebar, .desk-sidebar .standard-sidebar, .sidebar-standard-icons,
.layout-side-section { background-color: #04102A !important; }

/* Marca FazOS (a marca/ícone) no topo da sidebar */
.desk-sidebar .standard-sidebar::before, .standard-sidebar::before {
  content:""; display:block; height:30px; margin:16px 18px 12px;
  background:url('/assets/fazedoria_theme/images/fazos-mark.png') no-repeat left center;
  background-size:contain;
}

/* Texto dos itens: claro e legível (DS text-on-dark #EAF2FF) */
.desk-sidebar a, .desk-sidebar .sidebar-item-label, .desk-sidebar .item-anchor,
.standard-sidebar-item, .standard-sidebar-item .sidebar-item-label,
.standard-sidebar-section .sidebar-item-label, .desk-sidebar .standard-sidebar-label,
.desk-sidebar .sidebar-item-control, .desk-sidebar span {
  color:#EAF2FF !important; opacity:1 !important; font-weight:500 !important;
  font-family:'Plus Jakarta Sans',sans-serif !important;
}
.desk-sidebar svg, .standard-sidebar-item svg { stroke:#A6C2EC !important; opacity:1 !important; }
.standard-sidebar-item:hover { background-color:rgba(255,255,255,.08) !important; }
.standard-sidebar-item:hover .sidebar-item-label, .standard-sidebar-item:hover a { color:#FFFFFF !important; }

/* Selecionado = pílula clara com texto navy (legível) */
.desk-sidebar .standard-sidebar-item.selected, .standard-sidebar-item.selected {
  background:#FFFFFF !important; border-radius:10px;
}
.standard-sidebar-item.selected .sidebar-item-label, .standard-sidebar-item.selected a,
.standard-sidebar-item.selected { color:#0A2350 !important; }
.standard-sidebar-item.selected svg { stroke:#0E6FF0 !important; }

/* Nome do workspace + subtítulo no topo */
.desk-sidebar .standard-sidebar-section .standard-sidebar-label,
.sidebar-section-title, .desk-sidebar .title-area,
.desk-sidebar .workspace-title { color:#FFFFFF !important; }
.desk-sidebar .sidebar-item-control .small, .desk-sidebar .small,
.workspace-title .small { color:#90A8CE !important; }

/* ---- Navbar (clara, p/ logo colorido aparecer) ---- */
.navbar {
  background-color: var(--fz-white) !important;
  border-bottom: 1px solid var(--fz-gray-200) !important;
  box-shadow: var(--fz-shadow-sm);
}
.navbar .navbar-brand img, .app-logo, .navbar-home img { max-height:26px; }

/* ---- Cards / seções / inputs ---- */
.widget, .frappe-card, .dashboard-graph, .number-card, .ce-block__content,
.form-section, .new-timeline .timeline-item, .comment-box {
  border-radius: 20px !important;
}
.widget, .number-card, .dashboard-graph {
  box-shadow: var(--fz-shadow-md); border:1px solid var(--fz-gray-200);
}
.form-control, .input-with-feedback, .like-disabled-input, .control-input input,
.awesomplete > input, .select-input { border-radius:8px !important; }
.form-control:focus, .input-with-feedback:focus {
  border-color: var(--fz-blue-600) !important;
  box-shadow: 0 0 0 3px rgba(14,111,240,.18) !important;
}
.modal-content { border-radius:20px !important; }

/* ---- Página de login / web ---- */
.page-card { border-radius:20px !important; box-shadow: var(--fz-shadow-lg) !important; }
.page-card .btn-primary, .for-login .btn-primary, #login .btn-login,
.btn-login, .login-content .btn-primary {
  background: var(--fz-blue-600) !important; border-color: var(--fz-blue-600) !important;
}
.web-sidebar .current, .web-list-item:hover { border-color: var(--fz-blue-600); }

/* ---- Status semânticos do DS ---- */
.indicator-pill.green,.indicator.green::before { color:#16A34A; }
.indicator-pill.orange,.indicator.orange::before { color:#E89400; }
.indicator-pill.red,.indicator.red::before { color:#E11D48; }

/* ============================================================
   CONTRASTE — nada de tom-sobre-tom (o DS proíbe)
   ============================================================ */
.text-muted, .text-extra-muted, .small.text-muted, .control-label,
.frappe-control .help-box, .sidebar-label, .ellipsis.text-muted {
  color: var(--fz-gray-600) !important;
}
.disabled, a.disabled, .grey-link, .link-item.disabled, .text-secondary {
  color: var(--fz-gray-500) !important; opacity: 1 !important;
}
.onboarding-step .step-title, .widget .widget-title, .link-item {
  color: var(--fz-navy-700) !important;
}
.list-row-col .ellipsis, .dt-cell__content { color: var(--fz-navy-700); }

/* ============================================================
   ESCONDER BRANDING FRAPPE (white-label)
   ============================================================ */
.powered-by, .powered-by-frappe, footer .powered, .web-footer-powered,
a[href*="frappe.io"], a[href*="frappecloud.com"],
.navbar .dropdown-help [data-label="About"],
.standard-footer-item.powered { display:none !important; }
