/* Demo identity on the shared Fondital/tqstyle component contracts. */
:root { --tq-primary: #2563eb; --tq-primary-2: #1d4ed8; --tq-bg: #f4f7fb; }
.tq-demo-navbar .navbar-brand img { width: 120px; height: auto; }
.tq-demo-navbar .navbar-nav { align-items: center; }
.tq-demo-navbar .nav-link { font-weight: 600; padding: .6rem .75rem; }
.tq-demo-navbar .dropdown-menu { border-color: var(--tq-border); box-shadow: var(--tq-shadow); }
.tq-demo-hero { background: radial-gradient(ellipse at 90% 10%, #244ea0 0, transparent 47%), linear-gradient(120deg, #101d36, #142c50); color: var(--tq-text-inverse); }
.tq-demo-hero .container { min-height: 440px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.tq-demo-eyebrow { color: #afc9fb; letter-spacing: .12em; font-size: .875rem; font-weight: 700; }
.tq-demo-title { max-width: 840px; font-size: clamp(2.25rem, 4.7vw, 4rem); font-weight: 700; line-height: 1.08; letter-spacing: -.045em; color: inherit; }
.tq-demo-subtitle { max-width: 680px; color: #c9d8ee; font-size: 1.2rem; line-height: 1.6; }
.tq-demo-card { background: var(--tq-surface); border: 1px solid var(--tq-border); border-radius: 12px; box-shadow: var(--tq-shadow-soft); }
.tq-demo-workspace-nav { padding: 1rem; background: var(--tq-surface); border-bottom: 1px solid var(--tq-border); }
.tq-demo-workspace-nav .nav-link { font-weight: 600; padding: .6rem .8rem; border-radius: var(--tq-radius); }
.tq-demo-workspace-nav .nav-link.active { color: var(--tq-primary); background: var(--tq-primary-soft); }
.tq-crm-workspace-section, .tq-crm-page-intro { padding: 1.5rem; }
.tq-crm-table { background: var(--tq-surface); border: 1px solid var(--tq-border); border-radius: var(--tq-radius); }
.tq-demo-login-form .login_form { width: min(100%, 460px); border: 1px solid var(--tq-border); box-shadow: var(--tq-shadow); }
@media (max-width: 767px) { .tq-demo-hero .container { min-height: 380px; } .tq-demo-hero .container, #demo-modules { padding: 2.5rem 1.25rem !important; } .tq-crm-workspace-section, .tq-crm-page-intro { padding: 1rem; } }

body { background: var(--tq-bg); color: var(--tq-text); }
.tq-demo-navbar { margin: 0; width: 100%; border-radius: 0; }
.tq-demo-navbar .navbar-collapse { justify-content: flex-end; gap: 1.5rem; }
.tq-demo-navbar .btn-outline-light { color: var(--tq-primary); border-color: var(--tq-primary); }
.tq-demo-navbar .btn-outline-light:hover { color: #fff; background: var(--tq-primary); }
/* Contenitore della testata senza padding in entrambi gli stati di scorrimento (tqtheme alterna scrollDown/scrollUp;
   il padding 24px animato di tqstyle-fondital staccava la testata dai bordi dopo una risalita). */
#appcontainer > .container-fluid:has(> header > .tq-demo-navbar) { padding: 0; transition: none; }

/* tQuadra CRM identity over the complete Fondital component theme: primary derived from the logo blue
   (#3080c0) and darkened to keep text on white and on the soft tint at WCAG AA (5.8:1 and 5.1:1). */
:root {
 --tq-primary:#1d68a8; --tq-primary-2:#174f80; --tq-primary-soft:#e8f1f9;
 --tq-primary-selected:#d3e4f3; --tq-link:#1d68a8; --tq-link-hover:#174f80;
 --tq-bg:#f2f4f7; --tq-surface:#fff; --tq-card:#fff; --tq-text:#1c2430;
 --tq-text-strong:#16324f; --tq-text-body:#1c2430; --tq-muted:#566170;
 --tq-border:#d9dee6; --tq-border-strong:#c3cad4; --tq-success:#1e7b45; --tq-danger:#b42318; --tq-radius:6px;
 --tq-app-accent:#1d68a8; --tq-app-accent-2:#3080c0;
 --tq-shadow-soft:0 2px 4px rgba(22,50,79,.06);
 --tq-shadow:0 4px 16px rgba(22,50,79,.12); --tq-font-size-base:1rem;
 --tq-topbar-height:82px;
 --bs-primary:#1d68a8; --bs-body-bg:#f2f4f7; --bs-body-color:#1c2430;
}
body #appcontainer { background:var(--tq-bg); color:var(--tq-text); }
body .tq-demo-navbar { background:#fff!important; border-top:4px solid var(--tq-primary); box-shadow:0 2px 6px rgba(22,50,79,.07); min-height:var(--tq-topbar-height); }
body .tq-demo-navbar .navbar-brand img { filter:none; width:120px; }
body .tq-demo-navbar .nav-link { color:var(--tq-text-strong); }
body .tq-demo-navbar .nav-link.active { color:var(--tq-primary); border-bottom:2px solid var(--tq-primary); }
body .tq-crm-panel { border-radius:var(--tq-radius); border-color:var(--tq-border); box-shadow:var(--tq-shadow-soft); }
body .tq-crm-panel-title { border-top:3px solid var(--tq-primary); background:#fafbfc; padding:16px 20px; color:var(--tq-text-strong); border-radius:6px 6px 0 0; }
body .tq-crm-summary { padding:18px 20px; font-size:1rem; }
body .tq-crm-summary .small { font-size:1rem; }
body .tq-crm-summary .fw-semibold { color:var(--tq-text-strong); }
body .tq-crm-table { border-radius:6px; box-shadow:var(--tq-shadow-soft); }
body .tq-crm-page .btn-primary { background:var(--tq-primary); border-color:var(--tq-primary); }
body .tq-crm-page .btn-primary:hover { background:var(--tq-primary-2); border-color:var(--tq-primary-2); }
body .tq-crm-page .fixedDataTableLayout_header .public_fixedDataTableCell_cellContent { background:#f3f5f8; color:var(--tq-text-strong); font-weight:600; }
body .tq-crm-page .public_fixedDataTableCell_cellContent { font-size:1rem; }
body .tq-crm-page .fixedDataTableRowLayout_rowWrapper:hover .public_fixedDataTableCell_cellContent { background:#f3f8fc; }
body .tq-crm-page .containerEventoInterno > strong { font-size:.875rem; }
body .tq-crm-page .pagination-with-numresults { align-items:center; padding:10px 0; margin:0; }
body .tq-crm-page .pagination-with-numresults .result-pagination { display:flex; justify-content:flex-end; align-items:center; }
body .tq-crm-page .searchContainer { margin-bottom:0; }
body .tq-crm-page .search-submit { background:var(--tq-primary); border-color:var(--tq-primary); }
body .tq-crm-page .public_fixedDataTableCell_wrap1.tq-crm-table { box-shadow:none; border:0; border-radius:0; }
body #appcontainer .tq-demo-hero .tq-demo-title { color:#fff; }

/* 1) Testata piu compatta stile Lightning — nav.tq-demo-navbar.navbar.py-3.px-3.px-lg-4 da 86px a 60px (border-top 4px incluso) */
:root { --tq-topbar-height:56px; }
body .tq-demo-navbar { padding-top:6px !important; padding-bottom:6px !important; }
body .tq-demo-navbar .navbar-brand img { width:104px; }

/* 2) Toolbar calendario Lightning neutra — dentro .tq-crm-page bottoni Oggi/frecce/Mese */
body .tq-crm-page .calendarToolbar button.navigationBtn.text-white.btn.btn-secondary.btn-sm,
body .tq-crm-page .calendarToolbar button.btn.btn-success.btn-sm,
body .tq-crm-page .calendarToolbar button.btn.btn-info,
body .tq-crm-page .calendarToolbar .dropdown button.customDropdownToggle.btn.btn-secondary {
  height:32px;
  min-height:32px;
  background-color:var(--tq-surface);
  border:1px solid var(--tq-border-strong);
  color:var(--tq-primary);
}
body .tq-crm-page .calendarToolbar button.navigationBtn.text-white.btn.btn-secondary.btn-sm {
  color:var(--tq-primary) !important;
}
body .tq-crm-page .calendarToolbar button.navigationBtn.text-white.btn.btn-secondary.btn-sm:hover,
body .tq-crm-page .calendarToolbar button.btn.btn-success.btn-sm:hover,
body .tq-crm-page .calendarToolbar button.btn.btn-info:hover,
body .tq-crm-page .calendarToolbar .dropdown button.customDropdownToggle.btn.btn-secondary:hover {
  background-color:var(--tq-primary-soft);
  border-color:var(--tq-border-strong);
  color:var(--tq-primary);
}

/* 3) Weekend calendario neutralizzato — azzera rosso/rosa di tqstyle-fondital.css */
body .rbc-header:last-child {
  color:var(--tq-text-strong);
  background-color:var(--tq-surface-muted, #f8fafc);
  border-bottom-color:var(--tq-border);
}
body .rbc-row-bg .rbc-day-bg:last-child,
body .rbc-time-content .rbc-day-slot:last-child {
  background-color:var(--tq-surface-muted, #f8fafc);
}
body .rbc-day-slot.rbc-time-column:last-of-type .rbc-time-slot,
body .rbc-day-slot.rbc-time-column:last-of-type .rbc-timeslot-group {
  border-color:var(--tq-border);
}
body .react-calendar__month-view__days__day--weekend {
  color:var(--tq-muted);
}
body .react-calendar__month-view__weekdays__weekday--weekend {
  color:var(--tq-text-strong);
}
body .cal-day-weekend span[data-cal-date] {
  color:var(--tq-muted);
}

/* 4) Footer modali — Chiudi neutro e Salva primario */
body .modal-footer .btn-secondary,
body .modal .input-group .btn-secondary { 
  color:var(--tq-primary);
  background-color:var(--tq-surface);
  border:1px solid var(--tq-border-strong);
 }
body .modal-footer .btn-secondary:hover,
body .modal .input-group .btn-secondary:hover { 
  color:var(--tq-primary);
  background-color:var(--tq-primary-soft);
  border-color:var(--tq-border-strong);
 }
body .modal-footer .btn-secondary:focus-visible,
body .modal .input-group .btn-secondary:focus-visible { 
  outline:2px solid var(--tq-primary);
  outline-offset:2px;
 }
body .modal-footer .btn-success {
  color:var(--tq-surface);
  background-color:var(--tq-primary);
  border-color:var(--tq-primary);
}
body .modal-footer .btn-success:hover {
  color:var(--tq-surface);
  background-color:var(--tq-primary-2);
  border-color:var(--tq-primary-2);
}

/* 5) Export 375px — riallinea griglia pagination su due righe nella stessa media query di tqstyle-fondital.css (640px) */
/* Ricerca globale */
.tq-demo-navbar .tq-crm-header-search { flex:1 1 auto; max-width:480px; margin:0 auto; }
.tq-demo-navbar .tq-crm-header-search .tq-crm-global-search,
.tq-demo-navbar .tq-crm-header-search .simplesearchbar { width:100%; }
.tq-demo-navbar .tq-crm-header-search input,
.tq-demo-navbar .tq-crm-header-search .form-control,
.tq-demo-navbar .tq-crm-header-search .simplesearchbar input,
.tq-demo-navbar .tq-crm-header-search .simplesearchbar .form-control {
  height:34px;
  min-height:34px;
  border:1px solid var(--tq-border-strong);
  border-radius:var(--tq-radius);
  background:var(--tq-surface-muted, #f3f3f3);
  box-shadow:none;
}
.tq-demo-navbar .tq-crm-header-search input:focus,
.tq-demo-navbar .tq-crm-header-search .form-control:focus,
.tq-demo-navbar .tq-crm-header-search .simplesearchbar input:focus,
.tq-demo-navbar .tq-crm-header-search .simplesearchbar .form-control:focus {
  border-color:var(--tq-primary);
  box-shadow:0 0 0 2px var(--tq-primary-soft, rgba(29,104,168,.15));
  outline:none;
  background:var(--tq-surface, #fff);
}
@media (max-width: 991.98px) {
  .tq-demo-navbar .tq-crm-header-search { max-width:none; width:100%; margin:.5rem 0; }
  .tq-demo-navbar .navbar-collapse .tq-crm-header-search { flex-basis:100%; }
}
@media screen and (max-width: 640px) {
  body .pagination-with-numresults .result-number-select {
    grid-column:1;
    grid-row:2;
  }
  body .pagination-with-numresults .result-pagination {
    grid-column:1;
    grid-row:3;
  }
}

/* Home: spaziatura icona-numero nelle tre card */
.tq-demo-card .text-primary { display: inline-flex; align-items: center; gap: .5rem; }
/* Home: invito all'azione dell'hero (menu nativo azioni_home) */
.tq-demo-hero-cta .nav-item > .btn { background:var(--tq-primary); border:1px solid var(--tq-primary); color:#fff; font-weight:600; padding:8px 20px; border-radius:var(--tq-radius); }
.tq-demo-hero-cta .nav-item > .btn:hover,
.tq-demo-hero-cta .nav-item > .btn:focus-visible { background:var(--tq-primary-2); border-color:var(--tq-primary-2); color:#fff; }
/* Icone dei menu della testata e dell'invito all'azione */
.tq-demo-navbar .navbar-nav .nav-item > .btn .zmdi { margin-right:.375rem; font-size:1.125rem; vertical-align:-2px; }
.tq-demo-hero-cta .nav-item > .btn .zmdi { margin-left:.5rem; vertical-align:-1px; }

/* Testata sempre visibile durante lo scorrimento (tqtheme aggiunge .isfixed oltre i 50 px) */
:root { --tq-header-offset:61px; }
body .container-fluid:has(> header > .tq-demo-navbar) { position:sticky; top:0; z-index:1030; }
body .tq-demo-navbar.isfixed { box-shadow:0 2px 12px rgba(22,50,79,.12); }
/* Azioni di riga: icona Visualizza nel primario tQuadra invece dell'azzurro del profilo componenti. */
body .tq-crm-page [role=gridcell] .btn-info.actionItemContainer { color:var(--tq-primary); border-color:var(--tq-border-strong); }
body .tq-crm-page [role=gridcell] .btn-info.actionItemContainer:hover { background:var(--tq-primary-soft); }
