@import url("painel-motion.css");

@view-transition { navigation: none; }

@font-face {
  font-family: "Teko Painel";
  src: url("fonts/teko-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@media screen {
  :root {
    --font-display: "Teko Painel", "Teko", sans-serif;
    --divider: #d6dbe0;
    --gutter: clamp(16px, 3vw, 32px);
    --panel-canvas: #f6f8fb;
    --surface-shadow: 0 2px 7px rgb(24 46 75 / .09), 0 1px 2px rgb(24 46 75 / .06);
    --menu-shadow: 0 5px 14px rgb(24 46 75 / .16);
  }
  body { background: var(--panel-canvas); color: #171717; }
  .container, .portal-main, .fit-app-shell { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
  .portal-main { padding-block: 0 56px; }
  .panel-heading { padding-block: 30px 17px; }
  .panel-heading h1 { font: 600 clamp(38px, 5vw, 54px)/1 var(--font-display); text-transform: uppercase; margin: 0; text-shadow: none; }
  .panel-heading h1 span { display: inline-block; }
  :focus-visible, .portal-main :focus-visible { outline: 3px solid #075dcc; outline-offset: 3px; }
  body :where(input:not([type=checkbox]):not([type=radio]), select, textarea):not(.is-error) { min-width: 0; border: 1px solid #929aa2 !important; box-shadow: none; }
  body :is(input, select, textarea):focus-visible { outline: 2px solid #075dcc; outline-offset: 2px; }
  .panel:not(.auth), .card, .stat, .eval-card, .measurement-item, .skinfold-item, .photo-card, .calc-panel, .info-block, .history-panel, .result-card, .results-top { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 20px 0; margin: 0; border-top: 1px solid var(--divider); }
  .metrics { gap: 0; padding: 18px 16px; border: 1px solid var(--divider); margin-bottom: 28px; background: white; box-shadow: var(--surface-shadow); }
  .metrics .panel { border: 0; padding: 4px 20px; border-inline-start: 1px solid var(--divider); }
  .metrics .panel:first-child { padding-inline-start: 0; border: 0; }
  .metrics strong, .stat b { font: 600 44px/1 var(--font-display); margin-top: 6px; color: #075dcc; }
  .portal-main h2, #main h2 { font: 600 29px/1.15 var(--font-display); }
  .company-identity p { margin: 3px 0; }
  #activity { padding: 0; list-style: none; }
  #activity time { font-size: 0.85em; color: #49515a; font-variant-numeric: tabular-nums; }
  #activity li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 18px; padding-block: 12px; border-bottom: 1px solid var(--divider); margin: 0; }
  .student-tools { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
  .student-tools label:first-child { flex: 1 1 230px; }
  .student-tools label:nth-child(2) { flex: 0 1 180px; }
  #studentEditor { overflow: clip; }
  .student-form { padding: 16px 0; background: white; }
  .student-form h2 { grid-column: 1/-1; }
  .portal-main :not(.metrics) > .panel + .panel { margin-top: 14px; }
  .portal-main .primary, .portal-main .secondary { border: 1px solid #111; box-shadow: 3px 3px #111; border-radius: 0; }
  .portal-main .actions { justify-content: flex-start; }
  .portal-main .table-scroll + .actions { justify-content: space-between; }
  .evaluation-shell, .fit-app-shell { padding-block: 0 56px; }
  .evaluation-history-entry { padding-top: 14px; border-top: 1px solid var(--divider); margin-bottom: 16px; }
  .evaluation-notice, .optional-banner, .result-panel, .result-highlight, .compare-box, .protocol-badge, .history-item, .pdf-options-dialog { border: 1px solid var(--divider); background: #f6f8fa; box-shadow: none; }
  .evaluation-notice, .result-panel, .result-highlight, .pdf-options-dialog, #modal { background: white; box-shadow: var(--surface-shadow); }
  .evaluation-notice { border-inline-start: 3px solid var(--blue); }
  .stepper, #side {
    background: white;
    border: 1px solid var(--divider);
    padding: 8px;
    box-shadow: var(--surface-shadow);
  }
  .stepper { gap: 4px; }
  .stepper .step-dot { border: 0; border-bottom: 2px solid var(--divider); box-shadow: none; min-width: 0; background: white; color: #414951; }
  .stepper .step-dot.is-active { color: #075dcc; border-color: var(--blue); background: #edf5ff; box-shadow: var(--surface-shadow); }
  .stepper .step-dot span { text-shadow: none; color: inherit; }
  .eval-card-head { border-bottom: 0; margin-bottom: 16px; padding: 0; }
  .measurement-item, .skinfold-item, .photo-card { border: 0; padding: 0; }
  .form-actions, .pdf-options-actions, .pdf-options-head, .result-card h3, .history-head { border-width: 1px; border-style: solid; border-color: var(--divider); border-inline: 0; }
  .form-actions, .pdf-options-actions { border-bottom: 0; }
  .pdf-options-head, .result-card h3, .history-head { border-top: 0; }
  .form-actions [data-next], .form-actions #finishBtn { margin-inline-start: auto; }
  .metric-row, .result-highlight .report-summary-grid > div, .suggestion-goals > div, .suggestion-water { border: 0; border-bottom: 1px solid var(--divider); box-shadow: none; }
  .stats { gap: 16px; }
  #main, .card, .two > *, .calc-layout > * { min-width: 0; }
  .bar { border-bottom: 1px solid var(--divider); }
  [data-page=fichas] #side {
    gap: 12px;
    padding: 8px 5px 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  [data-page=fichas] #side button { padding: 11px 15px; }
  [data-page=fichas] #main :is(.bar, .card, .stat),
  .portal-main .panel:not(.auth):not(.metrics > .panel),
  #workspace > .workspace-top,
  #studentEditor .student-form,
  .eval-card, .results-top, .result-card, .history-panel,
  .calc-panel, .result-panel, .info-block > .container {
    padding: clamp(14px, 2.4vw, 24px);
    background: white;
    border: 1px solid var(--divider);
    border-radius: 6px;
    box-shadow: var(--surface-shadow);
  }
  .evaluation-notice, .result-highlight, .metrics { border-radius: 6px; }
  .eval-card { margin: 3px 1px 10px; }
  .portal-main .auth { border: 1px solid var(--divider); border-radius: 6px; box-shadow: var(--surface-shadow); }
  #showRecovery { font-size: .875rem; padding: 8px 12px; padding-left: 12px !important; }
  .portal-main .panel h2 { margin-bottom: 14px; }
  .portal-main .section-title { margin-bottom: 12px; }
  .portal-main #studentEditor .student-form { margin-block: 14px; }
  #studentEditor { overflow-clip-margin: 8px; }
  .evaluation-tabs { margin-bottom: 16px; }
  .evaluation-tab { border: 1px solid var(--divider); border-radius: 6px; box-shadow: var(--surface-shadow); }
  .evaluation-tab.is-active { border-color: #a8caef; background: #edf5ff; color: #075dcc; }
  .info-block { background: transparent; border: 0; padding: 0 var(--gutter) 48px; }
  .info-block > .container { max-width: calc(1200px - 2 * var(--gutter)); }
  [data-page=fichas] #main > :is(.bar, .card, .two) { margin-bottom: 16px; }
  .sheet-group h3 { margin: 0 0 12px; }
  .sheet-student-control, .workout-actions { display: flex; align-items: center; gap: 8px; }
  .sheet-student-control select { flex: 1; }
  .sheet-student-control button { flex: none; white-space: nowrap; }
  .workout-actions { flex-wrap: wrap; }
  .workout-focus { margin-bottom: 14px; }
  .dv .hd { justify-content: space-between; align-items: center; border-bottom: 1px solid var(--divider); padding-bottom: 10px; }
  .dv .hd .l { font: 600 30px/1 var(--font-display); color: #111; }
  .tw { width: 100%; overflow-x: auto; padding-block-end: 5px; }
  .ex { min-width: 920px; }
  #main :is(input, textarea, select), #modal :is(input, textarea, select) { box-shadow: none; }
  #modal { inset: 0; width: min(620px, calc(100% - 32px)); height: fit-content; max-height: 88dvh; margin: auto; background: white; border: 1px solid var(--divider); padding: 0; }
  #modal[open] { display: block; }
  #modal > div { max-height: none; border: 0; box-shadow: none; }
  #modal::backdrop { background: rgb(0 0 0 / .48); }
  .pk button { display: block; width: 100%; padding: 9px; text-align: left; background: white; border: 0; border-bottom: 1px solid var(--divider); cursor: pointer; }
  .pk button:hover { background: #edf5ff; }
  .save-label { display: inline-grid; }
  .save-label span { grid-area: 1/1; }
  .save-label [aria-hidden=true] { opacity: 0; transform: translateY(var(--text-swap-translate-y)); }
  .professional-account > .t-dropdown { background: white; color: #111; border: 1px solid var(--divider); box-shadow: var(--menu-shadow); }
  .professional-account a { color: #075dcc; }
  .professional-header { backdrop-filter: none; box-shadow: 0 5px 0 var(--blue), var(--menu-shadow); }
  .professional-account .t-dropdown a { color: #075dcc; }
  .professional-header .professional-menu-toggle { align-items: center; gap: 6px; }
  .portal-main #workspace:not([hidden]), .portal-main #professional-content:not([hidden]) { animation: none; }
  .calc-layout { padding-block: 12px 40px; gap: clamp(22px, 4vw, 56px); }
  .calc-layout > :is(.calc-panel, .result-panel) { border-radius: 6px !important; }
  .result-panel { position: static; }
  [data-page=calculadoras] .section { padding-block: 0 48px; background: transparent; }
  .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
  .tool-link { display: block; position: relative; background: white; border: 1px solid var(--divider); border-radius: 6px; padding: 18px 42px 18px 16px; box-shadow: var(--surface-shadow); text-decoration: none; color: #111; }
  .tool-link::after { content: "→"; position: absolute; right: 14px; top: 18px; color: #075dcc; }
  .tool-link h2 { font: 600 28px/1.1 var(--font-display); margin: 0 0 4px; }
  .tool-link p { margin: 0; color: #49515a; }
  .tool-link:hover h2 { color: #075dcc; }
  .result-panel .notice { border: 1px solid var(--divider); box-shadow: none; }
  .faq-item {
    padding: 0;
    margin-bottom: 10px;
    border: 1px solid var(--divider);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgb(24 46 75 / .06);
  }
  .faq-item[open] { border-color: #a8caef; }
  .faq-item summary { padding: 14px 48px 14px 16px; }
  .faq-item summary:focus-visible { outline-offset: -3px; border-radius: 7px; }
  .faq-item[open] summary { border-bottom: 0; color: #075dcc; background: #edf5ff; }
  .faq-item summary::after, .faq-item[open] summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid #075dcc;
    border-bottom: 2px solid #075dcc;
    transform: translateY(-65%) rotate(45deg);
  }
  .faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
  .faq-item > p { padding: 12px 16px 16px; }
  .result-panel .result-placeholder { color: #49515a; }
  .result-panel .result-placeholder .ico { display: none; }
  .imc-analysis-item, .gasto-analysis, .gasto-context, .gasto-goal,
  #gasto-resultado-wrap .gasto-metric { background: transparent; border: 0; border-top: 1px solid var(--divider); border-radius: 0; padding: 12px 0; }
  .portal-main th, .portal-main td { border-color: var(--divider); }
  .stepper .step-dot:disabled { cursor: default; }
  .portal-main .student-form .actions { gap: 12px; }
  .t-page-slide .t-page.is-active { position: relative; pointer-events: auto; opacity: 1; transform: none; filter: none; }
  .t-page-slide .t-page.arriving { display: block; }
  .t-page-slide .t-page.leaving { display: block; z-index: 1; bottom: auto; }
  .t-page-slide { overflow: clip; overflow-clip-margin: 5px; }
}
@media screen and (hover: hover) {
  .faq-item:not([open]) summary:hover { background: #f6f9fd; color: #075dcc; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  .faq-item { transition: border-color 180ms ease; }
  .faq-item summary { transition: background-color 180ms ease, color 180ms ease; }
  .faq-item summary::after { transition: transform 220ms ease; }

  @supports selector(details::details-content) and (interpolate-size: allow-keywords) {
    .faq-item { interpolate-size: allow-keywords; }
    .faq-item::details-content {
      block-size: 0;
      overflow: clip;
      opacity: 0;
      transition: block-size 260ms ease, opacity 200ms ease, content-visibility 260ms allow-discrete;
    }
    .faq-item[open]::details-content { block-size: auto; opacity: 1; }
  }
}
@media screen and (min-width: 720px) {
  .calc-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
@media screen and (max-width: 900px) {
  .professional-header .professional-menu-toggle:not([hidden]) { display: inline-flex; }
  .professional-header nav { border-bottom: 2px solid var(--blue); box-shadow: var(--menu-shadow); }
  .stepper { flex-wrap: nowrap; overflow-x: auto; }
  .stepper .step-dot { flex: 1 0 84px; }
}
@media screen and (max-width: 600px) {
  .panel-heading { padding-block: 22px 12px; }
  .calc-grid { grid-template-columns: 1fr; }
  .metrics .panel { padding: 10px 14px; }
  .metrics .panel:nth-child(odd) { border-left: 0; padding-left: 0; }
  .student-tools { gap: 10px; }
  .student-tools label:first-child { flex-basis: 100%; }
  .student-tools label:nth-child(2) { flex: 1; }
  .settings-grid, .student-form, .two { grid-template-columns: minmax(0, 1fr); }
  .eval-card .form-actions { flex-direction: row; }
  .eval-card .form-actions .btn { width: auto; min-width: 0; }
}
@media print { .panel-heading { display: none; } }


/* Workspaces adapt their controls to the available width. */
.step-picker { display: none; }
.history-tools, .history-pagination, .workout-pages { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.history-tools { margin: 0 0 18px; }
.history-tools label { display: grid; gap: 4px; }
.history-pagination, .workout-pages { align-items: center; justify-content: center; padding-top: 12px; }
.portal-list td { overflow-wrap: anywhere; }
@media screen and (max-width: 760px) {
  .stepper { position: sticky; top: 0; z-index: 5; overflow: visible; background: var(--panel-canvas); padding: 8px 0; }
  .stepper .step-dot { display: none; }
  .step-picker { display: flex; align-items: center; gap: 6px; width: 100%; font-weight: 600; }
  .step-picker select { flex: 1; min-width: 0; min-height: 42px; }
  .history-tools label { flex: 1 1 140px; min-width: 0; }
  .history-tools select { min-width: 0; }
  .portal-list, .workout-list, .evolution-table { display: block; min-width: 0 !important; }
  .portal-list thead, .workout-list thead, .evolution-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .portal-list tbody, .workout-list tbody, .evolution-table tbody { display: grid; gap: 9px; }
  .portal-list tr, .workout-list tr, .evolution-table tr { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--divider); border-radius: 8px; }
  .portal-list td, .workout-list td, .evolution-table td { display: block; border: 0 !important; padding: 3px !important; overflow-wrap: anywhere; text-align: left; }
  .portal-list td[data-label]::before, .workout-list td[data-label]::before, .evolution-table td[data-label]::before { content: attr(data-label) " · "; font-weight: 600; }
  .portal-list .portal-list-actions, .workout-list .workout-actions { display: flex; flex-wrap: wrap; gap: 6px; }
}

