/* V3 entry: screen styles for this work package only. Built on css/odoo.css classes (see its header and docs/V3_A_REPORT.md); no new colours or sizes outside the Odoo tokens. */

/* ===== Control panel: title, Date / Person facets, previous / next day ===== */
.e-cp { padding: 0 0 16px; }                                   /* <main> already gives the 16px gutter */
.e-search { flex: 0 1 auto; width: auto; padding: 4px 8px; gap: 8px; }
.e-fac { flex: 0 1 auto; padding-right: 0; }
.e-fac .o_searchview_facet_label { margin-right: 6px; }
.e-fac select {
  width: auto; height: 20px; min-height: 0; padding: 0 18px 0 0; border: 0; border-radius: 0; box-shadow: none;
  background-color: transparent; background-position: right 2px center; background-size: 10px 10px;
  font: inherit; color: var(--odoo-body-color); max-width: 100%;
}
.e-fac select:focus { box-shadow: none; outline: 0; }
.e-fac select:disabled { background-color: transparent; color: var(--odoo-body-color); cursor: default; }
.e-fac:focus-within { box-shadow: var(--odoo-focus-ring); }
.e-pager .o_pager_btn:disabled { opacity: .5; cursor: default; }
.e-pager .o_pager_btn:disabled:hover { background: var(--odoo-light); }

/* ===== The sheet: label-above flat fields, zones as group titles ===== */
.o_form_sheet_bg.e-screen { padding: 0; }                              /* <main> already gives the 16px gutter */
.e-sheet > .de-rem { display: block; margin: 0 0 24px; }
.e-fld { display: block; min-width: 0; }
.e-zones { gap: 24px var(--odoo-gutter); margin: 0; }
.e-zone { min-width: 0; }
.e-zh { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 0 0 7px; border-bottom: 1px solid var(--odoo-gray-200); min-width: 0; }
.e-zh .o_tag { flex: 0 0 auto; }
.e-zt { font-size: var(--odoo-fs-base); line-height: 21px; font-weight: 500; color: var(--odoo-heading-color); min-width: 0; overflow-wrap: anywhere; }
.e-zf { display: grid; gap: 8px 16px; }
.e-z3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.e-z2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.e-zf .e-fld { margin: 0; }
/* number boxes: right-aligned like an Odoo monetary / integer field, without the room a dropdown caret needs */
.e-sheet input[type="number"], .e-petty input[type="number"], .e-line input[type="number"] { padding-right: 0; }
.e-petty input[type="number"] { text-align: left; }
.e-fld span[id^="lk_"] { text-align: right; }

/* AUTO SCORE: the live total strip, drawn like the statusbar box (white, 1px #DEE2E6, radius 8) */
.e-sheet > .de-bar { margin-top: 24px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; gap: 16px; align-items: center; }
.e-stat { display: inline-flex; align-items: stretch; min-height: 52px; background: var(--odoo-light); border: 1px solid var(--odoo-gray-300); border-radius: var(--odoo-radius-lg); overflow: hidden; }
.e-seg { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 16px; border-left: 1px solid var(--odoo-gray-300); min-width: 0; }
.e-seg-h { flex-direction: row; align-items: center; border-left: 0; background: var(--odoo-gray-100); }
.e-k { display: flex; align-items: center; gap: 2px; font-size: 12px; line-height: 15px; color: var(--o-muted); white-space: nowrap; }
.e-v { display: flex; align-items: center; gap: 8px; font-size: var(--odoo-fs-h3); line-height: 25px; font-weight: 500; color: var(--odoo-heading-color); white-space: nowrap; }
.e-v b { font-weight: 500; }
.e-v .o-pie { width: 18px; height: 18px; flex: 0 0 auto; }
.e-sp { flex: 1 1 0; min-width: 0; }
.e-save { min-width: 128px; }
.e-ro { font-size: var(--odoo-fs-small); color: var(--o-muted); }

/* ===== Petty cash: an editable grid, one box per day, list footer for the total ===== */
.e-petty { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px 16px; }
.e-petty .e-pd { display: block; text-align: left; font-size: var(--odoo-fs-small); font-weight: 500; color: var(--odoo-heading-color); }
.e-pl { display: block; margin: 0 0 4px; font-size: var(--odoo-fs-small); line-height: 19.5px; }
.e-off .e-pl { color: var(--o-muted); font-weight: 400; }
.e-cur .e-pl { color: var(--odoo-link); font-weight: 700; }
.e-foot { display: flex; align-items: center; margin: 16px -16px -16px; padding: 0 16px; height: 37.3px; border-top: 1px solid var(--odoo-gray-300);
  font-size: var(--odoo-fs-base); font-weight: 500; color: var(--odoo-heading-color); background: var(--odoo-light); }

/* ===== New Invoice: the line editor ("Add a line" teal link) ===== */
.e-line { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.e-w-cust { flex: 1 1 220px; }
.e-w-day { flex: 0 0 72px; }
.e-w-tot, .e-w-mg { flex: 0 0 144px; }
.e-line select { width: 100%; }
.e-line input { width: 100%; }
.e-add { align-self: flex-start; margin-top: 29px; font-weight: 400; white-space: nowrap; }

/* ===== Lists: cards without inner padding, status badge buttons, trash icons ===== */
.e-flush > .card-b { padding: 0; }
.btn.e-st { height: auto; min-height: 0; padding: 3px 9.84px; border: 0; border-radius: var(--odoo-radius-pill); box-shadow: none; position: relative;
  font-size: 12px; font-weight: 500; line-height: 14px; }
.btn.e-st-ok { background: var(--o-soft-success); color: var(--o-success-text); }
.btn.e-st-wait { background: var(--o-soft-warning); color: var(--o-warning-text); }
.btn.e-st:hover { filter: brightness(.95); }
.btn.e-trash { height: auto; min-height: 0; padding: 4px 8px; border: 0; box-shadow: none; color: var(--o-danger-text); line-height: 0; }
.btn.e-trash:hover { background: var(--odoo-danger-bg-subtle); color: var(--o-danger-text); text-decoration: none; }
.btn.e-trash svg { display: block; }

/* ===== Small screens: single column, finger-sized targets ===== */
@media (max-width: 991.98px) {
  .e-search { order: 3; flex: 1 1 100%; width: 100%; }
}
@media (max-width: 575.98px) {
  .e-z3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .e-search { flex-direction: column; align-items: stretch; padding: 0; gap: 8px; border: 0; background: transparent; border-radius: 0; }
  .e-fac { width: 100%; background: var(--odoo-light); border: .667px solid var(--odoo-gray-400); }
  .e-fac select { flex: 1 1 auto; width: 100%; }
  .e-stat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .e-seg-h { display: none; }
  .e-seg { padding: 6px 10px; }
  .e-seg:nth-child(2) { border-left: 0; }
  .e-v { font-size: var(--odoo-fs-h5); gap: 6px; }
  .e-w-day, .e-w-tot, .e-w-mg { flex: 1 1 40%; }
  .e-add { margin-top: 0; }
}
@media (max-width: 768px) {
  .e-sheet > .de-bar { padding: 8px; background: var(--odoo-light); border: 1px solid var(--odoo-gray-300); border-radius: var(--odoo-radius-lg); box-shadow: none; }
  .e-sheet > .de-bar .e-stat { flex: 1 1 100%; }
  .e-sp { display: none; }
}
@media (pointer: coarse) {
  .e-fac { height: auto; min-height: 40px; }
  .e-fac select { min-height: 40px; height: 40px; }
  .e-pager, .e-pager .o_pager_btn { height: 40px; }
  .btn.e-st::after { content: ""; position: absolute; inset: -12px -6px; }
  .btn.e-trash { min-width: 40px; min-height: 40px; }
}

/* ===== Print: the Entry tab prints as the lists; the form and its controls are screen-only ===== */
@media print {
  .e-screen, .e-cp, .e-line { display: none !important; }
  .e-flush > .card-b { padding: 6px 10px; }
  tfoot td { padding: 4px 6px; font-size: 10px; font-weight: 600; background: var(--odoo-gray-100); }
  .e-petty { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 4px; }
  .e-foot { margin: 6px -10px -6px; height: auto; padding: 4px 10px; font-size: 10px; }
}
