/* FS NUTRI 0.2 — calendário avançado, portal demonstrativo, dashboard e temas transversais */
:root{color-scheme:light;--ui-surface:#fff;--ui-surface-soft:#fbf9fc;--ui-surface-alt:#f7f3fb;--ui-ink:#2b2036;--ui-muted:#82788b;--ui-border:#eae5ec;--ui-sidebar:#fbfaf6;--ui-focus:#f1eafa;--ui-tag:#f1edf4;--ui-control:#fff;--ui-shadow:0 15px 38px #362b4210;--ui-chart:#dfd0f3}
html{transition:background-color .18s,color .18s}button{touch-action:manipulation}button:focus-visible{outline:3px solid #a18ae1;outline-offset:2px}.theme-toggle{flex-shrink:0}.theme-toggle svg{width:18px;height:18px}
.hero-plus{min-height:215px}.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:21px;position:relative;z-index:2}.btn.hero-outline{background:#ffffff17;border:1px solid #ffffff55;color:white}.btn.hero-outline:hover{background:#ffffff2c}
.section-head-actions{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap}.section-head-actions .page-head{margin-bottom:0}.range-pills{display:flex;gap:5px;background:var(--ui-surface-alt);border:1px solid var(--ui-border);padding:4px;border-radius:12px;margin-bottom:4px}.range-pill{background:transparent;border:0;border-radius:9px;padding:8px 13px;color:var(--ui-muted);font-size:11px;font-weight:800}.range-pill.active{background:var(--purple);color:#fff;box-shadow:0 5px 12px #4b32852a}
.kpi-link{border:1px solid var(--ui-border);text-align:left;cursor:pointer;width:100%;color:var(--ui-ink);transition:transform .15s,box-shadow .15s,border-color .15s}.kpi-link:hover{transform:translateY(-3px);border-color:#b69bd7;box-shadow:0 18px 35px #45305818}.kpi-link .kpi-number{font-size:clamp(18px,2vw,27px)}.kpi-foot{display:flex;align-items:center;justify-content:space-between;color:var(--purple);font-weight:800;font-size:10px;margin-top:15px}.kpi-foot svg{height:13px;width:13px}.kpi-link .kpi-icon{margin-bottom:12px}.kpis-linked .kpi{min-height:150px}.quickline{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}.quick-btn{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--ui-border);background:var(--ui-surface);border-radius:12px;padding:11px 13px;color:var(--ui-ink);font-weight:700;font-size:11px}.quick-btn:hover{background:var(--ui-focus)}.quick-btn svg{height:16px;width:16px;color:var(--purple)}.clickable-row{width:100%;background:transparent;text-align:left;border:0;border-bottom:1px solid var(--ui-border);cursor:pointer;color:var(--ui-ink)}.clickable-row:hover{background:var(--ui-surface-alt)}.dashboard-chart{height:172px;display:flex;align-items:stretch;gap:9px;margin:7px 0 20px}.chart-column{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;background:transparent;border:0;color:var(--ui-muted);font-size:10px;font-weight:750}.chart-column:hover .bar-stick{filter:brightness(.85)}.bar-stick{width:min(100%,45px);background:var(--ui-chart);border-radius:7px 7px 3px 3px;min-height:7px;transition:height .2s}.bar-stick.is-today{background:var(--purple)}.bar-value{color:var(--ui-ink)}.chart-caption{color:var(--ui-muted);font-size:10px}.funnel{display:flex;flex-direction:column;gap:12px;margin-top:16px}.funnel>div{display:flex;gap:12px;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--ui-border)}.funnel span{color:var(--ui-muted);font-size:12px}.funnel strong{font-size:14px}.conversion{display:flex;align-items:center;gap:12px;padding:15px;background:var(--ui-surface-alt);border-radius:12px;margin-top:16px}.conversion strong{font-size:27px;color:var(--purple)}.conversion span{font-size:10px;color:var(--ui-muted)}
/* Calendário inspirado em padrões de gestão educacional: mês, semana, dia, lista e ações por célula. */
.calendar-panel{padding:20px 21px 17px}.cal-toolbar{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap}.cal-toolbar-main,.cal-toolbar-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.cal-nav{width:34px;height:34px;border:1px solid var(--ui-border);border-radius:9px;background:var(--ui-control);color:var(--ui-ink);font-size:25px;line-height:1}.cal-label{text-transform:capitalize;font-size:15px;margin-left:8px}.cal-date-picker,.cal-filter{background:var(--ui-control);border:1px solid var(--ui-border);padding:8px;border-radius:9px;font-size:11px;min-height:34px;max-width:170px;color:var(--ui-ink)}.cal-mode-switch{display:flex;gap:4px;padding:4px;border-radius:12px;background:var(--ui-surface-alt);width:max-content;max-width:100%;margin:18px 0;border:1px solid var(--ui-border)}.cal-mode{border:0;background:transparent;padding:9px 18px;color:var(--ui-muted);border-radius:9px;font-size:12px;font-weight:800;white-space:nowrap}.cal-mode.selected{background:var(--purple);color:#fff}.cal-scroll{width:100%;overflow-x:auto;scrollbar-width:thin}.month-calendar{min-width:650px;border-top:1px solid var(--ui-border);border-left:1px solid var(--ui-border);border-radius:12px;overflow:hidden}.month-weekdays,.month-cells{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.month-weekdays span{padding:13px 5px;background:var(--ui-surface-alt);color:var(--ui-muted);font-size:11px;font-weight:800;text-align:center;border-right:1px solid var(--ui-border);border-bottom:1px solid var(--ui-border)}.month-cell{position:relative;background:var(--ui-surface);border-right:1px solid var(--ui-border);border-bottom:1px solid var(--ui-border);min-height:116px;padding:7px 5px 23px;overflow:hidden}.month-cell.outside{background:var(--ui-surface-alt);opacity:.63}.month-cell.today{background:var(--ui-focus)}.day-num{display:flex;align-items:center;justify-content:center;gap:4px;margin:0 0 5px 2px;width:29px;height:26px;border-radius:8px;border:0;background:transparent;color:var(--ui-ink);font-weight:800;font-size:11px}.month-cell.today .day-num{background:var(--purple);color:#fff}.day-num i{display:none}.month-event-list{display:grid;gap:3px}.calendar-event{display:block;width:100%;border:0;border-left:3px solid var(--purple);background:#eee7f8;border-radius:5px;padding:5px 5px;text-align:left;line-height:1.25;color:#48396e;cursor:pointer;min-width:0}.calendar-event strong{font-size:10px;font-weight:800;white-space:nowrap;display:block;overflow:hidden;text-overflow:ellipsis}.calendar-event span{display:block;font-size:9px;margin-top:4px;white-space:normal;overflow-wrap:anywhere}.calendar-event.solicitado{border-color:#c9a15d;background:#fff3d9;color:#796030}.calendar-event.cancelado,.calendar-event.nao_compareceu{border-color:#c67d86;background:#f9e8eb;color:#914457}.calendar-event.realizado{border-color:#47966e;background:#e4f4e9;color:#2a734c}.day-add{position:absolute;right:5px;bottom:4px;border:0;background:transparent;color:var(--ui-muted);font-size:18px;line-height:1;width:24px;height:24px;border-radius:6px}.day-add:hover{background:var(--ui-focus);color:var(--purple)}.more-day{border:0;background:transparent;color:var(--purple);padding:3px;text-align:left;font-size:10px;font-weight:800}.week-calendar{display:grid;grid-template-columns:repeat(7,minmax(112px,1fr));min-width:820px;border:1px solid var(--ui-border);border-radius:13px;overflow:hidden}.week-cell{background:var(--ui-surface);min-height:250px;padding:10px;border-right:1px solid var(--ui-border);display:flex;flex-direction:column;gap:6px}.week-cell:last-child{border-right:0}.week-cell.today{background:var(--ui-focus)}.week-title{background:transparent;border:0;display:flex;flex-direction:column;align-items:center;gap:4px;color:var(--ui-muted);padding:7px 0 15px}.week-title span{font-size:10px}.week-title b{font-size:20px;color:var(--ui-ink)}.day-empty{font-size:10px;text-align:center;padding:16px 5px;color:var(--ui-muted)}.week-add{border:1px dashed var(--ui-border);background:var(--ui-surface-alt);color:var(--purple);border-radius:8px;padding:7px;font-size:10px;display:flex;align-items:center;justify-content:center;gap:5px;margin-top:auto}.week-add svg{width:12px;height:12px}.calendar-day-label{text-transform:capitalize;color:var(--ui-muted);font-size:13px;margin-bottom:13px}.timeline{border:1px solid var(--ui-border);border-radius:13px;overflow:hidden}.timeline-row{display:grid;grid-template-columns:77px 1fr;min-height:60px;border-bottom:1px solid var(--ui-border)}.timeline-row:last-child{border-bottom:0}.timeline-hour{color:var(--ui-muted);font-weight:750;padding:13px 15px;font-size:11px;background:var(--ui-surface-alt);border-right:1px solid var(--ui-border)}.timeline-entries{padding:5px;display:grid;gap:5px;align-content:start}.timeline-entries .calendar-event{padding:10px;max-width:500px}.timeline-free{border:1px dashed transparent;background:transparent;border-radius:7px;color:transparent;text-align:left;padding:7px;font-size:10px}.timeline-row:hover .timeline-free,.timeline-free:focus{color:var(--purple);border-color:var(--ui-border)}.list-calendar{border:1px solid var(--ui-border);border-radius:13px;overflow:hidden}.list-cal-title{padding:15px;background:var(--ui-surface-alt);text-transform:capitalize;font-weight:750;font-size:12px}.list-cal-event{width:100%;display:flex;align-items:center;gap:12px;text-align:left;padding:13px;border:0;background:var(--ui-surface);color:var(--ui-ink);border-bottom:1px solid var(--ui-border)}.list-cal-event:hover{background:var(--ui-surface-alt)}.list-cal-event>svg{width:14px;height:14px;color:var(--ui-muted)}.list-date{width:52px;flex:none;display:flex;flex-direction:column;align-items:center;background:var(--ui-surface-alt);border-radius:8px;padding:8px 4px;font-size:10px;color:var(--ui-muted);text-transform:capitalize}.list-date b{font-size:18px;color:var(--purple)}.cal-legend{display:flex;align-items:center;gap:17px;flex-wrap:wrap;padding:15px 2px 0;color:var(--ui-muted);font-size:10px}.cal-legend>span{display:inline-flex;align-items:center;gap:6px}.legend-dot{display:inline-block;width:8px;height:8px;border-radius:2px;background:var(--purple)}.legend-dot.wait{background:#c9a15d}.legend-dot.done{background:#47966e}.legend-dot.cancel{background:#c67d86}.cal-tip{margin-left:auto}
/* Ficha administrativa e portal fictício independente */
.back-link{border:0;background:transparent;color:var(--purple);font-weight:800;margin-top:5px;font-size:12px;padding:8px 0}.patient-name{text-align:left}.detail-list{margin-top:15px}.detail-list>div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid var(--ui-border);font-size:12px}.detail-list span{color:var(--ui-muted)}.detail-list b{max-width:70%;overflow-wrap:anywhere;text-align:right}
.login-heading{display:flex;align-items:center;justify-content:space-between}.portal-login-cta{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 16px;background:var(--ui-surface-alt);border:1px solid var(--ui-border);border-radius:14px;margin-top:18px}.portal-login-cta strong{font-size:12px}.portal-login-cta p{margin:5px 0 0;font-size:10px;color:var(--ui-muted);line-height:1.5}.portal-login-cta .btn{white-space:nowrap}
.portal-layout{min-height:100vh;background:var(--cream)}.portal-header{max-width:1180px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:18px 18px 0}.portal-header .brand{padding:0}.portal-head-right{display:flex;align-items:center;gap:9px}.portal-main{max-width:1140px;margin:0 auto;padding:32px 18px 62px}.portal-welcome{background:linear-gradient(125deg,#51368c,#7852af);border-radius:24px;color:white;min-height:180px;padding:32px;display:flex;justify-content:space-between;align-items:center;overflow:hidden;position:relative}.portal-welcome h1{font-family:'DM Serif Display',serif;font-size:clamp(29px,4vw,45px);font-weight:400;margin:9px 0}.portal-welcome p{font-size:13px;max-width:550px;line-height:1.75;color:#eee5f8}.portal-avatar{border:2px solid #ffffff55;border-radius:50%;background:#ffffff1c;display:grid;place-items:center;width:105px;height:105px}.portal-avatar svg{width:44px;height:44px;color:#e0ecd7}.portal-caution{margin:17px 0}.portal-tabs{display:flex;gap:8px;overflow-x:auto;padding:3px 0 14px;margin-bottom:5px;scrollbar-width:thin}.portal-tab{border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-control);font-size:12px;color:var(--ui-ink);font-weight:800;padding:11px 17px;white-space:nowrap}.portal-tab.active{background:var(--purple);border-color:var(--purple);color:white}.portal-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:17px}.portal-grid .panel{min-width:0}.portal-highlight{background:linear-gradient(145deg,#eff1e8,#fff);border-color:#e2e7da}.portal-highlight .eyebrow{color:#427a55;font-weight:800}.portal-highlight h2{font-family:'DM Serif Display',serif;font-size:35px;font-weight:400;margin-top:14px}.portal-highlight p{font-size:13px;color:var(--ui-muted);margin:7px 0 20px}.portal-mini-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:15px 0 23px}.portal-mini-stats>div{background:var(--ui-surface-alt);padding:13px 11px;border-radius:11px}.portal-mini-stats b{display:block;font-size:24px;color:var(--purple)}.portal-mini-stats span{font-size:10px;color:var(--ui-muted);line-height:1.5}.portal-quick{margin-top:17px}.portal-content-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-top:19px}.portal-content-grid .feature{display:flex;flex-direction:column;align-items:flex-start}.portal-content-grid .feature p{flex:1;margin-bottom:18px}.portal-footer{text-align:center;padding:20px;font-size:10px;color:var(--ui-muted);border-top:1px solid var(--ui-border)}
/* Tema escuro amplo, sem mudar o tom da marca */
html[data-theme="dark"]{color-scheme:dark;--cream:#15131e;--white:#211e2b;--ink:#eeeaf3;--muted:#a99fb3;--purple:#a98bdb;--violet:#a98bd9;--lav:#352943;--green:#7fbc91;--mint:#1e3628;--line:#3a3544;--sand:#251f29;--shadow:0 12px 38px #05040a55;--ui-surface:#221e2c;--ui-surface-soft:#211d2a;--ui-surface-alt:#2c2637;--ui-ink:#eeeaf3;--ui-muted:#a99fb3;--ui-border:#3b3547;--ui-sidebar:#1c1925;--ui-focus:#352a45;--ui-tag:#342c3d;--ui-control:#292431;--ui-chart:#514167}
html[data-theme="dark"] body{background:var(--cream);color:var(--ink)}
html[data-theme="dark"] .sidebar{background:var(--ui-sidebar);border-color:var(--ui-border)}
html[data-theme="dark"] .sidebar-bottom{background:#292332;color:#c1b0ca}html[data-theme="dark"] .sidebar-bottom strong{color:#dec6eb}
html[data-theme="dark"] .nav-link{color:#b4a9be}html[data-theme="dark"] .nav-link:hover{background:#30293b}html[data-theme="dark"] .nav-link.active{background:#3b304a;color:#d6b8f9}
html[data-theme="dark"] .avatar,html[data-theme="dark"] .brand-icon{background:#513781;color:#fff}html[data-theme="dark"] .circle-btn,html[data-theme="dark"] .mobile-header button,html[data-theme="dark"] .cal-nav{background:var(--ui-control);color:var(--ui-ink);border-color:var(--ui-border)}
html[data-theme="dark"] .kpi,html[data-theme="dark"] .panel,html[data-theme="dark"] .role-card,html[data-theme="dark"] .lead-card,html[data-theme="dark"] .feature,html[data-theme="dark"] .client-form,html[data-theme="dark"] .modal{background:var(--ui-surface);color:var(--ui-ink);border-color:var(--ui-border)}
html[data-theme="dark"] .kpi-icon{background:#41324f;color:#c4a3ec}html[data-theme="dark"] .kpi-icon.green{background:#254332;color:#92cca2}html[data-theme="dark"] .kpi-icon.amber{background:#4d4029;color:#e3c081}html[data-theme="dark"] .kpi-icon.rose{background:#472b37;color:#e5a3b7}
html[data-theme="dark"] .btn.light,html[data-theme="dark"] .btn.ghost,html[data-theme="dark"] .btn.danger{background:#30283b;color:#e6d1ff;border-color:var(--ui-border)}html[data-theme="dark"] .btn:not(.light):not(.ghost):not(.green):not(.danger):not(.hero-outline){background:#7355aa;color:white}
html[data-theme="dark"] .status.confirmado,html[data-theme="dark"] .status.pago{background:#244631;color:#9adbab}html[data-theme="dark"] .status.pendente,html[data-theme="dark"] .status.solicitado{background:#473b2a;color:#e4c68c}html[data-theme="dark"] .status.em_andamento,html[data-theme="dark"] .status.realizado{background:#3b2e4a;color:#d7bcf3}html[data-theme="dark"] .status.novo{background:#28384b;color:#a6cbf6}html[data-theme="dark"] .status.cancelado,html[data-theme="dark"] .status.atrasado{background:#492b34;color:#f0a0af}
html[data-theme="dark"] .tag,html[data-theme="dark"] .tag.gray{background:#3c3443;color:#d2bfe1}html[data-theme="dark"] .tag.green{background:#264331;color:#a9dbb8}html[data-theme="dark"] .tag.lav{background:#3e304e;color:#dec9fc}
html[data-theme="dark"] .calendar-event:not(.solicitado):not(.cancelado):not(.nao_compareceu):not(.realizado){background:#413351;color:#e3d3f2}html[data-theme="dark"] .calendar-event.solicitado{background:#483c2b;color:#eed19a}html[data-theme="dark"] .calendar-event.cancelado,html[data-theme="dark"] .calendar-event.nao_compareceu{background:#512f3e;color:#efadb5}html[data-theme="dark"] .calendar-event.realizado{background:#274833;color:#a8daba}
html[data-theme="dark"] .day,html[data-theme="dark"] .month-cell,html[data-theme="dark"] .week-cell,html[data-theme="dark"] .list-cal-event{background:var(--ui-surface);border-color:var(--ui-border)}html[data-theme="dark"] .day.today,html[data-theme="dark"] .month-cell.today,html[data-theme="dark"] .week-cell.today{background:#352a43}
html[data-theme="dark"] .day.outside,html[data-theme="dark"] .month-cell.outside{background:#231f2e}html[data-theme="dark"] .day-title b,html[data-theme="dark"] .week-title b{color:var(--ui-ink)}
html[data-theme="dark"] .data-table th,html[data-theme="dark"] .data-table tr:hover td{background:#292431;color:#c4b8ce}html[data-theme="dark"] .data-table td,html[data-theme="dark"] .task-row,html[data-theme="dark"] .item-row{border-color:var(--ui-border)}html[data-theme="dark"] .kanban-col{background:#211c2a}
html[data-theme="dark"] .time-pill,html[data-theme="dark"] .finance-sum,html[data-theme="dark"] .soft-accent,html[data-theme="dark"] .login-note{background:#32263d;color:#cfb4eb;border-color:var(--ui-border)}html[data-theme="dark"] .finance-sum span{color:#b4a5bd}
html[data-theme="dark"] .local-banner,html[data-theme="dark"] .locked,html[data-theme="dark"] .notice{background:#3a3023;color:#edcd96;border-color:#564832}html[data-theme="dark"] .card-note{background:#23382a;color:#a4d2b0;border-color:#38533d}
html[data-theme="dark"] .search,html[data-theme="dark"] .filter,html[data-theme="dark"] .field input,html[data-theme="dark"] .field select,html[data-theme="dark"] .field textarea,html[data-theme="dark"] .cal-date-picker,html[data-theme="dark"] .cal-filter{background:var(--ui-control);border-color:var(--ui-border);color:var(--ui-ink)}html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#9e92a9}html[data-theme="dark"] .field label{color:#c5b9cd}
html[data-theme="dark"] .client-hero p,html[data-theme="dark"] .client-form p{color:var(--ui-muted)}html[data-theme="dark"] .client-visual{background:radial-gradient(circle at 70% 15%,#443655 0 30%,transparent 30%),linear-gradient(145deg,#294332,#34263c)}html[data-theme="dark"] .client-visual .plate{background:#302738;border-color:#302738}
html[data-theme="dark"] .portal-highlight{background:linear-gradient(145deg,#24372b,#292330);border-color:#384839}html[data-theme="dark"] .portal-highlight .eyebrow{color:#a6d9b2}
html[data-theme="dark"] .login-box,html[data-theme="dark"] .portal-layout{background:var(--cream)}html[data-theme="dark"] .chart-column,html[data-theme="dark"] .item-main span,html[data-theme="dark"] .section-muted{color:var(--ui-muted)}html[data-theme="dark"] .btn.green{background:#3d8052;color:#fff}
@media(max-width:980px){.portal-grid{grid-template-columns:1fr}.portal-content-grid{grid-template-columns:1fr 1fr}.cal-tip{width:100%;margin-left:0}.calendar-panel{padding:16px}}
@media(max-width:760px){.hero-plus{min-height:207px}.hero-actions{margin-top:18px}.section-head-actions{align-items:flex-start}.kpi-link .kpi-number{font-size:21px}.kpis-linked .kpi{min-height:140px}.kpi-foot{margin-top:9px}.quickline .quick-btn{flex:1;min-width:125px;justify-content:center}.cal-toolbar-main{width:100%}.cal-toolbar-controls{width:100%}.cal-label{margin-left:auto;font-size:12px}.cal-mode-switch{width:100%;justify-content:space-between}.cal-mode{flex:1;padding:9px 10px}.month-calendar{min-width:620px}.month-cell{min-height:103px}.portal-header{padding-top:13px}.portal-header .brand-sub{font-size:8px;letter-spacing:1px}.portal-head-right .tag{display:none}.portal-head-right .btn{font-size:10px;padding:8px}.portal-welcome{padding:25px 20px;min-height:155px}.portal-avatar{width:58px;height:58px;flex:none}.portal-avatar svg{width:29px;height:29px}.portal-content-grid{grid-template-columns:1fr}.portal-mini-stats>div{padding:10px 7px}.portal-mini-stats b{font-size:21px}.portal-login-cta{align-items:flex-start;flex-direction:column}.portal-login-cta .btn{width:100%}.client-nav{flex-wrap:wrap}.client-nav .action-row{gap:5px}}
@media(max-width:450px){.top-actions{gap:5px}.top-actions .tag{display:none}.topbar{justify-content:space-between}.kpi-link .kpi-number{font-size:19px}.calendar-panel .cal-date-picker{max-width:145px}.portal-header .brand-icon{width:35px;height:35px;font-size:14px}.portal-header .brand-name{font-size:15px}.portal-head-right .btn{padding:8px 9px}.portal-header .brand{gap:6px}.portal-welcome p{font-size:11px}}
@media print{.portal-header,.portal-tabs,.portal-footer,.portal-caution,.portal-login-cta,.portal-welcome .portal-avatar,.portal-main button,.topbar,.sidebar{display:none!important}.portal-layout,.portal-main{background:white;color:black}.portal-main{padding:0}.portal-welcome{min-height:0;padding:18px;color:#111;background:#eee}.panel{break-inside:avoid;box-shadow:none}}
