/* EASE compact interface. Screen-only; document and PDF styles stay independent. */
@media screen {
  :root {
    --bg: #f6f7f9;
    --panel: #fff;
    --panel-strong: #fff;
    --line: #e5e7eb;
    --line-strong: #cbd1d8;
    --text: #24292f;
    --muted: #68717d;
    --accent: #386b59;
    --accent-soft: #eef5f1;
    --accent-strong: #274d40;
    --shadow: 0 2px 8px rgb(24 39 51 / 3%);
  }

  body { background: var(--bg); font-size: 14px; line-height: 1.5; }
  body .topbar { padding: 14px 18px; border-radius: 12px; box-shadow: none; }
  body h1 { font-size: 24px; line-height: 1.3; letter-spacing: -.035em; }
  body h2 { font-size: 18px; line-height: 1.4; }
  body .panel { border-radius: 12px; box-shadow: none; }
  body :is(.hero-panel, .saved-card, .summary-card, .metric) { border-radius: 10px; box-shadow: none; }
  body :is(.form-grid, .dialog-form-grid) { gap: 12px; }
  body label { color: var(--muted); font-size: 12px; line-height: 1.5; }
  body[data-page] :is(input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"])), select, textarea) {
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background-color: #fff;
    color: var(--text);
    box-shadow: none;
    line-height: 1.5;
  }
  body :is(input, textarea)::placeholder { color: #89929d; opacity: 1; }
  body[data-page] :is(input, select, textarea):focus,
  body[data-page] :is(input, select, textarea):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
    box-shadow: none;
  }
  body :is(button, .button-link, .nav-chip) { border-radius: 7px; font-size: 13px; font-weight: 600; box-shadow: none; }
  body :is(button, .button-link, .nav-chip):hover { transform: none; box-shadow: none; }
  body :is(button, a, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  body :is(button.accent, .button-link.accent-link, .nav-chip.is-active, .home-primary-action) {
    background: var(--accent-strong);
    color: #fff;
    border-color: var(--accent-strong);
    box-shadow: none;
  }
  body button:disabled { cursor: not-allowed; opacity: .5; }
  body .domain-input-group { border-radius: 7px; background: #fff; box-shadow: none; }
  body .domain-input-group input { border: 0; background: transparent; }
  body .domain-input-group:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; }
  body .domain-input-group input:focus { outline-offset: -2px; }
  body .domain-input-group strong { font-size: 12px; font-weight: 500; }
  body[data-page="login"] .login-layout { align-items: start; justify-items: center; padding-block: clamp(20px, 6vh, 64px); }
  body[data-page="login"] .login-panel { align-self: start; width: min(100%, 440px); min-height: 0; padding: 28px; }
  body[data-page="login"] .login-panel > * { width: 100%; }
  body[data-page="login"] .login-panel-brand-logo { height: 32px; max-width: 160px; }
  body[data-page="login"] .login-panel-header { margin-bottom: 22px; }
  body[data-page="login"] .registration-details { margin-top: 20px; padding-top: 16px; }

  body[data-page="home"] .home-layout { gap: 16px; }
  body[data-page="home"] :is(.home-primary-action, .home-secondary-action) { min-height: 64px; padding: 16px 20px; border-radius: 10px; box-shadow: none; }
  body[data-page="home"] :is(.home-primary-action, .home-secondary-action) strong { font-size: 16px; font-weight: 600; }
  body[data-page="home"] .home-status-filter { min-height: 52px; padding: 10px 12px; border-radius: 8px; gap: 8px; }
  body[data-page="home"] .home-status-filter strong { font-size: 20px; font-weight: 600; }
  body[data-page="home"] .home-status-filter.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: none; }
  body[data-page="home"] .home-customer-folder { border-radius: 10px; border-color: var(--line); }
  body[data-page="home"] .home-customer-folder summary { padding: 14px 16px; gap: 14px; }
  body[data-page="home"] .home-customer-folder summary strong { font-size: 16px; }
  body[data-page="home"] .home-customer-folder summary small { font-size: 12px; }
  body .customer-folder { border-radius: 10px; }
  body .customer-folder > summary { padding: 14px 16px; }
  body .customer-folder-heading > strong { font-size: 16px; }
  body .customer-folder-counts b { font-size: 16px; }
  body .customer-info-summary > div { padding: 9px 12px; border-radius: 7px; background: #f8f9fa; }
  body .customer-info-summary span { margin-bottom: 3px; }

  body :is(.order-app, .order-settings-app) { background: var(--bg); }
  body :is(.order-sidebar, .order-editor-header) { background: #fff; }
  body .order-pane-header { min-height: 60px; }
  body :is(.order-form-card, .order-settings-panel) { border-radius: 10px; box-shadow: none; }
  body .order-primary { background: var(--accent-strong) !important; }
}

@media screen and (min-width: 861px) {
  body[data-page] :is(.panel, .topbar, .app-dialog, .order-app, .order-dialog, .order-settings-app) :is(input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"])), select) {
    height: 36px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 14px;
  }
  body textarea { min-height: 68px; padding: 8px 10px; font-size: 14px; }
  body :is(button, .button-link, .nav-chip) { min-height: 36px; padding: 7px 12px; line-height: 1.5; }
  body :is(.topbar-actions, .inline-controls, .dialog-actions) > button { width: auto; margin-top: 0; }
  body[data-page="login"] .inline-controls > button { width: 100%; margin-top: 12px; }
  body .nav-chip { border-color: transparent; background: transparent; }
  body .nav-chip.is-active { background: var(--accent-soft); color: var(--accent-strong); }
  body :is(.home-account-trigger, .admin-session-badge) { min-height: 36px; padding-block: 7px; }
  body[data-page="home"] .home-list-tools .home-icon-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 8px; }
  body[data-page="home"] .home-icon-button svg { width: 18px; height: 18px; }
  body .detail-estimate-table :is(th, td) { padding-block: 6px; }
  body .detail-estimate-table :is(input:not([type="checkbox"]), select) { height: 32px; min-height: 32px; font-size: 13px; padding: 4px 6px; }
  body .detail-estimate-table textarea { min-height: 36px; padding: 6px 8px; font-size: 13px; }
  body .detail-estimate-table .line-quantity-column [data-action="qty"] { padding-inline: 2px; }
  body[data-page="detail"] .detail-estimate-table :is(td, .line-quantity-column) :is(input:not([type="checkbox"]), select) { height: 32px; min-height: 32px; padding-block: 4px; font-size: 13px; }
  body[data-page="detail"] .customer-info-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  body[data-page="detail"] .customer-info-summary .customer-info-wide { grid-column: span 2; }
  body[data-page="detail"] .customer-info-summary > div { padding: 9px 12px; }
  body .order-app :is(.order-search input, .order-site-search-form > input) { height: 36px; min-height: 36px; }
  body .order-site-search-form > input { padding-right: 40px; }
  body .order-site-search-form > .order-site-search-submit { width: 36px; min-height: 36px; padding: 0; }
  body .order-app .order-search input { border: 0; padding-inline: 0; }
}

@media screen and (max-width: 860px) {
  body h1 { font-size: 21px; }
  body h2 { font-size: 17px; }
  body .topbar { padding: 12px; }
  body[data-page] :is(input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="hidden"])), select) { min-height: 44px; padding: 9px 10px; font-size: 16px; }
  body textarea { padding: 10px; font-size: 16px; }
  body :is(button, .button-link, .nav-chip) { min-height: 44px; padding: 9px 12px; }
  body[data-page="login"] .login-layout { padding-block: 14px; }
  body[data-page="login"] .login-panel { padding: 22px 18px; }
  body[data-page="home"] :is(.home-primary-action, .home-secondary-action) { min-height: 56px; padding: 12px 14px; }
  body[data-page="home"] :is(.home-primary-action, .home-secondary-action) strong { font-size: 15px; }
  body[data-page="home"] .home-status-filter { min-height: 48px; padding: 10px 8px; }
  body[data-page="home"] .home-status-filter span { font-size: 12px; }
  body[data-page="home"] .home-status-filter strong { font-size: 18px; }
  body.me-active :is(.me-header, .me-toolbar, .me-row, .me-sheet, .mobile-total-actions) button { padding-inline: 10px; }
  body.me-active .me-more { padding: 0; }
  body.me-active .me-quantity input { padding: 8px 4px; }
  body .order-site-search-form > input { padding-right: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  body :is(button, .button-link, .nav-chip, .home-status-filter) { transition: none; }
}
