/* V3 settings: screen styles for this work package only (WP-E3: Monthly + Settings). Built on css/odoo.css classes (see its header and docs/V3_A_REPORT.md); no new colours or sizes outside the Odoo tokens, except the calendar-event palette values quoted below (reference apps/02-calendar/NOTES.md section 5).
   Layout (Odoo form view): .e3 > .o_control_panel.e3-cp (title + facet) + .o_form_sheet.e3-sheet > .o_notebook (.nav-tabs tabs + .o-tab-pane panes) holding the existing .card blocks (Odoo settings block: grey .card-h band + body). */

.e3 { min-width: 0; }
/* <main> already pads the page 16px, so the control panel only keeps its vertical gap */
.e3 > .o_control_panel.e3-cp { padding: 0 0 16px; }
.e3 .cp-title h1 { font-size: var(--odoo-fs-h4); line-height: 25.2px; font-weight: 500; color: var(--odoo-heading-color); }
.e3 .e3-facet { height: 26px; font-size: var(--odoo-fs-small); }
.e3 .e3-facet .o_searchview_facet_label { padding: 0 8px; }
.e3 > .alert { margin: 0 0 16px; }
.e3 .e3-sheet { overflow: visible; }
.e3 .o_notebook { margin-top: 0; }
.e3 .nav-link { font-weight: 400; }
.e3 .nav-link.active, .e3 .nav-link[aria-selected="true"] { font-weight: 500; }
.e3 .nav-link:hover:not(.active) { background: var(--odoo-gray-200); }
.e3 .nav-link:focus-visible { outline: 0; box-shadow: var(--odoo-focus-ring); position: relative; z-index: 1; }
.e3 .o-tab-pane { padding: 24px 0 0; }
.e3 .o-tab-pane[hidden] { display: none; }
.e3 .o-tab-pane > .card:last-child, .e3 .o-tab-pane > .g > .card:last-child { margin-bottom: 0; }
.e3 .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: stretch; }
.e3 .o-tab-pane > .g { align-items: start; }
.e3 .o-tab-pane > .kpi-grid { margin-bottom: 24px; }
.e3 .o-tab-pane > .kpi-grid:last-child { margin-bottom: 0; }

/* ---------- form fields (label above, flat input, muted help) ---------- */
.e3 .e3-field { margin: 0 0 16px; max-width: 560px; }
.e3 .e3-field:last-child { margin-bottom: 0; }
.e3 .e3-fl { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; }
.e3 .e3-fl .o-label { margin: 0; }
.e3 .e3-field input { max-width: 100%; text-align: left; }
.e3 .o_group.e3-group .e3-field input { width: 100% !important; max-width: 280px; }
.e3 .e3-help { display: block; margin-top: 8px; font-size: var(--odoo-fs-small); line-height: 19.5px; color: var(--o-muted); }
.e3 .e3-help b { color: var(--odoo-body-color); font-weight: 500; }
.e3 .o_group.e3-group { margin: 0; }
.e3 .o_group.e3-group > .e3-field { margin-bottom: 0; max-width: none; }

/* ---------- editable lists (targets, expenses, activity weights, benchmarks, thresholds) ---------- */
.e3 .o-tab-pane .card-b > table { margin: 0 -16px; width: calc(100% + 32px); }
.e3 .o-tab-pane .card-b > p { margin: 0 0 8px !important; font-size: var(--odoo-fs-small) !important; line-height: 19.5px; color: var(--o-muted) !important; }
.e3 table input[type="number"] { padding-right: 0; text-align: right; margin-left: auto; }
.e3 table input[type="text"] { width: 100% !important; min-width: 140px; max-width: 320px; }
/* money and number columns of the lists are right-aligned, header and cell (which columns: by pane and position) */
#e3mo-exp-p th:nth-child(n+3):not(:last-child), #e3mo-exp-p td:nth-child(n+3):not(:last-child),
#e3mo-tgt-p th:nth-child(n+2):not(:last-child), #e3mo-tgt-p td:nth-child(n+2):not(:last-child),
#e3st-act-p th:nth-child(n+2), #e3st-act-p td:nth-child(n+2),
#e3st-bench-p th:nth-child(2), #e3st-bench-p td:nth-child(2), #e3st-bench-p th:nth-child(3), #e3st-bench-p td:nth-child(3),
#e3st-thr-p table:not(.tn) th:nth-child(2), #e3st-thr-p table:not(.tn) td:nth-child(2),
#e3st-thr-p table.tn th:nth-child(3), #e3st-thr-p table.tn td:nth-child(3) { text-align: right; }
.e3 table td > [id^="lk_"] { min-height: 0 !important; margin-top: -2px; line-height: 14px; text-align: right; }
.e3 table td > [id^="lk_"]:empty { display: none !important; }
.e3 td .e3-hint { font-size: var(--odoo-fs-small); line-height: 19.5px; color: var(--o-muted); font-weight: 400; white-space: normal; }
.e3 .e3-sfx { display: inline-block; width: 16px; padding-left: 4px; text-align: left; color: var(--o-muted); }
.e3 .e3-trash { width: 28px; height: 28px; padding: 0; color: var(--odoo-gray-600); border-radius: var(--odoo-radius); }
.e3 .e3-trash:hover { background: var(--odoo-danger-bg-subtle); color: var(--o-danger-text); text-decoration: none; }
.e3 .e3-trash:focus-visible { box-shadow: var(--odoo-focus-ring); }
.e3 .e3-trash svg { display: block; }
/* "Add a line" row under a list, with the list total on the right (Odoo list footer) */
.e3 .e3-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 0 -16px -16px; padding: 4px 16px; min-height: 37.3px; }
.e3 .e3-foot .btn-link { padding: 0; font-weight: 500; }
.e3 .e3-total { margin-left: auto; font-size: var(--odoo-fs-base); font-weight: 500; color: var(--odoo-heading-color); }
.e3 table + .e3-foot { border-top: .67px solid var(--odoo-gray-300); }
.e3 .card-b > .e-none + .e3-foot { margin: 8px 0 -8px; padding: 4px 0; }

/* ---------- working calendar: Odoo calendar month view (white grid, hairlines, number on top, event-style bar) ---------- */
.e3 .cal { gap: 0; max-width: 840px; border: 1px solid var(--odoo-gray-300); border-radius: var(--odoo-radius-xl) var(--odoo-radius-xl) 0 0; overflow: hidden; background: var(--odoo-light); }
.e3 .cal-h { padding: 8px 0; font-size: 12px; line-height: 18px; font-weight: 500; text-align: center; text-transform: uppercase; color: var(--odoo-body-color);
  border-bottom: .667px solid var(--odoo-gray-300); border-right: .667px solid var(--odoo-gray-300); }
.e3 .cal-h:nth-child(7) { border-right: 0; }
.e3 .cal > div:not(.cal-h):not(.cal-d) { min-height: 72px; background: var(--odoo-gray-100); border-right: .667px solid var(--odoo-gray-300); border-bottom: .667px solid var(--odoo-gray-300); }
.e3 .cal-d {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; width: 100%; height: auto; min-height: 72px; padding: 6px 6px 8px;
  box-sizing: border-box; border: 0; border-right: .667px solid var(--odoo-gray-300); border-bottom: .667px solid var(--odoo-gray-300); border-radius: 0;
  background: var(--odoo-light); color: var(--odoo-body-color); font-family: var(--odoo-font); font-size: var(--odoo-fs-base); font-weight: 400; line-height: 26px; text-align: center;
}
.e3 .cal > :nth-child(7n) { border-right: 0; }
/* the date number is a 26px circle, as in the month view */
.e3 .cal-d > span { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; font-size: var(--odoo-fs-base); font-weight: 500; }
/* the state is an event-style bar (17.8px high, radius 3px, 11.9px text); a normal working day has none */
.e3 .cal-d small { display: block; width: 100%; max-width: 100%; height: 17.8px; min-height: 17.8px; padding: 0 6px; border-radius: 3px; box-sizing: border-box;
  font-size: 11.9px; font-weight: 400; line-height: 17.8px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--odoo-body-color); }
.e3 .cal-d.on small { visibility: hidden; }
/* Sunday off: the weekend grey of the calendar (#E7EBED at 50%) */
.e3 .cal-d.off { background: rgba(231, 235, 237, .5); color: var(--o-muted); }
.e3 .cal-d.off small { color: var(--o-muted); }
/* Sunday worked: soft green day, event colour 10 (fill #b8e4be); weekday holiday: soft red day, event colour 1 (fill #f7a1a1) */
.e3 .cal-d.wk { background: var(--o-soft-success); }
.e3 .cal-d.wk small { background: var(--odoo-tag-10-bg); }
.e3 .cal-d.hol { background: var(--o-soft-danger); }
.e3 .cal-d.hol small { background: var(--odoo-tag-1-bg); }
.e3 button.cal-d { cursor: pointer; }
.e3 button.cal-d:hover { background: var(--odoo-teal-tint); }
.e3 button.cal-d.off:hover { background: var(--odoo-gray-200); }
.e3 button.cal-d:focus-visible { outline: 2px solid var(--odoo-link); outline-offset: -2px; z-index: 1; }
.e3 div.cal-d { cursor: default; }
.e3 .cal-lg { gap: 8px 16px; margin: 12px 0 0; font-size: var(--odoo-fs-small); color: var(--odoo-body-color); }
.e3 .cal-sw { width: 14px; height: 14px; border-radius: 3px; border: .667px solid var(--odoo-gray-400); background: var(--odoo-light); }
.e3 .cal-sw.off { background: rgba(231, 235, 237, .5); }
.e3 .cal-sw.wk { background: var(--odoo-tag-10-bg); border-color: var(--odoo-tag-10-border); }
.e3 .cal-sw.hol { background: var(--odoo-tag-1-bg); border-color: var(--odoo-danger); }
.e3 #cal_sum { font-size: var(--odoo-fs-base) !important; margin: 0 0 4px !important; }
@media (pointer: coarse), (max-width: 768px) { .e3 .cal-d { min-height: 64px; padding: 4px 2px 6px; } .e3 .cal-d small { padding: 0 2px; text-align: center; font-size: 10px; } }
@media (max-width: 575.98px) { .e3 .cal-d small { font-size: 0; height: 6px; min-height: 6px; width: 60%; } .e3 .cal-d.off small { background: var(--odoo-gray-400); } }

/* ---------- small screens ---------- */
@media (max-width: 991.98px) {
  .e3 .o-tab-pane { padding-top: 16px; }
  .e3 .o_group.e3-group { grid-template-columns: 1fr; }
  .e3 .e3-field { max-width: none; }
}
@media (max-width: 575.98px) {
  .e3 .kpi-grid { grid-template-columns: 1fr 1fr; }
  .e3 .nav-link { padding: 8px 12px; }
}

/* ---------- print: a notebook prints every tab, without the tab strip ---------- */
@media print {
  .e3 .nav-tabs, .e3 .e3-cp { display: none !important; }
  .e3 .o-tab-pane[hidden] { display: block !important; }
  .e3 .o_form_sheet { border: 0; padding: 0; }
}
