/* ==========================================================================
   Atlas Task Manager — Django UI (v3)
   Visual layer ported 1:1 from the WordPress plugin (assets/css/app.css, v2.1.52)
   so the Django version looks identical to the plugin. Django-specific additions
   are at the bottom of this file ("Django adapter").
   ========================================================================== */

/* Vazirmatn: self-hosted only (no CDN). Put Vazirmatn-Variable.woff2 in static/fonts/.
   Without the file the UI falls back to Tahoma automatically. */
@font-face {
  font-family: "Vazirmatn";
  src: local("Vazirmatn"), url("fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.atm-app,
.atm-login {
  --atm-navy: #264653;
  --atm-teal: #2a9d8f;
  --atm-yellow: #e9c46a;
  --atm-orange: #f4a261;
  --atm-coral: #e76f51;
  --atm-white: #ffffff;
  --atm-ink: #17313b;
  --atm-muted: #718086;
  --atm-line: #e5eceb;
  --atm-surface: #f6f8f7;
  --atm-radius: 18px;
  --atm-shadow: 0 12px 38px rgba(38, 70, 83, 0.08);
}

html:has(body.atm-standalone-page) {
  margin-top: 0 !important;
  background: #eef3f1;
}

body.atm-standalone-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  color: var(--atm-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(42, 157, 143, 0.11), transparent 28%),
    radial-gradient(circle at 96% 100%, rgba(233, 196, 106, 0.13), transparent 30%),
    #f4f7f6;
}

body.atm-login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

body.atm-standalone-page #wpadminbar,
body.atm-standalone-page > header,
body.atm-standalone-page > footer {
  display: none !important;
}

.atm-app,
.atm-login,
.atm-app input,
.atm-app select,
.atm-app textarea,
.atm-app button,
.atm-login input,
.atm-login button {
  box-sizing: border-box;
  font-family: "Vazirmatn", "Vazir", Tahoma, Arial, sans-serif;
}

.atm-app,
.atm-login {
  color: var(--atm-ink);
  font-size: 14px;
  line-height: 1.8;
}

/* Keep padding and borders inside each panel's available width. */
.atm-app *,
.atm-app *::before,
.atm-app *::after { box-sizing: border-box; }

.atm-admin-wrap { margin: 18px 0 0 18px; }
.atm-admin-wrap > .atm-app { margin: 0; }

.atm-app {
  width: min(1220px, calc(100% - 32px));
  margin: 32px auto;
  overflow: hidden;
  border: 1px solid var(--atm-line);
  border-radius: 24px;
  background: var(--atm-surface);
  box-shadow: var(--atm-shadow);
}

.atm-app--admin { width: min(1220px, 100%); margin-inline: 0; }

.atm-standalone-page .atm-app {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.atm-standalone-page .atm-main {
  min-height: calc(100vh - 172px);
}

.atm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: var(--atm-white);
  border-bottom: 1px solid var(--atm-line);
}

.atm-topbar__brand,
.atm-topbar__actions,
.atm-topbar__user,
.atm-user-card__head,
.atm-department-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.atm-topbar__brand { min-width: 0; }
.atm-topbar__brand > div { min-width: 0; }
.atm-topbar__brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atm-topbar__brand .atm-brand-mark { flex: 0 0 auto; }
.atm-topbar__actions { flex: 0 0 auto; margin-inline-start: auto; }
.atm-topbar__user { min-width: 0; }
.atm-topbar__user > div { min-width: 0; max-width: 180px; }
.atm-topbar__user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atm-logout { flex: 0 0 auto; white-space: nowrap; }

.atm-topbar strong,
.atm-topbar small { display: block; }
.atm-topbar strong { font-size: 14px; }
.atm-topbar small { margin-top: -3px; color: var(--atm-muted); font-size: 11px; }

.atm-brand-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, var(--atm-teal), var(--atm-navy));
  box-shadow: 0 10px 24px rgba(42, 157, 143, 0.24);
  font: 800 32px/1 "Vazirmatn", "Vazir", Tahoma, sans-serif;
}

.atm-brand-mark--small { width: 42px; height: 42px; border-radius: 14px; font-size: 20px; }
.atm-brand-mark--logo {
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.atm-brand-mark__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.atm-avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: var(--atm-navy);
  background: rgba(233, 196, 106, 0.38);
  font-weight: 800;
  font-style: normal;
}
.atm-avatar__icon {
  display: block;
  width: 18px;
  height: 18px;
}

.atm-avatar--large { width: 48px; height: 48px; border-radius: 16px; font-size: 17px; }
.atm-avatar--large .atm-avatar__icon { width: 24px; height: 24px; }
.atm-avatar--tiny { width: 24px; height: 24px; border-radius: 8px; margin-left: 6px; font-size: 10px; }
.atm-avatar--tiny .atm-avatar__icon { width: 13px; height: 13px; }
.atm-logout { margin-right: 8px; color: var(--atm-coral); text-decoration: none; font-size: 12px; }

.atm-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  overflow-x: auto;
  background: var(--atm-white);
  border-bottom: 1px solid var(--atm-line);
}

.atm-nav :is(button, a) {
  min-width: max-content;
  padding: 8px 14px;
  border: 0;
  border-radius: 11px;
  color: var(--atm-muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.atm-nav :is(button, a):hover { color: var(--atm-navy); background: #f4f7f6; }
.atm-nav :is(button, a).is-active { color: #fff; background: var(--atm-navy); }

.atm-main { padding: 26px; }
.atm-panel { display: none; }
.atm-panel.is-active { display: block; animation: atm-fade 0.18s ease-out; }
@keyframes atm-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.atm-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.atm-section-heading h2,
.atm-card h3,
.atm-department-card h3,
.atm-user-card h3,
.atm-task-card h4 { margin: 0; color: var(--atm-navy); }
.atm-section-heading h2 { font-size: 22px; line-height: 1.4; }
.atm-section-heading p { margin: 0; color: var(--atm-muted); font-size: 12px; }
.atm-eyebrow { display: block; margin-bottom: 2px; color: var(--atm-teal); font: 800 10px/1.4 "Vazirmatn", "Vazir", Tahoma, sans-serif; letter-spacing: 1.2px; }
.atm-section-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

.atm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.atm-kpi {
  position: relative;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--atm-line);
  border-radius: var(--atm-radius);
  background: var(--atm-white);
}

.atm-kpi::before { position: absolute; top: 0; right: 0; width: 4px; height: 100%; background: var(--atm-kpi-color); content: ""; }
.atm-kpi span, .atm-kpi small, .atm-kpi strong { display: block; }
.atm-kpi span { color: var(--atm-muted); font-size: 11px; }
.atm-kpi strong { margin: 5px 0 0; color: var(--atm-kpi-color); font-size: 27px; line-height: 1.2; }
.atm-kpi small { color: #9aa5a8; font-size: 10px; white-space: nowrap; }

.atm-dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.atm-card,
.atm-department-card,
.atm-user-card {
  padding: 20px;
  border: 1px solid var(--atm-line);
  border-radius: var(--atm-radius);
  background: var(--atm-white);
  box-shadow: 0 5px 18px rgba(38, 70, 83, 0.035);
}

.atm-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.atm-card__head h3, .atm-card h3 { font-size: 15px; }
.atm-card__head > strong { color: var(--atm-teal); font-size: 24px; }
.atm-progress { height: 8px; margin: 18px 0 14px; overflow: hidden; border-radius: 999px; background: #edf2f0; }
.atm-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--atm-teal), #48b8aa); }
.atm-progress--compact { height: 5px; margin: 14px 0 7px; }

.atm-mini-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.atm-mini-stats span { padding: 7px 10px; border-radius: 10px; color: var(--atm-muted); background: var(--atm-surface); font-size: 10px; }
.atm-mini-stats b { margin-right: 4px; color: var(--atm-navy); }
.atm-link-button { border: 0; color: var(--atm-teal); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }

.atm-department-performance { grid-column: 1 / -1; }
.atm-department-performance .atm-card__head > div > p { margin: 2px 0 0; color: var(--atm-muted); font-size: 10px; }
.atm-department-chart-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.atm-department-chart { min-width: 0; padding: 14px; border: 1px solid var(--atm-line); border-radius: 14px; background: var(--atm-surface); }
.atm-department-chart__head { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.atm-department-chart__mark { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: #fff; background: var(--atm-accent); font-size: 12px; font-weight: 900; }
.atm-department-chart__head strong, .atm-department-chart__head small { display: block; }
.atm-department-chart__head strong { overflow: hidden; color: var(--atm-navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.atm-department-chart__head small { color: var(--atm-muted); font-size: 8px; }
.atm-department-chart__head > b { color: var(--atm-accent); font-size: 19px; }
.atm-department-chart__track { height: 9px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #e4ebe9; }
.atm-department-chart__track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--atm-accent), var(--atm-teal)); }
.atm-department-chart__stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; color: var(--atm-muted); font-size: 8px; }
.atm-department-chart__stats b { margin-right: 3px; color: var(--atm-navy); font-size: 9px; }

.atm-compact-list { margin-top: 10px; }
.atm-compact-list > div { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--atm-line); }
.atm-compact-list > div:last-child { border-bottom: 0; }
.atm-compact-list strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.atm-compact-list small { color: var(--atm-muted); font-size: 10px; }

.atm-dot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: var(--atm-yellow); }
.atm-dot--in_progress { background: var(--atm-orange); }
.atm-dot--stopped { background: #9b7e5c; }
.atm-dot--done { background: var(--atm-teal); }

.atm-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.atm-button:hover { transform: translateY(-1px); }
.atm-button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.atm-button--primary { color: #fff; background: var(--atm-navy); box-shadow: 0 7px 17px rgba(38, 70, 83, 0.16); }
.atm-button--secondary { color: #fff; background: var(--atm-teal); }
.atm-button--ghost { color: var(--atm-coral); background: rgba(231, 111, 81, 0.09); }
.atm-button--danger { color: #fff; background: var(--atm-coral); box-shadow: 0 7px 17px rgba(231, 111, 81, 0.16); }

.atm-form { display: grid; gap: 12px; margin-top: 14px; }
.atm-form--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.atm-form label, .atm-form .atm-field { display: grid; gap: 5px; margin: 0; min-width: 0; }
.atm-form label > span, .atm-form .atm-field > span { color: var(--atm-muted); font-size: 10px; font-weight: 700; }
.atm-form input:not([type="checkbox"]),
.atm-form select,
.atm-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #dce5e3;
  border-radius: 11px;
  outline: none;
  color: var(--atm-ink);
  background: #fff;
  font-size: 12px;
  line-height: 1.7;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atm-form textarea { resize: vertical; }
.atm-form select.atm-multi-select--enhanced { display: none !important; }
.atm-field-help { display: block; margin-top: 2px; color: var(--atm-muted); font-size: 9px; line-height: 1.8; }

/* Compact multi-assignee picker: same footprint as a normal select; selected users stay on one line. */
.atm-multi-picker { position: relative; width: 100%; min-width: 0; align-self: start; }
.atm-multi-picker__control {
  position: relative;
  display: flex;
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  align-items: center;
  gap: 5px;
  padding: 4px 32px 4px 7px;
  overflow: hidden;
  border: 1px solid #dce5e3;
  border-radius: 11px;
  outline: none;
  color: var(--atm-ink);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.atm-multi-picker__control:hover { border-color: #c8d8d5; }
.atm-multi-picker__control:focus,
.atm-multi-picker.is-open .atm-multi-picker__control { border-color: var(--atm-teal); box-shadow: 0 0 0 3px rgba(42, 157, 143, .10); }
.atm-multi-picker__chips {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
}
.atm-multi-picker__chips::-webkit-scrollbar { display: none; }
.atm-multi-picker__placeholder { flex: 0 0 auto; color: #8c9b99; font-size: 11px; line-height: 30px; white-space: nowrap; }
.atm-multi-picker__chip {
  display: inline-flex;
  min-width: 0;
  height: 26px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 3px;
  border: 1px solid rgba(42, 157, 143, .18);
  border-radius: 999px;
  color: var(--atm-navy);
  background: rgba(42, 157, 143, .10);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.atm-multi-picker__chip > span { overflow: hidden; max-width: 105px; text-overflow: ellipsis; white-space: nowrap; }
.atm-multi-picker__remove {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--atm-coral);
  background: rgba(231, 111, 81, .10);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1;
}
.atm-multi-picker__remove:hover { color: #fff; background: var(--atm-coral); }
.atm-multi-picker__arrow { position: absolute; inset: 50% 11px auto auto; color: var(--atm-muted); font-size: 16px; line-height: 1; transform: translateY(-55%); transition: transform .15s ease; }
.atm-multi-picker.is-open .atm-multi-picker__arrow { transform: translateY(-45%) rotate(180deg); }
.atm-multi-picker__menu {
  position: absolute;
  z-index: 60;
  inset: calc(100% + 5px) 0 auto 0;
  overflow: hidden;
  padding: 6px;
  border: 1px solid #dce5e3;
  border-radius: 11px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 12px 30px rgba(38, 70, 83, .14);
}
.atm-multi-picker__menu[hidden] { display: none !important; }
.atm-form .atm-multi-picker__search {
  min-height: 34px !important;
  height: 34px !important;
  margin-bottom: 5px;
  padding: 5px 9px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
}
.atm-multi-picker__list { display: grid; max-height: 190px; gap: 2px; overflow-y: auto; overscroll-behavior: contain; }
.atm-multi-picker__option {
  display: flex;
  width: 100%;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 0;
  border-radius: 8px;
  color: var(--atm-ink);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 9px;
  text-align: right;
}
.atm-multi-picker__option:hover { background: rgba(42, 157, 143, .07); }
.atm-multi-picker__option.is-selected { color: var(--atm-navy); background: rgba(42, 157, 143, .11); font-weight: 800; }
.atm-multi-picker__check { display: grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; border: 1px solid #ccd8d6; border-radius: 5px; color: #fff; background: #fff; font-size: 11px; }
.atm-multi-picker__option.is-selected .atm-multi-picker__check { border-color: var(--atm-teal); background: var(--atm-teal); }
.atm-multi-picker__option-name { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.atm-multi-picker__empty { padding: 12px 7px; color: var(--atm-muted); font-size: 10px; text-align: center; }
.atm-form input:focus, .atm-form select:focus, .atm-form textarea:focus { border-color: var(--atm-teal); box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1); }
.atm-password-field { display: grid; min-width: 0; gap: 5px; }
.atm-password-field > label { display: block; }
.atm-password-control { position: relative; display: block; min-width: 0; }
.atm-password-control input { padding-inline-start: 44px !important; }
.atm-password-toggle { position: absolute; z-index: 2; inset: 50% 7px auto auto; display: grid; width: 32px; height: 32px; padding: 0; transform: translateY(-50%); place-items: center; border: 0; border-radius: 9px; color: var(--atm-navy); background: rgba(42, 157, 143, 0.1); cursor: pointer; }
.atm-password-toggle:hover, .atm-password-toggle:focus-visible { color: #fff; background: var(--atm-teal); outline: none; }
.atm-password-eye { position: relative; display: block; width: 18px; height: 12px; border: 2px solid currentColor; border-radius: 70% 30% 70% 30%; transform: rotate(45deg); }
.atm-password-eye::before { position: absolute; inset: 50% auto auto 50%; width: 4px; height: 4px; transform: translate(-50%, -50%); border-radius: 50%; background: currentColor; content: ""; }
.atm-password-toggle.is-visible .atm-password-eye::after { position: absolute; inset: 50% auto auto 50%; width: 22px; height: 2px; transform: translate(-50%, -50%) rotate(-45deg); background: currentColor; box-shadow: 0 0 0 2px #fff; content: ""; }
.atm-date-label { min-width: 0; }
.atm-form .atm-check { display: flex; align-items: center; align-self: end; gap: 7px; min-height: 40px; }
.atm-form .atm-check > span { color: var(--atm-ink); }
.atm-field--wide, .atm-form-actions { grid-column: 1 / -1; }
.atm-field--span-2 { grid-column: span 2; }
.atm-form-actions { display: flex; justify-content: flex-start; }
.atm-form-message { min-height: 20px; color: var(--atm-coral); font-size: 11px; }
.atm-muted { margin: 5px 0 0; color: var(--atm-muted); font-size: 11px; }
.atm-collapsible { margin-bottom: 16px; }
.atm-task-panel { width: 100%; max-width: 1520px; margin-inline: auto; }
.atm-task-create-card { width: 100%; margin: 0 auto 18px; padding: 24px; }
.atm-task-create-card > h3 { margin-bottom: 4px; }
.atm-task-create-form { grid-template-columns: repeat(4, minmax(190px, 280px)); justify-content: space-between; column-gap: 16px; row-gap: 14px; }
.atm-task-create-form .atm-form-actions { margin-top: 2px; }
.atm-callout { padding: 12px 15px; margin-bottom: 14px; border-radius: 12px; color: #775a13; background: rgba(233, 196, 106, 0.22); font-size: 11px; }

.atm-department-grid,
.atm-user-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.atm-department-card { position: relative; overflow: hidden; }
.atm-department-card.is-disabled,
.atm-user-card.is-disabled { border-style: dashed; background: #f8faf9; }
.atm-department-card.is-disabled .atm-department-card__stripe { background: #aab5b2; }
.atm-department-card[data-atm-department-card] { cursor: pointer; }
.atm-department-card[data-atm-department-card] form { cursor: default; }
.atm-department-card__stripe { position: absolute; inset: 0 0 0 auto; width: 5px; background: var(--atm-accent); }
.atm-department-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 15px; color: #fff; background: var(--atm-accent); font-weight: 800; }
.atm-department-card h3, .atm-user-card h3 { font-size: 14px; }
.atm-department-card__head p, .atm-user-card__head p { margin: 0; color: var(--atm-muted); font-size: 10px; }
.atm-department-card__head > div,
.atm-user-card__head > div { min-width: 0; flex: 1; }
.atm-status-badge { display: inline-flex; min-height: 23px; align-items: center; justify-content: center; padding: 3px 8px; border-radius: 8px; font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.atm-status-badge.is-active { color: #20796f; background: rgba(42, 157, 143, 0.12); }
.atm-status-badge.is-inactive { color: #a14f3c; background: rgba(231, 111, 81, 0.12); }
.atm-status-badge.is-archived { color: #fff; background: var(--atm-coral); }
.atm-department-card__manager { margin-top: 15px; }
.atm-department-card__manager small, .atm-department-card__manager strong { display: block; }
.atm-department-card__manager small { color: var(--atm-muted); font-size: 9px; }
.atm-department-card__manager strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.atm-department-card__stats { display: flex; justify-content: space-between; gap: 7px; }
.atm-department-card__stats span { color: var(--atm-muted); font-size: 9px; }
.atm-department-card__stats b { color: var(--atm-navy); font-size: 11px; }

.atm-details { margin-top: 14px; border-top: 1px solid var(--atm-line); }
.atm-details > summary, .atm-add-subtask > summary { padding-top: 11px; color: var(--atm-teal); cursor: pointer; list-style: none; font-size: 10px; font-weight: 800; }
.atm-details > summary::-webkit-details-marker, .atm-add-subtask > summary::-webkit-details-marker { display: none; }
.atm-details__body { padding-top: 10px; }
.atm-details__body h4 { margin: 16px 0 8px; font-size: 11px; }
.atm-member-list { display: grid; gap: 6px; max-height: 210px; padding: 0; margin: 0; overflow: auto; list-style: none; }
.atm-member-list li { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 10px; background: var(--atm-surface); }
.atm-member-list strong, .atm-member-list small { display: block; }
.atm-member-list strong { font-size: 10px; }
.atm-member-list small { color: var(--atm-muted); font-size: 8px; }
.atm-edit-department { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--atm-line); }

.atm-kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.atm-kanban-column { position: relative; min-height: 190px; padding: 12px; overflow: hidden; border: 1px solid var(--atm-line); border-radius: var(--atm-radius); background: #f0f5f3; }
.atm-kanban-column::before { position: absolute; inset: 0 0 auto; height: 3px; background: var(--atm-navy); content: ""; }
.atm-kanban-column--in_progress::before { background: var(--atm-yellow); }
.atm-kanban-column--stopped::before { background: #9b7e5c; }
.atm-kanban-column--done::before { background: var(--atm-teal); }
.atm-kanban-column__head { display: flex; align-items: center; justify-content: space-between; padding: 2px 3px 10px; }
.atm-kanban-column__head h3 { margin: 0; color: var(--atm-navy); font-size: 12px; }
.atm-kanban-column__head span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; color: var(--atm-navy); background: #fff; font-size: 9px; font-weight: 800; }
.atm-kanban-column__body { display: grid; min-height: 125px; align-content: start; gap: 9px; }
.atm-task-card { padding: 14px; border: 1px solid #e2eae8; border-radius: 15px; background: #fff; box-shadow: 0 4px 12px rgba(38, 70, 83, 0.04); }
.atm-task-card__meta, .atm-task-card__progress, .atm-task-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atm-task-card__meta small, .atm-task-card__progress small { color: var(--atm-muted); font-size: 8px; }
.atm-task-card h4 { margin-top: 9px; font-size: 12px; }
.atm-task-card__title { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 9px; }
.atm-task-card__title h4 { margin: 0; }
.atm-task-card__title-copy { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 5px 7px; }
.atm-task-card__title-copy h4 { min-width: 0; }
.atm-stop-reason-inline { display: inline-flex; max-width: 100%; padding: 2px 6px; overflow: hidden; border: 1px solid rgba(155, 126, 92, 0.28); border-radius: 6px; color: #765f46; background: rgba(155, 126, 92, 0.10); font-size: 7px; font-weight: 800; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.atm-stop-reason-field[hidden] { display: none !important; }
.atm-stop-reason-field textarea { border-color: rgba(155, 126, 92, 0.45); background: #fffdf9; }
.atm-required-mark { color: #c7432f; font-weight: 900; }
.atm-checklist-toggle { display: grid; width: 25px; height: 25px; padding: 0; place-items: center; border: 1px solid #cfdad7; border-radius: 8px; color: transparent; background: #fff; cursor: pointer; font: 900 13px/1 "Vazirmatn", "Vazir", Tahoma, sans-serif; transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease; }
.atm-checklist-toggle:hover { border-color: var(--atm-teal); transform: translateY(-1px); }
.atm-checklist-toggle.is-complete { border-color: var(--atm-teal); color: #fff; background: var(--atm-teal); }
.atm-checklist-toggle:disabled { cursor: wait; opacity: 0.55; transform: none; }
.atm-checklist-toggle--small { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }
.atm-checklist-toggle--readonly { cursor: default; pointer-events: none; opacity: 0.72; }
.atm-task-card > p { display: -webkit-box; margin: 4px 0 0; overflow: hidden; color: var(--atm-muted); font-size: 9px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.atm-task-card__progress strong { color: var(--atm-teal); font-size: 10px; }
.atm-task-card__footer { margin-top: 10px; color: var(--atm-muted); font-size: 8px; }
.atm-task-card__footer span { display: flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atm-task-card__footer .atm-assignee-label, .atm-subtask > summary .atm-subtask__assignee-line { color: #d60000 !important; font-weight: 900 !important; opacity: 1 !important; }
.atm-priority { padding: 3px 7px; border-radius: 7px; color: #775a13; background: rgba(233, 196, 106, 0.22); font-size: 8px; font-weight: 800; }
.atm-priority--urgent { color: #b3442d; background: rgba(231, 111, 81, 0.15); }
.atm-priority--high { color: #a75c1d; background: rgba(244, 162, 97, 0.18); }
.atm-priority--low { color: #257c72; background: rgba(42, 157, 143, 0.12); }
.atm-details--task { margin-top: 10px; }
.atm-task-edit-form { padding-bottom: 12px; border-bottom: 1px dashed var(--atm-line); }
.atm-subtasks { margin-top: 12px; }
.atm-subtasks__head { display: flex; align-items: center; justify-content: space-between; }
.atm-subtasks__head h5 { margin: 0; color: var(--atm-navy); font-size: 10px; }
.atm-subtasks__head span { color: var(--atm-muted); font-size: 9px; }
.atm-subtask { margin-top: 7px; border: 1px solid var(--atm-line); border-radius: 10px; }
.atm-subtask > summary { display: grid; grid-template-columns: 20px 8px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 8px; cursor: pointer; list-style: none; font-size: 9px; }
.atm-subtask > summary::-webkit-details-marker { display: none; }
.atm-subtask__title-line { display: flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; }
.atm-subtask__title-line > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atm-stop-reason-inline--subtask { flex: 0 1 auto; max-width: 150px; font-size: 6.5px; }
.atm-subtask > summary small { max-width: 125px; overflow: hidden; color: var(--atm-muted); text-overflow: ellipsis; white-space: nowrap; }
.atm-subtask .atm-form { padding: 0 9px 9px; }
.atm-subtask-delete-form { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 9px 9px; }
.atm-subtask-delete-form .atm-form-message { max-width: 170px; }
.atm-task-context-note { margin-bottom: 12px; }
.atm-add-subtask { margin-top: 9px; }

.atm-comments { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--atm-line); }
.atm-comments__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atm-comments__head h5 { margin: 0; color: var(--atm-navy); font-size: 10px; }
.atm-comments__head span { color: var(--atm-muted); font-size: 8px; }
.atm-comment-form { gap: 8px; margin-top: 9px; }
.atm-comment-form textarea { min-height: 68px; }
.atm-comment-form__actions { display: flex; align-items: center; gap: 8px; }
.atm-comment-form__actions .atm-form-message { flex: 1; }
.atm-comment-list { display: grid; gap: 8px; margin-top: 11px; }
.atm-comment {
  min-width: 0;
  margin-inline-start: calc(var(--atm-comment-depth) * 10px);
  padding: 10px;
  border: 1px solid var(--atm-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(38, 70, 83, 0.035);
}
.atm-comment .atm-comment { margin-top: 8px; background: var(--atm-surface); }
.atm-comment__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.atm-comment__author { display: flex; min-width: 0; align-items: center; gap: 6px; }
.atm-comment__author strong { overflow: hidden; color: var(--atm-navy); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.atm-comment__meta time { flex: 0 0 auto; color: var(--atm-muted); font-size: 7px; }
.atm-comment__body { margin-top: 7px; color: var(--atm-ink); font-size: 9px; line-height: 1.9; overflow-wrap: anywhere; }
.atm-comment-reply { margin-top: 5px; }
.atm-comment-reply > summary { width: max-content; color: var(--atm-teal); cursor: pointer; list-style: none; font-size: 8px; font-weight: 800; }
.atm-comment-reply > summary::-webkit-details-marker { display: none; }
.atm-comment-reply .atm-form { gap: 7px; margin-top: 7px; padding: 8px; border-radius: 9px; background: var(--atm-surface); }
.atm-comment-reply textarea { min-height: 58px; }
.atm-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px; border: 1px solid rgba(231, 111, 81, 0.24); border-radius: 12px; background: rgba(231, 111, 81, 0.055); }
.atm-danger-zone strong, .atm-danger-zone small { display: block; }
.atm-danger-zone strong { color: var(--atm-coral); font-size: 10px; }
.atm-danger-zone small { color: var(--atm-muted); font-size: 8px; }
.atm-danger-zone form { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.atm-danger-zone .atm-form-message { max-width: 130px; }

.atm-user-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--atm-line); }
.atm-user-card__meta span { padding: 4px 8px; border-radius: 8px; color: var(--atm-navy); background: rgba(233, 196, 106, 0.25); font-size: 9px; font-weight: 800; }
.atm-user-card__meta small { color: var(--atm-muted); font-size: 9px; }
.atm-user-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; padding: 10px; border: 1px solid var(--atm-line); border-radius: 12px; background: var(--atm-surface); }
.atm-user-info > div { min-width: 0; padding: 7px 8px; border-radius: 9px; background: #fff; }
.atm-user-info small, .atm-user-info strong { display: block; }
.atm-user-info small { margin-bottom: 3px; color: var(--atm-muted); font-size: 8px; }
.atm-user-info strong { overflow-wrap: anywhere; color: var(--atm-navy); font-size: 9px; line-height: 1.65; }
/* User directory: keep a real RTL table on every screen size. */
.atm-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.atm-user-table-wrap { container-type: inline-size; margin-top: 0; }
.atm-user-table-wrap:focus-visible { outline: 2px solid var(--atm-navy); outline-offset: 3px; }
.atm-user-table { width: 100%; min-width: 940px; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; color: var(--atm-ink); background: var(--atm-surface); direction: rtl; }
.atm-user-table th,
.atm-user-table td { padding: 15px 14px; border: 0; border-bottom: 1px solid var(--atm-line); vertical-align: middle; text-align: right; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.atm-user-table thead th { padding-block: 14px; background: var(--atm-surface-2, #edf2f5); color: var(--atm-muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.atm-user-table thead th:nth-child(1) { width: 21%; }
.atm-user-table thead th:nth-child(2) { width: 17%; }
.atm-user-table thead th:nth-child(3) { width: 14%; }
.atm-user-table thead th:nth-child(4) { width: 14%; }
.atm-user-table thead th:nth-child(5) { width: 12%; }
.atm-user-table thead th:nth-child(6) { width: 8%; }
.atm-user-table thead th:last-child { width: 146px; }
.atm-user-table__row { transition: background .15s ease; }
.atm-user-table__row:hover,
.atm-user-table__row:focus-within { background: var(--atm-surface-2, #edf2f5); }
.atm-user-table__name { display: flex; align-items: center; gap: 10px; }
.atm-user-table__name .atm-avatar { flex: 0 0 32px; width: 32px; height: 32px; }
.atm-user-table__name strong { min-width: 0; font-weight: 700; }
.atm-user-table bdi { font-variant-numeric: tabular-nums; }
.atm-user-table__username { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.atm-user-table__role { font-size: 11px; }
.atm-user-table .atm-status-badge { white-space: nowrap; }
.atm-user-table .atm-status-badge.is-active { color: var(--atm-teal); }
.atm-user-table .atm-user-table__actions-cell { text-align: center; }
.atm-user-actions { display: flex; align-items: center; justify-content: center; gap: 6px; direction: rtl; }
.atm-user-actions form { display: flex; margin: 0; padding: 0; }
.atm-user-action { display: inline-flex; flex: 0 0 34px; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 7px; border: 1px solid var(--atm-line); border-radius: 8px; color: var(--atm-navy); background: var(--atm-surface); cursor: pointer; box-shadow: none; text-decoration: none; transition: background .15s, border-color .15s; }
.atm-user-action svg { display: block; width: 18px; height: 18px; flex: 0 0 18px; pointer-events: none; }
.atm-user-action--edit { color: var(--atm-teal); }
.atm-user-action--delete { color: var(--atm-coral); }
.atm-user-action:hover:not(:disabled),
.atm-user-action[aria-expanded="true"] { background: var(--atm-surface-2, #edf2f5); border-color: currentColor; }
.atm-user-action:focus-visible,
.atm-user-panel-close:focus-visible { outline: 2px solid var(--atm-navy); outline-offset: 3px; }
.atm-user-action:disabled { opacity: .35; cursor: not-allowed; }
.atm-user-action[aria-busy="true"] { opacity: .65; cursor: wait; }
.atm-user-panel-row[hidden] { display: none !important; }
.atm-user-table .atm-user-panel-row > td { padding: 16px; background: var(--atm-page, #edf2f5); }
.atm-user-row-panel { width: min(820px, calc(100vw - 64px)); max-width: calc(100cqi - 34px); position: sticky; inset-inline-start: 16px; padding: 18px; border: 1px solid var(--atm-line); border-radius: 10px; background: var(--atm-surface); }
.atm-user-row-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.atm-user-row-panel__head h3 { margin: 0; color: var(--atm-ink); font-size: 15px; line-height: 1.8; }
.atm-user-panel-close { flex: 0 0 auto; padding: 6px 12px; border: 1px solid var(--atm-line); border-radius: 7px; color: var(--atm-ink); background: var(--atm-surface-2, #edf2f5); cursor: pointer; font: inherit; font-size: 11px; }
.atm-user-row-panel .atm-user-info { margin-top: 0; }
.atm-user-row-panel .atm-user-info small { font-size: 10px; }
.atm-user-row-panel .atm-user-info strong { font-size: 12px; }
.atm-user-row-panel .atm-password-form { max-width: 400px; }

/* Dedicated user details/edit page. User actions navigate here instead of opening table rows. */
.atm-user-page__heading { align-items: flex-start; }
.atm-user-page__heading > div:first-child { min-width: 0; }
.atm-user-page__heading p { margin: 5px 0 0; color: var(--atm-muted); font-size: 11px; }
.atm-user-page__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 8px; }
.atm-user-page__card { width: 100%; padding: 20px; }
.atm-user-page__profile { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--atm-line); }
.atm-user-page__profile .atm-avatar { flex: 0 0 46px; width: 46px; height: 46px; }
.atm-user-page__profile > div { min-width: 0; }
.atm-user-page__profile strong,
.atm-user-page__profile small { display: block; }
.atm-user-page__profile strong { overflow: hidden; color: var(--atm-ink); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.atm-user-page__profile small { margin-top: 2px; color: var(--atm-muted); font-size: 10px; text-align: right; }
.atm-user-page__profile .atm-status-badge { margin-inline-start: auto; white-space: nowrap; }
.atm-user-page__card > .atm-user-info { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; padding: 14px; gap: 10px; }
.atm-user-page__card > .atm-user-info > div { padding: 12px; }
.atm-user-page__card > .atm-user-info small { font-size: 10px; }
.atm-user-page__card > .atm-user-info strong { font-size: 12px; }
.atm-user-edit-stack { display: grid; gap: 16px; }
.atm-user-edit-section { padding: 18px; border: 1px solid var(--atm-line); border-radius: 14px; background: var(--atm-surface); }
.atm-user-edit-section > h3 { margin: 0 0 15px; color: var(--atm-ink); font-size: 14px; }
.atm-user-edit-section .atm-password-form { max-width: 520px; margin-top: 0; padding-top: 0; border-top: 0; }
.atm-user-edit-section .atm-entity-actions { margin-top: 0; }
.atm-user-edit-section--danger { border-color: rgba(231, 111, 81, 0.3); }
@media (max-width: 760px) {
  .atm-user-table th, .atm-user-table td { padding: 12px; }
  .atm-user-row-panel { padding: 12px; }
  .atm-user-row-panel .atm-form--grid { grid-template-columns: 1fr; }
  .atm-user-page__heading { align-items: stretch; }
  .atm-user-page__actions { width: 100%; }
  .atm-user-page__actions .atm-button { flex: 1 1 100%; justify-content: center; }
  .atm-user-page__card { padding: 14px; }
  .atm-user-page__profile { align-items: flex-start; flex-wrap: wrap; }
  .atm-user-page__profile .atm-status-badge { margin-inline-start: 0; }
  .atm-user-page__card > .atm-user-info { grid-template-columns: 1fr; }
  .atm-user-edit-section { padding: 14px; }
}
.atm-password-form { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--atm-line); }
.atm-entity-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px; border: 1px solid rgba(231, 111, 81, 0.22); border-radius: 12px; background: rgba(231, 111, 81, 0.045); }
.atm-entity-actions--user { align-items: stretch; flex-direction: column; }
.atm-entity-actions strong,
.atm-entity-actions small { display: block; }
.atm-entity-actions strong { color: var(--atm-navy); font-size: 10px; }
.atm-entity-actions small { margin-top: 2px; color: var(--atm-muted); font-size: 8px; }
.atm-entity-actions__buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; }
.atm-entity-actions__buttons form { display: flex; align-items: center; gap: 6px; }
.atm-entity-actions__buttons .atm-form-message { max-width: 130px; }
.atm-archived-users-panel .atm-section-heading { align-items: center; }
.atm-archived-users-panel .atm-section-heading > div { max-width: 720px; }
.atm-archived-user-grid { margin-top: 16px; }
.atm-archived-user-card { position: relative; }
.atm-archived-user-card .atm-user-card__head { align-items: center; }
.atm-archive-date { margin: 12px 0 0; color: var(--atm-muted); font-size: 9px; }
.atm-settings-card { max-width: 680px; }
.atm-report-grid { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(480px, 1.2fr); gap: 14px; }
.atm-export-card { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: flex-start; overflow: hidden; }
.atm-export-card::before { position: absolute; inset: 0 0 auto; width: 100%; height: 4px; background: var(--atm-teal); content: ""; }
.atm-export-card--backup::before { background: var(--atm-navy); }
.atm-export-card__icon { display: grid; width: 42px; height: 42px; margin-bottom: 12px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--atm-teal), var(--atm-navy)); font: 900 17px/1 "Vazirmatn", "Vazir", Tahoma, sans-serif; }
.atm-export-card--backup .atm-export-card__icon { color: var(--atm-navy); background: rgba(233, 196, 106, 0.42); }
.atm-export-card > p { margin: 7px 0 0; color: var(--atm-muted); font-size: 10px; }
.atm-export-card > form:not(.atm-report-filter-form) { margin-top: auto; padding-top: 18px; }
.atm-export-note { width: 100%; margin-top: 14px; padding: 9px 11px; border-radius: 10px; color: #8a6518; background: rgba(233, 196, 106, 0.16); font-size: 9px; }
.atm-report-filter-form { width: 100%; margin-top: 15px; padding-top: 14px; border-top: 1px dashed var(--atm-line); }
.atm-report-contents { margin-top: 14px; }
.atm-report-contents .atm-card__head small { color: var(--atm-muted); font-size: 9px; }
.atm-report-chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.atm-report-chip-list span { padding: 6px 10px; border: 1px solid var(--atm-line); border-radius: 9px; color: var(--atm-navy); background: var(--atm-surface); font-size: 9px; font-weight: 700; }
.atm-permission-card { margin: 0 0 16px; }
.atm-permission-card__summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; user-select: none; }
.atm-permission-card__summary::-webkit-details-marker { display: none; }
.atm-permission-card__summary:focus-visible { border-radius: 10px; outline: 3px solid rgba(42, 157, 143, 0.2); outline-offset: 4px; }
.atm-permission-card__title { display: grid; gap: 2px; }
.atm-permission-card__title strong { color: var(--atm-navy); font-size: 14px; }
.atm-permission-card__hint { display: flex; align-items: center; gap: 10px; color: var(--atm-muted); font-size: 9px; }
.atm-permission-card__arrow { display: block; width: 10px; height: 10px; border-right: 2px solid var(--atm-teal); border-bottom: 2px solid var(--atm-teal); transform: rotate(45deg) translateY(-2px); transition: transform 0.2s ease; }
.atm-permission-card[open] .atm-permission-card__arrow { transform: rotate(225deg) translate(-2px, -2px); }
.atm-permission-card__body { padding-top: 14px; }
.atm-permission-card__body > .atm-muted { margin: 0 0 10px; }
.atm-permission-card__body .atm-table-wrap { margin-top: 0; }
.atm-table-wrap { width: 100%; margin-top: 14px; overflow-x: auto; border: 1px solid var(--atm-line); border-radius: 13px; }
.atm-permission-table { width: 100%; min-width: 720px; border-collapse: collapse; background: #fff; }
.atm-permission-table th,
.atm-permission-table td { padding: 10px 12px; border-bottom: 1px solid var(--atm-line); text-align: right; font-size: 10px; }
.atm-permission-table thead th { color: var(--atm-navy); background: #f2f6f5; font-weight: 800; }
.atm-permission-table tbody th { color: var(--atm-ink); font-weight: 600; }
.atm-permission-table tbody tr:last-child th,
.atm-permission-table tbody tr:last-child td { border-bottom: 0; }
.atm-access { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 8px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.atm-access--yes { color: #20796f; background: rgba(42, 157, 143, 0.12); }
.atm-access--no { color: #b34f38; background: rgba(231, 111, 81, 0.12); }
.atm-access--limited { color: #8a6518; background: rgba(233, 196, 106, 0.2); }

.atm-empty { margin: 12px 0 0; color: var(--atm-muted); font-size: 11px; }
.atm-empty--small { margin: 4px; text-align: center; font-size: 9px; }
.atm-toast { position: fixed; z-index: 999999; right: 26px; bottom: 26px; max-width: 330px; padding: 11px 15px; transform: translateY(20px); border-radius: 12px; opacity: 0; pointer-events: none; color: #fff; background: var(--atm-navy); box-shadow: var(--atm-shadow); font-size: 11px; transition: opacity 0.2s ease, transform 0.2s ease; }
.atm-toast.is-visible { transform: none; opacity: 1; }
.atm-toast.is-error { background: var(--atm-coral); }

body.atm-modal-open { overflow: hidden; }

.atm-confirm-modal,
.atm-confirm-modal * {
  box-sizing: border-box;
  font-family: "Vazirmatn", "Vazir", Tahoma, Arial, sans-serif;
}

.atm-confirm-modal {
  --atm-confirm-accent: #e9c46a;
  --atm-confirm-accent-strong: #f4a261;
  --atm-confirm-accent-soft: rgba(233, 196, 106, 0.2);
  position: fixed;
  z-index: 1000000;
  inset: 0;
  display: grid;
  visibility: hidden;
  overflow: hidden;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  direction: rtl;
  background: rgba(10, 28, 35, 0.55);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}

.atm-confirm-modal--danger {
  --atm-confirm-accent: #e76f51;
  --atm-confirm-accent-strong: #c94f36;
  --atm-confirm-accent-soft: rgba(231, 111, 81, 0.18);
}

.atm-confirm-modal--success {
  --atm-confirm-accent: #2a9d8f;
  --atm-confirm-accent-strong: #217f75;
  --atm-confirm-accent-soft: rgba(42, 157, 143, 0.18);
}

.atm-confirm-modal.is-open,
.atm-confirm-modal.is-closing {
  visibility: visible;
  transition-delay: 0s;
}

.atm-confirm-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.atm-confirm-modal__glow {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  opacity: 0.55;
  pointer-events: none;
  filter: blur(28px);
}

.atm-confirm-modal__glow--top {
  top: -155px;
  right: -85px;
  background: rgba(42, 157, 143, 0.46);
  animation: atm-confirm-float-top 7s ease-in-out infinite alternate;
}

.atm-confirm-modal__glow--bottom {
  bottom: -190px;
  left: -95px;
  background: var(--atm-confirm-accent-soft);
  animation: atm-confirm-float-bottom 8s ease-in-out infinite alternate;
}

.atm-confirm-modal__dialog {
  position: relative;
  isolation: isolate;
  display: grid;
  width: min(470px, 100%);
  overflow: hidden;
  padding: 34px 34px 30px;
  transform: translateY(26px) scale(0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  opacity: 0;
  color: #17313b;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 248, 246, 0.78)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 36px 90px rgba(7, 25, 31, 0.32),
    0 8px 24px rgba(7, 25, 31, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  text-align: center;
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.atm-confirm-modal__dialog::before {
  position: absolute;
  z-index: -1;
  top: -105px;
  right: -85px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--atm-confirm-accent-soft);
  content: "";
  filter: blur(8px);
}

.atm-confirm-modal__dialog::after {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -40%;
  width: 35%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.98), transparent);
  content: "";
  animation: atm-confirm-shimmer 3.8s ease-in-out infinite;
}

.atm-confirm-modal.is-open .atm-confirm-modal__dialog {
  animation: atm-confirm-arrive 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.atm-confirm-modal.is-closing .atm-confirm-modal__dialog {
  animation: atm-confirm-leave 0.22s ease-in forwards;
}

.atm-confirm-modal__icon {
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 20px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(145deg, var(--atm-confirm-accent), var(--atm-confirm-accent-strong));
  box-shadow: 0 14px 34px var(--atm-confirm-accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.atm-confirm-modal.is-open .atm-confirm-modal__icon {
  animation: atm-confirm-icon-pop 0.68s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.atm-confirm-modal__icon-ring {
  position: absolute;
  inset: -9px;
  border: 2px solid var(--atm-confirm-accent);
  border-radius: 31px;
  opacity: 0;
}

.atm-confirm-modal.is-open .atm-confirm-modal__icon-ring {
  animation: atm-confirm-ring 1.8s 0.55s ease-out infinite;
}

.atm-confirm-modal__icon-core {
  font: 900 35px/1 "Vazirmatn", "Vazir", Tahoma, sans-serif;
  text-shadow: 0 2px 8px rgba(23, 49, 59, 0.18);
}

.atm-confirm-modal__content { position: relative; z-index: 1; }
.atm-confirm-modal__eyebrow { display: block; margin-bottom: 5px; color: var(--atm-confirm-accent-strong); font-size: 9px; font-weight: 900; letter-spacing: 0.08em; }
.atm-confirm-modal__content h2 { margin: 0; color: #17313b; font-size: 21px; font-weight: 900; line-height: 1.7; }
.atm-confirm-modal__content p { max-width: 370px; margin: 8px auto 0; color: #5f7279; font-size: 12px; font-weight: 600; line-height: 2; }

.atm-confirm-modal__actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.atm-confirm-modal__button {
  min-width: 126px;
  min-height: 44px;
  padding: 9px 20px;
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  outline: none;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.5;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.atm-confirm-modal__button:hover { transform: translateY(-2px); }
.atm-confirm-modal__button:active { transform: translateY(0) scale(0.98); }
.atm-confirm-modal__button:focus-visible { outline: 3px solid rgba(42, 157, 143, 0.22); outline-offset: 3px; }
.atm-confirm-modal__button--cancel { color: #405a63; background: rgba(38, 70, 83, 0.08); box-shadow: inset 0 0 0 1px rgba(38, 70, 83, 0.08); }
.atm-confirm-modal__button--cancel:hover { background: rgba(38, 70, 83, 0.13); }
.atm-confirm-modal__button--confirm { color: #fff; background: linear-gradient(135deg, var(--atm-confirm-accent), var(--atm-confirm-accent-strong)); box-shadow: 0 11px 24px var(--atm-confirm-accent-soft); }
.atm-confirm-modal__button--confirm:hover { box-shadow: 0 15px 30px var(--atm-confirm-accent-soft); }

@keyframes atm-confirm-arrive {
  0% { transform: translateY(30px) scale(0.92); opacity: 0; }
  65% { transform: translateY(-4px) scale(1.012); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes atm-confirm-leave {
  from { transform: none; opacity: 1; }
  to { transform: translateY(14px) scale(0.97); opacity: 0; }
}

@keyframes atm-confirm-icon-pop {
  0% { transform: rotate(-10deg) scale(0.35); opacity: 0; }
  62% { transform: rotate(4deg) scale(1.08); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes atm-confirm-ring {
  0% { transform: scale(0.88); opacity: 0.6; }
  75%, 100% { transform: scale(1.18); opacity: 0; }
}

@keyframes atm-confirm-shimmer {
  0%, 35% { right: -40%; opacity: 0; }
  50% { opacity: 1; }
  70%, 100% { right: 105%; opacity: 0; }
}

@keyframes atm-confirm-float-top {
  to { transform: translate(-45px, 35px) scale(1.08); }
}

@keyframes atm-confirm-float-bottom {
  to { transform: translate(55px, -28px) scale(1.12); }
}

.atm-login {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  width: min(920px, calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--atm-line);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--atm-shadow);
}

.atm-login__art { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 44px; color: #fff; text-align: center; background: linear-gradient(150deg, var(--atm-navy) 0%, var(--atm-navy) 30%, var(--atm-teal) 100%); }
.atm-login__logo { display: block; width: 174px; height: 174px; object-fit: contain; }
.atm-login__group-name { margin-top: 10px; color: var(--atm-yellow); font-size: 21px; font-weight: 900; }
.atm-login__art p { max-width: 240px; margin: 5px 0 0; color: rgba(255,255,255,0.9); font-size: 12px; font-weight: 600; }
.atm-login__panel { display: flex; flex-direction: column; justify-content: center; padding: 60px 72px; }
.atm-login__heading h1 { margin: 7px 0 5px; color: var(--atm-navy); font-size: 27px; }
.atm-login__heading p { margin: 0; color: var(--atm-muted); font-size: 11px; }
.atm-login .atm-form { margin-top: 25px; }
.atm-login .atm-button { width: 100%; min-height: 44px; margin-top: 3px; }

@media (max-width: 1050px) {
  .atm-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .atm-department-grid, .atm-user-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-kanban { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .atm-task-create-form { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
}

@media (max-width: 760px) {
  .atm-app { width: min(100% - 18px, 1220px); margin: 10px auto; border-radius: 18px; }
  .atm-topbar { align-items: flex-start; padding: 14px; }
  .atm-topbar__brand small { display: none; }
  .atm-topbar__user > div { display: none; }
  .atm-nav { padding: 8px 12px; }
  .atm-main { padding: 16px 12px; }
  .atm-section-heading { align-items: center; }
  .atm-section-heading h2 { font-size: 18px; }
  .atm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-kpi { padding: 14px; }
  .atm-dashboard-grid, .atm-department-grid, .atm-user-grid, .atm-form--grid { grid-template-columns: 1fr; }
  .atm-user-info { grid-template-columns: 1fr; }
	.atm-report-grid { grid-template-columns: 1fr; }
  .atm-department-chart-list { grid-template-columns: 1fr; }
  .atm-field--wide, .atm-form-actions { grid-column: auto; }
	.atm-field--span-2 { grid-column: auto; }
  .atm-login { grid-template-columns: 1fr; min-height: 0; margin: 14px auto; }
  .atm-login__art { min-height: 160px; padding: 26px; }
  .atm-login__art p { margin-top: 12px; }
  .atm-login__panel { padding: 36px 24px; }
  .atm-standalone-page .atm-app { width: 100%; min-height: 100vh; margin: 0; border-radius: 0; }
  .atm-task-create-form { grid-template-columns: 1fr; }
  .atm-kanban { grid-template-columns: 1fr; }
	.atm-danger-zone { align-items: stretch; flex-direction: column; }
	.atm-danger-zone form { justify-content: space-between; }
	.atm-subtask-delete-form { align-items: stretch; flex-direction: column; }
	.atm-entity-actions { align-items: stretch; flex-direction: column; }
	.atm-section-actions { width: 100%; justify-content: stretch; }
	.atm-section-actions .atm-button { flex: 1; }
	.atm-archived-users-panel .atm-section-heading { align-items: stretch; }
	.atm-archived-users-panel .atm-section-heading > .atm-button { width: 100%; }
	.atm-permission-card__summary { align-items: flex-start; }
	.atm-permission-card__hint { flex: 0 0 auto; font-size: 0; }
}

@media (max-width: 430px) {
  .atm-kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .atm-kpi small { white-space: normal; }
  .atm-section-heading { align-items: flex-start; flex-direction: column; }
	.atm-confirm-modal { padding: 16px; }
	.atm-confirm-modal__dialog { padding: 28px 20px 22px; border-radius: 23px; }
	.atm-confirm-modal__icon { width: 68px; height: 68px; border-radius: 22px; }
	.atm-confirm-modal__content h2 { font-size: 18px; }
	.atm-confirm-modal__actions { flex-direction: column-reverse; }
	.atm-confirm-modal__button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .atm-confirm-modal,
  .atm-confirm-modal__dialog,
  .atm-confirm-modal__icon,
  .atm-confirm-modal__icon-ring,
  .atm-confirm-modal__glow,
  .atm-confirm-modal__dialog::after,
  .atm-confirm-modal__button {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.atm-archive-list {
  margin-top: 24px;
}

.atm-archive-list > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #264653;
  font-weight: 800;
}

.atm-archive-list > summary span {
  min-width: 30px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: #2a9d8f;
  text-align: center;
}



/* Settings columns follow the available panel width, including wp-admin. */
.atm-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  width: 100%;
  max-width: 1120px;
  margin-inline: 0 auto;
  gap: 18px;
  align-items: start;
}
.atm-settings-grid .atm-settings-card { min-width: 0; width: 100%; max-width: 680px; }
.atm-settings-grid .atm-muted { overflow-wrap: anywhere; }
.atm-settings-grid .atm-form > .atm-button { justify-self: start; max-width: 100%; }
.atm-sms-test-form { margin-top:12px; }
.atm-sms-copy { margin-top:16px; padding:14px; border:1px solid rgba(38,70,83,.12); border-radius:14px; background:rgba(42,157,143,.05); }
.atm-sms-copy strong { display:block; margin-bottom:8px; }
.atm-sms-copy p { margin:7px 0; font-size:12px; line-height:1.8; }

.atm-sms-provider-fields[hidden], [data-atm-sms-sender-field][hidden] { display:none !important; }
.atm-sms-provider-fields { display:grid; gap:10px; padding:10px 0 0; }
.atm-sms-provider-fields .atm-muted { margin:-2px 0 2px; font-size:11px; line-height:1.7; }

/* -------------------------------------------------------------------------
 * Atlas workspace shell
 * Visual layer inspired by the supplied task-manager reference.
 * Business copy, data attributes and server-side behavior remain unchanged.
 * ------------------------------------------------------------------------- */

html[data-atm-theme="dark"] body.atm-standalone-page { color-scheme: dark; }
html[data-atm-theme="light"] body.atm-standalone-page { color-scheme: light; }

body.atm-standalone-page {
  background: #0c1824;
  color: #f7fafc;
}

html[data-atm-theme="light"] body.atm-standalone-page {
  background: #f5f1e8;
  color: #182433;
}

.atm-app--shell {
  --atm-navy: #3478f2;
  --atm-teal: #22c55e;
  --atm-yellow: #facc15;
  --atm-orange: #f59e0b;
  --atm-coral: #ef4444;
  --atm-white: #1d2c3b;
  --atm-ink: #f4f7fb;
  --atm-muted: #a7b6c6;
  --atm-line: #334556;
  --atm-surface: #1a2a39;
  --atm-surface-2: #223446;
  --atm-sidebar: #172635;
  --atm-page: #0c1824;
  --atm-input: #26384b;
  --atm-active: #34485b;
  --atm-shadow: 0 12px 30px rgba(0, 0, 0, .18);
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  grid-template-rows: 74px minmax(0, 1fr);
  grid-template-areas: "topbar nav" "main nav";
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: var(--atm-ink);
  background: var(--atm-page);
  box-shadow: none;
  color-scheme: dark;
}

.atm-app--shell[data-atm-theme="light"] {
  --atm-navy: #2563eb;
  --atm-teal: #059669;
  --atm-yellow: #d97706;
  --atm-orange: #ea580c;
  --atm-coral: #dc2626;
  --atm-white: #fffaf2;
  --atm-ink: #182433;
  --atm-muted: #6f756f;
  --atm-line: #e1d9cc;
  --atm-surface: #fffaf2;
  --atm-surface-2: #f2ece2;
  --atm-sidebar: #fffaf2;
  --atm-page: #f5f1e8;
  --atm-input: #fffdf8;
  --atm-active: #eee7dc;
  --atm-shadow: 0 12px 30px rgba(82, 68, 47, .08);
  color-scheme: light;
}

.atm-standalone-page .atm-app--shell,
.atm-app--admin.atm-app--shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.atm-app--shell > .atm-topbar {
  grid-area: topbar;
  align-items: center;
  min-width: 0;
  min-height: 74px;
  padding: 0 26px;
  border: 0;
  border-bottom: 1px solid var(--atm-line);
  border-radius: 0;
  background: var(--atm-sidebar);
  direction: rtl;
}

.atm-app--shell .atm-topbar__brand,
.atm-app--shell .atm-topbar__user {
  color: var(--atm-ink);
}

.atm-app--shell .atm-topbar strong { color: var(--atm-ink); font-size: 14px; }
.atm-app--shell .atm-topbar small { color: var(--atm-muted); }
.atm-app--shell .atm-topbar__brand { gap: 11px; }
.atm-app--shell .atm-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--atm-teal), var(--atm-navy));
  box-shadow: none;
  font-size: 20px;
}
.atm-app--shell .atm-brand-mark--small { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.atm-app--shell .atm-brand-mark--logo {
  background: transparent;
  border-radius: 0;
}
.atm-app--shell .atm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--atm-navy);
}
.atm-app--shell .atm-topbar__user { gap: 10px; }
.atm-app--shell .atm-logout { color: var(--atm-coral); }

.atm-theme-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--atm-line);
  border-radius: 11px;
  color: var(--atm-ink);
  background: var(--atm-surface-2);
  cursor: pointer;
  font: inherit;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.atm-theme-toggle:hover,
.atm-theme-toggle:focus-visible {
  border-color: var(--atm-navy);
  color: var(--atm-navy);
  outline: none;
  transform: translateY(-1px);
}
.atm-theme-toggle__icon { display: block; font-size: 18px; line-height: 1; }

.atm-app--shell > .atm-nav {
  grid-area: nav;
  min-width: 0;
  min-height: 100vh;
  align-items: stretch;
  gap: 4px;
  padding: 18px 14px;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid var(--atm-line);
  background: var(--atm-sidebar);
  direction: rtl;
}

.atm-app--shell > .atm-nav::before {
  display: block;
  padding: 2px 10px 18px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--atm-line);
  color: var(--atm-ink);
  content: "⚙  پنل مدیریت";
  font-size: 15px;
  font-weight: 900;
  line-height: 1.6;
  text-align: right;
}

.atm-app--shell .atm-nav :is(button, a) {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--atm-muted);
  background: transparent;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.atm-app--shell .atm-nav :is(button, a)::before { content: none; }
.atm-app--shell .atm-nav__icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: #fff;
  line-height: 1;
}
.atm-app--shell .atm-nav__icon svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
}
.atm-app--shell .atm-nav__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.atm-app--shell[data-atm-theme="light"] .atm-nav__icon { color: #111; }
.atm-app--shell .atm-nav :is(button, a):hover,
.atm-app--shell .atm-nav :is(button, a):focus-visible {
  color: var(--atm-ink);
  background: var(--atm-active);
  outline: none;
  transform: translateX(-2px);
}
.atm-app--shell .atm-nav :is(button, a).is-active {
  border-color: rgba(52, 120, 242, .18);
  color: #fff;
  background: var(--atm-active);
  box-shadow: inset -3px 0 0 var(--atm-navy);
}
.atm-app--shell[data-atm-theme="light"] .atm-nav :is(button, a).is-active { color: var(--atm-navy); }
.atm-app--shell .atm-nav :is(button, a)[data-atm-tab="reports"] { margin-top: 16px; }

.atm-app--shell > .atm-main {
  grid-area: main;
  min-width: 0;
  min-height: calc(100vh - 74px);
  padding: 30px 26px 56px;
  color: var(--atm-ink);
  background: var(--atm-page);
  direction: rtl;
}

.atm-app--shell .atm-section-heading { margin-bottom: 20px; }
.atm-app--shell .atm-section-heading h2,
.atm-app--shell .atm-card h3,
.atm-app--shell .atm-department-card h3,
.atm-app--shell .atm-user-card h3,
.atm-app--shell .atm-task-card h4,
.atm-app--shell .atm-kanban-column__head h3,
.atm-app--shell .atm-subtasks__head h5,
.atm-app--shell .atm-comments__head h5,
.atm-app--shell .atm-permission-card__title strong,
.atm-app--shell .atm-department-chart__head strong,
.atm-app--shell .atm-export-card h3 {
  color: var(--atm-ink) !important;
}
.atm-app--shell .atm-section-heading h2 { font-size: 23px; font-weight: 900; }
.atm-app--shell .atm-section-heading p,
.atm-app--shell .atm-department-performance .atm-card__head > div > p,
.atm-app--shell .atm-muted,
.atm-app--shell .atm-department-card__head p,
.atm-app--shell .atm-user-card__head p,
.atm-app--shell .atm-department-chart__head small,
.atm-app--shell .atm-task-card__meta small,
.atm-app--shell .atm-task-card__progress small,
.atm-app--shell .atm-task-card > p,
.atm-app--shell .atm-task-card__footer,
.atm-app--shell .atm-subtask > summary small,
.atm-app--shell .atm-comments__head span,
.atm-app--shell .atm-field-help,
.atm-app--shell .atm-kpi span,
.atm-app--shell .atm-kpi small {
  color: var(--atm-muted) !important;
}
.atm-app--shell .atm-eyebrow { color: var(--atm-navy); }

.atm-app--shell .atm-kpi,
.atm-app--shell .atm-card,
.atm-app--shell .atm-department-card,
.atm-app--shell .atm-user-card,
.atm-app--shell .atm-export-card,
.atm-app--shell .atm-settings-card,
.atm-app--shell .atm-permission-card {
  border-color: var(--atm-line);
  border-radius: 10px;
  background: var(--atm-surface);
  box-shadow: none;
}
.atm-app--shell .atm-kpi {
  min-height: 70px;
  padding: 13px 15px;
  background: var(--atm-surface-2);
}
.atm-app--shell .atm-kpi strong { font-size: 23px; }
.atm-app--shell .atm-card,
.atm-app--shell .atm-department-card,
.atm-app--shell .atm-user-card { padding: 18px; }
.atm-app--shell .atm-card__head { min-height: 24px; }
.atm-app--shell .atm-card__head > strong { color: var(--atm-teal); }
.atm-app--shell .atm-progress { background: var(--atm-input); }
.atm-app--shell .atm-mini-stats span,
.atm-app--shell .atm-member-list li,
.atm-app--shell .atm-department-chart,
.atm-app--shell .atm-report-chip-list span {
  border-color: var(--atm-line);
  color: var(--atm-muted);
  background: var(--atm-surface-2);
}
.atm-app--shell .atm-mini-stats b,
.atm-app--shell .atm-department-chart__stats b,
.atm-app--shell .atm-department-card__stats b { color: var(--atm-ink); }
.atm-app--shell .atm-department-chart__track { background: var(--atm-input); }
.atm-app--shell .atm-compact-list > div { border-color: var(--atm-line); }

.atm-app--shell .atm-button--primary {
  background: var(--atm-navy);
  box-shadow: 0 7px 17px rgba(37, 99, 235, .22);
}
.atm-app--shell .atm-button--secondary { background: var(--atm-teal); }
.atm-app--shell .atm-button--ghost { color: var(--atm-coral); background: rgba(239, 68, 68, .12); }
.atm-app--shell .atm-button--danger { background: var(--atm-coral); box-shadow: 0 7px 17px rgba(239, 68, 68, .18); }
.atm-app--shell .atm-link-button { color: var(--atm-navy); }

.atm-app--shell .atm-callout {
  border: 1px solid rgba(250, 204, 21, .18);
  color: var(--atm-yellow);
  background: rgba(250, 204, 21, .10);
}
.atm-app--shell .atm-form input:not([type="checkbox"]),
.atm-app--shell .atm-form select,
.atm-app--shell .atm-form textarea,
.atm-app--shell .atm-multi-picker__control {
  border-color: var(--atm-line);
  color: var(--atm-ink);
  background: var(--atm-input);
}
.atm-app--shell .atm-form input::placeholder,
.atm-app--shell .atm-form textarea::placeholder { color: var(--atm-muted); }
.atm-app--shell .atm-form select option { color: var(--atm-ink); background: var(--atm-input); }
.atm-app--shell .atm-form input:focus,
.atm-app--shell .atm-form select:focus,
.atm-app--shell .atm-form textarea:focus,
.atm-app--shell .atm-multi-picker__control:focus,
.atm-app--shell .atm-multi-picker.is-open .atm-multi-picker__control {
  border-color: var(--atm-navy);
  box-shadow: 0 0 0 3px rgba(52, 120, 242, .16);
}
.atm-app--shell .atm-multi-picker__menu {
  border-color: var(--atm-line);
  background: var(--atm-surface);
  box-shadow: var(--atm-shadow);
}
.atm-app--shell .atm-multi-picker__option { color: var(--atm-ink); }
.atm-app--shell .atm-multi-picker__option:hover,
.atm-app--shell .atm-multi-picker__option.is-selected { color: var(--atm-ink); background: var(--atm-active); }
.atm-app--shell .atm-multi-picker__check { border-color: var(--atm-line); background: var(--atm-input); }
.atm-app--shell .atm-date-clear,
.atm-app--shell .atm-checklist-toggle { border-color: var(--atm-line); color: var(--atm-ink); background: var(--atm-input); }
.atm-app--shell .atm-password-toggle { color: var(--atm-navy); background: rgba(52, 120, 242, .14); }

.atm-app--shell .atm-kanban {
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 10px;
}
.atm-app--shell .atm-kanban-column {
  min-height: 190px;
  padding: 10px;
  border-color: var(--atm-line);
  border-radius: 10px;
  background: var(--atm-surface-2);
}
.atm-app--shell .atm-kanban-column__head { padding: 3px 3px 10px; }
.atm-app--shell .atm-kanban-column__head span { color: var(--atm-ink); background: var(--atm-input); }
.atm-app--shell .atm-task-card {
  padding: 12px;
  border-color: var(--atm-line);
  border-radius: 9px;
  background: var(--atm-surface);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .09);
}
.atm-app--shell .atm-task-card__progress strong { color: var(--atm-teal); }
.atm-app--shell .atm-task-card__footer .atm-assignee-label,
.atm-app--shell .atm-subtask > summary .atm-subtask__assignee-line { color: #ff7b7b !important; }
.atm-app--shell .atm-subtask { border-color: var(--atm-line); background: var(--atm-surface-2); }
.atm-app--shell .atm-details,
.atm-app--shell .atm-comments,
.atm-app--shell .atm-edit-department,
.atm-app--shell .atm-task-edit-form { border-color: var(--atm-line); }

.atm-app--shell .atm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--atm-line);
  border-radius: 9px;
  background: var(--atm-surface);
}
.atm-app--shell .atm-permission-table { color: var(--atm-ink); }
.atm-app--shell .atm-permission-table th,
.atm-app--shell .atm-permission-table td { border-color: var(--atm-line); }
.atm-app--shell .atm-permission-table thead th { color: var(--atm-ink); background: var(--atm-surface-2); }
.atm-app--shell .atm-report-contents,
.atm-app--shell .atm-export-note,
.atm-app--shell .atm-sms-copy { border-color: var(--atm-line); background: var(--atm-surface-2); }
.atm-app--shell .atm-report-contents { color: var(--atm-ink); }
.atm-app--shell .atm-toast { background: var(--atm-navy); box-shadow: var(--atm-shadow); }

html[data-atm-theme="dark"] .atm-login {
  --atm-ink: #f4f7fb;
  --atm-muted: #a7b6c6;
  --atm-line: #334556;
  --atm-surface: #1a2a39;
  --atm-input: #26384b;
  color: var(--atm-ink);
  background: var(--atm-surface);
  box-shadow: none;
}
html[data-atm-theme="dark"] .atm-login__panel { background: var(--atm-surface); }
html[data-atm-theme="dark"] .atm-login__heading h1 { color: var(--atm-ink); }
html[data-atm-theme="dark"] .atm-login__heading p,
html[data-atm-theme="dark"] .atm-login .atm-form label > span { color: var(--atm-muted); }
html[data-atm-theme="dark"] .atm-login .atm-form input:not([type="checkbox"]) { color: var(--atm-ink); border-color: var(--atm-line); background: var(--atm-input); }

@media (max-width: 1050px) {
  .atm-app--shell { grid-template-columns: minmax(0, 1fr) 220px; }
  .atm-app--shell .atm-kanban { grid-template-columns: repeat(2, minmax(230px, 1fr)); }
}

@media (max-width: 760px) {
  .atm-app--shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
  }
  .atm-app--shell > .atm-topbar { order: 1; min-height: 68px; padding: 0 14px; }
  .atm-app--shell > .atm-nav {
    order: 2;
    min-height: 0;
    flex-direction: row;
    gap: 5px;
    padding: 9px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--atm-line);
    border-left: 0;
  }
  .atm-app--shell > .atm-nav::before { display: none; }
  .atm-app--shell .atm-nav :is(button, a) {
    width: auto;
    min-width: max-content;
    flex: 0 0 auto;
    padding: 8px 11px;
  }
  .atm-app--shell .atm-nav :is(button, a)[data-atm-tab="reports"] { margin-top: 0; }
  .atm-app--shell > .atm-main { order: 3; min-height: 0; padding: 22px 12px 42px; }
  .atm-app--shell .atm-topbar__brand small,
  .atm-app--shell .atm-topbar__user > div { display: none; }
  .atm-app--shell .atm-topbar__brand strong { font-size: 12px; }
  .atm-app--shell .atm-section-heading h2 { font-size: 19px; }
  .atm-app--shell .atm-kanban { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .atm-app--shell .atm-topbar { gap: 8px; }
  .atm-app--shell .atm-topbar__brand { gap: 7px; }
  .atm-app--shell .atm-topbar__actions,
  .atm-app--shell .atm-topbar__user { gap: 8px; }
  .atm-app--shell .atm-logout { margin-right: 0; }
  .atm-app--shell .atm-brand-mark,
  .atm-app--shell .atm-brand-mark--small { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
  .atm-app--shell .atm-theme-toggle { width: 34px; height: 34px; flex-basis: 34px; }
  .atm-app--shell .atm-avatar { width: 30px; height: 30px; }
}

/* Hard isolation from theme/framework nav rules. */
.atm-app--shell { grid-template-columns: minmax(0, 1fr) 270px !important; }

.atm-app--shell > .atm-nav {
  display: flex !important;
  flex-flow: column nowrap !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  width: 270px !important;
  max-width: 270px !important;
  height: auto !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 18px 14px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.atm-app--shell > .atm-nav::before {
  flex: 0 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.atm-app--shell > .atm-nav > button,
.atm-app--shell > .atm-nav > button.is-active {
  display: flex !important;
  position: relative !important;
  flex: 0 0 46px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  align-self: stretch !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
  padding: 11px 14px !important;
  font-size: 13px !important;
}

.atm-app--shell > .atm-nav > button::before { content: none !important; }
.atm-app--shell > .atm-nav > button .atm-nav__icon {
  width: 23px !important;
  height: 23px !important;
  flex-basis: 23px !important;
}
.atm-app--shell > .atm-nav > button .atm-nav__icon svg {
  width: 19px !important;
  height: 19px !important;
}

.atm-app--shell[data-atm-theme="dark"] .atm-user-card {
  border-color: #3a5267;
  background: linear-gradient(145deg, #20384b 0%, #192d3f 100%);
}

.atm-app--shell[data-atm-theme="dark"] .atm-user-info {
  border-color: #3b5368;
  background: #142535;
}

.atm-app--shell[data-atm-theme="dark"] .atm-user-info > div {
  border: 1px solid #395267;
  color: var(--atm-ink);
  background: #213b50;
}

.atm-app--shell[data-atm-theme="dark"] .atm-user-info strong {
  color: #f3f7fb;
}

.atm-app--shell[data-atm-theme="dark"] .atm-user-info small {
  color: #aebdcb;
}

.atm-app--shell > .atm-nav > button[data-atm-tab="reports"] { margin-top: 16px !important; }

@media (max-width: 1050px) {
  .atm-app--shell { grid-template-columns: minmax(0, 1fr) 240px !important; }
  .atm-app--shell > .atm-nav { width: 240px !important; max-width: 240px !important; }
}

@media (max-width: 760px) {
  .atm-app--shell > .atm-nav {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    flex-flow: row nowrap !important;
    padding: 9px 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  .atm-app--shell > .atm-nav > button,
  .atm-app--shell > .atm-nav > button.is-active {
    width: auto !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 9px 12px !important;
    font-size: 12px !important;
  }
  .atm-app--shell > .atm-nav > button[data-atm-tab="reports"] { margin-top: 0 !important; }
}

/* Dedicated task pages and assignment details on board cards (2.1.21). */
.atm-app--shell .atm-task-card--link {
  display: block;
  min-width: 0;
  padding: 12px;
  color: var(--atm-ink);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.atm-app--shell .atm-task-card--link:hover {
  border-color: var(--atm-navy);
  background: var(--atm-active);
}
.atm-app--shell .atm-task-card--link:focus-visible {
  outline: 2px solid var(--atm-navy);
  outline-offset: 3px;
}
.atm-app--shell .atm-task-card--link h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.atm-app--shell .atm-task-card--link .atm-task-card__assignment {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--atm-line);
}
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-row {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid var(--atm-line);
  border-radius: 7px;
  background: rgba(255, 248, 230, .55);
}
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-label,
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-value {
  display: block;
  min-width: 0;
  color: #ffffff !important;
  overflow-wrap: anywhere;
}
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-label {
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1.6;
}
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-value {
  font-size: 10px;
  font-weight: 900;
  line-height: 1.8;
}
.atm-task-page { width: 100%; max-width: 1120px; margin-inline: auto; }
.atm-task-page > .atm-task-page__heading { align-items: flex-start; }
.atm-task-page__actions { display: flex; flex-direction: column; align-items: stretch; flex: 0 0 auto; gap: 8px; }
.atm-task-page__actions > .atm-button { width: 100%; justify-content: center; }
.atm-task-page > .atm-task-edit { margin-bottom: 20px; }
.atm-task-page > .atm-task-edit[hidden] { display: none !important; }
.atm-task-page > .atm-task-edit .atm-task-edit-form { padding: 0; border: 0; }
.atm-app--shell .atm-task-detail { padding: 24px; }
.atm-task-detail .atm-task-card__title { margin: 18px 0; gap: 12px; }
.atm-task-detail .atm-task-card__title-copy h3 {
  margin: 0;
  color: var(--atm-ink);
  font-size: 22px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.atm-task-description { margin: 16px 0; }
.atm-task-description p, .atm-task-stop-reason {
  margin: 8px 0;
  color: var(--atm-ink);
  font-size: 13px;
  line-height: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.atm-task-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.atm-task-facts > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--atm-line);
  border-radius: 10px;
  background: var(--atm-surface-2);
}
.atm-task-facts dt { margin: 0 0 6px; color: var(--atm-muted); font-size: 11px; }
.atm-task-facts dd { margin: 0; color: var(--atm-ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.atm-task-detail__body > .atm-details { padding-top: 12px; border-top: 1px solid var(--atm-line); }
.atm-task-detail .atm-subtasks { margin-top: 28px; }
.atm-task-detail .atm-subtasks__head h5, .atm-task-detail .atm-comments__head h5 { font-size: 16px; }
.atm-task-detail .atm-subtask { margin-top: 14px; }
.atm-task-detail .atm-subtask > summary { padding: 14px; font-size: 13px; }
.atm-task-detail .atm-subtask__title-line { flex-wrap: wrap; overflow: visible; }
.atm-task-detail .atm-subtask__title-line > span:first-child { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.atm-task-detail .atm-subtask > summary small { max-width: none; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.atm-task-detail .atm-subtask__info { padding: 0 14px; }
.atm-task-facts--subtask { margin: 12px 0; }
.atm-task-detail .atm-subtask-edit { margin: 14px; }
.atm-task-detail .atm-task-edit-form { padding-top: 12px; border: 0; }
.atm-task-detail .atm-task-card__meta small, .atm-task-detail .atm-priority { font-size: 11px; }
.atm-task-detail .atm-task-card__progress strong, .atm-task-detail .atm-task-card__progress small { font-size: 12px; }
.atm-task-detail .atm-danger-zone { margin-top: 28px; }
@media (max-width: 900px) {
  .atm-task-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-task-detail .atm-subtask > summary { grid-template-columns: 20px 8px minmax(0, 1fr); }
  .atm-task-detail .atm-subtask > summary small { grid-column: 3; }
}
@media (max-width: 560px) {
  .atm-app--shell .atm-task-detail { padding: 14px; }
  .atm-task-detail .atm-task-card__title-copy h3 { font-size: 18px; }
  .atm-task-facts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .atm-task-page .atm-section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
}

/* Settings: XLSX bulk user import */
.atm-user-import-card {
  min-width: 0;
}
.atm-import-rules {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
}
.atm-import-rules span {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px;
  background: rgba(148, 163, 184, .07);
  line-height: 1.9;
}
.atm-user-import-form {
  display: grid;
  gap: 14px;
}
.atm-file-field input[type="file"] {
  width: 100%;
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, .42);
  border-radius: 14px;
  background: rgba(148, 163, 184, .06);
  cursor: pointer;
}
.atm-user-import-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.atm-user-import-form .atm-form-message:not(:empty) {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(42, 157, 143, .10);
  line-height: 1.9;
}
.atm-settings-grid .atm-form-message:empty { display: none; }


/* Task board search/filter controls and compact task facts (2.1.26). */
.atm-task-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--atm-line);
  border-radius: 14px;
  background: var(--atm-surface);
}
.atm-task-toolbar label, .atm-task-search { display: grid; gap: 5px; min-width: 0; }
.atm-task-toolbar label > span, .atm-task-search label { color: var(--atm-muted); font-size: 10px; font-weight: 800; }
.atm-task-toolbar input, .atm-task-toolbar select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--atm-line);
  border-radius: 9px;
  color: var(--atm-ink);
  background: var(--atm-input);
}
.atm-task-filter-reset { min-height: 38px; white-space: nowrap; }
.atm-task-card--link[hidden] { display: none !important; }
.atm-kanban-column.is-filter-empty .atm-empty--small { display: block !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-label,
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-value { color: var(--atm-navy) !important; }
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-label,
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-value { color: #ffffff !important; }
@media (max-width: 1100px) {
  .atm-task-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-task-filter-reset { width: 100%; }
}
@media (max-width: 620px) {
  .atm-task-toolbar { grid-template-columns: 1fr; }
  .atm-app--shell .atm-task-card--link .atm-task-card__assignment { grid-template-columns: 1fr; }
}


/* Minimal task card palette and overdue deadline cue (2.1.29). */
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link {
  background: var(--atm-surface-2);
  border-color: #e8dcc1;
  box-shadow: none;
}
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link:hover {
  background: var(--atm-surface-2);
  border-color: #dcc8a4;
}
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row {
  border-color: #e8dcc1;
  background: rgba(255, 255, 255, .08);
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link {
  background: var(--atm-surface-2);
  border-color: rgba(232, 220, 193, .30);
  box-shadow: none;
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link:hover {
  background: #273b4f;
  border-color: rgba(232, 220, 193, .48);
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row {
  border-color: rgba(232, 220, 193, .22);
  background: rgba(255, 255, 255, .02);
}
.atm-app--shell .atm-task-card--link .atm-task-card__deadline.is-overdue {
  border-color: #ef4444 !important;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .18);
}

/* Brand logo and universal avatar refresh (2.1.28). */

/* Compact task edit layout (2.1.35): keep controls side-by-side instead of stretching full width. */
.atm-task-page > .atm-task-edit .atm-task-edit-form--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 14px;
  align-items: start;
}
.atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-task-edit-field--half,
.atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-date-label {
  grid-column: span 2;
}
.atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-form-actions {
  grid-column: 1 / -1;
  gap: 8px;
}
.atm-task-page > .atm-task-edit .atm-task-edit-form--compact textarea {
  min-height: 76px;
}
@media (max-width: 860px) {
  .atm-task-page > .atm-task-edit .atm-task-edit-form--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-task-edit-field--half,
  .atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-date-label {
    grid-column: span 2;
  }
}
@media (max-width: 560px) {
  .atm-task-page > .atm-task-edit .atm-task-edit-form--compact {
    grid-template-columns: minmax(0, 1fr);
  }
  .atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-task-edit-field--half,
  .atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-date-label,
  .atm-task-page > .atm-task-edit .atm-task-edit-form--compact .atm-form-actions {
    grid-column: 1;
  }
}

/* Department table + dedicated organization page (2.1.34). */
.atm-department-table-wrap {
  margin-top: 0;
  border-radius: 12px;
  overflow-x: auto;
}
.atm-department-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--atm-ink);
  background: var(--atm-surface);
  direction: rtl;
}
.atm-department-table th,
.atm-department-table td {
  padding: 14px 13px;
  border: 0;
  border-bottom: 1px solid var(--atm-line);
  vertical-align: middle;
  text-align: right;
  font-size: 11px;
  line-height: 1.75;
}
.atm-department-table thead th {
  color: var(--atm-muted);
  background: var(--atm-surface-2, #edf2f5);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.atm-department-table thead th:nth-child(1) { width: 76px; }
.atm-department-table thead th:nth-child(2) { width: 25%; }
.atm-department-table thead th:nth-child(3) { width: 18%; }
.atm-department-table thead th:nth-child(4),
.atm-department-table thead th:nth-child(5) { width: 8%; }
.atm-department-table thead th:nth-child(6) { width: 14%; }
.atm-department-table thead th:nth-child(7) { width: 10%; }
.atm-department-table thead th:nth-child(8) { width: 84px; text-align: center; }
.atm-department-table__row {
  cursor: pointer;
  transition: background .16s ease, opacity .16s ease;
}
.atm-department-table__row:hover,
.atm-department-table__row:focus-visible,
.atm-department-table__row:focus-within {
  background: var(--atm-surface-2, #edf2f5);
  outline: none;
}
.atm-department-table__row.is-disabled { opacity: .62; }
.atm-department-table__name {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
.atm-department-table__name strong {
  color: var(--atm-ink);
  font-size: 12px;
  font-weight: 850;
}
.atm-department-table__name small {
  display: block;
  overflow: hidden;
  color: var(--atm-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atm-department-table__actions { text-align: center !important; }
.atm-department-table__actions .atm-user-action { margin-inline: auto; }
.atm-department-table__progress {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.atm-department-table__progress > i {
  display: block;
  width: 100%;
  min-width: 60px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--atm-input, rgba(127,127,127,.14));
}
.atm-department-table__progress > i > em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--atm-teal);
}
.atm-department-table__progress b { flex: 0 0 auto; font-size: 10px; }

.atm-department-logo {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--atm-line);
  color: #fff;
  background: var(--atm-accent, var(--atm-navy));
  font-weight: 900;
}
.atm-department-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--atm-surface);
}
.atm-department-logo--chart { width: 36px; height: 36px; border-radius: 11px; }
.atm-department-logo--chart b { font-size: 12px; }
.atm-department-logo--table { width: 40px; height: 40px; border-radius: 10px; }
.atm-department-logo--table b { font-size: 13px; }
.atm-department-logo--hero { width: 88px; height: 88px; border-radius: 20px; }
.atm-department-logo--hero b { font-size: 28px; }
.atm-department-logo--preview { width: 72px; height: 72px; border-radius: 16px; }
.atm-department-logo--preview b { font-size: 22px; }

.atm-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.atm-back-button { text-decoration: none; }
.atm-department-page { width: 100%; }
.atm-department-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--atm-line);
  border-inline-start: 4px solid var(--atm-accent, var(--atm-navy));
  border-radius: 12px;
  background: var(--atm-surface);
}
.atm-department-hero__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}
.atm-department-hero__identity > div { min-width: 0; }
.atm-department-hero__identity h2 {
  margin: 2px 0 2px;
  color: var(--atm-ink);
  font-size: 23px;
  line-height: 1.6;
}
.atm-department-hero__identity p {
  max-width: 720px;
  margin: 0;
  color: var(--atm-muted);
  font-size: 11px;
}
.atm-department-hero__meta {
  display: grid;
  flex: 0 0 min(280px, 32%);
  gap: 10px;
  justify-items: end;
}
.atm-department-hero__meta > span:not(.atm-status-badge) {
  display: grid;
  gap: 2px;
  text-align: left;
}
.atm-department-hero__meta small { color: var(--atm-muted); font-size: 9px; }
.atm-department-hero__meta strong { color: var(--atm-ink); font-size: 11px; }

.atm-department-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}
.atm-department-summary > div {
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--atm-line);
  border-radius: 10px;
  background: var(--atm-surface);
}
.atm-department-summary small { color: var(--atm-muted); font-size: 9px; }
.atm-department-summary strong { color: var(--atm-ink); font-size: 18px; }

.atm-department-assets-grid,
.atm-department-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.atm-department-asset-card,
.atm-department-members-card,
.atm-department-settings-card { min-width: 0; }
.atm-department-asset-card__head,
.atm-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--atm-line);
}
.atm-department-asset-card__head h3,
.atm-card-heading h3 { margin: 0; font-size: 15px; }
.atm-department-asset-card__head p {
  max-width: 520px;
  margin: 4px 0 0;
  color: var(--atm-muted);
  font-size: 10px;
}
.atm-file-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border: 1px solid var(--atm-line);
  border-radius: 14px;
  color: var(--atm-navy);
  background: var(--atm-surface-2, #edf2f5);
  font-size: 18px;
  font-weight: 900;
}
.atm-department-upload-form { margin-top: 12px; }
.atm-department-upload-form input[type="file"] {
  min-height: 44px !important;
  padding: 8px !important;
  cursor: pointer;
}
.atm-field-note {
  display: block;
  margin-top: -3px;
  color: var(--atm-muted);
  font-size: 9px;
  line-height: 1.8;
}
.atm-brand-book-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--atm-line);
  border-radius: 10px;
  background: var(--atm-surface-2, #edf2f5);
}
.atm-brand-book-current > div { min-width: 0; }
.atm-brand-book-current small,
.atm-brand-book-current strong { display: block; }
.atm-brand-book-current small { color: var(--atm-muted); font-size: 9px; }
.atm-brand-book-current strong {
  overflow: hidden;
  color: var(--atm-ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atm-count-badge {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--atm-navy);
  background: var(--atm-surface-2, #edf2f5);
  font-size: 11px;
  font-weight: 900;
}
.atm-member-list--department { max-height: 360px; }
.atm-department-settings-card .atm-edit-department { margin-bottom: 16px; }
.atm-department-danger-zone { margin-top: 18px; }

@media (max-width: 1000px) {
  .atm-department-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .atm-department-assets-grid,
  .atm-department-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .atm-department-hero { align-items: flex-start; flex-direction: column; }
  .atm-department-hero__identity { align-items: flex-start; }
  .atm-department-logo--hero { width: 68px; height: 68px; border-radius: 16px; }
  .atm-department-hero__meta { width: 100%; flex-basis: auto; justify-items: start; }
  .atm-department-hero__meta > span:not(.atm-status-badge) { text-align: right; }
  .atm-department-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-brand-book-current { align-items: stretch; flex-direction: column; }
  .atm-brand-book-current .atm-button { justify-content: center; }
}

/* Task board readability + semantic metadata colors (2.1.38). */
.atm-app--shell .atm-task-card--link .atm-task-card__title-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.atm-app--shell .atm-task-card--link .atm-task-card__title-row h4 {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--atm-ink) !important;
}
.atm-app--shell .atm-task-card--link .atm-priority {
  flex: 0 0 auto;
  margin-top: 1px;
  white-space: nowrap;
}
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-label,
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-value {
  color: inherit !important;
}

/* Keep the existing semantic palette unchanged in Light Mode. */
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(1) .atm-task-card__assignment-label { color: #356ae6 !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(1) .atm-task-card__assignment-value { color: #173f9e !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(2) .atm-task-card__assignment-label { color: #8a4db8 !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(2) .atm-task-card__assignment-value { color: #64338a !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(3) .atm-task-card__assignment-label { color: #b47a16 !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(3) .atm-task-card__assignment-value { color: #7d5b16 !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(4) .atm-task-card__assignment-label { color: #c46a2a !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(4) .atm-task-card__assignment-value { color: #9a4517 !important; }
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__deadline.is-overdue .atm-task-card__assignment-label,
.atm-app--shell[data-atm-theme="light"] .atm-task-card--link .atm-task-card__deadline.is-overdue .atm-task-card__assignment-value { color: #c43d3d !important; }

/* High-contrast semantic palette for Dark Mode (2.1.39). */
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(1) {
  border-color: rgba(125, 166, 255, .28);
  background: rgba(59, 130, 246, .08);
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(1) .atm-task-card__assignment-label { color: #7da6ff !important; }
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(1) .atm-task-card__assignment-value { color: #c3d4ff !important; }

.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(2) {
  border-color: rgba(214, 156, 255, .26);
  background: rgba(168, 85, 247, .07);
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(2) .atm-task-card__assignment-label { color: #d69cff !important; }
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(2) .atm-task-card__assignment-value { color: #e5c6ff !important; }

.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(3) {
  border-color: rgba(255, 209, 102, .25);
  background: rgba(250, 204, 21, .065);
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(3) .atm-task-card__assignment-label { color: #ffd166 !important; }
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(3) .atm-task-card__assignment-value { color: #ffe4a3 !important; }

.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(4) {
  border-color: rgba(255, 155, 97, .27);
  background: rgba(249, 115, 22, .07);
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(4) .atm-task-card__assignment-label { color: #ff9b61 !important; }
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__assignment-row:nth-child(4) .atm-task-card__assignment-value { color: #ffc39f !important; }

.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__deadline.is-overdue {
  border-color: rgba(255, 123, 123, .38) !important;
  background: rgba(239, 68, 68, .10) !important;
}
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__deadline.is-overdue .atm-task-card__assignment-label { color: #ff7b7b !important; }
.atm-app--shell[data-atm-theme="dark"] .atm-task-card--link .atm-task-card__deadline.is-overdue .atm-task-card__assignment-value { color: #ffb3b3 !important; }

.atm-app--shell[data-atm-theme="dark"] .atm-priority {
  border: 1px solid rgba(253, 230, 138, .24);
  color: #fde68a;
  background: rgba(250, 204, 21, .12);
}
.atm-app--shell[data-atm-theme="dark"] .atm-priority--urgent {
  border-color: rgba(255, 123, 123, .28);
  color: #ff9a8a;
  background: rgba(239, 68, 68, .16);
}
.atm-app--shell[data-atm-theme="dark"] .atm-priority--high {
  border-color: rgba(253, 186, 116, .28);
  color: #fdba74;
  background: rgba(249, 115, 22, .15);
}
.atm-app--shell[data-atm-theme="dark"] .atm-priority--low {
  border-color: rgba(94, 234, 212, .24);
  color: #5eead4;
  background: rgba(45, 212, 191, .11);
}

/* Department-colored user avatars (2.1.41). */
.atm-avatar.atm-avatar--department,
.atm-app--shell .atm-avatar.atm-avatar--department {
  color: #fff;
  background: var(--atm-avatar-accent, var(--atm-navy));
}


/* ==========================================================================
   Django adapter
   ========================================================================== */

.atm-app--shell .atm-nav a { text-decoration: none; }
.atm-app--shell .atm-nav a.atm-nav__spacer { margin-top: 16px; }

/* Statuses that exist only in the Django workflow */
.atm-dot--doing { background: var(--atm-orange); }
.atm-dot--awaiting_approval { background: #5b8def; }
.atm-kanban-column--doing::before { background: var(--atm-yellow); }
.atm-kanban-column--awaiting_approval::before { background: #5b8def; }
@media (min-width: 1051px) {
  .atm-app--shell .atm-kanban { grid-template-columns: repeat(5, minmax(200px, 1fr)); overflow-x: auto; }
}

/* Status pills */
.atm-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  color: var(--atm-ink);
  background: var(--atm-surface-2, #f2ece2);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.atm-state::before { width: 7px; height: 7px; border-radius: 99px; background: var(--atm-yellow); content: ""; }
.atm-state--doing::before { background: var(--atm-orange); }
.atm-state--stopped::before { background: #9b7e5c; }
.atm-state--awaiting_approval::before { background: #5b8def; }
.atm-state--done::before { background: var(--atm-teal); }

/* Flash messages (Django messages framework) */
.atm-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--atm-line);
  border-radius: 12px;
  color: var(--atm-ink);
  background: var(--atm-surface);
  font-size: 12px;
  font-weight: 700;
}
.atm-flash--success { border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .12); }
.atm-flash--error { border-color: rgba(239, 68, 68, .5); background: rgba(239, 68, 68, .12); }
.atm-field-error { color: #ef4444; font-size: 10px; font-weight: 700; }
.atm-app--shell[data-atm-theme="dark"] .atm-field-error { color: #ff8a8a; }

/* Logout is a POST form in Django */
.atm-logout-form { display: inline; margin: 0; }
.atm-logout-form button.atm-logout {
  padding: 0 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.atm-plain-link { color: inherit; text-decoration: none; }
.atm-plain-link:hover { color: var(--atm-navy); }

/* Invitation card */
.atm-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border-inline-start: 4px solid var(--atm-yellow);
}
.atm-invite h3 { margin: 2px 0 4px; }
.atm-invite p { margin: 0; }
.atm-invite__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

.atm-board-note { margin: 0 0 12px; color: var(--atm-muted); font-size: 11px; }

/* Task page: two-column layout for actions / conversation */
.atm-detail-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; align-items: start; }
.atm-detail-columns > div { display: grid; gap: 14px; min-width: 0; }
.atm-detail-columns .atm-card h3 { margin-bottom: 4px; }
.atm-detail-columns .atm-form { margin-top: 10px; }
.atm-detail-columns .atm-form select[multiple] { min-height: 130px; }
.atm-form-hint { margin: 2px 0 0; color: var(--atm-muted); font-size: 11px; }

.atm-people { display: grid; gap: 8px; margin-top: 10px; }
.atm-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--atm-line);
  border-radius: 10px;
  background: var(--atm-surface-2, transparent);
}
.atm-person__copy { min-width: 0; flex: 1; }
.atm-person__copy strong, .atm-person__copy small { display: block; }
.atm-person__copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.atm-person__copy small { color: var(--atm-muted); font-size: 10px; }
.atm-tag {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--atm-navy);
  background: rgba(52, 120, 242, .14);
  font-size: 10px;
  font-weight: 800;
}
.atm-tag--ok { color: var(--atm-teal); background: rgba(34, 197, 94, .14); }
.atm-tag--wait { color: #b47a16; background: rgba(250, 204, 21, .16); }
.atm-app--shell[data-atm-theme="dark"] .atm-tag--wait { color: #ffd166; }
.atm-tag--no { color: var(--atm-coral); background: rgba(239, 68, 68, .12); }

.atm-timeline { display: grid; gap: 0; margin: 10px 0 0; padding: 0; list-style: none; }
.atm-timeline li {
  position: relative;
  padding: 0 18px 14px 0;
  border-right: 2px solid var(--atm-line);
  margin-right: 4px;
}
.atm-timeline li:last-child { padding-bottom: 0; border-right-color: transparent; }
.atm-timeline li::before {
  position: absolute;
  top: 5px;
  right: -6px;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--atm-navy);
  box-shadow: 0 0 0 3px var(--atm-surface);
  content: "";
}
.atm-timeline strong { display: block; font-size: 12px; }
.atm-timeline small { color: var(--atm-muted); font-size: 10px; }
.atm-timeline p { margin: 3px 0 0; color: var(--atm-ink); font-size: 11px; }

.atm-comment-form textarea { width: 100%; }

@media (max-width: 900px) {
  .atm-detail-columns { grid-template-columns: minmax(0, 1fr); }
  .atm-invite { align-items: flex-start; flex-direction: column; }
}


/* Task page: Django-specific tweaks (conversation + timeline inside the detail card) */
.atm-detail-columns .atm-comments { margin-top: 0; padding-top: 0; border-top: 0; }
.atm-task-detail .atm-comments__head h5 { margin: 0; font-size: 16px; }
.atm-task-detail .atm-comment__author strong { font-size: 12px; }
.atm-task-detail .atm-comment__meta > span { color: var(--atm-muted); font-size: 10px; }
.atm-task-detail .atm-comment__body { font-size: 12px; }
.atm-task-detail .atm-comment__body { white-space: normal; }
.atm-task-detail .atm-person .atm-avatar { margin-left: 0; }
.atm-task-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.atm-app--shell .atm-comment { border-color: var(--atm-line); background: var(--atm-surface-2); }
.atm-app--shell .atm-comment__body { color: var(--atm-ink); }
.atm-app--shell .atm-comment__author strong { color: var(--atm-ink); }
.atm-detail-columns .atm-form > .atm-button { justify-self: start; }
.atm-task-create-form { align-items: start; }

/* Per-department approvals + invite picker */
.atm-approval-dept { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--atm-line); border-radius: 12px; background: var(--atm-surface-2, transparent); }
.atm-approval-dept--approved { border-color: rgba(34, 197, 94, .45); }
.atm-approval-dept--revision { border-color: rgba(239, 68, 68, .5); }
.atm-approval-dept__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.atm-approval-row { display: grid; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--atm-line); }
.atm-approval-row:first-of-type { border-top: 0; }
.atm-approval-note { margin: 4px 0 0; padding: 6px 9px; border-radius: 8px; background: rgba(250, 204, 21, .10); font-size: 11px; }
.atm-approval-actions { display: grid; gap: 8px; margin: 0; }
.atm-approval-actions input[type="text"] { width: 100%; }
.atm-approval-actions__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.atm-invite-list { display: grid; gap: 10px; max-height: 280px; overflow: auto; padding: 6px; border: 1px solid var(--atm-line); border-radius: 12px; }
.atm-invite-group > strong { display: block; margin-bottom: 4px; color: var(--atm-muted); font-size: 11px; }
.atm-invite-group .atm-check { padding: 3px 0; }
.atm-invite-group[hidden], .atm-invite-person[hidden] { display: none !important; }

/* ---- Meetings ---- */
.atm-meeting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.atm-meeting-grid > .atm-card { margin: 0; min-width: 0; }
.atm-meeting-grid textarea { min-height: 150px; resize: vertical; }
.atm-meeting-form { max-width: 920px; }
.atm-meeting-form .atm-form-actions { justify-content: flex-start; }
.atm-when { display: grid; gap: 8px; min-width: 0; }
.atm-when > span { font-weight: 700; }
.atm-participants { max-height: 180px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; padding: 8px; border: 1px solid var(--atm-line); border-radius: 12px; }
.atm-filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; max-width: 100%; }
.atm-filter-bar > label { flex: 0 1 200px; min-width: 0; }
.atm-filter-bar > .atm-filter-bar__search { flex: 1 1 220px; }
.atm-meeting-head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 900px) { .atm-meeting-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- Meetings: list actions, tabs, trash ---- */
.atm-segmented { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 14px; border: 1px solid var(--atm-line); border-radius: 14px; background: var(--atm-surface); }
.atm-segmented a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 10px; color: var(--atm-muted); text-decoration: none; font-size: 12px; font-weight: 700; transition: background .15s, color .15s; }
.atm-segmented a:hover { color: var(--atm-navy); background: rgba(42, 157, 143, .08); }
.atm-segmented a.is-active { color: #fff; background: var(--atm-navy); }
.atm-segmented b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: rgba(42, 157, 143, .16); font-size: 10px; text-align: center; }
.atm-segmented a.is-active b { background: rgba(255, 255, 255, .22); }
.atm-meetings-table td { vertical-align: middle; }
.atm-row-sub { display: block; margin-top: 3px; color: var(--atm-muted); font-size: 10px; }
.atm-row-actions > div { display: flex; align-items: center; justify-content: flex-start; gap: 6px; }
.atm-inline-form { display: inline-flex; margin: 0; }
.atm-button--sm { min-height: 32px; padding: 6px 12px; font-size: 11px; text-decoration: none; }
.atm-user-action--archive { color: #c99a2e; }
.atm-trash-note { margin: 0 0 10px; color: var(--atm-muted); font-size: 12px; }
.atm-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }

.atm-meetings-table { width: 100%; min-width: 780px; border-collapse: collapse; table-layout: auto; color: var(--atm-ink); background: var(--atm-surface); direction: rtl; }
.atm-meetings-table th, .atm-meetings-table td { padding: 13px 12px; border: 0; border-bottom: 1px solid var(--atm-line); vertical-align: middle; text-align: right; font-size: 11px; line-height: 1.75; }
.atm-meetings-table thead th { color: var(--atm-muted); background: var(--atm-surface-2, #edf2f5); font-size: 10px; font-weight: 800; white-space: nowrap; }
.atm-meetings-table td:nth-child(1) { min-width: 170px; width: 28%; }
.atm-meetings-table td:nth-child(2), .atm-meetings-table td:nth-child(3), .atm-meetings-table td:nth-child(4), .atm-meetings-table td:nth-child(6) { white-space: nowrap; }
.atm-meetings-table td:nth-child(5) { min-width: 140px; }
.atm-meetings-table td.atm-row-actions { white-space: nowrap; width: 1%; }
.atm-meetings-table tbody tr:last-child td { border-bottom: 0; }
.atm-meetings-table .atm-department-table__row { cursor: pointer; }

/* ---- Meetings: print ---- */
.atm-print-only { display: none; }
@media print {
  .atm-topbar, .atm-nav, .atm-flash, .atm-toast, .atm-meeting-head-actions, .atm-meeting-grid, .atm-section-heading, .atm-segmented { display: none !important; }
  .atm-print-only { display: block !important; color: #000; font-size: 13px; line-height: 2; }
  .atm-print-only h1 { margin: 0 0 6px; font-size: 22px; }
  .atm-print-only h2 { margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid #999; font-size: 15px; }
  .atm-print-only .atm-print-text { white-space: pre-wrap; }
  .atm-print-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 60px; text-align: center; }
  .atm-print-sign span { display: block; padding-top: 6px; border-top: 1px solid #000; }
  html, body, .atm-app, .atm-main { display: block !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #000 !important; box-shadow: none !important; }
}

/* =====================================================================
   Task detail page — liquid glass layout (scoped to .atm-task-page)
   ===================================================================== */
.atm-app--shell .atm-task-page {
  --glass-bg: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.035));
  --glass-bg-soft: rgba(255,255,255,.05);
  --glass-border: rgba(255,255,255,.14);
  --glass-shadow: 0 18px 48px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.18);
  --glass-field: rgba(255,255,255,.07);
  max-width: 1380px;
}
.atm-app--shell[data-atm-theme="light"] .atm-task-page {
  --glass-bg: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.52));
  --glass-bg-soft: rgba(255,255,255,.55);
  --glass-border: rgba(255,255,255,.9);
  --glass-shadow: 0 14px 40px rgba(82,68,47,.12), inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(82,68,47,.06);
  --glass-field: rgba(255,255,255,.75);
}
/* ambient colour behind the glass */
.atm-app--shell > .atm-main:has(.atm-task-page) {
  background:
    radial-gradient(820px 460px at 88% -8%, rgba(52,120,242,.30), transparent 62%),
    radial-gradient(640px 440px at 4% 18%, rgba(34,197,94,.16), transparent 64%),
    radial-gradient(760px 520px at 55% 112%, rgba(168,85,247,.16), transparent 62%),
    var(--atm-page);
}
.atm-app--shell[data-atm-theme="light"] > .atm-main:has(.atm-task-page) {
  background:
    radial-gradient(820px 460px at 88% -8%, rgba(37,99,235,.16), transparent 62%),
    radial-gradient(640px 440px at 4% 18%, rgba(5,150,105,.12), transparent 64%),
    radial-gradient(760px 520px at 55% 112%, rgba(234,88,12,.10), transparent 62%),
    var(--atm-page);
}
/* the outer article becomes a plain container */
.atm-app--shell .atm-task-page .atm-task-detail { padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }

/* glass surfaces */
.atm-app--shell .atm-task-page :is(.atm-task-hero, .atm-detail-columns .atm-card, .atm-task-facts > div) {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
}
.atm-task-hero { position: relative; overflow: hidden; padding: 26px 28px 24px; border-radius: 26px; }
.atm-task-hero::before { content: ""; position: absolute; inset: -40% auto auto -10%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(52,120,242,.28), transparent 66%); pointer-events: none; }
.atm-task-hero > * { position: relative; }
.atm-task-hero .atm-task-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.atm-task-hero .atm-task-card__title { margin: 16px 0 14px; }
.atm-task-hero .atm-task-card__title-copy h3 { font-size: 26px; line-height: 1.7; }
.atm-task-hero .atm-callout { border: 1px solid var(--glass-border); border-radius: 14px; background: var(--glass-bg-soft); }
.atm-task-hero .atm-task-description { max-width: 78ch; }
.atm-task-hero .atm-progress { height: 8px; margin: 18px 0 8px; border-radius: 999px; background: var(--glass-bg-soft); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.atm-task-hero .atm-progress span { border-radius: inherit; background: linear-gradient(90deg, var(--atm-navy), var(--atm-teal)); box-shadow: 0 0 14px rgba(34,197,94,.45); }

/* facts: compact glass chips */
.atm-app--shell .atm-task-page .atm-task-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 18px; }
.atm-app--shell .atm-task-page .atm-task-facts > div { padding: 14px 16px; border-radius: 18px; transition: transform .18s ease, border-color .18s ease; }
.atm-app--shell .atm-task-page .atm-task-facts > div:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.28); }
.atm-app--shell .atm-task-page .atm-task-facts dt { margin-bottom: 5px; font-size: 10.5px; letter-spacing: .02em; }

/* two real columns: content | actions */
.atm-app--shell .atm-task-page .atm-detail-columns { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 18px; margin-top: 0; }
.atm-app--shell .atm-task-page .atm-detail-columns > div { gap: 18px; }
.atm-app--shell .atm-task-page .atm-detail-columns .atm-card { padding: 20px 22px; border-radius: 22px; }
.atm-app--shell .atm-task-page .atm-detail-columns .atm-card h3 { margin-bottom: 8px; font-size: 15px; }
.atm-detail-side { align-self: start; }

/* inner pieces */
.atm-app--shell .atm-task-page .atm-person { border: 1px solid var(--glass-border); border-radius: 14px; background: var(--glass-bg-soft); }
.atm-app--shell .atm-task-page .atm-approval-dept { border: 1px solid var(--glass-border); border-radius: 16px; background: var(--glass-bg-soft); }
.atm-app--shell .atm-task-page .atm-comment { border: 1px solid var(--glass-border); border-radius: 14px; background: var(--glass-bg-soft); }
.atm-app--shell .atm-task-page .atm-invite-list { border-color: var(--glass-border); border-radius: 14px; background: var(--glass-bg-soft); }
.atm-app--shell .atm-task-page .atm-form :is(input:not([type="checkbox"]), select, textarea) { border-color: var(--glass-border); border-radius: 12px; background: var(--glass-field); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.atm-app--shell .atm-task-page .atm-form :is(input, select, textarea):focus { border-color: var(--atm-navy); box-shadow: 0 0 0 3px rgba(52,120,242,.22); }
.atm-app--shell .atm-task-page .atm-button { border-radius: 12px; }
.atm-app--shell .atm-task-page .atm-button--primary { background: linear-gradient(135deg, var(--atm-navy), #5b8def); box-shadow: 0 8px 22px rgba(52,120,242,.35), inset 0 1px 0 rgba(255,255,255,.3); }
.atm-app--shell .atm-task-page .atm-task-page__actions { flex-direction: row; }
.atm-app--shell .atm-task-page .atm-task-page__actions > .atm-button { width: auto; color: var(--atm-ink); border: 1px solid var(--glass-border); background: var(--glass-bg-soft); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

@media (max-width: 1100px) {
  .atm-app--shell .atm-task-page .atm-detail-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .atm-app--shell .atm-task-page .atm-task-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-task-hero { padding: 20px 18px; border-radius: 20px; }
  .atm-task-hero .atm-task-card__title-copy h3 { font-size: 20px; }
}


/* =====================================================================
   v7 — compact liquid-glass layout, calendar / clock pickers
   Everything below is additive: same markup, same data attributes.
   ===================================================================== */

/* ---- glass tokens for the whole app (the task page keeps its own copy) ---- */
.atm-app--shell {
  --glass-bg: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.035));
  --glass-bg-soft: rgba(255,255,255,.05);
  --glass-border: rgba(255,255,255,.13);
  --glass-shadow: 0 10px 30px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.14);
  --glass-field: rgba(255,255,255,.065);
  --pop-bg: rgba(27,41,57,.86);
}
.atm-app--shell[data-atm-theme="light"] {
  --glass-bg: linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.55));
  --glass-bg-soft: rgba(255,255,255,.55);
  --glass-border: rgba(255,255,255,.9);
  --glass-shadow: 0 10px 28px rgba(82,68,47,.10), inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(82,68,47,.06);
  --glass-field: rgba(255,255,255,.78);
  --pop-bg: rgba(255,252,246,.9);
}

/* ambient colour behind the glass on every page, not only the task page */
.atm-app--shell > .atm-main {
  background:
    radial-gradient(820px 460px at 88% -8%, rgba(52,120,242,.24), transparent 62%),
    radial-gradient(640px 440px at 4% 18%, rgba(34,197,94,.12), transparent 64%),
    var(--atm-page);
}
.atm-app--shell[data-atm-theme="light"] > .atm-main {
  background:
    radial-gradient(820px 460px at 88% -8%, rgba(37,99,235,.13), transparent 62%),
    radial-gradient(640px 440px at 4% 18%, rgba(5,150,105,.10), transparent 64%),
    var(--atm-page);
}

/* ---- page frame: one predictable column, content decides its own height ---- */
.atm-app--shell > .atm-main { padding: 22px 26px 40px; }
.atm-app--shell > .atm-main > .atm-panel:not(.atm-task-page) { max-width: 1240px; margin-inline: auto; }
.atm-app--shell > .atm-main > .atm-panel.atm-panel--form { max-width: 960px; margin-inline: auto; }
.atm-app--shell .atm-section-heading { flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.atm-app--shell .atm-section-heading h2 { font-size: 21px; line-height: 1.5; }
.atm-app--shell .atm-section-heading .atm-eyebrow { display: block; line-height: 1.4; }
.atm-app--shell .atm-section-heading p { margin-top: 2px; }

/* ---- glass surfaces, compact padding ---- */
.atm-app--shell :is(.atm-card, .atm-kpi, .atm-department-card, .atm-user-card, .atm-settings-card, .atm-segmented, .atm-task-toolbar, .atm-table-wrap) {
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
.atm-app--shell .atm-card,
.atm-app--shell .atm-department-card,
.atm-app--shell .atm-user-card { padding: 16px 18px; border-radius: 16px; }
.atm-app--shell .atm-kpi { min-height: 0; padding: 11px 14px; border-radius: 14px; }
.atm-app--shell .atm-table-wrap { border-radius: 16px; }
.atm-app--shell .atm-table-wrap table { background: transparent; }
.atm-app--shell .atm-table-wrap thead th { background: var(--glass-bg-soft); }
.atm-app--shell .atm-card h3 { font-size: 15px; }
.atm-app--shell .atm-card__head { margin-bottom: 8px; }

/* neutral buttons were flat grey; give them a quiet glass look */
.atm-app--shell .atm-button:not([class*="atm-button--"]) {
  border: 1px solid var(--glass-border);
  color: var(--atm-ink);
  background: var(--glass-bg-soft);
  box-shadow: none;
}
.atm-app--shell .atm-button:not([class*="atm-button--"]):hover { background: var(--atm-active); }
.atm-app--shell .atm-button { min-height: 36px; border-radius: 12px; }
.atm-app--shell .atm-button--sm { min-height: 30px; padding: 4px 12px; }

/* ---- forms: tighter rhythm, three columns by default ---- */
.atm-app--shell .atm-form { gap: 10px; margin-top: 0; }
.atm-app--shell .atm-card > .atm-form,
.atm-app--shell .atm-card > .atm-muted + .atm-form { margin-top: 10px; }
.atm-app--shell .atm-form--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 12px; row-gap: 10px; align-items: start; }
.atm-app--shell .atm-form :is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea) {
  min-height: 38px;
  padding: 6px 11px;
  border-color: var(--glass-border);
  border-radius: 11px;
  background: var(--glass-field);
}
.atm-app--shell .atm-form label > span,
.atm-app--shell .atm-form .atm-field > span { font-size: 10.5px; }
.atm-app--shell .atm-form-actions { align-items: center; gap: 8px; margin-top: 2px; }
.atm-app--shell .atm-form-lead { margin: 0 0 12px; font-size: 12px; }
.atm-app--shell .atm-form .atm-people:has(> .atm-check) { display: flex; flex-wrap: wrap; gap: 2px 18px; margin-top: 2px; }
.atm-app--shell .atm-form .atm-people > .atm-check { min-height: 30px; }

/* task creation: 4 columns -> title | department | priority, description, assignee | deadline | personal */
.atm-app--shell .atm-task-create-form { grid-template-columns: repeat(4, minmax(0, 1fr)); justify-content: stretch; }
.atm-app--shell .atm-task-create-card { margin: 0; padding: 18px 20px; }
.atm-app--shell .atm-task-create-form textarea { min-height: 72px; }
.atm-app--shell .atm-task-create-form .atm-check { align-self: end; min-height: 38px; }

/* meeting form: two columns, start/end each on a single line */
.atm-app--shell .atm-meeting-form { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 20px; }
.atm-when { display: grid; gap: 5px; min-width: 0; }
.atm-when > .atm-when__label { color: var(--atm-muted); font-size: 10.5px; font-weight: 700; }
.atm-when__row { display: grid; grid-template-columns: minmax(0, 1fr) 124px; gap: 8px; min-width: 0; }
.atm-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.atm-fieldset > legend { padding: 0; margin-bottom: 5px; color: var(--atm-muted); font-size: 10.5px; font-weight: 700; }
.atm-app--shell .atm-participants {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0 10px; max-height: 132px; padding: 6px 10px;
  border-color: var(--glass-border); border-radius: 12px; background: var(--glass-field);
}
.atm-app--shell .atm-participants .atm-check { min-height: 30px; }
.atm-form-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.atm-form-footer__status { width: min(220px, 100%); }

/* ---- meetings list ---- */
.atm-app--shell .atm-segmented { margin: 0 0 10px; padding: 3px; border-radius: 13px; }
.atm-app--shell .atm-segmented a { padding: 6px 14px; }
.atm-app--shell .atm-filter-bar { gap: 10px; margin: 0 0 12px; padding: 12px 14px; }
.atm-app--shell .atm-filter-bar > label { flex: 0 1 150px; }
.atm-app--shell .atm-filter-bar > .atm-date-label { flex: 0 1 168px; min-width: 0; }
.atm-app--shell .atm-filter-bar > .atm-filter-bar__search { flex: 1 1 220px; }
.atm-filter-bar .atm-field { display: grid; gap: 4px; margin: 0; }
.atm-app--shell .atm-meeting-head-actions { gap: 6px; margin-inline-start: auto; }
.atm-app--shell .atm-filter-bar .atm-meeting-head-actions { margin-inline-start: 0; }
.atm-meetings-table th, .atm-meetings-table td { padding: 10px 12px; }

/* ---- meeting detail: even rows, real list rows ---- */
.atm-app--shell .atm-meeting-grid { gap: 12px; align-items: stretch; }
.atm-meeting-grid > .atm-card { display: flex; flex-direction: column; }
.atm-meeting-grid .atm-card > .atm-form { margin-top: 8px; }
.atm-meeting-grid .atm-card > .atm-form textarea { min-height: 130px; }
.atm-meeting-grid .atm-card p { margin: 6px 0; }
.atm-meeting-grid .atm-card h4 { margin: 10px 0 2px; font-size: 13px; }
.atm-meeting-grid ol { margin: 4px 0 0; padding-inline-start: 22px; }
.atm-meeting-grid ul { display: grid; gap: 6px; margin: 8px 0; padding: 0; list-style: none; }
.atm-meeting-grid ul > li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--glass-border); border-radius: 12px; background: var(--glass-bg-soft); }
.atm-meeting-grid ul > li form { margin: 0; }
.atm-meeting-grid ul .atm-button { min-height: 28px; padding: 2px 10px; font-size: 11px; }

/* ---- dashboard ---- */
.atm-app--shell .atm-invite { gap: 12px; margin-bottom: 10px; padding: 12px 16px; }
.atm-app--shell .atm-invite h3 { margin: 0 0 2px; font-size: 14px; }
.atm-app--shell .atm-kpi-grid { gap: 10px; margin-bottom: 12px; }
.atm-app--shell .atm-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.atm-app--shell .atm-dashboard-grid > .atm-department-performance { grid-column: 1 / -1; }
.atm-app--shell .atm-progress-card .atm-mini-stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 8px; }
.atm-app--shell .atm-progress-card .atm-mini-stats > span {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px; border: 0; border-bottom: 1px dashed var(--atm-line); border-radius: 0; background: transparent;
}
.atm-app--shell .atm-progress-card .atm-mini-stats > span:last-child { border-bottom: 0; }
.atm-app--shell .atm-kanban-column { min-height: 120px; }
.atm-app--shell .atm-task-toolbar { padding: 10px 12px; border-radius: 14px; }

/* ---- settings ---- */
.atm-app--shell .atm-settings-grid { max-width: none; gap: 14px; }
.atm-app--shell .atm-settings-grid .atm-settings-card { max-width: none; }

/* ---- date + time pickers ---- */
.atm-dp { position: relative; display: flex; align-items: center; min-width: 0; }
.atm-dp__trigger {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 6px 11px;
  border: 1px solid var(--glass-border); border-radius: 11px;
  color: var(--atm-muted); background: var(--glass-field);
  font: inherit; font-size: 12px; text-align: right; cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.atm-dp.has-value .atm-dp__trigger { color: var(--atm-ink); padding-left: 32px; }
.atm-dp__trigger:hover { border-color: rgba(255,255,255,.28); }
.atm-dp__trigger:focus-visible,
.atm-dp__trigger[aria-expanded="true"] { border-color: var(--atm-navy); box-shadow: 0 0 0 3px rgba(52,120,242,.22); outline: none; }
.atm-dp__icon { flex: 0 0 16px; width: 16px; height: 16px; opacity: .8; }
.atm-dp__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atm-dp__clear {
  position: absolute; top: 50%; left: 7px; display: grid; width: 22px; height: 22px; place-items: center; padding: 0;
  border: 0; border-radius: 50%; color: var(--atm-muted); background: transparent; cursor: pointer; font-size: 16px; line-height: 1; transform: translateY(-50%);
}
.atm-dp__clear:hover, .atm-dp__clear:focus-visible { color: var(--atm-coral); background: rgba(239,68,68,.14); outline: none; }
.atm-dp__clear[hidden] { display: none; }
.atm-dp--time .atm-dp__clear { display: none; }
.atm-dp--time.has-value .atm-dp__trigger { padding-left: 11px; }

.atm-pop-backdrop { position: fixed; inset: 0; z-index: 1190; background: rgba(4,10,18,.45); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.atm-pop-backdrop.is-open { opacity: 1; pointer-events: auto; }
.atm-pop {
  position: fixed; z-index: 1200; width: 292px; max-width: calc(100vw - 16px); padding: 12px;
  border: 1px solid var(--glass-border); border-radius: 18px;
  color: var(--atm-ink); background: var(--pop-bg);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 24px 60px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.16);
  font-size: 12px; line-height: 1.6; text-align: right;
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top center;
  transition: opacity .15s ease, transform .15s ease;
}
.atm-pop.is-open { opacity: 1; transform: none; }
.atm-pop--time { width: 224px; }
.atm-pop.is-sheet { top: auto; right: 8px; bottom: 8px; left: 8px; width: auto; max-width: none; transform: translateY(18px); transform-origin: bottom center; }
.atm-pop.is-sheet.is-open { transform: none; }
.atm-pop button { font-family: inherit; }
.atm-pop__head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.atm-pop__title {
  flex: 1; min-height: 32px; padding: 0 8px; border: 0; border-radius: 10px;
  color: var(--atm-ink); background: transparent; font-size: 13px; font-weight: 800; cursor: pointer; text-align: center;
}
.atm-pop__title:hover { background: var(--glass-bg-soft); }
.atm-pop__title.is-static { display: block; padding-top: 5px; cursor: default; }
.atm-pop__head--solo { justify-content: center; }
.atm-pop__nav {
  display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; padding: 0;
  border: 1px solid var(--glass-border); border-radius: 10px; color: var(--atm-ink); background: var(--glass-bg-soft); cursor: pointer;
}
.atm-pop__nav svg { width: 16px; height: 16px; }
.atm-pop__nav:hover:not(:disabled) { background: var(--atm-active); }
.atm-pop__nav:disabled { opacity: .35; cursor: default; }
.atm-pop__week, .atm-pop__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.atm-pop__week { margin-bottom: 2px; }
.atm-pop__week span { padding: 2px 0; color: var(--atm-muted); font-size: 10.5px; font-weight: 700; text-align: center; }
.atm-pop__week .is-fri { color: #ff8a8a; }
.atm-pop__days { gap: 2px; }
.atm-pop__day, .atm-pop__cell {
  min-height: 34px; padding: 0; border: 0; border-radius: 10px; color: var(--atm-ink); background: transparent; font-size: 12px; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.atm-pop__day.is-fri { color: #ff8a8a; }
.atm-pop__day:hover, .atm-pop__cell:hover { background: var(--atm-active); }
.atm-pop__day.is-today, .atm-pop__cell.is-today { box-shadow: inset 0 0 0 1.5px var(--atm-navy); }
.atm-pop__day.is-selected, .atm-pop__cell.is-selected {
  color: #fff; background: linear-gradient(135deg, var(--atm-navy), #5b8def); box-shadow: 0 4px 12px rgba(52,120,242,.4); font-weight: 800;
}
.atm-pop__day:focus-visible, .atm-pop__cell:focus-visible, .atm-pop__nav:focus-visible, .atm-pop__title:focus-visible, .atm-pop__link:focus-visible {
  outline: 2px solid var(--atm-navy); outline-offset: 1px;
}
.atm-pop__grid { display: grid; gap: 6px; }
.atm-pop__grid--months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.atm-pop__grid--years { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 208px; overflow-y: auto; padding: 2px; }
.atm-pop__grid .atm-pop__cell { min-height: 38px; }
.atm-pop__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.atm-pop__col { display: grid; gap: 4px; min-width: 0; }
.atm-pop__col-title { color: var(--atm-muted); font-size: 10.5px; font-weight: 700; text-align: center; }
.atm-pop__list { position: relative; display: grid; align-content: start; gap: 2px; max-height: 196px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.atm-pop__list .atm-pop__cell { min-height: 32px; }
.atm-pop__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--glass-border); }
.atm-pop__link { padding: 4px 8px; border: 0; border-radius: 8px; color: var(--atm-navy); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.atm-pop__link:hover { background: var(--glass-bg-soft); }
.atm-pop__link--muted { color: var(--atm-muted); }
.atm-app--shell[data-atm-theme="light"] .atm-pop__day.is-fri,
.atm-app--shell[data-atm-theme="light"] .atm-pop__week .is-fri { color: var(--atm-coral); }

@media (prefers-reduced-motion: reduce) {
  .atm-pop, .atm-pop-backdrop, .atm-dp__trigger { transition: none; }
}

/* ---- responsive ---- */
@media (max-width: 1050px) {
  .atm-app--shell .atm-task-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-app--shell .atm-form--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atm-app--shell .atm-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .atm-app--shell > .atm-main { padding: 18px 12px 36px; }
  .atm-app--shell .atm-card, .atm-app--shell .atm-department-card, .atm-app--shell .atm-user-card { padding: 14px; }
  .atm-app--shell .atm-meeting-form,
  .atm-app--shell .atm-task-create-form,
  .atm-app--shell .atm-form--grid { grid-template-columns: minmax(0, 1fr); }
  .atm-app--shell .atm-field--span-2 { grid-column: 1 / -1; }
  .atm-app--shell .atm-filter-bar > label,
  .atm-app--shell .atm-filter-bar > .atm-date-label { flex: 1 1 140px; }
  .atm-form-footer { flex-wrap: wrap; }
  .atm-form-footer__status { width: 100%; }
  .atm-app--shell .atm-meeting-head-actions { margin-inline-start: 0; }
}

/* v7a: task detail — balance the two columns so no empty area is left under the shorter one */
@media (min-width: 1101px) {
  .atm-app--shell .atm-task-page .atm-detail-columns { display: block; column-count: 2; column-gap: 18px; }
  .atm-app--shell .atm-task-page .atm-detail-columns > div { display: contents; }
  .atm-app--shell .atm-task-page .atm-detail-columns .atm-card { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 18px; }
}

/* v7b: person filter in toolbar + equal-size task cards with ellipsis */
.atm-task-toolbar { grid-template-columns: minmax(200px, 1.4fr) repeat(4, minmax(130px, 1fr)) auto; }
@media (max-width: 1100px) { .atm-task-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .atm-task-toolbar { grid-template-columns: 1fr; } }
.atm-app--shell .atm-task-card--link { display: flex; flex-direction: column; height: 192px; overflow: hidden; }
.atm-app--shell .atm-task-card--link .atm-task-card__title-row { flex: 0 0 auto; min-height: 2.8em; }
.atm-app--shell .atm-task-card--link .atm-task-card__title-row h4 {
  display: -webkit-box; overflow: hidden; text-overflow: ellipsis;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow-wrap: anywhere; line-height: 1.4; max-height: 2.8em;
}
.atm-app--shell .atm-task-card--link .atm-task-card__assignment { flex: 0 0 auto; }
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-value {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal;
}
.atm-app--shell .atm-task-card--link .atm-progress--compact { margin-top: auto; flex: 0 0 auto; }

/* v7c: keep long values (department / assignee) inside their box with ellipsis */
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-row { align-items: stretch; overflow: hidden; }
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-label,
.atm-app--shell .atm-task-card--link .atm-task-card__assignment-value { max-width: 100%; min-width: 0; }
