.qd-dashboard {
    --qd-surface: var(--qd-theme-surface, #fff);
    --qd-text: var(--qd-theme-text, #29323e);
    --qd-subtle: var(--qd-theme-subtle, #747e8c);
    --qd-border: var(--qd-theme-border, #e8ecf0);
    --qd-track: var(--qd-theme-track, #f0f3f6);
    --qd-green: #16836b;
    --qd-red: #d44941;
    --qd-amber: #cb941d;
    --qd-purple: #8063c6;
    --qd-blue: #3a7cb8;
    --qd-muted: #8a96a8;
    --qd-selection-color: var(--qd-theme-selection-color, #b13623);
    --qd-selection-background: color-mix(in srgb, var(--qd-selection-color) 9%, var(--qd-surface));
    --qd-selection-border: color-mix(in srgb, var(--qd-selection-color) 50%, var(--qd-surface));
    color: var(--qd-text);
    display: grid;
    gap: 18px;
    min-width: 0;
}
.qd-content { display: contents; }
.qd-dashboard button, .qd-dashboard input, .qd-dashboard select { font: inherit; }
.qd-dashboard button { cursor: pointer; }
.qd-dashboard button:disabled { cursor: default; opacity: .48; }
.qd-dashboard button:focus-visible, .qd-dashboard input:focus-visible, .qd-dashboard select:focus-visible, .qd-trend:focus-visible { outline: 3px solid #bd35216b; outline-offset: 3px; }
.qd-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.qd-eyebrow { font-size: .64rem; letter-spacing: .12em; font-weight: 800; color: #bd3521; }
.qd-title h2 { font-size: 1.35rem; font-weight: 800; margin: 5px 0; }
.qd-title p { margin: 0; color: var(--qd-subtle); font-size: .83rem; }
.qd-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; border: 1px solid var(--qd-border); border-radius: 11px; padding: 10px 13px; min-height: 42px; color: var(--qd-text); background: var(--qd-surface); font-size: .78rem !important; font-weight: 700 !important; }
.qd-panel { background: var(--qd-surface); border: 1px solid var(--qd-border); border-radius: 18px; padding: 22px; box-shadow: 0 4px 18px #18263605; min-width: 0; }
.qd-filter-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; }
.qd-filter-heading strong { display: flex; align-items: center; gap: 8px; }
.qd-filter-heading span { color: var(--qd-subtle); font-size: .72rem; }
.qd-period-options { display: flex; gap: 7px; padding: 0; margin-top: 16px; width: 100%; }
.qd-period-options button { flex: 1; min-height: 42px; padding: 8px 10px; border: 1px solid var(--qd-border); border-radius: 10px; background: var(--qd-surface); color: var(--qd-subtle); font-size: .77rem; font-weight: 700; }
.qd-dashboard label, .qd-gender > span { display: flex; flex-direction: column; gap: 7px; color: var(--qd-subtle); font-size: .73rem; font-weight: 700; margin: 0; }
.qd-dashboard input, .qd-dashboard select { min-height: 43px; border: 1px solid var(--qd-border); border-radius: 10px; background: var(--qd-surface); color: var(--qd-text); padding: 9px 11px; width: 100%; font-size: .82rem; font-weight: 500; min-width: 0; }
.qd-month-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 17px 0 12px; }
.qd-month-heading input { max-width: 120px; }
.qd-month-heading > span { color: var(--qd-subtle); font-size: .76rem; }
.qd-months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.qd-months button { min-height: 42px; padding: 8px 10px; border: 1px solid var(--qd-border); border-radius: 10px; color: var(--qd-subtle); background: var(--qd-surface); font-size: .77rem; font-weight: 700; }
.qd-helper { font-size: .73rem; color: var(--qd-subtle); line-height: 1.6; margin: 13px 0 0; }
.qd-week-picker { display: flex; gap: 20px; margin: 18px 0 4px; align-items: end; }
.qd-week-picker label { width: 230px; max-width: 100%; flex-shrink: 0; }
.qd-week-picker p { color: var(--qd-subtle); font-size: .75rem; line-height: 1.6; margin: 0 0 6px; }
.qd-filter-bottom { margin-top: 19px; padding-top: 17px; border-top: 1px solid var(--qd-border); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.qd-gender { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.qd-dashboard .qd-gender .qc-gender-options { display: flex; align-items: stretch; gap: 7px; min-height: 42px; height: auto; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
.qd-dashboard .qd-gender .qc-gender-options button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 0; min-width: 0; min-height: 42px; margin: 0; padding: 8px 10px; border: 1px solid var(--qd-border); border-radius: 10px; line-height: 1.25; background: var(--qd-surface); color: var(--qd-subtle); font-size: .77rem; font-weight: 700; }
.qd-context { display: flex; gap: 24px; justify-content: space-between; align-items: center; background: var(--qd-surface); border: 1px solid var(--qd-border); border-radius: 16px; padding: 20px 22px; }
.qd-context-main { display: grid; gap: 9px; min-width: 0; }
.qd-context-label { color: var(--qd-subtle); font-size: .6rem; font-weight: 800; letter-spacing: .12em; }
.qd-context-main h3 { margin: 0; font-size: 1.12rem; font-weight: 800; line-height: 1.4; }
.qd-context-range { display: flex; align-items: baseline; gap: 8px; margin: 0; color: var(--qd-subtle); font-size: .79rem; line-height: 1.65; }
.qd-filter-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; }
.qd-filter-chips > span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--qd-border); border-radius: 20px; background: var(--qd-track); font-size: .69rem; font-weight: 650; color: var(--qd-subtle); }
.qd-filter-chips > span.is-filtered { border-color: #bd352140; background: #bd35210c; color: var(--qd-text); }
.qd-filter-chips > span.is-filtered i { color: #bd3521; }
.qd-context-updated { display: flex; align-items: start; gap: 10px; padding-left: 22px; border-left: 1px solid var(--qd-border); flex-shrink: 0; }
.qd-context-updated > i { color: var(--qd-subtle); margin-top: 2px; }
.qd-context-updated > div { display: grid; gap: 6px; }
.qd-context-updated span { color: var(--qd-subtle); font-size: .66rem; }
.qd-context-updated strong { color: var(--qd-text); font-size: .82rem; font-weight: 750; }
.qd-context-updated small { color: var(--qd-subtle); font-size: .67rem; }
.qd-select-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.qd-select-field > span { color: var(--qd-subtle); font-size: .73rem; font-weight: 700; }
.qd-select-trigger { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; border: 1px solid var(--qd-border); border-radius: 12px; background: var(--qd-surface); color: var(--qd-text); padding: 10px 13px; text-align: left; }
.qd-select-trigger > span { flex: 1; min-width: 0; font-size: .79rem; line-height: 1.5; overflow-wrap: anywhere; }
.qd-select-trigger > i { color: var(--qd-subtle); font-size: .85rem; flex-shrink: 0; }
.qd-select-trigger > i:last-child { font-size: .68rem; }
.qd-select-trigger[aria-expanded="true"] { border-color: #bd352180; }
.qd-dashboard .qd-select-trigger[aria-expanded="false"] { border-color: var(--qd-border); box-shadow: none; }
.qd-dashboard .qd-select-trigger:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.qd-dashboard .qd-period-options button.active,
.qd-dashboard .qd-months button.active,
.qd-dashboard .qd-gender .qc-gender-options button.active { border-color: var(--qd-selection-border); background: var(--qd-selection-background); color: var(--qd-selection-color); box-shadow: none; }
.qd-dashboard .qd-gender .qc-gender-options button.active i { color: var(--qd-selection-color); }
.qd-round-filter { width: 100%; }
.qd-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.qd-metric-group { display: grid; gap: 12px; }
.qd-metric-group-heading h3 { margin: 0 0 5px; font-size: .95rem; font-weight: 800; }
.qd-metric-group-heading p { margin: 0; color: var(--qd-subtle); font-size: .73rem; line-height: 1.6; }
.qd-metrics.personas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qd-metrics.controles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qd-metric { --accent: var(--qd-blue); background: var(--qd-surface); border: 1px solid var(--qd-border); border-radius: 16px; text-align: left; padding: 16px; display: flex; flex-direction: column; gap: 8px; color: var(--qd-text); min-width: 0; transition: border-color .15s, transform .15s; }
.qd-metric.green { --accent: var(--qd-green); }
.qd-metric.red { --accent: var(--qd-red); }
.qd-metric.amber { --accent: var(--qd-amber); }
.qd-metric.purple { --accent: var(--qd-purple); }
.qd-metric:hover { border-color: var(--accent); transform: translateY(-2px); }
.qd-metric-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; font-size: .75rem; font-weight: 700; line-height: 1.5; }
.qd-metric-top i { color: var(--accent); font-size: 1rem; }
.qd-metric > strong { font-size: 1.85rem; line-height: 1.2; letter-spacing: -.05em; font-weight: 800; color: var(--accent); }
.qd-metric > small { color: var(--qd-subtle); font-size: .67rem; line-height: 1.6; }
.qd-metric-link { color: var(--accent); font-size: .65rem; font-weight: 700; margin-top: auto; padding-top: 4px; }
.qd-method { margin: -4px 0 0; }
.qd-method i { margin-right: 4px; }
.qd-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.qd-panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.qd-panel-heading > div { flex: 1; min-width: 0; }
.qd-panel-heading > .qd-text-button { flex-shrink: 0; white-space: nowrap; min-height: 32px; }
.qd-panel-heading h3 { font-size: .96rem; font-weight: 800; margin: 0 0 6px; }
.qd-panel-heading p { color: var(--qd-subtle); font-size: .73rem; line-height: 1.6; margin: 0; }
.qd-panel-heading > i { color: var(--qd-subtle); }
.qd-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.qd-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--qd-subtle); font-size: .67rem; }
.qd-legend i, .qd-annul-legend i { width: 9px; height: 9px; display: inline-block; border-radius: 3px; flex-shrink: 0; }
.qd-legend .green, .qd-stacked .green, .qd-trend-bars .green { background: var(--qd-green); }
.qd-legend .amber, .qd-stacked .amber, .qd-annul-legend .amber { background: var(--qd-amber); }
.qd-legend .purple, .qd-stacked .purple, .qd-annul-legend .purple { background: var(--qd-purple); }
.qd-legend .red, .qd-track .red, .qd-trend-bars .red { background: var(--qd-red); }
.qd-annul-legend .muted { background: var(--qd-muted); }
.qd-area-row { margin: 22px 0; }
.qd-area-row:last-child { margin-bottom: 0; }
.qd-text-button { border: 0; background: transparent; color: var(--qd-text); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .76rem !important; padding: 0; text-align: left; }
.qd-area-row > button { width: 100%; }
.qd-text-button span { font-size: .68rem; color: var(--qd-subtle); }
.qd-area-row > small { display: block; color: var(--qd-subtle); font-size: .65rem; margin-top: 7px; }
.qd-stacked { height: 15px; background: var(--qd-track); border-radius: 5px; display: flex; overflow: hidden; margin-top: 9px; }
.qd-stacked button { min-width: 2px; border: 0; padding: 0; height: 100%; }
.qd-stacked button:hover { filter: brightness(1.15); }
.qd-annul-chart { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 190px; }
.qd-donut { width: 160px; height: 160px; flex-shrink: 0; border: 0; border-radius: 50%; padding: 20px; display: grid; place-items: center; }
.qd-donut > span { display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--qd-surface); width: 120px; height: 120px; border-radius: 50%; color: var(--qd-text); }
.qd-donut strong { font-size: 2rem; font-weight: 800; }
.qd-donut small { color: var(--qd-subtle); font-size: .72rem; }
.qd-annul-legend { display: grid; gap: 7px; flex: 1; }
.qd-annul-legend button { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 7px; padding: 9px 0; background: transparent; border: 0; color: var(--qd-text); text-align: left; font-size: .72rem; }
.qd-annul-legend small { grid-column: 2 / 4; color: var(--qd-subtle); font-size: .68rem; }
.qd-control-row { display: flex; flex-direction: column; gap: 7px; width: 100%; background: transparent; border: 0; border-radius: 9px; padding: 10px 0; text-align: left; color: var(--qd-text); }
.qd-control-row:hover { background: var(--qd-track); }
.qd-control-row > span:first-child { display: flex; gap: 12px; align-items: start; justify-content: space-between; font-size: .77rem; }
.qd-control-row b { color: var(--qd-red); white-space: nowrap; }
.qd-control-row small { color: var(--qd-subtle); font-size: .66rem; }
.qd-control-row small i { margin-left: 4px; }
.qd-track { width: 100%; height: 7px; border-radius: 5px; background: var(--qd-track); overflow: hidden; display: block; }
.qd-track > span { display: block; height: 100%; border-radius: inherit; }
.qd-trend { display: flex; overflow-x: auto; gap: 14px; align-items: stretch; padding: 8px 3px 14px; min-height: 245px; scrollbar-width: thin; }
.qd-trend-column { width: 95px; min-width: 95px; border: 0; background: transparent; color: var(--qd-text); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px; border-radius: 8px; }
.qd-trend-column:hover { background: var(--qd-track); }
.qd-trend-values { color: var(--qd-green); font-size: .72rem; font-weight: 800; }
.qd-trend-values small { display: block; color: var(--qd-red); font-weight: 650; font-size: .67rem; }
.qd-trend-bars { height: 115px; min-height: 115px; width: 54px; display: flex; align-items: end; gap: 5px; border-bottom: 1px solid var(--qd-border); margin: 9px 0; background: repeating-linear-gradient(to top, transparent 0 28px, var(--qd-border) 28px 29px); }
.qd-trend-bars > span { width: 24px; border-radius: 4px 4px 0 0; }
.qd-trend-column > strong { font-size: .71rem; }
.qd-trend-column > small { font-size: .61rem; color: var(--qd-subtle); line-height: 1.6; margin-top: 3px; }
.qd-person-row { border: 0; background: transparent; color: var(--qd-text); width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 0; text-align: left; border-top: 1px solid var(--qd-border); }
.qd-person-avatar { width: 36px; height: 36px; background: #bd35210e; color: #bd3521; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.qd-person-row .qd-person-rank { display: grid; font-size: .83rem; font-weight: 800; }
.qd-person-name { flex: 1; min-width: 0; display: grid; gap: 4px; }
.qd-person-name strong { font-size: .8rem; overflow-wrap: anywhere; }
.qd-person-name small { font-size: .68rem; color: var(--qd-subtle); }
.qd-person-score { display: grid; gap: 3px; text-align: right; flex-shrink: 0; }
.qd-person-score strong { color: var(--qd-red); font-size: 1rem; }
.qd-person-score small { font-size: .65rem; color: var(--qd-subtle); }
.qd-person-row > i { font-size: .7rem; color: var(--qd-subtle); }
.qd-annul-row { display: flex; justify-content: space-between; align-items: start; gap: 14px; padding: 15px 0; border: 0; border-top: 1px solid var(--qd-border); width: 100%; text-align: left; background: transparent; color: var(--qd-text); }
.qd-annul-row > span:first-child { display: grid; gap: 6px; }
.qd-annul-row strong { font-size: .8rem; }
.qd-annul-row small { color: var(--qd-subtle); font-size: .7rem; }
.qd-reason { color: var(--qd-subtle); font-size: .73rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qd-badge { --badge-color: var(--qd-muted); display: inline-flex; align-items: center; justify-content: center; padding: 5px 9px; border-radius: 20px; color: var(--badge-color); background: color-mix(in srgb, var(--badge-color) 12%, var(--qd-surface)); min-width: 88px; flex-shrink: 0; width: max-content; font-size: .65rem; font-weight: 800; white-space: nowrap; }
.qd-badge.green { --badge-color: var(--qd-green); }
.qd-badge.amber { --badge-color: var(--qd-amber); }
.qd-badge.purple { --badge-color: var(--qd-purple); }
.qd-badge.red { --badge-color: var(--qd-red); }
.qd-empty { min-height: 210px; text-align: center; display: grid; justify-items: center; align-content: center; gap: 12px; }
.qd-empty > i { color: var(--qd-subtle); font-size: 2rem; }
.qd-empty h3 { font-size: 1rem; font-weight: 750; margin: 0; }
.qd-empty p, .qd-chart-empty { color: var(--qd-subtle); font-size: .8rem; line-height: 1.7; margin: 0; }
.qd-chart-empty { padding: 25px 0; }
.qd-placeholder { min-height: 45vh; }
.qd-dialog { width: min(100%, 790px); background: var(--qd-surface); color: var(--qd-text); padding: 22px; }
.qd-dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.qd-dialog-header h3 { font-size: 1.15rem; font-weight: 800; margin: 7px 0; overflow-wrap: anywhere; }
.qd-dialog-header p { color: var(--qd-subtle); font-size: .73rem; line-height: 1.6; }
.qd-detail-search { margin: 12px 0 19px !important; }
.qd-evaluation { border: 1px solid var(--qd-border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.qd-evaluation-heading { display: flex; align-items: center; gap: 12px; border: 0; width: 100%; padding: 14px; background: var(--qd-surface); color: var(--qd-text); text-align: left; }
.qd-evaluation-heading > span:first-child { flex: 1; min-width: 0; display: grid; gap: 5px; }
.qd-evaluation-heading strong { font-size: .8rem; overflow-wrap: anywhere; }
.qd-evaluation-heading small { font-size: .67rem; color: var(--qd-subtle); }
.qd-evaluation-heading > i { color: var(--qd-subtle); font-size: .7rem; }
.qd-evaluation-body { border-top: 1px solid var(--qd-border); padding: 16px; }
.qd-evaluation-body dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 16px; }
.qd-evaluation-body dt { font-size: .65rem; color: var(--qd-subtle); font-weight: 500; margin-bottom: 5px; }
.qd-evaluation-body dd { font-size: .76rem; margin: 0; overflow-wrap: anywhere; }
.qd-observation { padding: 13px; border-radius: 10px; background: var(--qd-track); }
.qd-observation strong { font-size: .73rem; }
.qd-observation p { margin: 5px 0 0; font-size: .76rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.qd-result-summary { font-size: .74rem; color: var(--qd-subtle); margin: 18px 0 10px; }
.qd-control-detail { display: flex; gap: 12px; justify-content: space-between; align-items: start; border-top: 1px solid var(--qd-border); padding: 12px 0; }
.qd-control-detail strong { font-size: .77rem; }
.qd-control-detail p { font-size: .73rem; line-height: 1.7; color: var(--qd-subtle); margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.qd-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--qd-border); }
.qd-pagination button { display: flex; gap: 6px; align-items: center; background: var(--qd-surface); border: 1px solid var(--qd-border); border-radius: 9px; padding: 9px; color: var(--qd-text); font-size: .73rem; min-height: 40px; }
.qd-pagination > span { color: var(--qd-subtle); font-size: .72rem; }
.qd-select-overlay { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: #161b246e; padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); touch-action: none; overscroll-behavior: contain; }
.qd-select-dialog { width: min(100%, 510px); max-height: min(80dvh, 680px); display: flex; flex-direction: column; gap: 16px; min-height: 0; background: var(--qd-surface); color: var(--qd-text); padding: 22px; border: 1px solid var(--qd-border); border-radius: 22px; box-shadow: 0 22px 70px #0003; outline: none; touch-action: pan-y; overscroll-behavior: contain; }
.qd-selector-header { display: flex; align-items: start; gap: 14px; justify-content: space-between; flex-shrink: 0; }
.qd-selector-header h3 { font-size: 1.1rem; font-weight: 800; margin: 6px 0; }
.qd-selector-header p { color: var(--qd-subtle); font-size: .76rem; line-height: 1.6; margin: 0; }
.qd-selector-close { flex: 0 0 34px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--qd-track); color: var(--qd-subtle); font-size: .8rem; }
.qd-dashboard .qd-selector-search { display: flex; flex-direction: row; align-items: center; gap: 8px; border: 1px solid var(--qd-border); border-radius: 10px; padding: 0 11px; color: var(--qd-subtle); }
.qd-selector-search input { border: 0; background: transparent; padding: 10px 0; }
.qd-selector-options { display: grid; gap: 8px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; touch-action: pan-y; padding: 3px; scrollbar-width: thin; }
.qd-selector-option { display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 58px; border: 1px solid var(--qd-border); border-radius: 12px; background: var(--qd-surface); color: var(--qd-text); text-align: left; }
.qd-selector-option > span { display: grid; flex: 1; gap: 5px; min-width: 0; }
.qd-selector-option strong { font-size: .8rem; font-weight: 700; line-height: 1.5; }
.qd-selector-option small { color: var(--qd-subtle); font-size: .69rem; line-height: 1.6; }
.qd-option-icon { color: var(--qd-subtle); font-size: 1rem; }
.qd-option-check { color: var(--qd-muted); font-size: 1rem; }
.qd-selector-option.selected { border-color: #bd35217a; background: #bd35210a; }
.qd-selector-option.selected .qd-option-check, .qd-selector-option.selected .qd-option-icon { color: #bd3521; }
.qd-selector-option:hover { border-color: #bd35217a; }
@media (max-width: 950px) {
    .qd-metrics, .qd-metrics.personas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qd-annul-chart { gap: 15px; }
    .qd-donut { width: 135px; height: 135px; padding: 16px; }
    .qd-donut > span { width: 103px; height: 103px; }
}
@media (max-width: 730px) {
    .qd-charts { grid-template-columns: minmax(0, 1fr); }
    .qd-months { grid-template-columns: repeat(4, 1fr); }
    .qd-panel { padding: 17px; }
    .qd-filter-bottom { gap: 14px; }
    .qd-title h2 { font-size: 1.1rem; }
    .qd-context { align-items: stretch; flex-direction: column; gap: 16px; padding: 18px; }
    .qd-context-updated { border-left: 0; border-top: 1px solid var(--qd-border); padding: 14px 0 0; }
    .qd-week-picker { flex-direction: column; align-items: start; gap: 10px; }
    .qd-annul-chart { gap: 25px; }
}
@media (max-width: 440px) {
    .qd-metrics.personas { grid-template-columns: minmax(0, 1fr); }
    .qd-dashboard { gap: 14px; }
    .qd-title { align-items: start; }
    .qd-title p { font-size: .74rem; }
    .qd-refresh { padding: 9px; font-size: .7rem !important; }
    .qd-filter-bottom { grid-template-columns: minmax(0, 1fr); }
    .qd-select-dialog { padding: 18px 14px; border-radius: 18px; }
    .qd-dashboard .qd-gender .qc-gender-options button { font-size: .72rem; }
    .qd-months button { font-size: .68rem; }
    .qd-month-heading > span { font-size: .7rem; }
    .qd-metrics { gap: 9px; }
    .qd-metric { padding: 13px; }
    .qd-metric-top { font-size: .7rem; }
    .qd-metric > strong { font-size: 1.6rem; }
    .qd-metric > small { font-size: .64rem; }
    .qd-panel-heading { gap: 8px; }
    .qd-panel-heading h3 { font-size: .87rem; }
    .qd-person-row { gap: 9px; flex-wrap: wrap; }
    .qd-person-avatar { display: none; }
    .qd-person-name strong { font-size: .74rem; }
    .qd-person-score small { font-size: .6rem; }
    .qd-dialog { padding: 17px 12px; }
    .qd-evaluation-heading { gap: 7px; padding: 12px 9px; }
    .qd-evaluation-heading small { font-size: .61rem; }
    .qd-badge { min-width: 74px; font-size: .61rem; padding: 5px 7px; }
    .qd-evaluation-body { padding: 12px; }
    .qd-evaluation-body dl { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .qd-metric { transition: none; } }

/* Selector semanal: calendario del mes, se elige la fila completa (lunes a domingo) */
.qd-week-calendar { margin: 16px 0 4px; max-width: 420px; }
.qd-week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qd-week-nav strong { font-size: .86rem; text-transform: capitalize; color: var(--qd-text); }
.qd-week-nav button { border: 1px solid var(--qd-border); background: var(--qd-surface); color: var(--qd-text); border-radius: 9px; width: 34px; height: 34px; display: grid; place-items: center; }
.qd-week-days, .qd-week-row { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.qd-week-days span { font-size: .66rem; font-weight: 700; color: var(--qd-subtle); padding: 4px 0; }
.qd-week-row { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 7px 0; margin: 2px 0; color: var(--qd-text); font-size: .8rem; font-weight: 600; cursor: pointer; }
.qd-week-row:hover:not(:disabled) { background: var(--qd-track); }
.qd-week-row .out { color: var(--qd-subtle); opacity: .55; }
.qd-week-row.active { background: #bd3521; border-color: #bd3521; color: #fff; }
.qd-week-row.active .out { color: #fff; opacity: .75; }
.qd-week-calendar p { color: var(--qd-subtle); font-size: .72rem; margin: 6px 0 0; }

/* Carga manual de datos */
.qd-load-row { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--qd-border); }
.qd-load-hint { font-size: .74rem; color: var(--qd-amber); display: inline-flex; gap: 6px; align-items: center; margin-right: auto; }
.qd-load { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: #bd3521; color: #fff; font-weight: 700; padding: 11px 18px; min-height: 44px; font-size: .82rem; box-shadow: 0 5px 14px #bd352126; }
.qd-load:disabled { opacity: .55; box-shadow: none; }
@media (max-width: 640px) { .qd-load { width: 100%; } .qd-week-calendar { max-width: none; } }

/* Dashboard por área (Panamá BPM) */
.qd-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.qd-range-error { color: var(--qd-red); }
.qd-dashboard .qd-filter-bottom > label { min-width: 0; }
.qd-chip-scroll { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 0 14px; -webkit-overflow-scrolling: touch; }
.qd-chip-scroll button { flex: 0 0 auto; min-height: 38px; padding: 7px 12px; border: 1px solid var(--qd-border); border-radius: 20px; background: var(--qd-surface); color: var(--qd-subtle); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.qd-dashboard .qd-chip-scroll button.active { border-color: var(--qd-selection-border); background: var(--qd-selection-background); color: var(--qd-selection-color); }
.qd-area-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.qd-area-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px; border: 1px solid var(--qd-border); border-radius: 14px; background: var(--qd-surface); color: var(--qd-text); text-align: left; }
.qd-area-card.total { background: var(--qd-track); }
.qd-dashboard .qd-area-card:disabled { opacity: 1; }
.qd-area-card:not(:disabled):hover { border-color: var(--qd-red); }
.qd-area-card-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; font-size: .8rem; line-height: 1.35; }
.qd-area-card-head .qd-badge { flex-shrink: 0; }
.qd-area-card-pct { display: flex; align-items: baseline; gap: 8px; }
.qd-area-card-pct b { font-size: 1.45rem; font-weight: 800; letter-spacing: -.04em; }
.qd-area-card-pct b.ok { color: var(--qd-green); }
.qd-area-card-pct b.bad { color: var(--qd-red); }
.qd-area-card-pct small, .qd-area-card > small { color: var(--qd-subtle); font-size: .68rem; line-height: 1.5; }
.qd-track .green { background: var(--qd-green); }
.qd-matrix-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--qd-border); border-radius: 12px; }
.qd-matrix-scroll:focus-visible { outline: 3px solid #bd35216b; outline-offset: 3px; }
.qd-matrix { border-collapse: collapse; width: max-content; min-width: 100%; font-size: .72rem; }
.qd-matrix th, .qd-matrix td { padding: 9px 10px; border-bottom: 1px solid var(--qd-border); text-align: center; white-space: nowrap; }
.qd-matrix thead th { color: var(--qd-subtle); font-weight: 700; background: var(--qd-track); }
.qd-matrix tbody th { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 700; background: var(--qd-surface); max-width: 190px; white-space: normal; min-width: 150px; }
.qd-matrix tr.total th, .qd-matrix tr.total td { font-weight: 800; }
.qd-matrix td strong { display: block; font-size: .78rem; }
.qd-matrix td small { color: var(--qd-subtle); font-size: .64rem; }
.qd-matrix td.ok strong { color: var(--qd-green); }
.qd-matrix td.bad strong { color: var(--qd-red); }
.qd-matrix td.empty { color: var(--qd-subtle); }
.qd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.qd-dot.ok { background: var(--qd-green); }
.qd-dot.bad { background: var(--qd-red); }
.qd-case { display: flex; flex-direction: column; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--qd-border); min-width: 0; }
.qd-case:last-of-type { border-bottom: 0; }
.qd-case-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; font-size: .78rem; }
.qd-case-head .qd-badge { flex-shrink: 0; }
.qd-case > small { color: var(--qd-subtle); font-size: .67rem; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .qd-range { grid-template-columns: 1fr; }
    .qd-area-list { grid-template-columns: 1fr; }
}
.qd-print-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.qd-print-row small { color: var(--qd-subtle); font-size: .72rem; }
/* Año: el campo no se encoge (antes cortaba «2026» en pantallas angostas). */
.qd-dashboard .qd-month-heading label { flex: 0 0 116px; min-width: 116px; }
.qd-dashboard .qd-month-heading input { max-width: none; width: 100%; text-align: center; }
.qd-month-heading > span { text-align: right; }
/* Cinco agrupaciones (dashboard por área): cuadrícula pareja, sin desbordar a lo ancho. */
.qd-period-options.qd-period-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.qd-period-options.qd-period-5 button { min-width: 0; padding: 8px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 440px) { .qd-period-options.qd-period-5 button { font-size: .7rem; } }
/* Selección de un día en el calendario. */
.qd-day-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin: 2px 0; }
.qd-day-row button { border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 7px 0; color: var(--qd-text); font-size: .8rem; font-weight: 600; }
.qd-day-row button:hover:not(:disabled) { background: var(--qd-track); }
.qd-day-row button.out { color: var(--qd-subtle); opacity: .55; }
.qd-day-row button.active { background: #bd3521; border-color: #bd3521; color: #fff; opacity: 1; }
