/* Shared directory presentation system: customers, users and subsequent data tables.
   All common layout, metrics, filters, table rows, actions and mobile rules live here. */
/* Modern customer directory – matches customer profile / settings visual language. */
.ds-directory-page{display:grid;gap:17px;min-width:0}
/* The directory deliberately uses the exact same shared heading as Settings. */
.ds-directory-page>.ds-page-heading{margin:0;box-sizing:border-box}
.ds-directory-page>.ds-page-heading .ds-profile-heading-icon{flex-shrink:0}
.ds-directory-page .ds-page-heading-copy{min-width:0}
.ds-directory-page .ds-page-heading-actions .ds-directory-add{min-height:40px}
.ds-directory-add i{font-size:18px}
.ds-directory-page>.ds-directory-heading--compact-action>.ds-page-heading-actions .ds-directory-add{
 width:40px;height:40px;min-width:40px;padding:0;flex:0 0 40px;justify-content:center
}
.ds-directory-heading--compact-action .ds-directory-add i{font-size:22px}
/* All manager KPI tile strips share one responsive scroll behavior. A row
   overflows its own container when its tiles cannot fit; no media breakpoint
   stacks tiles into new lines. Tables and filter grids are deliberately excluded. */
:is(.ds-directory-metrics,.ds-overview-metrics,.ds-global-monthly-stats,.stats-grid,.storage-grid,.customer-metrics){
 min-width:0;
 overflow-x:auto;
 overscroll-behavior-x:contain;
 -webkit-overflow-scrolling:touch;
 scrollbar-width:none;
 scroll-snap-type:x proximity;
}
:is(.ds-directory-metrics,.ds-overview-metrics,.ds-global-monthly-stats,.stats-grid,.storage-grid,.customer-metrics)::-webkit-scrollbar{
 display:none;
 width:0;
 height:0;
}
:is(.ds-directory-metrics,.ds-overview-metrics,.ds-global-monthly-stats,.stats-grid,.storage-grid,.customer-metrics)>*{
 scroll-snap-align:start;
}
.ds-directory-metrics{display:grid;grid-template-columns:repeat(var(--ds-stat-columns,5),minmax(220px,1fr));gap:13px;min-width:0}
/* A metric tile is precisely the 54px avatar plus equal padding on all edges. */
.ds-directory-metric{position:relative;display:flex;align-items:center;gap:12px;min-width:0;
 min-height:0;height:auto;padding:17px;border-radius:12px!important;box-shadow:none!important;
 border:1px solid var(--separator-color)!important;background:var(--sidebar-bg);
 transition:none;transform:none}
.ds-directory-metric:hover{border-color:var(--separator-color)!important;transform:none;box-shadow:none!important}
.ds-directory-metric-icon{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;
 border-radius:12px;background:var(--accent-wash);color:var(--accent-strong);font-size:24px}
.ds-directory-metric--synced .ds-directory-metric-icon{
 background:color-mix(in srgb,var(--success) 9%,var(--sidebar-bg));color:var(--success)}
.ds-directory-metric--unsynced .ds-directory-metric-icon{
 background:color-mix(in srgb,var(--warning) 10%,var(--sidebar-bg));color:var(--warning)}
.ds-directory-metric--attention .ds-directory-metric-icon{
 background:color-mix(in srgb,var(--danger) 9%,var(--sidebar-bg));color:var(--danger)}
.ds-directory-metric-copy{display:flex;flex-direction:column;justify-content:center;gap:4px;
 flex:1 1 auto;min-width:0;height:54px;min-height:0;max-height:54px}
.ds-directory-metric-copy strong{display:block;line-height:1;font-size:26px;color:var(--text);
 font-weight:500;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.ds-directory-metric-copy small{display:block;font-size:11px;line-height:1.3;color:var(--text-soft);
 overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ds-directory-metric-arrow{position:absolute;inset-inline-end:17px;top:17px;
 font-size:15px;color:var(--icon);pointer-events:none}
.ds-directory-page>.ds-directory-panel{margin:0;display:block;border:1px solid var(--separator-color);
 border-radius:13px;box-shadow:none;min-width:0;overflow:hidden;background:var(--sidebar-bg)}
.ds-directory-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;
 min-height:66px;padding:15px 22px;border-bottom:1px solid var(--separator-color)}
.ds-directory-panel-head h2{font-size:16px;font-weight:500;line-height:1.35;margin:0}
.ds-directory-panel-meta{display:flex;align-items:center;justify-content:flex-end;gap:10px;
 min-width:0;flex-wrap:wrap;margin-inline-start:auto}
.ds-directory-results-tag{display:inline-flex;align-items:center;justify-content:center;gap:7px;
 padding:7px 12px;min-height:32px;box-sizing:border-box;border:1px solid var(--separator-color);
 border-radius:8px;background:var(--app-bg);color:var(--text-soft);font-size:11px;
 white-space:nowrap;font-variant-numeric:tabular-nums}
.ds-directory-results-tag i{color:var(--accent-strong);font-size:15px}
.ds-directory-filter-active{color:var(--accent-strong)}
/* Dedicated directory filter card: one horizontal row at desktop widths. */
.ds-directory-page>.ds-directory-filter-card{
 margin:0;padding:17px 20px;min-width:0;box-shadow:none;
 border:1px solid var(--separator-color);border-radius:12px;background:var(--sidebar-bg)
}
.ds-directory-filters{margin:0;padding:0;background:transparent;border:0}
.ds-directory-filter-row{display:grid;
 grid-template-columns:minmax(220px,1.8fr) repeat(4,minmax(115px,1fr)) auto;
 align-items:end;gap:12px;min-width:0}
.ds-directory-search{display:grid;gap:7px;min-width:0}
.ds-directory-search-input{position:relative;display:flex;align-items:center;min-width:0}
.ds-directory-search-input>i{position:absolute;right:12px;color:var(--icon);pointer-events:none;font-size:19px}
.ds-directory-search-input input{width:100%;min-width:0;min-height:43px;
 border:1px solid var(--separator-color);border-radius:9px;
 padding:10px 39px 10px 12px;color:var(--text);background:var(--app-bg);font-size:12px}
.ds-directory-search-input input::placeholder{color:var(--icon)}
.ds-directory-select{display:grid;gap:7px;min-width:0;color:var(--text-soft);font-size:11px}
.ds-directory-select>span:first-child{font-size:11px;font-weight:500}
.ds-directory-select select{min-height:43px;min-width:0;width:100%;
 border:1px solid var(--separator-color);border-radius:9px;padding:9px 10px;
 background:var(--app-bg);color:var(--text);font-size:12px}
.ds-directory-filter-actions{display:flex;align-items:center;gap:8px;min-width:0}
.ds-directory-search-button{height:43px;white-space:nowrap;display:inline-flex;gap:7px;align-items:center;justify-content:center}
.ds-directory-reset{display:grid;place-items:center;flex:0 0 42px;width:42px;height:43px;
 background:var(--sidebar-bg);border:1px solid var(--separator-color);
 color:var(--accent-strong);border-radius:9px;font-size:18px}
.ds-directory-reset:hover{background:var(--hover-bg)}
.ds-directory-advanced-button{cursor:pointer;padding:0;position:relative;overflow:visible}
.ds-directory-advanced-count{position:absolute;inset-block-start:-6px;inset-inline-start:-6px;
 display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:19px;height:19px;
 border:2px solid var(--sidebar-bg);border-radius:50%;background:var(--accent-strong);
 padding:0;text-align:center;color:#fff;font-family:Arial,sans-serif;
 font-size:10px;font-weight:600;font-variant-numeric:tabular-nums;line-height:10px;pointer-events:none}
.ds-directory-advanced-modal{width:min(660px,calc(100vw - 28px))}
.ds-directory-advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.ds-directory-advanced-grid>.ds-directory-select>span:first-child{font-size:12px}
@media(min-width:1401px){
 .ds-directory-customer-filters .ds-directory-filter-row{
  grid-template-columns:minmax(180px,1.6fr) repeat(4,minmax(100px,1fr)) auto
 }
}
/* Customer directory: two complete filter rows on tablets. */
@media(min-width:701px) and (max-width:1400px){
 .ds-directory-customer-filters .ds-directory-filter-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
 }
 .ds-directory-customer-filters .ds-directory-filter-row>.ds-directory-search,
 .ds-directory-customer-filters .ds-directory-filter-row>.ds-directory-filter-actions{
  grid-column:span 2;
 }
 .ds-directory-customer-filters .ds-directory-search-button{
  flex:1 1 auto;min-width:0;
 }
}
@media(max-width:600px){
 .ds-directory-advanced-grid{gap:10px}
}

.ds-directory-scroll{overflow:auto;max-width:100%;outline-offset:-3px}
.ds-directory-table{width:100%;table-layout:auto;white-space:nowrap;border-collapse:collapse;text-align:right}
/* The business name is the only flexible column. Reclaim unused space
   from the left-side versions/count columns without expanding the table,
   changing the fixed dates, or affecting other directory tables. */
.ds-directory-page .ds-directory-scroll table.ds-directory-table.ds-customer-directory-table{
 width:100%;min-width:1320px;table-layout:fixed;
}
.ds-customer-directory-table col.ds-directory-business-column{width:auto}
/* Even badge-to-badge spacing across region, connection, computer count,
   software and data: one shared ~32px gutter between the standard tags.
   Keep all tags centered and leave the business-name column flexible. */
.ds-customer-directory-table col.ds-directory-region-column{width:92px}
.ds-customer-directory-table col.ds-directory-connection-column{width:122px}
.ds-customer-directory-table col.ds-directory-machines-column{width:77px}
/* Match the badge-to-badge whitespace of the neighboring region,
   connection and machine columns. Version badges still wrap when a customer
   has multiple software/data versions. */
.ds-customer-directory-table col.ds-directory-software-column{width:95px}
.ds-customer-directory-table col.ds-directory-data-column{width:112px}
.ds-customer-directory-table :is(th,td):is(:nth-child(5),:nth-child(6)){
 padding-inline:7px;
}
.ds-customer-directory-table td.ds-directory-version-cell{
 min-width:0;
}
.ds-customer-directory-table col.ds-directory-tints-column{width:96px}
.ds-customer-directory-table col.ds-directory-actions-column{width:70px}
.ds-directory-table th{padding:15px 13px;background:var(--app-bg);color:var(--text-soft);font-size:11px;border-bottom:1px solid var(--separator-color)}
.ds-directory-table td{padding:14px 13px;border-bottom:1px solid var(--separator-color);font-size:11.5px;color:var(--text-soft)}
.ds-directory-table tbody tr:last-child td{border-bottom:0}
.ds-directory-table tbody tr:hover{background:var(--hover-bg)}
.ds-directory-name{display:inline-flex;align-items:center;gap:11px;min-width:0;color:var(--text)}
/* Long customer names use the extra space but never push adjacent columns. */
.ds-customer-directory-table .ds-directory-name{width:100%;max-width:100%;box-sizing:border-box}
.ds-customer-directory-table .ds-directory-name>span:last-child{flex:1 1 auto;overflow:hidden}
.ds-customer-directory-table .ds-directory-name strong{
 display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis
}
.ds-directory-name:hover strong{color:var(--accent-strong)}
.ds-directory-avatar{display:grid;place-items:center;width:39px;height:39px;flex:0 0 39px;
 border-radius:10px;background:var(--accent-wash);color:var(--accent-strong);font-size:20px}
.ds-directory-name>span:last-child{display:grid;gap:5px;min-width:0}
.ds-directory-name strong{font-size:12.5px;font-weight:500}
.ds-directory-name small{font-size:10.5px;color:var(--text-soft);margin:0}
.ds-directory-name .ds-directory-customer-number{
 display:flex;align-items:center;gap:5px;direction:rtl;
 font-variant-numeric:tabular-nums;white-space:nowrap;
}
.ds-directory-customer-number b{
 font-size:inherit;font-weight:500;color:var(--text-soft);unicode-bidi:isolate;
}
.ds-directory-customer-number .ds-directory-customer-city{
 min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--text-soft);
}
.ds-directory-name .ds-directory-location{display:inline-flex;align-items:center;gap:4px}
.ds-directory-location i{font-size:13px;color:var(--accent-strong)}
/* Keep wider columns for desktop directories only. */
@media (min-width:1181px) and (pointer:fine){
 .ds-directory-table{min-width:1100px}
 .ds-directory-name-cell{min-width:220px}
}
.ds-directory-tag{display:inline-flex;align-items:center;gap:6px;border-radius:7px;
 padding:7px 9px;font-size:10.5px;font-weight:500;white-space:nowrap}
.ds-directory-tag i{font-size:13px}
.ds-directory-tag.active,.ds-directory-tag.good{color:var(--success);background:color-mix(in srgb,var(--success) 9%,var(--sidebar-bg))}
.ds-directory-tag.closed,.ds-directory-tag.blocked{color:var(--danger);background:color-mix(in srgb,var(--danger) 9%,var(--sidebar-bg))}
.ds-directory-tag.waiting{color:var(--warning);background:color-mix(in srgb,var(--warning) 11%,var(--sidebar-bg))}
.ds-directory-tag.none{color:var(--text-soft);background:var(--selected-bg)}
/* All connection states share one exactly sized, centered tag. Keep existing
   severity colors/icons and font size from the shared status tag. */
.ds-customer-directory-table .ds-directory-connection-tag{
 display:inline-flex;align-items:center;justify-content:center;gap:6px;
 box-sizing:border-box;width:90px;min-width:90px;max-width:90px;
}
.ds-directory-multiple{display:block;color:var(--text-soft);font-size:10px;margin-top:5px}
.ds-directory-value{font-variant-numeric:tabular-nums;color:var(--text);font-size:12px}
.ds-directory-date{font-size:11px;white-space:nowrap}
/* Compact, identical date widths: sync next, last contact, last sync.
   With machines restored to column 4, the three dates are RTL columns 8–10. */
.ds-customer-directory-table col.ds-directory-time-column{width:112px}
.ds-customer-directory-table :is(th,td):nth-child(n+8):nth-child(-n+10){
 box-sizing:border-box;
 width:112px;min-width:112px;max-width:112px;
 padding-inline:7px;
 text-align:center;
}
.ds-customer-directory-table td:nth-child(n+8):nth-child(-n+10) .ds-directory-last-sync{
 justify-content:center;align-items:center;
 text-align:center;margin-inline:auto;
}
.ds-customer-directory-table :is(th,td):nth-child(4){
 box-sizing:border-box;width:77px;min-width:77px;max-width:77px;
 padding-inline:5px;text-align:center;
}
/* Reuse the neutral "לא דווחה" tag palette and 13px icon size.
   Smaller width for the single-digit customer machine count. */
.ds-directory-table .ds-directory-tag.none.ds-directory-machines-badge{
 display:inline-flex;align-items:center;justify-content:center;gap:5px;
 box-sizing:border-box;width:45px;height:29px;min-width:45px;
 padding:5px 6px;border:0;border-radius:7px;
 font-size:10.5px;font-weight:500;font-variant-numeric:tabular-nums;
 white-space:nowrap;
}
.ds-directory-machines-badge i{font-size:13px;line-height:1}
.ds-directory-machines-badge bdi{unicode-bidi:isolate}
.ds-directory-last-sync{display:inline-flex;flex-direction:column;align-items:center;
 gap:4px;font-variant-numeric:tabular-nums;line-height:1.25}
.ds-directory-last-sync-date{color:var(--text);font-size:11.5px;font-weight:500}
.ds-directory-last-sync-time{color:var(--text-soft);font-size:10.5px;font-weight:400}
/* Customer-local scheduled sync time; separate from the last actual sync. */
.ds-directory-schedule-cell{white-space:nowrap}
/* Shared neutral badge for scheduled times and target release versions in
   both update directories. One visual rule, including light/dark themes. */
.ds-directory-schedule-tag,.ds-updates-target-version{
 display:inline-flex;align-items:center;justify-content:center;
 box-sizing:border-box;gap:6px;width:auto;height:27px;min-height:27px;
 padding:0 9px;border:0;border-radius:7px;background:var(--selected-bg);
 color:var(--text-soft);font-size:10.5px;line-height:1.2;font-weight:500;
 font-variant-numeric:tabular-nums;white-space:nowrap;direction:rtl}
.ds-directory-schedule-tag i{font-size:13px;color:var(--accent-strong);line-height:1}
.ds-directory-schedule-tag bdi{unicode-bidi:isolate}
.ds-directory-schedule-tag.is-disabled{color:var(--text-soft)}
.ds-directory-schedule-tag.is-disabled i{color:var(--danger)}
.ds-directory-schedule-unset{color:var(--text-soft);font-size:11px}
/* Scheduled HH:MM uses the exact weight/color of the neighboring date,
   with no tag background, border or clock icon. */
.ds-directory-schedule-display{
 align-items:center;justify-content:center;min-height:0;
}
/* A permitted directory schedule is the same shared time picker as the
   customer computer card, styled as the existing schedule tag. The native
   input remains functional when JavaScript is disabled. */
.ds-directory-schedule-form{
 display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;
}
.ds-directory-schedule-form .ds-ui-time{
 display:inline-block;flex:0 0 auto;width:max-content;min-width:0;max-width:100%
}
.ds-directory-schedule-form :is(.ds-ui-time .ds-ui-trigger,input[type=time]:not(.ds-ui-source)){
 box-sizing:border-box;width:max-content;min-width:0;min-height:34px;height:34px;
 padding:0 9px;border:1px solid var(--separator-color);border-radius:8px;
 background:var(--app-bg);color:var(--text);font:inherit;font-size:11.5px;
 font-weight:500;direction:rtl;cursor:pointer
}
.ds-directory-schedule-form .ds-ui-time .ds-ui-trigger{
 justify-content:center;gap:6px
}
.ds-directory-schedule-form .ds-ui-trigger-text{
 flex:0 0 auto;font-variant-numeric:tabular-nums;text-align:right
}
.ds-directory-schedule-form .ds-ui-trigger i{
 font-size:15px;color:var(--accent-strong)
}
.ds-directory-schedule-form.is-disabled .ds-ui-trigger{
 color:var(--text-soft)
}
.ds-directory-schedule-form.is-disabled .ds-ui-trigger i{
 color:var(--danger)
}
.ds-directory-schedule-form.is-saving{
 opacity:.65
}

.ds-directory-actions{display:flex;align-items:center;justify-content:flex-start;gap:6px}
.ds-directory-actions>a,.ds-directory-action-icon{display:inline-flex;align-items:center;justify-content:center;
 gap:6px;min-height:35px;padding:8px 11px;border:1px solid var(--separator-color);
 border-radius:8px;font-size:11px;font-weight:500;white-space:nowrap;background:var(--sidebar-bg);color:var(--text)}
.ds-directory-actions>a:hover,.ds-directory-action-icon:hover{background:var(--hover-bg)}
.ds-directory-actions .ds-directory-action-primary{color:var(--accent-strong);border-color:color-mix(in srgb,var(--accent) 25%,var(--separator-color))}
.ds-directory-actions .ds-directory-icon-button,
.ds-directory-action-icon{
 box-sizing:border-box;display:grid;place-items:center;width:36px;height:36px;min-width:36px;
 min-height:36px;padding:0;border-radius:8px;font-size:17px;line-height:1
}
.ds-directory-actions .ds-directory-icon-button i,
.ds-directory-action-icon i{font-size:25px;line-height:1}
.ds-directory-action-icon.close{color:var(--warning)}.ds-directory-action-icon.reopen{color:var(--success)}
.ds-directory-quick-form{margin:0}
/* Infinite scroll status — no page-number controls. */
.ds-directory-infinite{display:flex;justify-content:space-between;align-items:center;gap:12px;
 min-height:51px;padding:13px 20px;border-top:1px solid var(--separator-color);
 font-size:11px;color:var(--text-soft);box-sizing:border-box}
.ds-directory-loaded{font-variant-numeric:tabular-nums}
.ds-directory-loading-state{display:flex;align-items:center;gap:7px}
.ds-directory-loading-icon{font-size:17px;color:var(--accent);animation:ds-directory-spin .8s linear infinite}
.ds-directory-loading-icon[hidden]{display:none}
@keyframes ds-directory-spin{to{transform:rotate(360deg)}}
.ds-directory-retry{border:1px solid var(--separator-color);border-radius:8px;
 min-height:30px;padding:6px 12px;background:var(--sidebar-bg);color:var(--accent-strong);
 font:inherit;font-size:11px;cursor:pointer}
.ds-directory-retry:hover{background:var(--hover-bg)}
@media(prefers-reduced-motion:reduce){.ds-directory-loading-icon{animation:none}}
.ds-directory-empty{min-height:260px;display:grid;place-content:center;justify-items:center;text-align:center;gap:12px;padding:30px}
.ds-directory-empty>span{width:60px;height:60px;display:grid;place-items:center;border-radius:15px;background:var(--accent-wash);
 color:var(--accent-strong);font-size:28px}
.ds-directory-empty h3{font-size:16px}
.ds-directory-empty p{color:var(--text-soft);font-size:12px;line-height:1.7}
.ds-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1200px){
 .ds-directory-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}
 .ds-directory-search{grid-column:span 2}
 .ds-directory-filter-actions{justify-content:flex-start}
}
@media(max-width:950px){
}
@media(max-width:600px){
 /* Two-column heading: reserve a second row only when an action exists. */
 .ds-directory-page>.ds-page-heading{
  display:grid;grid-template-columns:54px minmax(0,1fr);
  grid-template-rows:auto;align-items:start;column-gap:12px;row-gap:16px;
  padding:16px;min-width:0
 }
 .ds-directory-page>.ds-page-heading>.ds-profile-heading-icon{
  grid-column:1;grid-row:1;width:54px;height:54px;min-width:54px;
  min-height:54px;align-self:start
 }
 .ds-directory-page>.ds-page-heading>.ds-page-heading-copy{
  grid-column:2;grid-row:1;min-width:0;align-self:center;overflow-wrap:anywhere
 }
 .ds-directory-page .ds-page-heading-copy h1{font-size:20px}
 .ds-directory-page>.ds-page-heading>.ds-page-heading-actions{
  grid-column:1/-1;grid-row:2;width:100%;min-width:0;margin:0
 }
 .ds-directory-page .ds-page-heading-actions .ds-directory-add{
  display:flex;width:100%;min-width:0;min-height:42px
 }
 .ds-directory-page>.ds-directory-heading--compact-action:has(>.ds-page-heading-actions){
  grid-template-columns:54px minmax(0,1fr) auto;align-items:center
 }
 .ds-directory-page>.ds-directory-heading--compact-action>.ds-page-heading-actions{
  grid-column:3;grid-row:1;width:auto;align-self:center;margin:0
 }
 .ds-directory-page>.ds-directory-heading--compact-action>.ds-page-heading-actions .ds-directory-add{
  width:42px;height:42px;min-width:42px;min-height:42px;flex-basis:42px
 }
 .ds-directory-metrics{gap:8px}
 .ds-directory-metric{padding:17px;gap:10px}
 .ds-directory-metric-icon{width:54px;height:54px;flex-basis:54px;font-size:24px}
 .ds-directory-metric-copy strong{font-size:22px}
 .ds-directory-metric-arrow{inset-inline-end:17px;top:17px}
 /* Table title right, count badge left, same horizontal line. */
 .ds-directory-panel-head{
  display:flex;flex-direction:row;align-items:center;justify-content:space-between;
  padding:16px;gap:10px;min-width:0
 }
 .ds-directory-panel-head h2{flex:0 1 auto;min-width:0;margin:0}
 .ds-directory-panel-meta{flex:0 1 auto;margin-inline-start:auto;
  align-items:center;justify-content:flex-end;gap:6px;min-width:0}
 .ds-directory-results-tag{white-space:nowrap;flex:0 0 auto}
 .ds-directory-page>.ds-directory-filter-card{padding:14px}
 /* Two filter fields per row; an unpaired final field spans both columns. */
 .ds-directory-filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ds-directory-filter-row>.ds-directory-search{grid-column:auto}
 .ds-directory-filter-row>.ds-directory-select{min-width:0}
 .ds-directory-filter-row>.ds-directory-select:last-of-type:nth-of-type(odd){grid-column:1/-1}
 .ds-directory-filter-actions{grid-column:1/-1}
 .ds-directory-search-button{flex:1}
 .ds-directory-infinite{
  align-items:center;justify-content:center;flex-direction:column;
  gap:8px;text-align:center
 }
 .ds-directory-infinite .ds-directory-loading-state{
  width:100%;align-items:center;justify-content:center;text-align:center
 }
 .ds-directory-infinite .ds-directory-loaded{width:100%;text-align:center}
}

@media(max-width:420px){
 /* Keep paired fields on narrow phones too, while allowing text to shrink. */
 .ds-directory-filter-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .ds-directory-filter-row>.ds-directory-select{min-width:0}
 .ds-directory-filter-row>.ds-directory-search{grid-column:auto}
 .ds-directory-filter-row>.ds-directory-filter-actions{grid-column:1/-1}
}

/* Color-coded area labels; legacy customers missing geography still render safely. */
.ds-directory-region-tag{display:inline-flex;align-items:center;justify-content:center;
 box-sizing:border-box;width:60px;min-width:60px;max-width:60px;
 padding:6px 8px;border-radius:7px;
 font-size:11px;line-height:1.3;font-weight:500;white-space:nowrap}
.ds-directory-region-tag.region-north{color:#1876be;background:rgba(30,133,210,.12)}
.ds-directory-region-tag.region-center{color:#8a51bb;background:rgba(137,89,202,.13)}
.ds-directory-region-tag.region-south{color:#ad6d16;background:rgba(205,139,35,.13)}
.ds-directory-region-tag.region-other{color:#36826b;background:rgba(49,142,108,.13)}
.ds-directory-region-unset{font-size:11px;color:var(--text-soft)}
.ds-directory-region-tag.ds-directory-region-unset{background:var(--selected-bg)}

/* Customer directory: compact left-anchored action column and centered metrics. */
.ds-directory-table th:nth-child(2),.ds-directory-table th:nth-child(3),
.ds-directory-table th:nth-child(4),.ds-directory-table th:nth-child(5),
.ds-directory-table th:nth-child(6),.ds-directory-table th:nth-child(7),
.ds-directory-table th:nth-child(8),
.ds-directory-table td.ds-directory-center{text-align:center}
.ds-directory-table th:last-child,.ds-directory-table td.ds-directory-actions-cell{
 width:188px;min-width:188px;max-width:188px;box-sizing:border-box;
 text-align:left
}
.ds-directory-table .ds-directory-actions{display:flex;align-items:center;
 justify-content:flex-end;gap:6px;direction:rtl;width:100%}
.ds-directory-table .ds-directory-actions .ds-directory-icon-button{
 box-sizing:border-box;display:grid;place-items:center;
 width:36px;height:36px;min-width:36px;min-height:36px;flex:0 0 36px;
 padding:0;border:1px solid var(--separator-color)!important;
 border-radius:8px;background:var(--sidebar-bg);color:var(--text);
 cursor:pointer;text-decoration:none;line-height:1
}
.ds-directory-table .ds-directory-actions .ds-directory-icon-button i{font-size:25px;line-height:1}
.ds-directory-table .ds-directory-actions .ds-directory-icon-button:hover:not(:disabled){
 background:var(--hover-bg)
}
.ds-directory-table .ds-directory-actions .ds-directory-icon-button.close{color:var(--warning)}
.ds-directory-table .ds-directory-actions .ds-directory-icon-button.reopen{color:var(--success)}
.ds-directory-table .ds-directory-actions .ds-directory-disabled-action{
 display:inline-flex;align-items:center;justify-content:center;
 width:36px;height:36px;min-width:36px;flex:0 0 36px;cursor:help
}
.ds-directory-table .ds-directory-actions .ds-directory-icon-button:disabled{
 opacity:.36;cursor:not-allowed;pointer-events:none
}
.ds-directory-table .ds-directory-actions .ds-directory-quick-form{
 display:inline-flex;margin:0;align-items:center
}
.ds-directory-table .ds-directory-tag.active i,.ds-directory-table .ds-directory-tag.closed i{font-size:14px}
/* Optional machine details in the one-step create-customer dialog. */
.ds-customer-computer-section{margin-block-start:24px}
.ds-customer-computer-optin{display:flex;align-items:center;gap:11px;cursor:pointer;
 min-height:42px;padding:12px 14px;border:1px solid var(--separator-color);
 border-radius:9px;background:var(--app-bg);color:var(--text)}
.ds-customer-computer-optin strong{display:block;font-size:12.5px;font-weight:500}
.ds-customer-computer-optin small{display:block;color:var(--text-soft);font-size:11px;margin-top:3px}
.ds-customer-computer-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
 gap:13px 15px;margin-top:13px}
.ds-customer-computer-fields[hidden]{display:none!important}
.ds-customer-computer-fields .ds-modal-field{min-width:0}
.ds-customer-computer-fields .ds-customer-machine-profile{grid-column:1/-1}
.ds-customer-computer-note{grid-column:1/-1;color:var(--text-soft);font-size:11px;line-height:1.6}
@media(max-width:600px){
 .ds-customer-computer-fields{grid-template-columns:minmax(0,1fr)}
 .ds-customer-computer-fields .ds-customer-machine-profile,
 .ds-customer-computer-note{grid-column:1}
}
/* Per-version status on the customer directory, including mixed installations. */
.ds-directory-version-cell{min-width:126px}
.ds-directory-version-tags{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px}
.ds-directory-version-tags .ds-directory-tag{font-variant-numeric:tabular-nums}
.ds-directory-version-tags .ds-directory-tag bdi{unicode-bidi:isolate}
.ds-directory-version-tags .ds-directory-tag small{font-size:10px;opacity:.75}
.ds-directory-version-unknown{color:var(--text-soft)}
/* On the customer directory, sync headings are 7–9 and the
   machine-count heading is 10; both are centered explicitly above. */

/* Table action menus are rendered directly in PHP. Reuse the EXACT
   trigger/popover/item design of the customer-machine card from app.css.
   These rules only define table-column geometry and content wrappers. */
table.ds-directory-table.ds-row-actions-table :is(th:last-child,td.ds-row-actions-cell),
.ds-directory-page table.ds-directory-table.ds-row-actions-table :is(th:last-child,td.ds-row-actions-cell){
  box-sizing:border-box;width:70px;min-width:70px;max-width:70px;text-align:center
}
.ds-directory-table.ds-row-actions-table td.ds-row-actions-cell .ds-row-action-options{
  display:flex;align-items:center;justify-content:center;width:100%;min-width:0
}
.ds-row-action-popover form{display:block;width:100%;margin:0;padding:0}
.ds-row-action-popover .ds-directory-disabled-action{
  display:block;width:100%;min-width:0;max-width:none;cursor:default
}
.ds-row-action-popover .ds-profile-menu-item:disabled{opacity:.4;cursor:not-allowed}
.ds-row-action-popover .ds-updates-release-file-controls{display:contents}
.ds-row-action-popover [hidden]{display:none!important}
.ds-row-action-popover .ds-profile-menu-item:focus-visible{
  outline:2px solid var(--accent);outline-offset:-2px
}

/* Color family distribution: one compact, proportional bar, no extra tiles. */
.ds-shade-catalog-page>.ds-shade-usage-card{
 margin:0;padding:17px;min-width:0;overflow:visible;box-shadow:none;
 border:1px solid var(--separator-color);border-radius:12px;background:var(--sidebar-bg)
}
.ds-shade-usage-bar{
 display:flex;direction:rtl;gap:2px;height:45px;min-width:0;
 border-radius:8px;overflow:hidden
}
.ds-shade-usage-segment{
 display:flex;align-items:center;justify-content:center;
 flex:var(--ds-shade-usage-weight) 1 0%;min-width:2px;
 border:0;margin:0;padding:0;overflow:hidden;cursor:pointer;
 background:var(--ds-shade-usage-color);color:var(--ds-shade-usage-ink);
 container-type:inline-size;font:inherit;text-decoration:none;transition:filter .15s
}
.ds-shade-usage-segment:hover{filter:brightness(.95);color:var(--ds-shade-usage-ink);text-decoration:none}
.ds-shade-usage-segment:focus-visible{
 outline:2px solid var(--accent);outline-offset:-3px
}
.ds-shade-usage-label{
 display:flex;align-items:center;justify-content:center;gap:8px;
 white-space:nowrap;font-size:12px
}
.ds-shade-usage-name,.ds-shade-usage-percent{display:none}
.ds-shade-usage-percent{font-weight:600;font-variant-numeric:tabular-nums}
@container (min-width:40px){.ds-shade-usage-percent{display:inline}}
@container (min-width:100px){.ds-shade-usage-name{display:inline}}
@media(max-width:700px){
 .ds-shade-catalog-page>.ds-shade-usage-card{padding:10px}
 .ds-shade-usage-bar{height:36px}
 .ds-shade-usage-label{font-size:10px;gap:5px}
}
/* Shade catalog: shared directory sizing, plus a literal color sample. */
/* Four fields plus two buttons: one balanced row on wide screens. */
.ds-shade-catalog-filters .ds-directory-filter-row{
 grid-template-columns:minmax(0,1.85fr) minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.15fr) max-content;
 align-items:center;gap:10px
}
.ds-shade-catalog-filters--usage .ds-directory-filter-row{
 grid-template-columns:minmax(0,1.6fr) minmax(0,1.1fr) minmax(0,1fr) minmax(0,1.2fr) minmax(0,.8fr) max-content
}
.ds-shade-catalog-filters .ds-directory-filter-actions{grid-column:auto;white-space:nowrap}
@media(min-width:701px){
 /* The shared tablet search spans two columns; this five-track form must not. */
 .ds-shade-catalog-filters .ds-directory-filter-row>.ds-directory-search{grid-column:auto}
}
@media(max-width:700px){
 .ds-shade-catalog-filters .ds-directory-filter-row{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
 .ds-shade-catalog-filters .ds-directory-filter-actions,
 .ds-shade-catalog-filters .ds-shade-year-filter{grid-column:1/-1}
}

.ds-shade-catalog-page .ds-directory-panel-meta .ds-shade-header-icon{box-sizing:border-box;width:40px;height:40px;min-width:40px;padding:0;display:grid;place-items:center;flex:0 0 40px}
.ds-shade-catalog-page .ds-directory-results-tag{height:40px;min-height:40px}
.ds-shade-catalog-page .ds-shade-header-icon[data-ds-modal-open="shadeDeleteDialog"]{color:var(--danger)}
.ds-shade-header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.ds-shade-header-actions>form{display:flex;margin:0}
.ds-shade-header-icon i{font-size:20px}
.ds-shade-delete-fields{display:grid;gap:15px}
.ds-shade-delete-fields [hidden]{display:none!important}
.ds-shade-delete-fields p{margin:0;color:var(--text-soft);font-size:12px}
#shadeDeleteDialog .ds-modal-footer .ds-modal-action-danger{
  background:var(--danger);border:1px solid var(--danger);color:#fff
}
#shadeDeleteDialog .ds-modal-footer .ds-modal-action-danger:hover:not(:disabled){
  background:#b91c1c;border-color:#b91c1c
}
@media(max-width:800px){
 .ds-shade-catalog-page .ds-directory-panel-head{flex-wrap:wrap}
 .ds-shade-catalog-page .ds-directory-panel-head h2{white-space:nowrap}
 .ds-shade-catalog-page .ds-directory-panel-meta .ds-shade-header-icon{height:42px;width:42px;min-width:42px;flex-basis:42px}
 .ds-shade-catalog-page .ds-directory-results-tag{height:42px;min-height:42px}
 .ds-shade-header-actions{gap:6px}
}

/* Shade gallery: the existing directory panel, filters, permissions and modal. */
.ds-shade-families{display:flex;align-items:center;gap:7px;padding:14px 20px;border-bottom:1px solid var(--separator-color);overflow:auto;scrollbar-width:thin}
.ds-shade-family{display:inline-flex;align-items:center;gap:6px;padding:8px 11px;min-height:34px;border:1px solid var(--separator-color);border-radius:7px;background:var(--sidebar-bg);color:var(--text-soft);font-size:12px;white-space:nowrap;text-decoration:none;flex:0 0 auto}
.ds-shade-family.active{color:var(--accent-strong);background:color-mix(in srgb,var(--accent) 9%,var(--sidebar-bg));border-color:color-mix(in srgb,var(--accent) 35%,var(--separator-color))}
.ds-shade-family:hover{color:var(--accent-strong);border-color:var(--accent)}
.ds-shade-family-dot{display:block;width:12px;height:12px;border-radius:4px;flex:0 0 12px;border:1px solid #00000012}
.ds-shade-family-missing{background:var(--app-bg);border-color:var(--separator-color);position:relative}
.ds-shade-family-missing::before,.ds-shade-family-missing::after{content:"";position:absolute;inset:50% 0 auto;height:1px;background:var(--text-soft);transform:rotate(45deg)}
.ds-shade-family-missing::after{transform:rotate(-45deg)}
.ds-shade-gallery{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px;padding:20px;min-width:0;align-items:stretch}
.ds-shade-group-heading{grid-column:1/-1;display:flex;align-items:center;gap:8px;margin:14px 0 3px;color:var(--text);font-size:14px;font-weight:500}
.ds-shade-group-heading:first-child{margin-top:0}
.ds-shade-group-heading small{font-size:12px;font-weight:400;color:var(--text-soft);white-space:nowrap}
.ds-shade-group-heading::after{content:"";height:1px;background:var(--separator-color);flex:1;margin-inline-start:7px}
.ds-shade-gallery-card{position:relative;min-width:0;border:1px solid var(--separator-color);border-radius:8px;overflow:hidden;background:var(--sidebar-bg);transition:border-color .15s,box-shadow .15s}
.ds-shade-gallery-card:hover{border-color:var(--separator-color);box-shadow:0 3px 10px #0000000c}
.ds-shade-gallery-card:focus-within:not(:hover){outline:2px solid var(--accent);outline-offset:2px}
.ds-shade-gallery-main{display:block;width:100%;padding:0;background:transparent;border:0;text-align:start;color:var(--text);cursor:pointer;font:inherit}
.ds-shade-gallery-color{display:block;position:relative;height:110px;border-bottom:1px solid var(--separator-color)}
.ds-shade-gallery-no-color{background:var(--app-bg);color:var(--separator-color)}
.ds-shade-gallery-usage{position:absolute;top:8px;left:8px;z-index:1;display:inline-flex;
 align-items:center;gap:4px;max-width:calc(100% - 16px);padding:5px 7px;border-radius:6px;
 background:#fffffff0;color:#344054;font-size:10.5px;line-height:1.2;
 box-shadow:0 1px 3px #00000016;white-space:nowrap;font-variant-numeric:tabular-nums}
.ds-shade-gallery-usage i{font-size:13px}
.ds-shade-gallery-no-color svg{display:block;width:100%;height:100%}
.ds-shade-gallery-meta{display:grid;gap:4px;padding:10px 11px;min-width:0;text-align:right}
.ds-shade-gallery-meta bdi{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ds-shade-gallery-code{font-size:13px;font-weight:500}
.ds-shade-gallery-name,.ds-shade-gallery-fan{font-size:11px;color:var(--text-soft)}
/* The edit button is on the left even when the fan name is LTR. */
.ds-shade-gallery-fan{padding-left:24px}
.ds-shade-gallery-select,.ds-shade-gallery-edit{position:absolute;display:grid;place-items:center;width:26px;height:26px;opacity:0;transition:opacity .15s;border-radius:5px}
.ds-shade-gallery-select{top:6px;inset-inline-start:6px;background:#ffffffdf;cursor:pointer}
.ds-shade-gallery-select input{margin:0;width:15px;height:15px;accent-color:var(--accent);cursor:pointer}
.ds-shade-gallery-edit{bottom:6px;inset-inline-end:6px;color:var(--text-soft);background:var(--sidebar-bg);text-decoration:none;font-size:17px}
.ds-shade-gallery-card:hover :is(.ds-shade-gallery-select,.ds-shade-gallery-edit),
.ds-shade-gallery-card:focus-within :is(.ds-shade-gallery-select,.ds-shade-gallery-edit),
.ds-shade-gallery-select:has(input:checked){opacity:1}
.ds-shade-gallery-edit:hover{color:var(--accent-strong)}
/* Narrow tablets: the same four-track grid used by customer management.
   First row: search (two tracks), fan, state.
   Second row: sort (two tracks), action group (two tracks). */
@media(max-width:1100px) and (min-width:701px){
 .ds-shade-catalog-filters .ds-directory-filter-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px
 }
 .ds-shade-catalog-filters .ds-directory-filter-row>.ds-directory-search,
 .ds-shade-catalog-filters .ds-directory-filter-row>.ds-directory-select:last-of-type,
 .ds-shade-catalog-filters .ds-directory-filter-row>.ds-directory-filter-actions{
  grid-column:span 2;
 }
 .ds-shade-catalog-filters .ds-directory-search-button{
  flex:1 1 auto;min-width:0;
 }
}
/* With the date field, keep both tablet rows complete: search/fan/state,
   then sort/year/actions. On mobile the year is a full-width final field. */
@media(min-width:701px) and (max-width:1400px){
 .ds-shade-catalog-filters--usage .ds-directory-filter-row{
  grid-template-columns:repeat(4,minmax(0,1fr));gap:10px
 }
 .ds-shade-catalog-filters--usage .ds-directory-filter-row>.ds-directory-search,
 .ds-shade-catalog-filters--usage .ds-directory-filter-row>.ds-directory-filter-actions{grid-column:span 2}
 .ds-shade-catalog-filters--usage .ds-directory-filter-row>.ds-directory-select.ds-shade-year-filter{grid-column:auto}
 .ds-shade-catalog-filters--usage .ds-directory-search-button{flex:1 1 auto;min-width:0}
}
@media(max-width:1100px) and (min-width:801px){
 .ds-shade-gallery{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
}
@media(max-width:800px){
 .ds-shade-families{padding:12px 14px;gap:6px}
 .ds-shade-gallery{grid-template-columns:repeat(3,minmax(0,1fr));padding:14px;gap:9px}
 .ds-shade-gallery-color{height:100px}
 .ds-shade-gallery-meta{padding:9px}
}
@media(max-width:400px){
 .ds-shade-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(hover:none){.ds-shade-gallery-select,.ds-shade-gallery-edit{opacity:1}}

/* Localized directory tables retain their existing widths and scroll behavior. */
html[dir=ltr] .ds-directory-scroll .ds-directory-table{direction:ltr;text-align:left}
html[dir=ltr] .ds-directory-scroll .ds-directory-table :is(.ds-directory-name,.ds-directory-customer-number,.ds-directory-version-tags){direction:ltr}
html[dir=ltr] .ds-directory-infinite{direction:ltr}
html[dir=ltr] .ds-directory-table :is(.ds-directory-tag,.ds-updates-version-pill,.ds-directory-schedule-tag){white-space:nowrap}
html[dir=ltr] .ds-row-action-popover .ds-profile-menu-item{text-align:start}
