/* ==========================================================================
   apptek-look.css — the portal "go-to look" (Adam 2026-09-30), shared by every page.
   Reference: Administration → Job Reviews (homepage/public/project-reports.html).
   Loaded LAST in <head> (after the page's own <style>), so:
     · element-level page defaults (td{…}, table th{…}, select{…}) are replaced;
     · class-level page rules (.matrix td, tr.overdue td, td.bad) still win —
       row-status colours, compact grids and highlighted cells keep working.
   Screen only: printing and the print windows pages open are untouched.
   Company values live in the --lk-* tokens below; AE Scaffold copies this file
   and changes only the tokens.
   ========================================================================== */
:root {
  --lk-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --lk-ink: #111827;
  --lk-muted: #6b7280;
  --lk-th-bg: #f9fafb;
  --lk-th-ink: #4b5563;
  --lk-line: #dfe3e8;
  --lk-stripe: #eef1f5;
  --lk-hover: #e1eaf6;
  --lk-ctl-line: #d1d5db;
  --lk-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23475467' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  /* the shared component sheet (ui-core.css) reads its font from here */
  --ap-font: var(--lk-font);
}

/* ---- everywhere on screen ---- */
@media screen {
  /* one font on every computer (Windows used to fall back to thin Segoe UI) */
  html body { font-family: var(--lk-font) !important; }
  html body :is(button, input, select, textarea, optgroup) { font-family: inherit; }

  /* dropdowns: the same rounded control on Windows and Mac */
  select:not([multiple]):not([size]) {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    border-radius: 8px; padding-right: 32px !important;
    background-image: var(--lk-chevron) !important;
    background-repeat: no-repeat !important;
    background-position: right 11px center !important;
    background-size: 12px 8px !important;
  }
  select::-ms-expand { display: none; }

  /* type floor: nothing under 12px. Inline sizes written by page scripts
     (style="font-size:11px") are lifted here, so no script is edited. */
  [style*="font-size:9px"],
  [style*="font-size: 9px"],
  [style*="font-size:9.5px"],
  [style*="font-size: 9.5px"],
  [style*="font-size:10px"],
  [style*="font-size: 10px"],
  [style*="font-size:10.5px"],
  [style*="font-size: 10.5px"],
  [style*="font-size:11px"],
  [style*="font-size: 11px"],
  [style*="font-size:11.5px"],
  [style*="font-size: 11.5px"],
  [style*="font-size:.6rem"],
  [style*="font-size: .6rem"],
  [style*="font-size:.65rem"],
  [style*="font-size: .65rem"],
  [style*="font-size:.7rem"],
  [style*="font-size: .7rem"],
  [style*="font-size:.72rem"],
  [style*="font-size: .72rem"],
  [style*="font-size:0.6rem"],
  [style*="font-size: 0.6rem"],
  [style*="font-size:0.65rem"],
  [style*="font-size: 0.65rem"],
  [style*="font-size:0.7rem"],
  [style*="font-size: 0.7rem"],
  [style*="font-size:0.72rem"],
  [style*="font-size: 0.72rem"] { font-size: 12px !important; }

  /* the shared component sheet (ui-core.css): its 11px labels, counts and tags */
  .ap-eyebrow, .ap-side-brand small, .ap-nav-label, .ap-search kbd,
  .ap-filters .ap-field > .ap-label, .ap-filters .ap-field label { font-size: 12px; }
  .ap-nav .ap-count, .ap-tag, .ap-tabs [role="tab"] .ap-count, .ap-pill { font-size: 13px; }
  .ap-table td .secondary { font-size: 13px; }
}

/* ---- tables: desktop and tablet only, so phone card-layouts keep their own styling ---- */
@media screen and (min-width: 768px) {
  /* 15px text, roomy rows, light-grey uppercase headers */
  html body table th {
    background: var(--lk-th-bg); color: var(--lk-th-ink);
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 12px 14px; border-bottom: 1px solid var(--lk-line); vertical-align: bottom;
  }
  html body table td {
    font-size: 15px; line-height: 1.4;
    padding: 12px 14px; border-bottom: 1px solid var(--lk-line); vertical-align: top;
  }
  /* stripes + hover sit on the ROW with zero specificity, so any page colouring of a
     row or a cell (overdue, error, selected, totals) still paints over them */
  :where(table > tbody > tr:nth-child(even)) { background: var(--lk-stripe); }
  :where(table > tbody > tr:hover) { background: var(--lk-hover); }

  /* table cells sized inline by page scripts (<td style="font-size:12px">) read at table size too */
  td[style*="font-size:12px"],
  td[style*="font-size: 12px"],
  td[style*="font-size:12.5px"],
  td[style*="font-size: 12.5px"],
  td[style*="font-size:13px"],
  td[style*="font-size: 13px"],
  td[style*="font-size:13.5px"],
  td[style*="font-size: 13.5px"],
  td[style*="font-size:14px"],
  td[style*="font-size: 14px"],
  td[style*="font-size:.8rem"],
  td[style*="font-size: .8rem"],
  td[style*="font-size:0.8rem"],
  td[style*="font-size: 0.8rem"],
  td[style*="font-size:.85rem"],
  td[style*="font-size: .85rem"],
  td[style*="font-size:0.85rem"],
  td[style*="font-size: 0.85rem"],
  td[style*="font-size:.875rem"],
  td[style*="font-size: .875rem"],
  td[style*="font-size:0.875rem"],
  td[style*="font-size: 0.875rem"] { font-size: 15px !important; }

  /* the shared ui-core table component */
  .ap-table { font-size: 15px; }
  .ap-table th { background: var(--lk-th-bg); color: var(--lk-th-ink); letter-spacing: .04em; padding: 12px 14px; border-bottom-color: var(--lk-line); }
  .ap-table td { font-size: 15px; padding: 12px 14px; border-bottom-color: var(--lk-line); vertical-align: top; }
  .ap-table.is-dense th, .ap-table.is-dense td { padding: 9px 12px; }
  .ap-table tbody tr:nth-child(even) td { background: var(--lk-stripe); }
  .ap-table tbody tr:hover td { background: var(--lk-hover); }
}

/* ==========================================================================
   kit ae-look-2-quiet-fields (2026-11-15, AE look audit: "pages look editable all the time")
   1. Quiet fields (opt-in): put class="lk-quiet" on a read-mostly area (a table of rows someone reviews, a settings card). Its text boxes,
      dropdowns and notes read as text - no box, no arrow - and the box appears on hover or when the field has the cursor, exactly as the
      CRM's fields (crm-ui.css). Nothing else changes: a click edits as before, Enter / blur still save. Filters and real forms keep their
      boxes (do not opt them in). On a touch screen (no hover) a faint line and the dropdown arrow stay, so a field can still be found.
      The CRM person page's Account card (Sales rep) is opted in here, so no CRM script changes for it.
   2. Read-only and disabled boxes everywhere read as plain text: they cannot be changed, so they must not look like they can.
      Buttons, tick boxes and radio buttons keep their look. A page that wants the box anyway puts class="lk-box" on the field.
   ========================================================================== */
:root {
  --lk-q-line: #d9dee5;
  --lk-q-focus: var(--co-accent, var(--ap-red, #E30613));
  --lk-q-place: #8a929c;
  --lk-chevron-faint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A0A7B0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
@media screen {
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) :is(input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=image]), select, textarea):not(.lk-box) {
    border-color: transparent !important; background-color: transparent !important; box-shadow: none !important;
    transition: border-color .12s, background-color .12s, box-shadow .12s;
  }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) :is(input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=image]), select, textarea):not(.lk-box):not(:disabled):not([readonly]):hover { border-color: var(--lk-q-line) !important; background-color: #fff !important; }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) :is(input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=image]), select, textarea):not(.lk-box):not(:disabled):not([readonly]):focus {
    border-color: var(--lk-q-focus) !important; background-color: #fff !important; outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lk-q-focus) 22%, transparent) !important;
  }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) select:not([multiple]):not([size]):not(.lk-box) { background-image: none !important; cursor: pointer; }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) select:not([multiple]):not([size]):not(.lk-box):not(:disabled):is(:hover, :focus) { background-image: var(--lk-chevron) !important; }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) :is(input, textarea)::placeholder { color: var(--lk-q-place); opacity: 1; }
  .lk-quiet select:not(.lk-box):has(> option:checked[value=""]) { color: var(--lk-q-place); }   /* an unset choice ("Not set") reads muted, like the CRM's "Add ..." */
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) input[type=number]:not(.lk-box) { text-align: right; }   /* numbers line up with their right-aligned column */
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) select option { color: var(--lk-ink); }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) input[type=number]:not(.lk-box):not(:hover):not(:focus) { -moz-appearance: textfield; }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) input[type=number]:not(.lk-box):not(:hover):not(:focus)::-webkit-inner-spin-button,
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) input[type=number]:not(.lk-box):not(:hover):not(:focus)::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
  :is(.lk-quiet, html.crm-ui .a3 .a3-acc) input[type=date]:not(.lk-box):not(:hover):not(:focus)::-webkit-calendar-picker-indicator { opacity: 0; }
  @media (hover: none) {
    :is(.lk-quiet, html.crm-ui .a3 .a3-acc) :is(input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=image]), select, textarea):not(.lk-box):not(:disabled):not([readonly]) { border-color: var(--lk-line) !important; }
    :is(.lk-quiet, html.crm-ui .a3 .a3-acc) select:not([multiple]):not([size]):not(.lk-box):not(:disabled) { background-image: var(--lk-chevron-faint) !important; }
  }

  /* 2. read-only / disabled = plain text */
  :is(input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=image]), select, textarea):is([readonly], :disabled):not(.lk-box) {
    border-color: transparent !important; background-color: transparent !important; box-shadow: none !important;
    color: var(--lk-ink) !important; -webkit-text-fill-color: var(--lk-ink); opacity: 1 !important; cursor: default;
  }
  select:disabled:not(.lk-box) { background-image: none !important; }
  input[type=date]:is([readonly], :disabled):not(.lk-box)::-webkit-calendar-picker-indicator { display: none; }
  :is(input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=image]), select, textarea):is([readonly], :disabled):not(.lk-box)::placeholder { color: var(--lk-muted); -webkit-text-fill-color: var(--lk-muted); }
}
