/* C4U Design System 2026 — camada exclusivamente visual */
:root{
  --c4u-brand:#6f4bf1;
  --c4u-brand-2:#8b6cf6;
  --c4u-brand-soft:#f0ebff;
  --c4u-brand-softer:#f8f6ff;
  --c4u-ink:#21183a;
  --c4u-muted:#7b7391;
  --c4u-line:#e8e3f3;
  --c4u-surface:#ffffff;
  --c4u-bg:#f7f6fb;
  --c4u-success:#1ea968;
  --c4u-warning:#dc9417;
  --c4u-danger:#d84f63;
  --c4u-radius:16px;
  --c4u-radius-lg:22px;
  --c4u-shadow:0 8px 28px rgba(65,42,111,.07);
  --c4u-shadow-hover:0 14px 34px rgba(65,42,111,.12);
}

html,body{font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif!important;background:var(--c4u-bg)!important;color:var(--c4u-ink)!important}
body.c4u-design-2026{letter-spacing:-.005em}
body.c4u-design-2026 *{box-sizing:border-box}

/* ÍCONES */
.c4u-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;min-width:20px;color:currentColor;vertical-align:middle}
.c4u-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.c4u-icon.c4u-icon-sm{width:16px;height:16px;min-width:16px}
.c4u-icon.c4u-icon-lg{width:28px;height:28px;min-width:28px}
.c4u-icon.c4u-icon-xl{width:38px;height:38px;min-width:38px}
.c4u-icon-filled svg .fill{fill:currentColor;stroke:none}

/* SIDEBAR — ícones de uma única família */
#appShell .classic-sidebar{background:#fff!important;border-right:1px solid var(--c4u-line)!important;box-shadow:none!important}
#appShell .classic-sidebar .classic-brand{border-color:var(--c4u-line)!important}
#appShell .classic-sidebar .section-toggle{color:#8b849c!important;font-size:9px!important;font-weight:800!important;letter-spacing:.12em!important;text-transform:uppercase}
#appShell .classic-sidebar .nav-item{
  min-height:40px!important;height:auto!important;padding:9px 11px!important;border-radius:11px!important;
  color:#403656!important;font-size:12px!important;font-weight:650!important;gap:10px!important;
  transition:background .16s ease,color .16s ease,transform .16s ease!important
}
#appShell .classic-sidebar .nav-item:hover{background:#f6f2ff!important;color:#5d3fd8!important;transform:translateX(1px)!important}
#appShell .classic-sidebar .nav-item.active{background:linear-gradient(90deg,#eee8ff 0%,#f7f4ff 100%)!important;color:#613df0!important;box-shadow:none!important}
#appShell .classic-sidebar .nav-item.active::before{width:3px!important;left:0!important;top:7px!important;bottom:7px!important;border-radius:99px!important;background:#6f4bf1!important}
#appShell .classic-sidebar .nav-item>.c4u-icon{width:19px;height:19px;min-width:19px;color:#52466f}
#appShell .classic-sidebar .nav-item.active>.c4u-icon{color:#6f4bf1}
#appShell .classic-sidebar .nav-item .nav-svg,
#appShell .classic-sidebar .nav-item .c4u-nav-symbol{display:none!important}
#appShell .classic-sidebar .chat-nav-badge{margin-left:auto;border-radius:999px;background:#6f4bf1!important;color:#fff!important;min-width:20px;height:20px;padding:0 6px;font-size:10px}

/* TOPBAR */
#appShell .classic-topbar{background:rgba(255,255,255,.94)!important;border-bottom:1px solid var(--c4u-line)!important;box-shadow:0 4px 22px rgba(64,42,108,.04)!important;backdrop-filter:blur(12px)}
#appShell .classic-topbar h1{color:var(--c4u-ink)!important;font-weight:780!important;letter-spacing:-.025em}
#appShell .classic-topbar p{color:var(--c4u-muted)!important}
.global-search-wrap{background:#faf9fd!important;border:1px solid var(--c4u-line)!important;border-radius:14px!important;box-shadow:none!important}
.global-search-wrap:focus-within{background:#fff!important;border-color:#cfc0ff!important;box-shadow:0 0 0 4px rgba(111,75,241,.07)!important}
.global-search-wrap input{color:var(--c4u-ink)!important}
.global-search-wrap kbd{background:#fff!important;border:1px solid var(--c4u-line)!important;color:#807795!important;border-radius:8px!important}
.hamb,.top-badge-button,.online-users-button,.top-profile-button{border:1px solid var(--c4u-line)!important;background:#fff!important;border-radius:12px!important;color:#4c4261!important;box-shadow:none!important}
.hamb:hover,.top-badge-button:hover,.online-users-button:hover,.top-profile-button:hover{background:#f7f4ff!important;color:#6846e8!important;border-color:#ddd2ff!important}

/* PÁGINAS / CARDS */
.content{background:var(--c4u-bg)!important}
.page-head h2,.calendar-head h2,.route-head h2{color:var(--c4u-ink)!important;font-weight:780!important;letter-spacing:-.025em}
.page-head p,.calendar-head p,.route-head p,.muted{color:var(--c4u-muted)!important}
.card,.panel,.page-card,.table-wrap,.modal-card,.calendar-card,.calendar-agenda,.import-action,.file-filters{
  background:var(--c4u-surface)!important;border:1px solid var(--c4u-line)!important;border-radius:var(--c4u-radius-lg)!important;box-shadow:var(--c4u-shadow)!important
}
.page-card{border-top:1px solid var(--c4u-line)!important}

/* BOTÕES — texto + ícone consistente */
.btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;border-radius:11px!important;font-weight:700!important;transition:transform .15s ease,box-shadow .15s ease,background .15s ease!important}
.btn:hover{transform:translateY(-1px)}
.btn>.c4u-icon{width:17px;height:17px;min-width:17px}
.btn-primary{background:linear-gradient(135deg,#6f4bf1,#8666f6)!important;color:#fff!important;box-shadow:0 6px 16px rgba(111,75,241,.18)!important}
.btn-primary:hover{box-shadow:0 9px 21px rgba(111,75,241,.24)!important}
.btn-light{background:#f7f4ff!important;color:#574676!important;border:1px solid #e8e0fb!important}
.btn-light:hover{background:#f0eaff!important;color:#633ff0!important}
.btn-success{background:#e9f8f0!important;color:#167247!important;border:1px solid #d3efdf!important}
.btn-danger{background:#fff0f2!important;color:#bd3e53!important;border:1px solid #f7dce1!important}
.btn-sm{border-radius:9px!important}
.action-menu summary{list-style:none!important}
.action-menu summary::-webkit-details-marker{display:none}
.action-menu-panel{border:1px solid var(--c4u-line)!important;border-radius:14px!important;box-shadow:var(--c4u-shadow-hover)!important;overflow:hidden!important;background:#fff!important}

/* INPUTS */
.search,input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select,textarea{
  border:1px solid var(--c4u-line)!important;background:#fff!important;border-radius:11px!important;color:var(--c4u-ink)!important;box-shadow:none!important
}
.search:focus,input:focus,select:focus,textarea:focus{outline:none!important;border-color:#cbbcff!important;box-shadow:0 0 0 4px rgba(111,75,241,.07)!important}
.field label{color:#5f5575!important;font-weight:700!important}

/* TABELAS */
.table-wrap{overflow:hidden!important}
table{border-collapse:separate!important;border-spacing:0!important}
thead th{background:#faf9fd!important;color:#756b8d!important;font-size:10px!important;font-weight:800!important;letter-spacing:.06em!important;text-transform:uppercase!important;border-bottom:1px solid var(--c4u-line)!important}
tbody td{border-bottom:1px solid #f0edf6!important;color:#302744!important}
tbody tr:last-child td{border-bottom:0!important}
tbody tr:hover td{background:#fcfbff!important}

/* BADGES */
.badge{display:inline-flex!important;align-items:center!important;gap:6px!important;border-radius:999px!important;padding:5px 9px!important;font-weight:750!important;border:0!important}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.8}
.badge.green{background:#eaf8f0!important;color:#16764a!important}
.badge.amber{background:#fff5df!important;color:#a2690c!important}
.badge.red{background:#fff0f2!important;color:#c04458!important}

/* DASHBOARD */
.dashboard-v16{gap:14px!important}
.dash-welcome{border-radius:22px!important;background:linear-gradient(135deg,#231938 0%,#3a2861 100%)!important;box-shadow:0 14px 32px rgba(48,31,78,.18)!important}
.dash-kpi,.dash-panel,.dash-route-strip{border:1px solid var(--c4u-line)!important;border-radius:20px!important;box-shadow:var(--c4u-shadow)!important}
.dash-kpi-icon{border-radius:14px!important;box-shadow:none!important}
.dash-kpi-icon .c4u-icon{width:24px;height:24px;color:inherit}
.dash-order-row,.dash-agenda-row,.dash-message-row{border-radius:13px!important;border:1px solid #eee9f6!important;background:#fcfbff!important}
.dash-avatar{border-radius:12px!important}

/* CALENDÁRIO */
.calendar-card,.calendar-agenda{border-radius:20px!important}
.calendar-day{border-radius:13px!important;border:1px solid #eeeaf5!important;background:#fff!important;transition:.15s ease!important}
.calendar-day:hover{border-color:#d8ccfb!important;box-shadow:0 8px 18px rgba(76,48,126,.08)!important;transform:translateY(-1px)}
.calendar-day.today{background:#f6f2ff!important;border-color:#d9cdff!important}
.calendar-day.selected{background:#6f4bf1!important;border-color:#6f4bf1!important;color:#fff!important}
.calendar-day.selected strong{color:#fff!important}
.cal-icon{background:#f2edff!important;color:#6f4bf1!important;border-radius:8px!important;font-size:0!important}
.cal-icon>.c4u-icon{width:14px;height:14px}
.calendar-day.selected .cal-icon{background:rgba(255,255,255,.16)!important;color:#fff!important}
.agenda-icon{font-size:0!important;background:#f0ebff!important;color:#6f4bf1!important;border-radius:10px!important}
.agenda-icon>.c4u-icon{width:18px;height:18px}
.agenda-item{border:1px solid #eee9f6!important;background:#fcfbff!important;border-radius:13px!important}

/* ARQUIVOS — de lista "TXT" para cards visuais */
.file-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))!important;gap:14px!important}
.file-card{display:grid!important;grid-template-columns:64px 1fr!important;align-items:start!important;gap:12px!important;padding:16px!important;border-radius:18px!important;min-height:150px!important;transition:.16s ease!important}
.file-card:hover{transform:translateY(-2px);box-shadow:var(--c4u-shadow-hover)!important;border-color:#ded4f7!important}
.file-icon{width:58px!important;height:58px!important;border-radius:16px!important;background:linear-gradient(145deg,#f0eaff,#e1d4ff)!important;color:#734cf0!important;display:grid!important;place-items:center!important;font-size:0!important}
.file-icon>.c4u-icon{width:30px;height:30px}
.file-info{gap:5px!important;min-width:0}
.file-info b{font-size:13px!important;color:#2b2140!important;white-space:normal!important;line-height:1.25!important}
.file-info small,.file-info span{font-size:9px!important;color:#817890!important;line-height:1.4!important}
.file-actions{grid-column:1/-1!important;display:flex!important;gap:7px!important;padding-top:6px!important;border-top:1px solid #f0ecf7!important}
.file-actions .btn{flex:1!important}

/* cartões de pasta adicionados por módulos atuais/futuros */
.folder-card,.c4u-folder-card,[data-c4u-folder]{background:#fff!important;border:1px solid var(--c4u-line)!important;border-radius:18px!important;box-shadow:var(--c4u-shadow)!important}
.folder-icon,.c4u-folder-icon{width:54px;height:54px;border-radius:15px;background:linear-gradient(145deg,#8e6df5,#b194ff);color:#fff;display:grid;place-items:center}
.folder-icon>.c4u-icon,.c4u-folder-icon>.c4u-icon{width:32px;height:32px}

/* BIBLIOTECA */
.library-card{border:1px solid var(--c4u-line)!important;border-radius:18px!important;box-shadow:var(--c4u-shadow)!important;transition:.16s ease!important}
.library-card:hover{transform:translateY(-2px);box-shadow:var(--c4u-shadow-hover)!important;border-color:#ded4f7!important}
.library-card-image{background:linear-gradient(180deg,#faf9fd,#f6f3fb)!important}
.library-card-body{padding:15px!important}
.library-price{background:#f8f5ff!important;border:1px solid #eee8fb!important}
.mini-product-img{border-radius:10px!important;background:#f1ecff!important;color:#6f4bf1!important}
.upload-box{border-color:#d8cdf7!important;background:#faf8ff!important;color:#6944e6!important}

/* ORÇAMENTO — não muda estrutura, só acabamento */
.quote-primary-info,.library-quote-bar,.item-card,.details-block,.calc-row{border-color:var(--c4u-line)!important}
.library-quote-bar{background:#faf8ff!important;border:1px solid #ebe4fb!important;border-radius:14px!important;padding:11px!important}
.item-card{border-radius:18px!important;box-shadow:var(--c4u-shadow)!important;background:#fff!important}
.item-card .thumb{border-radius:14px!important;background:#f7f4fb!important;border:1px solid #eee9f5!important}
.details-block{border-radius:13px!important;background:#fcfbff!important}
.section-title{color:#574774!important;font-weight:800!important}

/* DOCUMENTOS / MODELOS */
.document-row,.template-card,.quality-entry{border:1px solid var(--c4u-line)!important;border-radius:16px!important;background:#fff!important;box-shadow:var(--c4u-shadow)!important}
.document-icon,.template-icon{font-size:0!important;background:linear-gradient(145deg,#eee8ff,#e0d3ff)!important;color:#6f4bf1!important;border-radius:13px!important}
.document-icon>.c4u-icon,.template-icon>.c4u-icon{width:23px;height:23px}

/* MODAIS */
.modal-overlay{background:rgba(31,24,47,.42)!important;backdrop-filter:blur(5px)!important}
.modal-card{border-radius:20px!important;box-shadow:0 28px 80px rgba(43,30,68,.24)!important}

/* estados escuros: mantém coerência se o tema for usado */
html[data-theme="dark"] body.c4u-design-2026{--c4u-bg:#17131d;--c4u-surface:#211a28;--c4u-ink:#f3eef8;--c4u-muted:#a99eb5;--c4u-line:#3b3145;--c4u-brand-soft:#302442;--c4u-brand-softer:#251d2d;background:#17131d!important}
html[data-theme="dark"] #appShell .classic-sidebar{background:#1d1724!important;border-color:#3b3145!important}
html[data-theme="dark"] #appShell .classic-sidebar .nav-item{color:#d8cfdf!important}
html[data-theme="dark"] #appShell .classic-sidebar .nav-item.active{background:#35274a!important;color:#d9c9ff!important}
html[data-theme="dark"] .card,html[data-theme="dark"] .panel,html[data-theme="dark"] .page-card,html[data-theme="dark"] .table-wrap,html[data-theme="dark"] .modal-card{background:#211a28!important}

@media(max-width:900px){
 .file-grid{grid-template-columns:1fr!important}
 #appShell .classic-sidebar .nav-item{min-height:42px!important}
}

/* ==========================================================
   C4U DESIGN SYSTEM 2026 v1.1 — CORREÇÕES DE COMPATIBILIDADE
   Mantém a topbar e o cabeçalho do Dashboard com o layout
   original do C4U e neutraliza camadas visuais antigas.
   ========================================================== */

/* Topbar: preservar o desenho original do sistema. */
body.c4u-design-2026 #appShell .classic-topbar{
  display:flex!important;
  top:0!important;
  height:70px!important;
  min-height:70px!important;
  padding:0 24px!important;
  background:rgba(255,255,255,.88)!important;
  border:0!important;
  border-bottom:1px solid var(--border)!important;
  border-radius:0!important;
  box-shadow:0 3px 20px rgba(79,43,130,.025)!important;
  backdrop-filter:blur(14px)!important;
}
body.c4u-design-2026 #appShell .top-left{gap:13px!important;min-width:0!important}
body.c4u-design-2026 #appShell .classic-topbar h1{
  font-size:21px!important;font-weight:650!important;line-height:1.1!important;
  letter-spacing:-.025em!important;margin:0!important;color:#273047!important
}
body.c4u-design-2026 #appShell .classic-topbar p{
  font-size:11px!important;color:#788098!important;margin:2px 0 0!important
}
body.c4u-design-2026 #appShell .classic-top-actions{gap:6px!important}
body.c4u-design-2026 #appShell .classic-top-actions .global-search-wrap{
  width:min(430px,38vw)!important;margin:0!important
}
body.c4u-design-2026 #appShell .global-search-wrap{
  min-height:38px!important;height:38px!important;padding:0!important;
  background:#fff!important;border:1px solid #e2dbf0!important;
  border-radius:12px!important;box-shadow:0 3px 11px rgba(73,35,133,.025)!important
}
body.c4u-design-2026 #appShell .global-search-wrap:focus-within{
  border-color:#a185d8!important;box-shadow:0 0 0 3px rgba(96,37,170,.08)!important
}
body.c4u-design-2026 #appShell .global-search-wrap input{
  font-size:12px!important;color:#273047!important;background:transparent!important;border:0!important;border-radius:0!important;padding:0 8px!important;box-shadow:none!important
}
body.c4u-design-2026 #appShell .global-search-wrap input::placeholder{color:#8b90a3!important}
body.c4u-design-2026 #appShell .global-search-wrap kbd{
  margin-left:auto!important;margin-right:8px!important;background:#f7f3fd!important;
  border:1px solid var(--border)!important;color:#807393!important;border-radius:5px!important;
  padding:2px 6px!important;font-size:9px!important
}
body.c4u-design-2026 #appShell .hamb,
body.c4u-design-2026 #appShell .top-badge-button{
  width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;
  border:1px solid transparent!important;border-radius:7px!important;
  background:transparent!important;color:#655778!important;box-shadow:none!important
}
body.c4u-design-2026 #appShell .hamb:hover,
body.c4u-design-2026 #appShell .top-badge-button:hover{
  color:#6025aa!important;background:#f1ebfc!important;border-color:#e4d9f8!important
}
body.c4u-design-2026 #appShell .online-users-button,
body.c4u-design-2026 #appShell .top-profile-button{
  height:38px!important;background:#fff!important;color:#4a415a!important;
  border:0!important;border-left:1px solid var(--border)!important;border-radius:0!important;
  box-shadow:none!important
}
body.c4u-design-2026 #appShell .online-users-button{padding:0 9px 0 15px!important;margin-left:3px!important}
body.c4u-design-2026 #appShell .top-profile-button{padding:0 9px 0 12px!important;margin-left:2px!important}
body.c4u-design-2026 #appShell .top-profile-avatar{width:30px!important;height:30px!important;border-radius:50%!important}
body.c4u-design-2026 #appShell .top-profile-copy b{color:#283247!important}
body.c4u-design-2026 #appShell .top-profile-copy small{color:#788098!important}

/* Camadas experimentais antigas podem ter colocado uma data extra na topbar. */
body.c4u-design-2026 #ultraTopbarMeta{display:none!important}

/* Dashboard: cabeçalho volta ao original, sem faixa/bloco roxo gigante. */
body.c4u-design-2026 #appShell .dash-welcome{
  display:flex!important;align-items:flex-end!important;justify-content:space-between!important;
  gap:12px!important;padding:2px 2px 6px!important;margin:0!important;
  min-height:0!important;background:transparent!important;background-image:none!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;color:inherit!important
}
body.c4u-design-2026 #appShell .dash-welcome::before,
body.c4u-design-2026 #appShell .dash-welcome::after{display:none!important;content:none!important}
body.c4u-design-2026 #appShell .dash-welcome h2{
  font-size:30px!important;font-weight:650!important;line-height:1.1!important;
  margin:3px 0 0!important;letter-spacing:-.035em!important;color:#263047!important
}
body.c4u-design-2026 #appShell .dash-welcome p{
  margin:2px 0 0!important;font-size:12px!important;color:#758098!important
}
body.c4u-design-2026 #appShell .dash-eyebrow{
  font-size:9px!important;letter-spacing:.12em!important;color:#758098!important;font-weight:700!important
}
body.c4u-design-2026 #appShell .dash-welcome-actions{display:flex!important;gap:7px!important;align-items:center!important}

/* Não deixar estilos antigos de interface ultra alterarem a topbar/dashboard. */
body.c4u-design-2026.c4u-ultra-ui #appShell .classic-topbar,
body.c4u-design-2026.c4u-ultra-ui #appShell .dash-welcome{transform:none!important}

@media(max-width:760px){
  body.c4u-design-2026 #appShell .classic-topbar{height:64px!important;min-height:64px!important;padding:0 12px!important}
  body.c4u-design-2026 #appShell .classic-top-actions .global-search-wrap{display:none!important}
  body.c4u-design-2026 #appShell .dash-welcome{align-items:flex-start!important;flex-direction:column!important}
  body.c4u-design-2026 #appShell .dash-welcome-actions{width:100%!important}
}
