/* v4.44 — três modelos de estrutura (não só de cor). Carregado depois do modern_v427.css.
   Cada modelo muda o MENU e o desenho da página inteira:
     horizonte — menu em cima, com ícones e nome embaixo (estilo aplicativo)
     trilho    — menu fino só com ícones; ao passar o mouse ele abre com os nomes
     ilha      — menu e topo flutuando em cartões arredondados, tons de areia e bronze
   No celular (até 1100 px) os três usam o menu que abre pelo botão ☰, com as cores do modelo.
   Os seletores começam por html[data-theme=…] para vencer as regras antigas com !important. */

/* ───────────────────────── Cores ───────────────────────── */
html[data-theme="horizonte"], body[data-theme="horizonte"], body.theme-horizonte{
  --bg:#f6f7fb; --surface:#ffffff; --surface-2:#f8f9fc; --text:#0f172a; --muted:#64748b; --line:#e6e8ef;
  --primary:#4f46e5; --primary-2:#4338ca; --accent:#6366f1; --accent-2:#a5b4fc;
  --sidebar:#ffffff; --sidebar-text:#334155; --shadow:0 1px 3px rgba(15,23,42,.06); --radius:16px;
  --btn-radius:10px; --card-blur:0px; --panel-pad:22px; --table-head:#f8f9fc;
  --bg-main:#f6f7fb; --bg-sidebar:#ffffff; --bg-card:#ffffff; --bg-card-soft:#f3f4f9;
  --text-main:#0f172a; --text-muted:#64748b; --text-sidebar:#475569; --text-sidebar-active:#4338ca;
  --border-color:#e6e8ef; --primary-hover:#4338ca; --primary-soft:#eef0ff; --secondary:#64748b;
  --button-bg:#4f46e5; --button-text:#ffffff; --input-bg:#ffffff; --input-text:#0f172a; --input-border:#d9dce6;
  --shadow-card:0 1px 3px rgba(15,23,42,.06); --radius-card:16px; --topbar-bg:#ffffff;
  --badge-bg:#fee2e2; --badge-text:#b91c1c;
  --sidebar-bg:rgba(255,255,255,.92); --sidebar-border:#e6e8ef; --sidebar-text-muted:#475569; --sidebar-icon:#64748b;
  --sidebar-hover-bg:#f1f2f8; --sidebar-hover-text:#0f172a; --sidebar-active-bg:#eef0ff; --sidebar-active-text:#4338ca;
  --sidebar-active-border:#4f46e5; --sidebar-badge-bg:#fee2e2; --sidebar-badge-text:#b91c1c;
}
html[data-theme="trilho"], body[data-theme="trilho"], body.theme-trilho{
  --bg:#f3f5f4; --surface:#ffffff; --surface-2:#f7f9f8; --text:#111827; --muted:#5f6b67; --line:#e2e7e5;
  --primary:#0f766e; --primary-2:#115e59; --accent:#10b981; --accent-2:#6ee7b7;
  --sidebar:#0b1220; --sidebar-text:#e5edf0; --shadow:0 1px 2px rgba(16,24,40,.05); --radius:12px;
  --btn-radius:9px; --card-blur:0px; --panel-pad:20px; --table-head:#f5f8f7;
  --bg-main:#f3f5f4; --bg-sidebar:#0b1220; --bg-card:#ffffff; --bg-card-soft:#eef3f1;
  --text-main:#111827; --text-muted:#5f6b67; --text-sidebar:#cbd5e1; --text-sidebar-active:#ffffff;
  --border-color:#e2e7e5; --primary-hover:#115e59; --primary-soft:#e6f4f1; --secondary:#5f6b67;
  --button-bg:#0f766e; --button-text:#ffffff; --input-bg:#ffffff; --input-text:#111827; --input-border:#d5ddda;
  --shadow-card:0 1px 2px rgba(16,24,40,.05); --radius-card:12px; --topbar-bg:transparent;
  --badge-bg:#fee2e2; --badge-text:#b91c1c;
  --sidebar-bg:#0b1220; --sidebar-border:rgba(255,255,255,.08); --sidebar-text-muted:#94a3b8; --sidebar-icon:#94a3b8;
  --sidebar-hover-bg:rgba(255,255,255,.07); --sidebar-hover-text:#ffffff; --sidebar-active-bg:rgba(16,185,129,.16);
  --sidebar-active-text:#ffffff; --sidebar-active-border:#10b981; --sidebar-badge-bg:#fee2e2; --sidebar-badge-text:#b91c1c;
}
html[data-theme="ilha"], body[data-theme="ilha"], body.theme-ilha{
  --bg:#f3efe8; --surface:#fffdf9; --surface-2:#faf6ef; --text:#1f1a14; --muted:#7a6f60; --line:#ebe3d6;
  --primary:#1f1a14; --primary-2:#000000; --accent:#b08443; --accent-2:#d9b77c;
  --sidebar:#fffdf9; --sidebar-text:#3b3328; --shadow:0 10px 30px -12px rgba(60,40,10,.18); --radius:22px;
  --btn-radius:12px; --card-blur:0px; --panel-pad:24px; --table-head:#faf6ef;
  --bg-main:#f3efe8; --bg-sidebar:#fffdf9; --bg-card:#fffdf9; --bg-card-soft:#f6f0e6;
  --text-main:#1f1a14; --text-muted:#7a6f60; --text-sidebar:#4a4135; --text-sidebar-active:#ffffff;
  --border-color:#ebe3d6; --primary-hover:#000000; --primary-soft:#f3ebdd; --secondary:#7a6f60;
  --button-bg:#1f1a14; --button-text:#ffffff; --input-bg:#ffffff; --input-text:#1f1a14; --input-border:#e2d8c7;
  --shadow-card:0 10px 30px -12px rgba(60,40,10,.18); --radius-card:22px; --topbar-bg:#fffdf9;
  --badge-bg:#fde8e3; --badge-text:#9f2d20;
  --sidebar-bg:#fffdf9; --sidebar-border:#ebe3d6; --sidebar-text-muted:#4a4135; --sidebar-icon:#9a8a73;
  --sidebar-hover-bg:#f6f0e6; --sidebar-hover-text:#1f1a14; --sidebar-active-bg:#1f1a14; --sidebar-active-text:#ffffff;
  --sidebar-active-border:#b08443; --sidebar-badge-bg:#fde8e3; --sidebar-badge-text:#9f2d20;
}
html[data-theme="horizonte"] body, html[data-theme="trilho"] body, html[data-theme="ilha"] body{background:var(--bg) !important;color:var(--text)}
html[data-theme="horizonte"] body:after, html[data-theme="trilho"] body:after, html[data-theme="ilha"] body:after{opacity:0 !important}
html[data-theme="horizonte"] .btn-primary, html[data-theme="trilho"] .btn-primary, html[data-theme="ilha"] .btn-primary{background:var(--button-bg) !important;border-color:var(--button-bg) !important;color:#fff !important}
html[data-theme="horizonte"] .eyebrow, html[data-theme="trilho"] .eyebrow, html[data-theme="ilha"] .eyebrow{color:var(--accent) !important}

/* o tracinho antigo à esquerda do item ativo (sombra/borda dos temas velhos) não serve aqui */
html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link.active,
html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link.active{box-shadow:none !important;border-left:0 !important}
html[data-theme="ilha"] body.ui-modern #sidebar .nav-menu .nav-link.active{border-left:0 !important}

/* ─────────────── Botões do seletor de visual (amostras) ─────────────── */
.theme-swatch-horizonte .swatch{background:linear-gradient(135deg,#ffffff 0 48%,#4f46e5 50%)}
.theme-swatch-trilho .swatch{background:linear-gradient(135deg,#0b1220 0 48%,#10b981 50%)}
.theme-swatch-ilha .swatch{background:linear-gradient(135deg,#f3efe8 0 48%,#b08443 50%)}

/* ═══════════════ HORIZONTE — menu em cima (computador) ═══════════════ */
@media (min-width:1101px){
  html[data-theme="horizonte"] body.ui-modern .app-shell{flex-direction:column}
  html[data-theme="horizonte"] body.ui-modern #sidebar.sidebar{
    position:sticky !important; top:0 !important; left:0; transform:none !important;
    width:100% !important; height:auto !important; min-height:76px;
    flex-direction:row !important; align-items:center !important;
    padding:6px 20px !important; gap:14px !important; overflow:visible !important;
    background:var(--sidebar-bg) !important; -webkit-backdrop-filter:saturate(1.6) blur(14px); backdrop-filter:saturate(1.6) blur(14px);
    border-right:0 !important; border-bottom:1px solid var(--sidebar-border) !important; box-shadow:0 1px 0 rgba(15,23,42,.02) !important;
    z-index:60 !important;
  }
  html[data-theme="horizonte"] body.ui-modern #sidebar .brand{border:0 !important;padding:0 !important;flex:0 0 auto}
  html[data-theme="horizonte"] body.ui-modern #sidebar .brand img{max-height:36px !important}
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu{
    flex-direction:row !important; align-items:stretch; flex:1 1 auto; min-width:0; justify-content:flex-end;
    gap:2px !important; overflow:visible !important; margin:0 !important; padding:0 !important;
  }
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link{
    flex-direction:column !important; justify-content:flex-start; align-items:center !important;
    gap:4px !important; width:78px; min-height:62px !important; padding:8px 4px 6px !important;
    border-radius:12px !important; font-size:11px !important; font-weight:600 !important; line-height:1.15 !important;
    text-align:center; color:var(--text-sidebar) !important;
  }
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link > span:last-child{
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; max-width:74px;
  }
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link .menu-ico .ico{width:20px;height:20px}
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link.active{background:var(--sidebar-active-bg) !important;color:var(--sidebar-active-text) !important}
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link.active::before{
    left:22px !important; right:22px !important; top:auto !important; bottom:-7px !important; width:auto !important; height:3px !important; border-radius:3px 3px 0 0 !important;
  }
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-count{
    position:absolute; top:3px; left:calc(50% + 4px); margin:0 !important; min-width:17px; height:17px; font-size:10px !important; padding:0 4px !important;
  }
  /* Painel ADM vira um botão com lista suspensa */
  html[data-theme="horizonte"] body.ui-modern #sidebar .admin-menu-group{position:relative;margin:0 !important;padding:0 0 0 8px !important;border:0 !important;border-left:1px solid var(--line) !important;display:flex;align-items:center}
  html[data-theme="horizonte"] body.ui-modern #sidebar .admin-menu-toggle{margin:0 !important;height:40px;padding:0 12px !important;border:1px solid var(--line) !important;border-radius:10px !important;background:var(--surface) !important;color:var(--text) !important;font-size:10.5px !important;gap:8px;display:flex;align-items:center;white-space:nowrap}
  html[data-theme="horizonte"] body.ui-modern #sidebar .admin-menu-items{
    position:absolute; right:0; top:calc(100% + 14px); width:250px; padding:8px; gap:2px !important;
    background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:0 24px 48px -12px rgba(16,24,40,.22); z-index:80;
  }
  html[data-theme="horizonte"] body.ui-modern #sidebar .admin-menu-items .nav-link{flex-direction:row !important;width:auto;min-height:36px !important;font-size:13px !important;text-align:left;justify-content:flex-start;padding:8px 10px !important}
  html[data-theme="horizonte"] body.ui-modern #sidebar .admin-menu-items .nav-link > span:last-child{max-width:none;display:inline}
  html[data-theme="horizonte"] body.ui-modern #sidebar .admin-menu-items .nav-link.active::before{display:none}
  html[data-theme="horizonte"] body.ui-modern #sidebar .sidebar-footer{display:none !important}
  html[data-theme="horizonte"] body.ui-modern .content{width:100%;max-width:1480px;margin:0 auto;padding:22px 32px 48px !important}
  html[data-theme="horizonte"] body.ui-modern .topbar{top:88px !important;border-radius:14px !important;box-shadow:none !important}
}
/* Horizonte: telas médias — só os ícones, nome ao passar o mouse */
@media (min-width:1101px) and (max-width:1480px){
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link{width:60px;flex:0 1 60px}
  html[data-theme="horizonte"] body.ui-modern #sidebar .brand img{max-height:30px !important;max-width:190px}
  html[data-theme="horizonte"] body.ui-modern #sidebar .admin-menu-toggle{padding:0 9px !important;letter-spacing:.04em !important}
}
/* itens da lista do Painel ADM: linha inteira, nunca a largura de ícone do menu */
@media (min-width:1101px){
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .admin-menu-items .nav-link{width:100% !important;flex:none !important;flex-direction:row !important;gap:10px !important}
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .admin-menu-items .nav-link > span:last-child{max-width:none !important;font-size:13px !important;display:inline !important;-webkit-line-clamp:unset}
  html[data-theme="horizonte"] body.ui-modern #sidebar .nav-menu .nav-link > span:last-child{font-size:10px;max-width:60px}
}
html[data-theme="horizonte"] body.ui-modern .panel, html[data-theme="horizonte"] body.ui-modern .card{box-shadow:var(--shadow-card) !important}

/* ═══════════════ TRILHO — menu fino de ícones (computador) ═══════════════ */
@media (min-width:1101px){
  html[data-theme="trilho"] body.ui-modern .app-shell{display:block}
  html[data-theme="trilho"] body.ui-modern #sidebar.sidebar{
    position:fixed !important; left:0; top:0; transform:none !important; height:100vh !important;
    width:76px !important; padding:16px 12px !important; gap:14px !important; overflow:hidden;
    background:var(--sidebar-bg) !important; border-right:0 !important; z-index:90 !important;
    transition:width .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s !important;
  }
  html[data-theme="trilho"] body.ui-modern #sidebar.sidebar:hover,
  html[data-theme="trilho"] body.ui-modern #sidebar.sidebar:focus-within{width:262px !important;box-shadow:24px 0 48px -16px rgba(0,0,0,.45) !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .brand{padding:2px 0 14px !important;border-color:var(--sidebar-border) !important;overflow:hidden}
  html[data-theme="trilho"] body.ui-modern #sidebar .brand img{height:40px !important;max-height:40px !important;width:230px !important;max-width:none !important;object-fit:cover;object-position:left center;margin:0 !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu{overflow-x:hidden !important;margin:0 !important;padding:0 !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link{
    width:100%; min-height:44px; padding:10px 15px !important; gap:16px !important; border-radius:12px !important;
    white-space:nowrap; color:var(--sidebar-text-muted) !important;
  }
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link .menu-ico{color:inherit !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link > span:last-child{visibility:hidden;opacity:0;transition:opacity .15s}
  html[data-theme="trilho"] body.ui-modern #sidebar:hover .nav-menu .nav-link > span:last-child,
  html[data-theme="trilho"] body.ui-modern #sidebar:focus-within .nav-menu .nav-link > span:last-child{visibility:visible;opacity:1}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-count{visibility:visible;position:absolute;left:30px;top:4px;margin:0 !important;min-width:16px;height:16px;font-size:9.5px !important;padding:0 4px !important;box-shadow:0 0 0 2px var(--sidebar-bg) !important}
  html[data-theme="trilho"] body.ui-modern #sidebar:hover .nav-count,
  html[data-theme="trilho"] body.ui-modern #sidebar:focus-within .nav-count{position:static;margin-left:6px !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link:hover{color:#fff !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link.active{background:var(--sidebar-active-bg) !important;color:#fff !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link.active .menu-ico{color:var(--accent) !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link.active::before{left:-12px !important;top:10px !important;bottom:10px !important;width:3px !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .admin-menu-toggle{white-space:nowrap;color:var(--sidebar-text-muted) !important;border-top:1px solid var(--sidebar-border);border-radius:0 !important;padding-top:14px !important}
  html[data-theme="trilho"] body.ui-modern #sidebar:not(:hover):not(:focus-within) .admin-menu-toggle span{visibility:hidden}
  html[data-theme="trilho"] body.ui-modern #sidebar .sidebar-footer{visibility:hidden;border-color:var(--sidebar-border) !important;white-space:nowrap}
  html[data-theme="trilho"] body.ui-modern #sidebar:hover .sidebar-footer{visibility:visible}
  html[data-theme="trilho"] body.ui-modern .content{margin-left:76px;width:calc(100% - 76px) !important;max-width:calc(100vw - 76px) !important;padding:14px 36px 48px !important}
  html[data-theme="trilho"] body.ui-modern .topbar{
    top:0 !important; margin:0 -36px 22px !important; padding:14px 36px !important; border-radius:0 !important;
    border:0 !important; border-bottom:1px solid var(--line) !important; box-shadow:none !important;
    background:color-mix(in srgb,var(--bg),transparent 8%) !important;
  }
}
html[data-theme="trilho"] body.ui-modern .panel, html[data-theme="trilho"] body.ui-modern .card{border-radius:12px !important;box-shadow:var(--shadow-card) !important}
html[data-theme="trilho"] body.ui-modern .daily-motivation-bar{border-radius:12px !important}

/* ═══════════════ ILHA — cartões flutuantes (computador) ═══════════════ */
@media (min-width:1101px){
  html[data-theme="ilha"] body.ui-modern .app-shell{padding:16px 0 16px 16px;gap:4px}
  html[data-theme="ilha"] body.ui-modern #sidebar.sidebar{
    position:sticky !important; top:16px !important; height:calc(100vh - 32px) !important; width:250px !important;
    border-radius:26px !important; border:1px solid var(--sidebar-border) !important;
    background:var(--sidebar-bg) !important; box-shadow:0 30px 60px -28px rgba(60,40,10,.35) !important; padding:22px 14px 18px !important;
  }
  html[data-theme="ilha"] body.ui-modern .content{padding:0 26px 40px 22px !important}
  html[data-theme="ilha"] body.ui-modern .topbar{top:16px !important;border-radius:20px !important;border:1px solid var(--line) !important;box-shadow:0 18px 40px -26px rgba(60,40,10,.35) !important;background:color-mix(in srgb,var(--surface),transparent 6%) !important}
}
html[data-theme="ilha"] body.ui-modern #sidebar .brand{border-color:var(--sidebar-border) !important}
html[data-theme="ilha"] body.ui-modern #sidebar .nav-menu .nav-link{border-radius:12px !important;color:var(--sidebar-text) !important}
html[data-theme="ilha"] body.ui-modern #sidebar .nav-menu .nav-link.active{background:var(--sidebar-active-bg) !important;color:#fff !important;box-shadow:0 8px 18px -8px rgba(31,26,20,.55) !important}
html[data-theme="ilha"] body.ui-modern #sidebar .nav-menu .nav-link.active .menu-ico{color:var(--accent-2) !important}
html[data-theme="ilha"] body.ui-modern #sidebar .nav-menu .nav-link.active::before{display:none}
html[data-theme="ilha"] body.ui-modern #sidebar .admin-menu-toggle{color:var(--muted) !important}
html[data-theme="ilha"] body.ui-modern .panel, html[data-theme="ilha"] body.ui-modern .card,
html[data-theme="ilha"] body.ui-modern .stat-card, html[data-theme="ilha"] body.ui-modern .hero-card{border-radius:22px !important;border-color:var(--line) !important;box-shadow:var(--shadow-card) !important}
html[data-theme="ilha"] body.ui-modern .daily-motivation-bar{border-radius:18px !important}
html[data-theme="ilha"] body.ui-modern .btn{border-radius:12px !important}

/* ─────────────── Celular e telas pequenas: menu de abrir (☰) ─────────────── */
@media (max-width:1100px){
  html[data-theme="horizonte"] body.ui-modern #sidebar.sidebar,
  html[data-theme="ilha"] body.ui-modern #sidebar.sidebar{background:var(--surface) !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link{color:var(--sidebar-text-muted) !important}
  html[data-theme="trilho"] body.ui-modern #sidebar .nav-menu .nav-link.active{color:#fff !important}
  html[data-theme="ilha"] body.ui-modern #sidebar.sidebar{border-radius:0 22px 22px 0 !important}
}
