/* P108 - Dashboard data-table visual contract, 2026-10-28.
   Scope: real data tables and explicitly table-shaped lists only.
   Do not change form grids, calendar grids, card collections or business logic. */
:root{
  --mahya-section-header-bg:#e7effb;
  --mahya-table-column-bg:#eff3f9;
  --mh108-table-ink:#425572;
  --mh108-table-line:#dbe4ef;
  --mh108-table-depth:0 7px 17px -16px rgba(29,58,102,.16);
  --mh108-table-wash:linear-gradient(180deg,rgba(37,76,126,.035) 0,rgba(37,76,126,.012) 36px,transparent 100px);
}

/* A single explicit registry of data tables prevents accidental application to forms. */
:is(
  .work-table-v42178,
  .sms-table-v42273,
  .server-catalog-table-v42236,
  .city-credential-table-v4235,
  .v15-server-table,
  .latest-checks-table-v4224,
  .mh107-table,
  .mh72-table,
  .mh94-table,
  .mahya-report-scroll-v60 table,
  .mh36-list table,
  .mh37-birth-list table,
  .mh37-upcoming-list table
) thead tr th{
  background:var(--mahya-table-column-bg)!important;
  color:var(--mh108-table-ink)!important;
  font-weight:650!important;
  border-bottom:1px solid var(--mh108-table-line)!important;
  vertical-align:middle;
}

/* The shadow is deliberately almost imperceptible, running top to bottom.
   Preserve existing hover, zebra, selected, and status row colors. */
:is(
  .work-table-v42178,
  .sms-table-v42273,
  .server-catalog-table-v42236,
  .city-credential-table-v4235,
  .v15-server-table,
  .latest-checks-table-v4224,
  .mh107-table,
  .mh72-table,
  .mh94-table,
  .mahya-report-scroll-v60 table,
  .mh36-list table,
  .mh37-birth-list table,
  .mh37-upcoming-list table
) tbody{
  background-image:var(--mh108-table-wash);
  background-repeat:no-repeat;
  background-size:100% 100px;
}

/* The reporting/check tables had opaque white cell backgrounds, masking the wash. */
.latest-checks-table-v4224 tbody tr:not(:hover) td{
  background-color:transparent;
}

/* Shared quiet edge elevation for actual table cards. No size/overflow changes. */
:is(
  .work-table-panel-v42178,
  .followups-table-card-v42190,
  .sms-recipient-table-card-v42273,
  .sms-table-wrap-v42273,
  .server-catalog-card-v42236,
  .city-credential-table-wrap-v4235,
  .v15-server-table-wrap,
  .latest-table-shell-v4224,
  .mh107-table-panel,
  .mh72-table-wrap,
  .mh36-list,
  .mh37-birth-list,
  .mh37-upcoming-list,
  .mahya-report-scroll-v60,
  .mh94-table-scroll
){
  box-shadow:var(--mh108-table-depth);
}

/* Table-section bars: blue-soft title / neutral gray-blue column row / white records. */
.server-catalog-card-v42236>.server-catalog-card-head-v42236,
.followups-table-card-v42190>.followups-table-head-v42190,
.sms-recipient-table-card-v42273>.sms-section-head-v42273{
  background:var(--mahya-section-header-bg);
  border-bottom:1px solid var(--mh108-table-line);
}

/* Same compact button grammar as P107 for table-related new-record actions only. */
.server-catalog-card-head-v42236 [data-catalog-add-v42236]{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:34px;height:34px;padding:6px 10px;
  border:1px solid var(--mahya-primary,var(--primary,#2563eb));
  border-radius:8px;background:var(--mahya-primary,var(--primary,#2563eb));
  color:#fff;font-size:11px;font-weight:650;line-height:1.25;
  white-space:nowrap;box-shadow:none;
}
.server-catalog-card-head-v42236 [data-catalog-add-v42236]:hover{
  filter:brightness(.96);
}

/* Div/grid tables: apply only to headers whose rows behave as columns. */
.diag-item-table .diag-item-head,
#mh-workspace-servers [data-mh-server-table] .dashboard-operation-header-v4293,
.srv2-org-root.mh99-server-root .mh99-server-columns,
.mh103-org-workspace .mh103-contacts .mh103-contact-columns{
  background:var(--mahya-table-column-bg)!important;
  color:var(--mh108-table-ink);
  border-bottom:1px solid var(--mh108-table-line);
}
.diag-item-table,
#mh-workspace-servers [data-mh-server-table] .dashboard-operation-list-v4293,
.srv2-org-root.mh99-server-root .mh99-server-table,
.mh103-org-workspace .mh103-contacts .mh103-contact-list{
  background-image:var(--mh108-table-wash);
  background-repeat:no-repeat;
  background-size:100% 100px;
}
/* Honor all existing table sizing/column geometry and touch targets. */
@media(prefers-reduced-motion:reduce){
  .server-catalog-card-head-v42236 [data-catalog-add-v42236]{transition:none}
}

/* Gradient must remain visible on the first data row even when older CSS
   paints each table-cell background white. Do not interfere with hover states. */
:is(
  .work-table-v42178,
  .sms-table-v42273,
  .server-catalog-table-v42236,
  .city-credential-table-v4235,
  .v15-server-table,
  .latest-checks-table-v4224,
  .mh107-table,
  .mh72-table,
  .mh94-table,
  .mahya-report-scroll-v60 table,
  .mh36-list table,
  .mh37-birth-list table,
  .mh37-upcoming-list table
) tbody tr:first-child:not(:hover)>td{
  background-image:linear-gradient(180deg,rgba(37,76,126,.031),transparent 52px);
  background-repeat:no-repeat;
}

/* Table-specific title bars where a true section bar exists. */
.mh37-birth-registry>.mh37-birth-header{
  background:var(--mahya-section-header-bg)!important;
  border-bottom:1px solid var(--mh108-table-line);
}

/* Compact new-record actions in selected data-table workspaces use 34px.
   Company library actions are deliberately EXCLUDED: its primary and secondary
   actions both inherit the shared library button height (40px) from mh107-btn.
   Do not resize unrelated search, edit, view or delete actions. */
:is(
  .mh72-command>.mh72-new,
  .mh36-heading .mh36-primary,
  .mh36-heading .mh36-create,
  .mh37-message-heading .mahya-button:not(.is-secondary)
){
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-height:34px;height:34px;padding:6px 10px;
  border:1px solid var(--mahya-primary,var(--primary,#2563eb));
  border-radius:8px;background:var(--mahya-primary,var(--primary,#2563eb));
  color:#fff;font-size:11px;font-weight:650;line-height:1.25;
  text-decoration:none;white-space:nowrap;box-shadow:none;
}
:is(
  .mh72-command>.mh72-new,
  .mh36-heading .mh36-primary,
  .mh36-heading .mh36-create,
  .mh37-message-heading .mahya-button:not(.is-secondary)
):hover{filter:brightness(.96)}
