:root{
  /* spacing */
  --s4: 0px; /* intentionally 0 */
  --s8: 8px;
  --space-field: calc(var(--s8) * 1.5);
  --space-block: calc(var(--s8) * 2);
  --space-section: calc(var(--s8) * 3);

  /* buttons — touch-friendly bounds */
  --btn-min-height: 36px;
  --btn-min-width: 72px;
  --btn-max-width: 320px;

  /* inputs */
  --input-min-width: 8rem;
  --input-max-width: 480px;

  /* card */
  --card-padding-y: calc(var(--s8) * 2);
  --card-padding-x: calc(var(--s8) * 3);

  /* dropdown chevron (native select + searchable trigger) */
  --ds-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236a6f83' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  --ds-chevron-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236a6f83' d='M5 0L10 6H0z'/%3E%3C/svg%3E");

  /* header / sidebar */
  --header-bg: #2d3143;
  --header-border: #e0e3eb;
  --header-text: #2d3143;
  --header-muted: #6a6f83;
  --brand-orange: #ff9900;

  --sidebar-bg: #e8eaf0;
  --sidebar-active: var(--brand-orange);
  --sidebar-text: #4b4f63;

  /* surfaces */
  --surface-page: #d8dbe4;
  --surface-card: #ffffff;
  --surface-panel: #f4f5f8;
  --border-default: #d2d5e0;
  --border-subtle: #e2e4ee;

  /* buttons */
  --btn-primary: #1a3a5c;
  --btn-primary-hover: #163245;
  --btn-text: #ffffff;
  --btn-secondary-bg: #eef0f4;
  --btn-secondary-hover: #e2e5ec;
  --btn-secondary-text: #2d3143;
  --btn-danger-bg: #c9302c;
  --btn-danger-hover: #a82824;
  --btn-outline-border: var(--btn-primary);
  --btn-outline-text: var(--btn-primary);

  /* statuses */
  --success-text: #1e7a4a;
  --status-teal: #2a7d8a;
  --table-header-accent: #d7f0de;
}

* { box-sizing: border-box; }

body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--surface-page);
  margin: 0;
  padding: 0;
  color: var(--header-text);
  font-size: 0.85rem;
  min-height: 100vh;
}

/* App chrome */
.app-header{
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s8);
  padding: calc(var(--s8) * 2) calc(var(--s8) * 3);
  background: var(--header-bg);
  color: #fff;
  min-height: 56px;
}

/* Industry-standard header layout (opt-in) */
.app-header--industry{
  flex-wrap: nowrap;
}
.app-header__left,
.app-header__right{
  display: flex;
  align-items: center;
  gap: calc(var(--s8) * 2);
  min-width: 0;
}
.app-header__right{
  margin-left: auto;
}
.app-header--industry .app-header-links{
  flex-wrap: nowrap;
  gap: calc(var(--s8) * 1.5);
  align-items: center;
  white-space: nowrap;
}
.app-header--industry .app-header-links{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.app-header--industry .app-header-links::-webkit-scrollbar{ height: 8px; }
.app-header--industry .app-header-links::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.18); border-radius: 999px; }
.app-nav-toggle{
  display: none;
}
.app-brand{
  display: flex;
  align-items: center;
  gap: calc(var(--s8) * 2);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}
.app-brand-logo{
  display: inline-flex;
  align-items: center;
  gap: calc(var(--s8) * 1.5);
  min-width: 0;
}
.app-brand__meta{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  gap: 2px;
  min-width: 0;
}
.app-brand__meta .app-brand__line1{
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-brand__meta .app-brand__line2{
  font-weight: 400;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-brand-logo img{
  display: block;
  height: 26px;
  width: auto;
}
.app-header-logo-right{
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
}
.app-header-logo-right img{
  display: block;
  height: 26px;
  width: auto;
}
@media (max-width: 900px){
  .app-header-logo-right img{ height: 22px; }
  .app-brand-logo img{ height: 22px; }
}

/* Inline SVG icons */
.ds-ico{
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
}
.btn--with-ico{
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
}
.btn--icon-only{
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn--icon-only.btn-sm{
  width: 36px;
  height: 36px;
}
.app-brand-sub{
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--header-muted);
  opacity: 0.95;
}
.app-brand-mission{ color: var(--header-text); }
.app-brand-os{ color: var(--brand-orange); }
.app-env{
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  align-items: center;
}
.env-pill{
  padding: var(--s4) calc(var(--s8) * 2);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}
.app-header-links{
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--s8) * 2);
  font-size: 0.78rem;
}
.app-header-links a{
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.app-header-links a:hover{ text-decoration: underline; }

.topbar__right{
  display: flex;
  align-items: center;
  gap: calc(var(--s8) * 1.5);
}
.topbar__menu{
  display: flex;
  align-items: center;
  gap: calc(var(--s8) * 1.25);
  white-space: nowrap;
}
.topbar__menuitem{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
}
.topbar__menuitem:hover{ background: rgba(255,255,255,0.10); }
.topbar__menuitem:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
}
.topbar__menuitem-icon{ font-size: 1rem; opacity: 0.95; }
.topbar__menuitem-chev{ font-size: 0.8rem; opacity: 0.85; }
.topbar__menuitem-text{ line-height: 1; }

.topbar__dropWrap{ position: relative; display: inline-flex; }
.topbar__dropPanel{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(45,49,67,0.18);
  padding: 8px;
  z-index: 140;
}
.topbar__dropItem{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #2d3143;
  font-size: 0.85rem;
  text-align: left;
  text-decoration: none;
}
.topbar__dropItem:hover{ background: rgba(26,58,92,0.06); }
.topbar__dropIcon{ color: #5c6175; }

.topbar__logoSpace{
  display: inline-flex;
  align-items: center;
  padding-left: calc(var(--s8) * 1.5);
  margin-left: calc(var(--s8) * 0.5);
  border-left: 1px solid rgba(255,255,255,0.18);
}
.topbar__logoSpaceImg{
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.98;
}

/* icon button (mobile panel) */
.iconbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
}
.iconbtn:hover{ background: rgba(255,255,255,0.10); }
.iconbtn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
}
.show-sm{ display: none; }
@media (max-width: 900px){
  .show-sm{ display: inline-flex; }
  .topbar__menuitem-text{ display: none; }
}

.app-header-links .app-header-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-header-user{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.app-header-user__btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}
.app-header-user__btn:hover{ background: rgba(255,255,255,0.10); }
.app-header-user__btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
}
.app-header-user__menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(45,49,67,0.18);
  padding: 8px;
  z-index: 120;
}
.app-header-user__item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #2d3143;
  font-size: 0.85rem;
  text-align: left;
}
.app-header-user__item:hover{ background: rgba(26,58,92,0.06); }

.app-body{
  display: flex;
  min-height: calc(100vh - 56px);
  align-items: stretch;
}
.sidebar{
  width: 240px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid #c8ccd8;
  padding: calc(var(--s8) * 2) var(--s8);
  overflow-y: auto;
}
.sidebar-section-title{
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a8fa3;
  margin: calc(var(--s8) * 2) 0 var(--s8);
}
.sidebar-section-title:first-child { margin-top: 0; }
.nav-group{ margin-bottom: calc(var(--s8) * 2); }
.nav-item{
  display: block;
  padding: var(--s8) calc(var(--s8) * 1.5);
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.8rem;
  border-radius: 4px;
  margin-bottom: 0;
}
.nav-item.is-active{
  background: #fff;
  color: var(--sidebar-active);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.nav-sub{ padding-left: calc(var(--s8) * 2); }
.nav-sub .nav-item{ font-size: 0.76rem; }

.main{
  flex: 1;
  min-width: 0;
  padding: calc(var(--s8) * 2);
}
.main-card{
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(45, 49, 67, 0.06);
  padding: var(--card-padding-y) var(--card-padding-x);
  margin: 0 auto;
}

/* Responsive app chrome (header + off-canvas sidebar) */
@media (max-width: 900px){
  .app-header{
    position: sticky;
    top: 0;
  }
  .app-nav-toggle{
    display: inline-flex;
    color: rgba(255,255,255,0.92);
  }
  .app-nav-toggle:hover{
    background: rgba(255,255,255,0.10);
  }
  .app-nav-toggle:focus-visible{
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
  }

  .app-body{
    position: relative;
  }
  .sidebar{
    position: fixed;
    z-index: 90;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
    transform: translateX(-100%);
    transition: transform 0.16s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  }
  .app-body.app-body--sidebar-open .sidebar{
    transform: translateX(0);
  }
  .main{
    padding: calc(var(--s8) * 2);
  }
}

/* Nested / inset card */
.ds-card{
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: var(--card-padding-y) var(--card-padding-x);
  box-shadow: 0 1px 4px rgba(45, 49, 67, 0.06);
}
.ds-card--compact{
  padding: var(--space-field) var(--space-block);
}
.ds-card--flush{
  padding: 0;
}

/* Showcase / docs pages (e.g. design-system-preview.html) */
.ds-preview-page-title{
  margin: 0 0 calc(var(--s8) * 2) 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #2d3143;
  letter-spacing: 0.02em;
}
.ds-preview-section{
  margin-bottom: calc(var(--s8) * 3);
}
.ds-preview-row{
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--s8) * 2);
  align-items: flex-start;
}
.ds-preview-col{
  flex: 1 1 280px;
  min-width: 240px;
}

/* Common components */
.panel{
  background: #f7f7f7;
  border-radius: 6px;
  padding: var(--s8);
  border: 1px solid var(--border-subtle);
}
.panel--flush{
  padding: 0;
}
.u-m0{
  margin: 0 !important;
}
.u-mt0{
  margin-top: 0 !important;
}
.ds-preview-row--start{
  align-items: flex-start !important;
}
.ds-preview-row--stretch{
  align-items: stretch !important;
}
.ds-fill{
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ds-fill > .panel{
  flex: 1;
  min-height: 0;
}
.ds-preview-col--tile{
  flex: 0 0 200px;
  max-width: 220px;
}
.form-actions--bare{
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.panel-title{
  font-weight: 700;
  color: #4b4f63;
  font-size: 0.9rem;
  margin: 0 0 var(--s8);
}

.field-label{
  display: block;
  margin-bottom: var(--s8);
  font-weight: 700;
  font-size: 0.78rem;
  color: #6a6f83;
 
 
}
.field-label--inline{
  display: flex;
  align-items: center;
  gap: var(--s8);
  margin-bottom: var(--s8);
}
.req{
  color: #d9534f;
  font-weight: 700;
  margin-left: 0.18em;
}

.select,
.text-input,
.small-input,
.other-input,
input[type="date"].input-date,
input[type="time"].input-time,
input[type="datetime-local"].input-datetime{
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background: #ffffff;
  color: #2d3143;
}

.select,
.text-input,
input[type="date"].input-date,
input[type="time"].input-time,
input[type="datetime-local"].input-datetime{
  width: 100%;
  min-width: var(--input-min-width);
  max-width: var(--input-max-width);
  padding: var(--s8);
  font-size: 0.8rem;
  line-height: 1.3;
}

/* Native select: same chevron as searchable combobox */
.select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: calc(var(--s8) * 3 + 10px);
  background-image: var(--ds-chevron-down);
  background-repeat: no-repeat;
  background-position: right calc(var(--s8) * 1.125) center;
  background-size: 10px 6px;
}
.select::-ms-expand{ display: none; }

/* Date / time / datetime-local — match text fields */
input[type="date"].input-date,
input[type="time"].input-time,
input[type="datetime-local"].input-datetime{
  min-height: var(--btn-min-height);
  box-sizing: border-box;
  border-radius: 6px;
  border-color: #d7dbe7;
  background-color: #ffffff;
  background-image: none;
  box-shadow: 0 1px 2px rgba(45, 49, 67, 0.04);
  color-scheme: light;
  accent-color: var(--btn-primary);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="date"].input-date:hover,
input[type="time"].input-time:hover,
input[type="datetime-local"].input-datetime:hover{
  border-color: #c4cada;
  box-shadow: 0 1px 3px rgba(45, 49, 67, 0.08);
}
input[type="date"].input-date:focus,
input[type="time"].input-time:focus,
input[type="datetime-local"].input-datetime:focus{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.20);
}
input[type="date"].input-date::-webkit-calendar-picker-indicator,
input[type="time"].input-time::-webkit-calendar-picker-indicator,
input[type="datetime-local"].input-datetime::-webkit-calendar-picker-indicator{
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  opacity: 0.62;
}
input[type="date"].input-date::-webkit-calendar-picker-indicator:hover,
input[type="time"].input-time::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"].input-datetime::-webkit-calendar-picker-indicator:hover{
  background: #f1f3f8;
  opacity: 1;
}
input[type="date"].input-date::-webkit-datetime-edit,
input[type="time"].input-time::-webkit-datetime-edit,
input[type="datetime-local"].input-datetime::-webkit-datetime-edit{
  color: #2d3143;
}
input[type="date"].input-date::-webkit-datetime-edit-fields-wrapper,
input[type="time"].input-time::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"].input-datetime::-webkit-datetime-edit-fields-wrapper{
  padding: 0;
}

/* Input with trailing action (e.g., datetime + Now) */
.ds-input-action{
  display: flex;
  align-items: center;
  gap: var(--s8);
  width: 100%;
  max-width: var(--input-max-width);
}
.ds-input-action > .text-input,
.ds-input-action > .input-date,
.ds-input-action > .input-time,
.ds-input-action > .input-datetime{
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}
.ds-input-action .btn-secondary{
  flex: 0 0 auto;
  min-width: 72px;
}

/* Info button + tooltip */
.ds-tooltip-wrap{
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.btn-info,
.ds-info-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  background: var(--surface-panel);
  color: #5c6175;
  font-size: 0.7rem;
  font-weight: 800;
  font-style: normal;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-info:hover,
.ds-info-btn:hover{
  background: #e8eaf0;
  border-color: #c8ccd8;
  color: #2d3143;
}
.btn-info:focus-visible,
.ds-info-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
}
.ds-tooltip{
  position: absolute;
  z-index: 200;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 160px;
  max-width: min(280px, 70vw);
  padding: calc(var(--s8) * 1.125) calc(var(--s8) * 1.5);
  border-radius: 6px;
  background: #2d3143;
  color: #f0f1f5;
  font-size: 0.74rem;
  line-height: 1.4;
  font-weight: 500;
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.ds-tooltip::after{
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: #2d3143;
}
.ds-tooltip-wrap:hover .ds-tooltip,
.ds-tooltip-wrap:focus-within .ds-tooltip{
  opacity: 1;
  visibility: visible;
}
/* Tooltip below (optional modifier) */
.ds-tooltip-wrap--tip-bottom .ds-tooltip{
  bottom: auto;
  top: calc(100% + 10px);
}
.ds-tooltip-wrap--tip-bottom .ds-tooltip::after{
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #2d3143;
}
.input--fluid{
  max-width: 100%;
}
.input--width-max{
  width: 100%;
  max-width: var(--input-max-width);
}
.select:focus,
.text-input:focus,
input[type="date"].input-date:focus,
input[type="time"].input-time:focus,
input[type="datetime-local"].input-datetime:focus{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}

.helper-text{
  color: #7a7f94;
  font-size: 0.8rem;
}

.opt{
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  cursor: pointer;
  font-size: 0.78rem;
  color: #4b4f63;
}
.opt input{ cursor: pointer; }

.btn-primary,
.btn-next{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-primary);
  color: var(--btn-text);
  border: none;
  padding: var(--s8) calc(var(--s8) * 2.5);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  min-height: var(--btn-min-height);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn--width-min{
  min-width: var(--btn-min-width);
}
.btn--width-max{
  width: 100%;
  max-width: var(--btn-max-width);
}
a.btn-primary,
a.btn-next,
a.btn-secondary,
a.btn-file,
a.btn-outline{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  min-height: var(--btn-min-height);
}
.btn-primary:hover,
.btn-next:hover{ background: var(--btn-primary-hover); }
.btn-primary:focus-visible,
.btn-next:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 93, 103, 0.35);
}

.btn-file{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s8) calc(var(--s8) * 2);
  border-radius: 4px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  font-size: 0.8rem;
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
  color: #2d3143;
  min-height: var(--btn-min-height);
}
.btn-file:hover{ background: #f5f5f7; }
.btn-file:focus-visible{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}

/* Buttons — sizes & extended variants */
.btn-sm{
  padding: 5px calc(var(--s8) * 1.5);
  font-size: 0.72rem;
}
.btn-lg{
  padding: calc(var(--s8) * 1.25) calc(var(--s8) * 3);
  font-size: 0.85rem;
}
.btn-secondary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  padding: var(--s8) calc(var(--s8) * 2);
  border-radius: 4px;
  border: 1px solid var(--border-default);
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
  min-height: var(--btn-min-height);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-secondary:hover{
  background: var(--btn-secondary-hover);
  border-color: #c8ccd8;
}
.btn-secondary:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 93, 103, 0.35);
}
.btn-outline{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  padding: var(--s8) calc(var(--s8) * 2);
  border-radius: 4px;
  border: 2px solid var(--btn-outline-border);
  background: transparent;
  color: var(--btn-outline-text);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
  min-height: var(--btn-min-height);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-outline:hover{
  background: rgba(26, 58, 92, 0.06);
}
.btn-outline:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
}
.btn-danger{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  padding: var(--s8) calc(var(--s8) * 2.5);
  border-radius: 4px;
  border: none;
  background: var(--btn-danger-bg);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
  min-height: var(--btn-min-height);
  transition: background 0.15s ease;
}
.btn-danger:hover{ background: var(--btn-danger-hover); }
.btn-danger:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(201, 48, 44, 0.45);
}
.btn-ghost{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  padding: var(--s8) calc(var(--s8) * 1.5);
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--btn-primary);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
  min-height: var(--btn-min-height);
}
.btn-ghost:hover{ background: rgba(26, 58, 92, 0.08); }
.btn-ghost:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 93, 103, 0.25);
}
.btn-link{
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--btn-primary);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-family: inherit;
}
.btn-link:hover{ color: var(--btn-primary-hover); }
.btn-link:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
  border-radius: 2px;
}
.btn-primary:disabled,
.btn-next:disabled,
.btn-secondary:disabled,
.btn-outline:disabled,
.btn-danger:disabled,
.btn-file:disabled,
.btn-ghost:disabled{
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Form layout helpers */
.field-control{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  align-items: stretch;
  min-width: 0;
}
.field-group{
  margin-bottom: var(--space-block);
}
.field-group:last-child{ margin-bottom: 0; }
.form-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-field);
  margin-top: var(--space-block);
  padding-top: var(--space-block);
  border-top: 1px solid var(--border-subtle);
}
.form-actions--end{
  justify-content: flex-end;
}
.form-actions--between{
  justify-content: space-between;
}
.textarea-input{
  width: 100%;
  max-width: min(100%, var(--input-max-width));
  min-width: var(--input-min-width);
  min-height: 88px;
  padding: var(--s8);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background: #ffffff;
  color: #2d3143;
  font-size: 0.8rem;
  line-height: 1.4;
  font-family: inherit;
  resize: vertical;
}
.textarea-input.input--fluid{
  max-width: 100%;
  min-width: 0;
}
.textarea-input:focus{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}
.radio-stack,
.checkbox-stack{
  display: flex;
  flex-direction: column;
  gap: calc(var(--s8) * 1.25);
  align-items: flex-start;
}
.radio-stack .opt,
.checkbox-stack .opt{
  margin: 0;
}
.fieldset-ds{
  margin: 0;
  padding: calc(var(--s8) * 2);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #fff;
}
.fieldset-ds legend{
  padding: 0 calc(var(--s8) * 1.25);
  font-size: 0.82rem;
  font-weight: 700;
  color: #4b4f63;
}

/* Tabs */
.ds-tabs{
  display: flex;
  flex-direction: column;
  gap: calc(var(--s8) * 1.5);
  min-width: 0;
}
.ds-tablist{
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
  margin: 0;
  list-style: none;
}
.ds-tab{
  position: relative;
  margin: 0 0 -1px 0;
  padding: calc(var(--s8) * 1.25) calc(var(--s8) * 2);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #6a6f83;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ds-tab:hover{
  color: #2d3143;
  background: rgba(0, 0, 0, 0.03);
}
.ds-tab.is-active,
.ds-tab[aria-selected="true"]{
  color: #2d3143;
  background: var(--surface-card);
  border-color: var(--border-subtle);
  border-bottom-color: var(--surface-card);
  box-shadow: 0 -1px 0 var(--surface-card);
}
.ds-tab:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
  z-index: 1;
}
.ds-tabpanels{
  padding: calc(var(--s8) * 1.5) 0 0 0;
  min-width: 0;
}
.ds-tabpanel{
  display: none;
  font-size: 0.82rem;
  color: #4b4f63;
  line-height: 1.45;
}
.ds-tabpanel.is-active{
  display: block;
}
.ds-tabpanel[hidden]{
  display: none !important;
}

/* Ensure flex/grid panels respect HTML `hidden` */
.ds-preview-col[hidden]{
  display: none !important;
}

.upload-tile{
  width: 100%;
  max-width: min(140px, 100%);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6a6f83;
  padding: var(--s8);
}
.upload-tile:hover{ background: #f5f5f7; }
.upload-tile:focus-visible{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}

.upload-tile-col{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s8);
  min-width: 0;
  max-width: min(220px, 100%);
}
.upload-tile-col .helper-text{
  margin: 0;
  text-align: left;
  width: 100%;
  line-height: 1.35;
  word-break: break-word;
}

.upload-input-label{
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b4f63;
  line-height: 1.3;
}
.upload-input-label .req{ margin-left: 0.15em; }

.checkbox-list{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  margin: calc(var(--s8) * 2) 0;
}
.checkbox-list label{
  display: flex;
  align-items: center;
  gap: var(--s8);
  cursor: pointer;
  color: #4b4f63;
  font-size: 0.8rem;
}
.checkbox-list input{ cursor: pointer; }

/* Loader wizard (lc-*) */
.lc-accordion{
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}
.lc-accordion > summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s8);
  padding: calc(var(--s8) * 2);
  background: #f0f1f5;
  color: #4b4f63;
  font-weight: 700;
  font-size: 0.9rem;
}
.lc-accordion > summary::-webkit-details-marker{ display: none; }
.lc-accordion > summary::after{
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #6a6f83;
  border-bottom: 2px solid #6a6f83;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.lc-accordion[open] > summary::after{ transform: rotate(-135deg); }
.lc-body{
  padding: calc(var(--s8) * 2);
  background: #ffffff;
}

.lc-wizard{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  background: var(--surface-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}
@media (max-width: 960px){
  .lc-wizard{ grid-template-columns: 1fr; }
}
.lc-wizard-col{
  padding: calc(var(--s8) * 2);
  min-width: 0;
  border-right: 1px solid var(--border-subtle);
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lc-wizard-col:last-child{ border-right: none; }
@media (max-width: 960px){
  .lc-wizard-col{
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .lc-wizard-col:last-child{ border-bottom: none; }
}
.lc-wizard-col-title{
  margin: 0 0 calc(var(--s8) * 1.25);
  padding-bottom: var(--s8);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d3143;
  letter-spacing: 0.02em;
}
.lc-field-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--s8) calc(var(--s8) * 1.25);
  align-items: center;
  margin-bottom: calc(var(--s8) * 1.25);
}
.lc-wizard-col .lc-field-row:last-child{ margin-bottom: 0; }
.lc-field-row--stack{ align-items: start; }
.lc-field-row--stack .lc-field-control{ min-width: 0; }

.lc-field-label{
  font-size: 0.78rem;
  font-weight: 600;
  color: #6a6f83;
  line-height: 1.35;
}
.lc-field-control .select,
.lc-field-control .text-input{
  width: 100%;
  max-width: 100%;
}
.lc-input-below-select{ margin-top: var(--s8); }

.lc-multiselect{
  max-height: 140px;
  overflow: auto;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  padding: var(--s8);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}
.lc-ms-item{
  display: flex;
  align-items: center;
  gap: var(--s8);
  font-size: 0.78rem;
  color: #4b4f63;
  cursor: pointer;
}
.lc-ms-item input{ cursor: pointer; }

/* Step 2 — Instruments (new-config) */
.ds-instruments-panel .lc-multiselect{
  max-height: 200px;
}

.lc-mapping-controls{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s8);
}
.lc-mapping-controls .select{
  flex: 1 1 100px;
  min-width: 0;
}
.lc-mapping-controls--with-add .btn-next{
  flex: 0 0 auto;
  white-space: nowrap;
}
.ds-column-map-editor{
  display: flex;
  flex-direction: column;
  gap: calc(var(--s8) * 1.5);
  width: 100%;
  max-width: 100%;
}
.btn-swap{
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: var(--btn-primary);
  color: var(--btn-text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.btn-swap:hover{ background: var(--btn-primary-hover); }
.btn-swap:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 93, 103, 0.35);
}

.lc-checklist{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  margin-bottom: var(--s8);
}
.lc-check-row{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s8);
  font-size: 0.78rem;
  color: #4b4f63;
}
.lc-check-row input{ cursor: pointer; }
.lc-check-label{ font-weight: 600; color: #5c6175; }

.lc-status{
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.lc-status--success{ color: var(--success-text); }
.lc-status--teal{ color: var(--status-teal); }

.lc-wizard-actions{
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  margin-top: auto;
  padding-top: var(--s8);
}

/* Step toggling (used by new-config.html) */
.ds-step{ display: none; }
.ds-step.ds-step--active{ display: block; }

/* Step indicator (new-config.html) */
.ds-stepper{
  display: flex;
  gap: var(--s8);
  margin: var(--s8) 0 var(--s8);
  align-items: center;
  flex-wrap: wrap;
}
.ds-stepper-item{
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-panel);
  font-weight: 600;
  color: #6a6f83;
  font-size: 0.7rem;
  line-height: 1.25;
  text-align: center;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ds-stepper-item.is-active{
  background: var(--btn-primary);
  border-color: var(--btn-primary);
  color: var(--btn-text);
}

/* Breadcrumbs */
.breadcrumbs{
  font-size: 0.75rem;
  color: #7a7f94;
  padding: var(--s8) 0;
  user-select: none;
}
.breadcrumbs span + span::before{
  content: "·";
  margin: 0 var(--s8);
  color: #c2c5d0;
}
.breadcrumb-current{
  color: var(--sidebar-active);
  font-weight: 700;
}

/* Page title + breadcrumb stack */
.ds-page-header{
  display: flex;
  flex-direction: column;
  gap: var(--space-field);
  margin: 0 0 var(--space-block) 0;
  padding-bottom: var(--space-block);
  border-bottom: 1px solid var(--border-subtle);
}
.ds-page-title{
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  color: #2d3143;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.ds-page-header .breadcrumbs{
  padding: 0;
}
.ds-section-title{
  margin: 0 0 var(--space-block) 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: #2d3143;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

/* Searchable single-select (combobox) */
.ds-select-search{
  position: relative;
  width: 100%;
  max-width: var(--input-max-width);
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}
.ds-select-search__anchor{
  position: relative;
  width: 100%;
  max-width: var(--input-max-width);
}
.ds-select-search__trigger{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--s8);
  width: 100%;
  max-width: var(--input-max-width);
  min-height: var(--btn-min-height);
  padding: var(--s8) calc(var(--s8) * 3 + 10px) var(--s8) calc(var(--s8) * 1.25);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background-color: #fff;
  background-image: var(--ds-chevron-down);
  background-repeat: no-repeat;
  background-position: right calc(var(--s8) * 1.125) center;
  background-size: 10px 6px;
  color: #2d3143;
  font-size: 0.8rem;
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.ds-select-search__trigger:hover{
  border-color: #c8ccd8;
}
.ds-select-search__trigger:focus{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}
.ds-select-search__trigger.is-open{
  background-image: var(--ds-chevron-up);
}
.ds-select-search__panel{
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  padding: var(--s8);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(45, 49, 67, 0.12);
}
.ds-select-search__filter{
  width: 100%;
  max-width: none;
  margin-bottom: var(--s8);
}
.ds-select-search__options{
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
}
.ds-select-search__option{
  margin: 0;
  padding: calc(var(--s8) * 1.125) var(--s8);
  border-radius: 4px;
  font-size: 0.8rem;
  color: #2d3143;
  cursor: pointer;
}
.ds-select-search__option:hover,
.ds-select-search__option.is-highlighted{
  background: var(--surface-panel);
}
.ds-select-search__option[aria-selected="true"]{
  background: rgba(26, 58, 92, 0.08);
  font-weight: 600;
}
.ds-select-search__option.is-hidden{
  display: none !important;
}

/* Upload form (for config create/edit) */
.upload-form{
  background: #f7f7f7;
  border: 1px solid #e2e4ee;
  border-radius: 6px;
  padding: var(--space-block);
  margin-top: var(--space-block);
}
.upload-form-heading{
  margin: 0 0 var(--space-block) 0;
  padding-bottom: var(--space-field);
  border-bottom: 1px solid #e2e4ee;
  font-size: 1.02rem;
  font-weight: 700;
  color: #2d3143;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.upload-panel-heading{
  margin: 0 0 calc(var(--s8) * 2) 0;
}
.upload-form-top{
  display: flex;
  flex-direction: column;
  gap: calc(var(--s8) * 2);
  align-items: stretch;
  margin-bottom: calc(var(--s8) * 2);
}

.upload-file-preview{ min-width: 0; }
.upload-file-preview .sub-label{
  margin-top: 0;
  margin-bottom: var(--s8);
}
.upload-preview-scroll{
  min-height: 140px;
  max-height: min(320px, 50vh);
  overflow: auto;
  border: 1px solid #e2e4ee;
  border-radius: 4px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.upload-preview-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  background: #fff;
}
.upload-preview-table th,
.upload-preview-table td{
  padding: var(--s8) calc(var(--s8) * 1.25);
  text-align: left;
  border-bottom: 1px solid #e4e6f0;
  vertical-align: top;
}
.upload-preview-table thead th{
  background: #f0f1f5;
  font-weight: 700;
  color: #6a6f83;
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 1px 0 #e4e6f0;
}
.upload-preview-table tbody tr:last-child td{
  border-bottom: none;
}
.upload-preview-table .col-num{
  width: 2.5rem;
  color: #7a7f94;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.upload-preview-table .col-line{
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.upload-file-block{
  display: flex;
  flex-direction: column;
  gap: calc(var(--s8) * 2);
  align-items: stretch;
}
.upload-file-block > .field-label{ margin-bottom: 0; }
.upload-file-block[hidden]{ display: none !important; }

.upload-main-row{
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) minmax(140px, 1fr);
  gap: calc(var(--s8) * 2);
  align-items: start;
}
@media (max-width: 900px){
  .upload-main-row{ grid-template-columns: 1fr; }
}

/* Override tile sizing for config upload */
.upload-tile{
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 1px solid #d2d5e0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  font-size: 1.4rem;
  color: #6a6f83;
  margin: 0;
}
.upload-tile:hover{ background: #f5f5f7; }
.upload-tile:focus-visible{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}
.helper-text{
  color: #7a7f94;
  font-size: 0.8rem;
}
.upload-tile-col{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s8);
  min-width: 0;
  max-width: min(220px, 100%);
}
.upload-tile-col .helper-text{
  margin: 0;
  text-align: left;
  width: 100%;
  line-height: 1.35;
  word-break: break-word;
}

.upload-field{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  align-items: stretch;
}
.upload-input-label{
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b4f63;
  line-height: 1.3;
}
.upload-input-label .req{ margin-left: 0.15em; }

.sub-label{
  font-size: 0.8rem;
  color: #4b4f63;
  margin: var(--s8) 0;
  font-weight: 600;
}
.field-row{
  display: flex;
  align-items: center;
  gap: var(--s8);
  flex-wrap: wrap;
}
.field-row[hidden]{
  display: none !important;
}

.field-row--inline-wide{
  justify-content: flex-start;
  gap: calc(var(--s8) * 2);
  flex-wrap: wrap;
}
.field-row--inline-wide .sub-label{ margin: 0; }

.small-input{
  width: 56px;
  padding: var(--s8);
  border: 1px solid #d2d5e0;
  border-radius: 4px;
  background: #fff;
  font-size: 0.8rem;
  line-height: 1.3;
}
.small-input:focus{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}

/* Delimiters panel */
fieldset.field.upload-delimiters-panel{
  border: 1px solid #e2e4ee;
  border-radius: 6px;
  background: #ffffff;
  padding: calc(var(--s8) * 2);
  box-shadow: 0 1px 2px rgba(45, 49, 67, 0.04);
  margin: 0;
}
.delimiters-row{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s8);
}
.delimiters-row .radios{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: calc(var(--s8) * 3);
  max-width: 100%;
  overflow-x: auto;
  padding: var(--s8) var(--s8) calc(var(--s8) * 1.5);
  -webkit-overflow-scrolling: touch;
}
.delimiters-row .radios .opt{
  flex-shrink: 0;
  gap: calc(var(--s8) * 1.25);
  padding: 0 calc(var(--s8) * 1.5);
}
.delimiters-row .radios #multiple-delimiters-input{
  flex: 0 0 auto;
  width: 120px;
  min-width: 88px;
  max-width: min(160px, 28vw);
  padding: 5px var(--s8);
  font-size: 0.72rem;
  line-height: 1.25;
}

/* Other configurations */
.upload-other-config-panel{
  border: 1px solid #e2e4ee;
  border-radius: 6px;
  background: #ffffff;
  padding: calc(var(--s8) * 2);
  box-shadow: 0 1px 2px rgba(45, 49, 67, 0.04);
}
.upload-options-cols{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--s8) * 2);
  align-items: start;
}
@media (max-width: 900px){
  .upload-options-cols{ grid-template-columns: 1fr; }
}
.upload-col{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  min-width: 0;
}

/* Data source panel */
.upload-datasource-panel{
  margin-top: calc(var(--s8) * 2);
  border: 1px solid #e2e4ee;
  border-radius: 6px;
  background: #ffffff;
  padding: calc(var(--s8) * 2);
  box-shadow: 0 1px 2px rgba(45, 49, 67, 0.04);
}
.upload-datasource-row{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  align-items: flex-start;
  min-width: 0;
}
.upload-datasource-config-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: var(--s8) calc(var(--s8) * 2);
  align-items: start;
  width: 100%;
}
@media (max-width: 900px){
  .upload-datasource-config-grid{ grid-template-columns: 1fr; }
}
.upload-datasource-type-radios{
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s8);
  flex-wrap: nowrap;
}
.upload-datasource-config-grid .sub-label{ margin: 0; }
.upload-datasource-config-grid .select{ max-width: none; }

.individual-directory-line{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s8);
  min-width: 0;
  width: 100%;
}
.individual-directory-line .opt{ flex-shrink: 0; }
.individual-directory-input{
  width: 100%;
  max-width: 100%;
}

/* Buttons row */
.upload-form-next-row{
  margin-top: var(--space-block);
  padding-top: var(--space-block);
  border-top: 1px solid #eceef4;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-field);
  flex-wrap: wrap;
}

/* new-config.html spacing cleanup */
#upload-config-form{
  display: flex;
  flex-direction: column;
  gap: var(--space-block);
}
#upload-config-form .ds-stepper{
  margin: 0;
}
#upload-config-form .upload-file-block,
#upload-config-form #upload-preview-panel,
#upload-config-form #ds-wizard-data-grid,
#upload-config-form .upload-form-top{
  margin: 0;
}
.ds-wizard-data-grid[hidden]{
  display: none !important;
}
.ds-data-grid-scroll{
  min-height: 160px;
  max-height: min(280px, 45vh);
}
.ds-data-grid-table{
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 0.72rem;
  background: #fff;
  color: #2d3143;
}
.ds-data-grid-table td{
  border: 1px solid #d2d5e0;
  padding: 5px 9px;
  vertical-align: middle;
  text-align: left;
}
.ds-data-grid-table__num{
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ds-data-grid-table__accent{
  background: #d7f0de;
  font-weight: 700;
  color: #1e5a3a;
}
.ds-data-grid-table__hl{
  background: #e4e6ed;
}

.ds-data-grid-toolbar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s8) calc(var(--s8) * 2);
  margin: 0 0 var(--s8) 0;
  padding: var(--s8) calc(var(--s8) * 1.25);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface-panel);
}
.ds-data-grid-toolbar__label{
  font-size: 0.78rem;
  font-weight: 700;
  color: #5c6175;
  margin-right: var(--s8);
}
.ds-data-grid-hint{
  margin: 0 0 var(--s8) 0;
  max-width: 48rem;
}
.ds-data-grid-hint strong{
  color: #2d3143;
}
.ds-data-grid-table--selectable td{
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.ds-data-grid-table--selectable td.is-selected{
  box-shadow: inset 0 0 0 2px var(--brand-orange, #ff9900);
  background-color: rgba(255, 153, 0, 0.14) !important;
}
.ds-data-grid-table--selectable td.ds-data-grid-table__accent.is-selected{
  background-color: rgba(255, 153, 0, 0.22) !important;
}
.ds-data-grid-table--selectable td.ds-data-grid-table__hl.is-selected{
  background-color: rgba(255, 153, 0, 0.2) !important;
}
#upload-config-form .upload-form-top{
  gap: calc(var(--s8) * 1.5);
}
#upload-config-form .ds-step{
  padding-top: var(--s8);
}
#upload-config-form .ds-step.ds-step--active{
  padding-top: var(--s8);
}
#upload-config-form .upload-form-next-row{
  margin-top: 0;
}

/* Searchable multi-select (instruments — ids to map) */
.ds-ms-search{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s8);
  width: 100%;
  max-width: 360px;
}
.ds-ms-search__anchor{
  position: relative;
  width: 100%;
  max-width: 360px;
}
.ds-ms-search__chips{
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  min-height: 0;
}
.ds-ms-search__chips:empty{
  display: none;
}
.ds-chip{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 2px 2px 2px 8px;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background: var(--surface-panel);
  font-size: 0.76rem;
  color: #2d3143;
}
.ds-chip__text{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-chip__remove{
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: #6a6f83;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ds-chip__remove:hover{
  background: #e2e4ee;
  color: #2d3143;
}
.ds-chip__remove:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 93, 103, 0.35);
}
.ds-ms-search__trigger{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s8);
  width: 100%;
  max-width: 360px;
  padding: var(--s8);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background: #fff;
  color: #7a7f94;
  font-size: 0.8rem;
  line-height: 1.3;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.ds-ms-search__trigger:focus{
  outline: none;
  border-color: #ffb54d;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}
.ds-ms-search__trigger.has-selection{
  color: #2d3143;
}
.ds-ms-search__trigger::after{
  content: "";
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #6a6f83;
  margin-left: auto;
}
.ds-ms-search__trigger.is-open::after{
  transform: rotate(180deg);
}
.ds-ms-search__panel{
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  min-width: min(100%, 420px);
  max-width: min(520px, 100vw - 32px);
  padding: var(--s8);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(45, 49, 67, 0.12);
}
.ds-ms-search__filter{
  width: 100%;
  max-width: none;
  margin-bottom: var(--s8);
}
.ds-ms-search__grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s8) calc(var(--s8) * 1.5);
  max-height: 220px;
  overflow: auto;
  padding: var(--s8) 2px;
}
@media (max-width: 640px){
  .ds-ms-search__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ds-ms-search__item{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #4b4f63;
  cursor: pointer;
  min-width: 0;
}
.ds-ms-search__item input{ cursor: pointer; flex-shrink: 0; }
.ds-ms-search__item.is-hidden{ display: none !important; }

.ds-map-list-wrap{
  margin-top: var(--s8);
}
.ds-map-list-wrap .sub-label{
  margin: 0 0 var(--s8) 0;
}
.ds-map-list-scroll{
  max-height: min(260px, 42vh);
  overflow: auto;
  overflow-x: hidden;
  border: 1px solid #e2e4ee;
  border-radius: 6px;
  background: #ffffff;
  padding: calc(var(--s8) * 1.25);
  box-shadow: 0 1px 2px rgba(45, 49, 67, 0.04);
  -webkit-overflow-scrolling: touch;
}
.ds-map-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s8);
}
.ds-map-list__item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s8);
  padding: calc(var(--s8) * 1.25) calc(var(--s8) * 1.5);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface-panel);
  font-size: 0.8rem;
  color: #2d3143;
}
.ds-map-list__text{
  min-width: 0;
  font-weight: 600;
}
.ds-map-list__remove{
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  background: #fff;
  color: #4b4f63;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.ds-map-list__remove:hover{
  background: #f0f1f5;
  color: #2d3143;
}
.ds-map-list__remove:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(42, 93, 103, 0.35);
}
.ds-map-list-empty{
  margin: 0;
  padding: var(--s8) 2px;
}
.ds-map-list-empty[hidden]{
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Job-data page layout (construction.html scaffold)                            */
/* -------------------------------------------------------------------------- */
.ds-job-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-field);
  margin: 0 0 var(--space-field) 0;
}
.ds-job-header__title{
  min-width: 0;
}
.ds-job-header__kicker{
  font-size: 0.76rem;
  font-weight: 700;
  color: #7a7f94;
}
.ds-job-header__h1{
  margin: 4px 0 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #2d3143;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.ds-job-header__actions{
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}
.ds-job-header__actions .btn-secondary,
.ds-job-header__actions .btn-danger,
.ds-job-header__actions .btn-outline,
.ds-job-header__actions .btn-primary{
  white-space: nowrap;
}

/* Compact action buttons on small screens (icon-only) */
@media (max-width: 760px){
  .ds-action-compact span{
    display: none;
  }
  .ds-action-compact.btn--with-ico{
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .ds-action-compact .ds-ico{
    width: 18px;
    height: 18px;
  }
}

.ds-job-tabs{
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0;
  margin: 0 0 var(--space-block) 0;
  border-radius: 6px;
  background: #2e6d80;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.ds-job-tab{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--s8) * 1.25) calc(var(--s8) * 2);
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.ds-job-tab:hover{
  background: rgba(255,255,255,0.08);
}
.ds-job-tab.is-active,
.ds-job-tab[aria-current="page"]{
  border-bottom-color: var(--brand-orange);
  color: #ffffff;
}
.ds-job-tab:focus-visible{
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(255, 153, 0, 0.35);
}

.ds-job-section{
  display: flex;
  flex-direction: column;
  gap: var(--space-block);
}
.ds-job-section__bar{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-field);
  flex-wrap: wrap;
}
.ds-job-section__meta{
  min-width: 240px;
}
.ds-job-section__name{
  font-weight: 700;
  color: #2d3143;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

/* KPI / chainage highlights (Construction pages) */
.ds-kpi-value{
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 153, 0, 0.16);
  border: 1px solid rgba(255, 153, 0, 0.45);
  color: #b35a00;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.ds-job-section__filter{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  min-width: 180px;
}
.ds-job-section__filter .select{
  max-width: 220px;
}

.ds-job-toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s8);
}
.ds-job-toolbar__left{
  display: flex;
  align-items: center;
  min-width: 0;
}
.ds-job-toolbar__left .select{
  max-width: 220px;
}
.ds-job-toolbar__actions{
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
}

.ds-table-scroll{
  overflow: auto;
  max-height: min(320px, 45vh);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.ds-table{
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 0.76rem;
  background: #fff;
}
.ds-table--compact td{
  padding: 6px 8px;
}
.ds-table--compact .text-input,
.ds-table--compact .select{
  padding: 6px 8px;
  font-size: 0.76rem;
  max-width: none;
}
.ds-table--compact .select{
  min-width: 6rem;
}
.ds-table th,
.ds-table td{
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e4e6f0;
  vertical-align: middle;
}
.ds-table thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0f1f5;
  font-weight: 700;
  color: #6a6f83;
  box-shadow: 0 1px 0 #e4e6f0;
  white-space: nowrap;
}
.ds-table tbody tr:hover{
  background: rgba(26, 58, 92, 0.04);
}
.ds-table tbody tr.is-highlight{
  background: rgba(255, 153, 0, 0.16);
}
.ds-table-muted{
  color: #8a8fa3;
}
.ds-table tfoot td{
  border-top: 1px solid #e4e6f0;
  background: var(--surface-panel);
}
.ds-table tfoot .ds-job-toolbar{
  padding: var(--s8) calc(var(--s8) * 1.25);
}

/* Shift report fixed controls (outside scroll region) */
.ds-table-controls{
  border-top: 1px solid #e4e6f0;
  background: var(--surface-panel);
}
.ds-table-controls .ds-job-toolbar{
  padding: var(--s8) calc(var(--s8) * 1.25);
  flex-wrap: nowrap;
  gap: var(--s8);
}
.ds-table-controls .ds-job-toolbar__left,
.ds-table-controls .ds-job-toolbar__actions{
  flex-wrap: nowrap;
}
.ds-table-controls .ds-preview-row{
  flex-wrap: nowrap;
}
.ds-table-controls .ds-job-toolbar__actions{
  align-items: center;
}
.ds-table-controls{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ds-table-controls .btn-secondary,
.ds-table-controls .btn-primary,
.ds-table-controls .btn-outline,
.ds-table-controls .btn-danger{
  white-space: nowrap;
}

.ds-row-actions{
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  flex-wrap: nowrap;
}
.ds-row-actions .btn-sm{
  padding: 5px 10px;
}

/* Datatable: column chooser */
.ds-col-menu{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ds-col-menu__panel{
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  width: 260px;
  max-width: min(320px, 80vw);
  padding: calc(var(--s8) * 1.5);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.16);
}
.ds-col-menu__title{
  font-weight: 800;
  color: #2d3143;
  font-size: 0.82rem;
  margin: 0 0 var(--s8) 0;
}
.ds-col-menu__list{
  display: flex;
  flex-direction: column;
  gap: var(--s8);
  max-height: 260px;
  overflow: auto;
  padding: var(--s8) 2px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface-panel);
}
.ds-col-menu__item{
  display: flex;
  align-items: center;
  gap: var(--s8);
  font-size: 0.78rem;
  color: #4b4f63;
  cursor: pointer;
  user-select: none;
}
.ds-col-menu__item input{ cursor: pointer; }
.ds-col-menu__actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s8);
  margin-top: var(--s8);
}

.ds-th-inline{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Tooltip that can be positioned globally (JS) */
.ds-tooltip-float{
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  transform: translate(-9999px, -9999px);
  min-width: 160px;
  max-width: min(320px, 86vw);
  padding: calc(var(--s8) * 1.125) calc(var(--s8) * 1.5);
  border-radius: 6px;
  background: #2d3143;
  color: #f0f1f5;
  font-size: 0.74rem;
  line-height: 1.4;
  font-weight: 500;
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.08s ease;
}
.ds-tooltip-float.is-open{
  opacity: 1;
}

.ds-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-block);
}
.ds-modal[aria-hidden="false"]{
  display: flex;
}
.ds-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(45, 49, 67, 0.55);
}
.ds-modal__dialog{
  position: relative;
  width: min(520px, 92vw);
  max-height: min(80vh, 720px);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  box-shadow: 0 18px 60px rgba(0,0,0,0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ds-modal__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-field);
  padding: var(--space-block);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-panel);
}
.ds-modal__header--dark{
  background: #5b6a75;
  border-bottom-color: rgba(255,255,255,0.12);
}
.ds-modal__header--dark .ds-modal__title{
  color: #ffffff;
}
.ds-modal__header--dark .ds-modal__close{
  color: rgba(255,255,255,0.92);
}
.ds-modal__header--dark .ds-modal__close:hover{
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}
.ds-modal__title{
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #2d3143;
}
.ds-modal__title--dark{
  color: #ffffff;
}
.ds-modal__x{
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  border-radius: 6px;
  color: rgba(255,255,255,0.92);
}
.ds-modal__x:hover{
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}
.ds-setup-card{
  border-radius: 10px;
  background: #ffffff;
}
.ds-setup-actions{
  display: flex;
  flex-wrap: wrap;
  gap: var(--s8);
  margin-top: var(--space-field);
}
.ds-modal__body{
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-block);
  color: #4b4f63;
  font-size: 0.85rem;
  line-height: 1.45;
}
.ds-modal__footer{
  padding: var(--space-block);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-panel);
  display: flex;
  justify-content: flex-end;
  gap: var(--s8);
  flex-wrap: wrap;
}

/* Industry-standard close button variant (keeps DS button feel) */
.ds-modal__close{
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ds-modal__close::before{
  content: \"×\";
  font-size: 1.35rem;
  font-weight: 800;
}
.ds-modal__header--dark .ds-modal__close{
  color: rgba(255,255,255,0.92);
}
.ds-modal__header--dark .ds-modal__close:hover{
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}

.ds-alert-success{
  border: 1px solid rgba(30, 122, 74, 0.28);
  background: rgba(30, 122, 74, 0.08);
  color: #1e7a4a;
  border-radius: 8px;
  padding: var(--space-field);
  font-weight: 600;
}
.ds-alert-warn{
  border: 1px solid rgba(179, 90, 0, 0.28);
  background: rgba(255, 153, 0, 0.10);
  color: #7a4a00;
  border-radius: 8px;
  padding: var(--space-field);
  font-weight: 600;
}

.ds-cell-actions{
  display: inline-flex;
  align-items: center;
  gap: var(--s8);
  flex-wrap: wrap;
}
.ds-cell-actions .helper-text{
  font-size: 0.76rem;
}

.ds-collapsible-bar{
  width: 100%;
  border: none;
  border-top: 1px solid var(--border-subtle);
  background: #5b6a75;
  color: #ffffff;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
}
.ds-collapsible-bar:hover{
  filter: brightness(1.03);
}
.ds-collapsible-bar:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.35);
}

.ds-job-lower{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-field);
}
@media (max-width: 980px){
  .ds-job-lower{
    grid-template-columns: 1fr;
  }
}
.ds-job-lower__panel{
  min-height: 220px;
}
.ds-job-textarea{
  max-width: none;
  min-width: 0;
  width: 100%;
}
.ds-attachment-box{
  display: flex;
  flex-direction: column;
  gap: var(--space-field);
}

.ds-attach-list{
  margin: 0;
  padding-left: 18px;
  color: #5c6175;
  font-size: 0.8rem;
}
.ds-attach-list li{ margin: 2px 0; }
.ds-preview-empty{
  color: #8a8fa3;
  font-size: 0.8rem;
  padding: var(--space-field);
  border: 1px dashed #d2d5e0;
  border-radius: 6px;
  background: #ffffff;
  min-height: 140px;
}

@media (max-width: 900px){
  .ds-job-header{
    flex-direction: column;
    align-items: stretch;
  }
  .ds-job-header__actions{
    justify-content: flex-start;
  }
}

