/* A49 · One mobile material, taken from Presupuesto / Informe Express.
   Important declarations in this named layer outrank historical unlayered
   important rules. Do not add fake IDs or duplicate classes for specificity.
   Only paint properties are shared: layout, visibility and status logic stay
   with each component. A plain class also opts new components into the material. */
@layer eco-mobile-material {
 @media screen and (max-width:900px) {
  :root {
   --eco-mobile-surface-color:#1b2021;
   --eco-mobile-surface-image:radial-gradient(125% 92% at 9% 0,rgba(255,255,255,.078),transparent 43%),linear-gradient(150deg,#252b2c 0%,#1b2021 54%,#131819 100%);
   --eco-mobile-surface-edge:rgba(236,222,203,.14);
   --eco-mobile-surface-shadow:0 17px 31px rgba(0,0,0,.44),0 5px 10px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.09),inset 0 -1px rgba(0,0,0,.5);
   --eco-mobile-control-shadow:0 6px 12px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.09),inset 0 -1px rgba(0,0,0,.5);
  }
  /* Ordinary actions get the same light and edge at a smaller depth. */
  :where(body) :where(button,.btn,.client-link):not(:where(
    .bottom-nav-btn,.tab-btn,.eco-side-btn,.map-marker,.leaflet-control-zoom-in,.leaflet-control-zoom-out,.ups-month-point,
    .apple-command-actions>button,.more-sheet-grid>button,#teamMoreModules>button,
    .team-home-actions>button,.team-home-modules>button,.team-service-grid>button,
    .client-nav button,.team-bottom-nav button,#teamBottomNav button,
    .quote-list>button,.client-select-btn,.visit-type,.ewc-day,.calendar-cell,.eco-ai-priorities>button
  )) {
   background-color:var(--eco-mobile-surface-color)!important;
   background-image:var(--eco-mobile-surface-image)!important;
   border-color:var(--eco-mobile-surface-edge)!important;
   box-shadow:var(--eco-mobile-control-shadow)!important;
  }
  :where(body) :where(.eco-mobile-surface,.apple-command-center,.home-stat,.apple-command-actions>button,.home-notification-center,.home-collapsible,.eco-consultas-home,
.card,.kpi,.panel,.hero,.hero-shell,.hero-search-wrap,.hero-action-cluster,.summary-card,.summary-total,.list-card,.index-card,.qp-card,.qp-summary,.cob-card,
.settings-glass-card,.settings-owner-express,.eco-health-card,.micro-help-card,.tools,.eco-workspace-bar,.global-search-panel,.notification-panel,
.item-row,.catalog-row,.catalog-item-row,.clause-row,.inv-item-row,.temp-photo-card,.report-photo-card,.quote-list>button,.client-select-btn,.cash-status-check,
.express-mode-card,.express-inbox-card,.express-inbox-row,.express-history-row,.express-survey-panel,.express-auth-item,.express-access-row,
.xp-item,.xp-cli,.si-op,.check-option,.express-review-check,.signature-panel,.xp-signature-panel,.floor-row,.visit-type,.survey-summary,.building-option,
.eco-calendar-main,.eco-calendar-upcoming,.eco-calendar-annual,.eco-calendar-cell,.eco-calendar-event,.eco-calendar-agenda-day,.eco-work-calendar,.ewc-day,.ewc-job,.calendar-cell,.upcoming-item,
.approval-hero,.approval-layout,.approval-item,.approval-detail,.approval-notice,.approval-candidates>label,
.mon-hero,.mon-connection,.mon-kpis>div,.mon-map-card,.mon-side-card,.mon-events-card,.mon-pilot-card,.mon-site,.mon-event,.mon-gateway-grid,.mon-command-list>article,.mon-gateway-note,.mon-located-summary,
.eco-ai-hero,.eco-ai-priorities>button,.eco-ai-shell,.eco-ai-message>div,.eco-ai-quick>button,.eco-notes-panel,.eco-note-row,.eco-note-preview-panel,
.ups-schedule-card,.ups-month-cell,.ups-report-row,.ups-report-detail,.team-ups-equipment-card,.team-ups-month-plan,.team-ups-month,.team-ups-summary,.team-ups-kpi,.team-ups-sheet,
.team-entry-card,.team-login,.team-home-hero,.team-service-hero,.team-home-services,.team-home-module,.team-home-modules>button,.team-service-grid>button,.team-home-actions>button,.team-record,.team-help-card,.team-calendar-sync,.team-work-notice,
.client-login,.client-hero,.client-stat,.client-card,.client-guide,.client-building,.client-year-folder,.client-folder,.client-month-folder,.client-admin-bar,.client-tools,.client-request-card,.client-empty,
.login-card,.splash-login-card,.question-card,.result-card,.step,.options>button,.option,
.modal-card,.confirm-card,.shortcuts-card,.signature-modal-card,.express-review-card,.xp-signature-modal-card,dialog,
#moreSheet,#teamMore,.more-sheet-grid>button,#teamMoreModules>button) {
   background-color:var(--eco-mobile-surface-color)!important;
   background-image:var(--eco-mobile-surface-image)!important;
   border:1px solid var(--eco-mobile-surface-edge)!important;
   box-shadow:var(--eco-mobile-surface-shadow)!important;
   -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
  /* Round all four corners, retaining compact radii on small controls. */
  :where(body) :is(.apple-command-center,.home-stat,.card,.kpi,.panel,.hero,.hero-shell,.summary-card,.client-card,.client-hero,.team-home-hero,.team-service-hero,.modal-card,dialog){border-radius:22px!important}
  :where(body) :is(.apple-command-actions>button,.more-sheet-grid>button,#teamMoreModules>button){border-radius:17px!important}
  /* State is still visible through color, edge and focus. */
  :where(body) :is(button,.btn,.client-link):is(.primary,.primary-action,.client-primary,[aria-pressed=true],.selected),
  :where(body) :is(.ewc-day.selected,.eco-calendar-cell.selected,.visit-type.active,.team-ups-month[open],.client-select-btn.active,.xp-cli.sel,.xp-item.sel,.si-op.sel,.ups-report-row.is-active,.check-option:has(input:checked)){
   border-color:rgba(210,162,122,.55)!important;
   box-shadow:var(--eco-mobile-control-shadow),inset 0 0 0 1px rgba(210,162,122,.22)!important;
  }
  :where(body) :is(button,.btn):is(.danger,.delete,.remove){border-color:rgba(242,126,126,.42)!important;color:#f2a0a0!important}
  :where(body) .ewc-job.complete{border-left:3px solid #38a87a!important}
  :where(body) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select,textarea){
   background:#14191a!important;border-color:rgba(236,222,203,.16)!important;
   box-shadow:inset 0 2px 5px rgba(0,0,0,.24),0 1px 0 rgba(255,255,255,.035)!important;
   color:#eeeae3!important;
  }
  :where(body) :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{
   outline:2px solid #d2a27a!important;outline-offset:3px!important;
  }
  :where(body) :is(.home-stat-icon,.apple-action-icon,.more-sheet-icon,.kpi-icon,.client-building-icon,.visit-type-icon){
   color:#dfb48f!important;background:transparent!important;box-shadow:none!important;border-color:transparent!important;
  }
  /* Text and form controls remain readable in every module. */
  :where(body) :is(.home-stat-label,.panel-sub,.help,.muted,.client-muted,.team-muted){color:#aaa79f!important}
  :where(body) :is(.apple-command-center,.home-stat,.card,.summary-card,.panel,.client-card,.team-record,.check-option,.xp-item,.xp-cli,.si-op){color:#eeeae3!important}
  /* A50 · Google entry uses the same material before authentication. */
  :where(body) :is(#splashLoginCard,#loginCard,.team-login){
   border-radius:22px!important;color:#eeeae3!important;
  }
  :where(body) :is(#btnGoogle,#googleBtn,.team-login #enter){
   background-color:var(--eco-mobile-surface-color)!important;
   background-image:var(--eco-mobile-surface-image)!important;
   border:1px solid var(--eco-mobile-surface-edge)!important;
   box-shadow:var(--eco-mobile-surface-shadow)!important;
   color:#eeeae3!important;border-radius:17px!important;min-height:52px!important;
  }
  :where(body) :is(.splash-login-sub,.splash-login-security,.login-security,.team-login>p){color:#aaa79f!important}
  :where(body) :is(.splash-login-eyebrow,.login-eyebrow){color:#dfb48f!important}
  :where(body) :is(#btnGoogle,#googleBtn,.team-login #enter):disabled{opacity:.55!important;cursor:wait!important}

  /* A51 · contraste funcional: el material no puede heredar texto oscuro
     cuando reemplaza el fondo claro histórico de un control. */
  :where(body) :is(button,.btn,.client-link):not(:where(.primary,.primary-action,.client-primary,.danger,.delete,.remove)){
   color:#eeeae3!important;
  }
  :where(body) :is(button.primary,.primary,.primary-action,.client-primary){
   color:#17191a!important;
   background-color:#bd916c!important;
   background-image:linear-gradient(135deg,#c99b74,#ad7d5a)!important;
   border-color:rgba(234,194,158,.36)!important;
  }
  :where(body) :is(button.primary,.primary,.primary-action,.client-primary):disabled{
   color:#ddcfc2!important;
   background-color:#302a26!important;
   background-image:linear-gradient(145deg,#37312d,#242728)!important;
   border-color:rgba(210,162,122,.38)!important;
   opacity:.72!important;
  }
  :where(body) :is(button,.btn,.client-link):disabled:not(:where(.primary,.primary-action,.client-primary)){
   color:#bcb8b1!important;opacity:.68!important;
  }
  /* El estado pertenece al control elegido, no a una franja desplazada
     detrás de toda la fila del checklist. */
  :where(body) .check[data-state]{background:transparent!important}
  :where(body) .check-option{box-shadow:var(--eco-mobile-control-shadow)!important}
  :where(body) .check-option.ok.sel{color:#9ce6ad!important;background:#193328!important;background-image:none!important;border-color:rgba(80,190,119,.58)!important}
  :where(body) .check-option.obs.sel{color:#f1c27f!important;background:#382b1e!important;background-image:none!important;border-color:rgba(224,164,87,.62)!important}
  :where(body) .check-option.fail.sel{color:#f2a09b!important;background:#382322!important;background-image:none!important;border-color:rgba(231,101,93,.62)!important}
  :where(body) .check-option.na.sel{color:#dedbd5!important;background:#2d3031!important;background-image:none!important;border-color:rgba(200,196,188,.34)!important}

 }
}

@layer eco-mobile-material {
 @media screen and (max-width:900px) and (prefers-reduced-motion:reduce) {
  :where(body) :is(#splashStage,#splashLoginStage,.splash-brand-lockup,.splash-brand,.splash-sub,.splash-dots,.team-login,.auth-screen #loginCard,.auth-screen #authLoading){
   animation:none!important;opacity:1!important;transform:none!important;
  }
 }
}
