:root {
  --ink:#293630;
  --muted:#7b817b;
  --paper:#f7f6f2;
  --white:#fff;
  --line:#e7e6df;
  --gold:#ad8c51;
  --gold-dark:#8c6d36;
  --gold-pale:#f5efe3;
  --sage:#eaf0e8;
  --red:#ae4843;
  --red-pale:#fff1ef;
  --radius:14px;
  --shadow:0 7px 25px rgba(34,47,38,.035);
  font-family:Tahoma,"Segoe UI",Arial,sans-serif;
  color:var(--ink);
  font-synthesis:none;
  color-scheme:light;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--paper);
  font-size:14px;
  line-height:1.75;
}
button,input,select,textarea {
  font:inherit;
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent;
}
button,a {
  touch-action:manipulation;
}
button {
  cursor:pointer;
}
button:disabled {
  opacity:.55;
  cursor:not-allowed;
}
a {
  color:inherit;
  text-decoration:none;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #b9914a80;
  outline-offset:3px;
}
h1,h2,h3,p {
  margin:0;
}
h1 {
  font-size:30px;
  line-height:1.6;
  letter-spacing:-.7px;
  font-weight:600;
}
h2 {
  font-size:19px;
  line-height:1.6;
  font-weight:600;
}
h3 {
  font-size:16px;
  line-height:1.7;
  font-weight:600;
}
button {
  border:0;
}
.muted {
  color:var(--muted);
}
.small {
  font-size:12px;
}
.glyph {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  font-family:Arial,sans-serif;
  font-size:21px;
  line-height:1;
}
.eyebrow {
  font:10px/1.7 Arial,sans-serif;
  letter-spacing:2px;
  color:var(--gold-dark);
  font-weight:600;
}
.app-shell {
  min-height:100vh;
  display:grid;
  grid-template-columns:244px minmax(0,1fr);
}
.sidebar {
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-inline-end:1px solid var(--line);
  padding:31px 21px 20px;
  z-index:20;
}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  direction:ltr;
  align-self:center;
}
.brand-mark {
  width:43px;
  height:49px;
  border:1px solid #b49a6b;
  display:flex;
  align-items:center;
  justify-content:center;
  font:36px Georgia,serif;
  color:#a48348;
  background:linear-gradient(140deg,#fff,#f9f4e9);
}
.brand-name {
  font:15px/1.6 Georgia,serif;
  letter-spacing:2px;
  color:#3a443a;
  white-space:nowrap;
}
.brand-caption {
  direction:rtl;
  font-size:10px;
  color:#8f938b;
  text-align:left;
}
.nav-label {
  font-size:10px;
  color:#a0a59d;
  margin:45px 15px 14px;
}
.navigation {
  display:flex;
  flex-direction:column;
  gap:8px;
}
.nav-item {
  display:flex;
  gap:13px;
  align-items:center;
  padding:12px 14px;
  border-radius:8px;
  color:#707970;
  font-size:13px;
  font-weight:500;
  transition:background .15s,color .15s;
}
.nav-item .glyph {
  width:20px;
  color:#929c90;
}
.nav-item:hover {
  background:#f6f6f1;
}
.nav-item.active {
  background:#f1eddf;
  color:#80622e;
}
.nav-item.active .glyph {
  color:#aa8542;
}
.sidebar-note {
  margin:42px 10px 20px;
  padding:19px 0;
  border-top:1px solid var(--line);
}
.sidebar-note .eyebrow {
  font-size:8px;
  letter-spacing:1px;
}
.sidebar-note strong {
  display:block;
  font-size:12px;
  margin:12px 0 6px;
}
.sidebar-note p {
  font-size:11px;
  color:#90958c;
  line-height:1.9;
}
.sidebar-bottom {
  margin-top:auto;
  border-top:1px solid var(--line);
  padding-top:20px;
}
.profile {
  display:flex;
  align-items:center;
  gap:10px;
}
.avatar {
  height:35px;
  width:35px;
  display:grid;
  place-items:center;
  background:var(--sage);
  color:#6d7b63;
  border-radius:50%;
  font-size:14px;
}
.profile-info {
  display:flex;
  flex-direction:column;
  min-width:0;
}
.profile-info strong {
  font-size:12px;
  max-width:140px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-info span {
  font-size:10px;
  color:var(--muted);
}
.logout {
  font-size:11px;
  background:none;
  color:#7f877c;
  padding:12px 45px 0 0;
}
.workspace {
  min-width:0;
}
.topbar {
  height:77px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 42px;
  background:#fcfbf8;
  gap:16px;
}
.topbar-start,.topbar-end {
  display:flex;
  align-items:center;
  gap:14px;
}
.workspace-title {
  font-size:12px;
  color:#5f6b60;
}
.topbar-separator {
  color:#c4c5bb;
  font-size:11px;
}
.topbar-location {
  font-size:11px;
}
.timezone {
  font-size:10px;
  color:#8c958c;
}
.menu-toggle {
  display:none;
  background:transparent;
  color:var(--ink);
  padding:5px 10px;
  font-size:20px;
}
.main {
  padding:24px 42px 50px;
  max-width:1580px;
  margin:auto;
}
.authority-banner {
  display:flex;
  align-items:center;
  gap:9px;
  color:#8b7955;
  font-size:10px;
  border:1px solid #e8e0cc;
  background:#fbf7ed;
  border-radius:7px;
  padding:8px 12px;
  margin-bottom:32px;
}
.authority-banner .glyph {
  font-size:14px;
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:0 0 30px;
}
.page-heading h1 {
  margin:4px 0 6px;
}
.page-description {
  font-size:12px;
  color:#818b80;
}
.heading-actions {
  flex-shrink:0;
  display:flex;
  gap:10px;
}
.btn {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:7px;
  border-radius:7px;
  padding:10px 18px;
  min-height:40px;
  font-size:12px;
  font-weight:500;
  line-height:1.8;
  transition:background .15s,transform .15s;
  border:1px solid transparent;
  white-space:nowrap;
}
.btn:not(:disabled):active {
  transform:translateY(1px);
}
.btn.primary {
  background:#a68a56;
  border-color:#a68a56;
  color:#fff;
  box-shadow:0 3px 7px #97733612;
}
.btn.primary:hover:not(:disabled) {
  background:#927440;
}
.btn.secondary {
  background:#fff;
  border-color:#dddcd3;
  color:#586251;
}
.btn.secondary:hover {
  background:#f8f7f1;
}
.btn.subtle {
  background:#f4f5ef;
  color:#67705f;
  border-color:#f0f1e9;
}
.btn.subtle:hover {
  background:#e8eddf;
}
.btn.small-btn {
  padding:4px 11px;
  min-height:31px;
  font-size:11px;
}
.btn.large {
  min-height:49px;
  font-size:14px;
}
.toolbar {
  display:flex;
  gap:16px;
  justify-content:space-between;
  align-items:center;
  margin-bottom:23px;
}
.tabs {
  background:#eaeae2;
  border-radius:8px;
  display:flex;
  padding:4px;
  gap:3px;
}
.tab {
  font-size:11px;
  background:transparent;
  color:#818a7a;
  padding:8px 15px;
  border-radius:5px;
  white-space:nowrap;
  min-height:36px;
}
.tab.active {
  background:#fff;
  color:#4e5b48;
  box-shadow:0 2px 5px #4850420a;
}
.search {
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:7px;
  padding:0 12px;
  min-width:230px;
  max-width:320px;
  min-height:45px;
}
.search .glyph {
  font-size:25px;
  color:#abb1a5;
}
.search input {
  border:0;
  outline:none;
  background:transparent;
  min-width:0;
  width:100%;
  font-size:11px;
  color:var(--ink);
  padding:10px 0;
}
.search input::placeholder {
  color:#a0a59a;
}
.stats-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:13px;
  margin-bottom:34px;
}
.stat-card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:16px 17px 14px;
  box-shadow:var(--shadow);
}
.stat-label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#7d877a;
  font-size:11px;
}
.stat-label .glyph {
  font-size:18px;
  color:#acb3a5;
  border:1px solid #ebede6;
  border-radius:6px;
  width:27px;
  height:27px;
}
.stat-value {
  display:block;
  font-size:32px;
  line-height:1.8;
  font-weight:500;
  color:#3e4d3a;
}
.stat-footnote {
  font-size:9px;
  color:#a1a799;
}
.stat-card.critical {
  background:#fff9f7;
  border-color:#ebd7d1;
}
.stat-card.critical .stat-value,.stat-card.critical .stat-label {
  color:var(--red);
}
.stat-card.critical .glyph {
  color:var(--red);
  border-color:#efded8;
}
.stat-card.warning .stat-value {
  color:#a78247;
}
.dashboard-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 244px;
  gap:25px;
  align-items:start;
}
.tasks-panel {
  min-width:0;
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}
.section-heading h2 {
  font-size:17px;
}
.section-heading p {
  font-size:10px;
  margin-top:3px;
}
.badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:5px;
  font-size:10px;
  line-height:1.8;
  padding:3px 8px;
  font-weight:400;
  white-space:nowrap;
}
.badge.neutral {
  background:#f0f2ec;
  color:#7b8476;
}
.badge.gold {
  background:#f5edde;
  color:#9a7b42;
}
.badge.demo {
  background:#edece3;
  color:#82806c;
  font-size:9px;
}
.badge.demo:before {
  content:'';
  display:block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#afa277;
  margin-inline-end:6px;
}
.badge.critical {
  background:#fbe4df;
  color:#b2544b;
}
.badge.success {
  background:#eaf1e4;
  color:#6e835e;
}
.badge.factory {
  color:#947950;
  background:#f5eddf;
}
.badge.client {
  background:#edf0f5;
  color:#708093;
}
.task-list {
  display:flex;
  flex-direction:column;
  gap:15px;
}
.task-card {
  background:#fff;
  border:1px solid #e5e6df;
  border-inline-start:3px solid #a9b6a0;
  border-radius:10px;
  box-shadow:var(--shadow);
  padding:20px 22px 0;
  overflow:hidden;
}
.task-card.is-critical {
  border-color:#ead3cd;
  border-inline-start-color:#bb6258;
  background:linear-gradient(95deg,#fff 68%,#fffaf8);
}
.task-card.is-done {
  background:#fbfcf9;
}
.task-card.is-critical.is-done {
  background:#fff8f6;
  border-inline-start-color:#bb6258;
}
.task-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.task-customer {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:11px;
  color:#7a8474;
  min-width:0;
}
.customer-monogram {
  height:24px;
  width:24px;
  display:grid;
  place-items:center;
  background:#f3f2e9;
  border-radius:5px;
  color:#9c8f70;
  flex-shrink:0;
  font-size:12px;
}
.task-badges {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.task-title {
  font-size:17px;
  font-weight:500;
  margin:14px 0 13px;
  overflow-wrap:anywhere;
}
.task-context {
  display:flex;
  flex-direction:column;
  gap:11px;
}
.context-row {
  display:grid;
  grid-template-columns:68px minmax(0,1fr);
  gap:10px;
  align-items:start;
}
.context-label {
  font-size:10px;
  color:#a2a697;
  line-height:1.8;
  white-space:nowrap;
}
.context-row p,.next-action p {
  font-size:11px;
  color:#707967;
  line-height:1.9;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
.next-action {
  display:flex;
  align-items:flex-start;
  gap:10px;
  background:#f7f8f3;
  border-radius:6px;
  padding:10px 12px;
}
.next-action .glyph {
  font-size:19px;
  color:#9baa90;
  margin-top:4px;
}
.next-action .context-label {
  font-size:9px;
}
.next-action p {
  color:#5b6b51;
  font-size:12px;
}
.task-metadata {
  display:flex;
  align-items:center;
  gap:8px 13px;
  flex-wrap:wrap;
  padding:15px 0;
}
.due-date,.source-date {
  font-size:9px;
  color:#a0a693;
}
.due-date.overdue {
  color:#b06c58;
}
.source-link {
  font-size:10px;
  color:#9b875c;
}
.source-link:hover {
  text-decoration:underline;
}
.task-footer {
  border-top:1px solid #eeeee7;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 0;
}
.record-id {
  font-size:9px;
  color:#b0b5a6;
}
.record-actions {
  display:flex;
  align-items:center;
  gap:11px;
  flex-wrap:wrap;
}
.text-action {
  font-size:10px;
  color:#8c7951;
  padding:4px 0;
}
.text-action:hover {
  color:#5d6f4d;
}
.dashboard-aside {
  display:flex;
  flex-direction:column;
  gap:17px;
  padding-top:4px;
}
.today-note {
  background:#e9ede3;
  border:1px solid #e1e6d8;
  border-radius:10px;
  padding:24px 22px;
  position:relative;
  overflow:hidden;
}
.today-note:after {
  content:'';
  position:absolute;
  width:160px;
  height:160px;
  border:1px solid #c6d0ba65;
  border-radius:50%;
  bottom:-76px;
  left:-61px;
  pointer-events:none;
}
.today-note .eyebrow {
  font-size:8px;
  color:#8b997c;
  letter-spacing:1.2px;
}
.today-date {
  font-size:11px;
  color:#8c9980;
  margin:9px 0 22px;
}
.today-note h3 {
  font-size:21px;
  white-space:pre-line;
  line-height:1.75;
  font-weight:400;
  color:#4f6244;
}
.today-note p {
  font-size:11px;
  color:#819175;
  margin-top:14px;
  line-height:2;
}
.guide-card {
  padding:19px 20px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fafaf6;
}
.guide-card h3 {
  font-size:12px;
  margin-bottom:17px;
}
.legend-row {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:9px;
  color:#89907f;
  margin:12px 0;
}
.legend-dot {
  width:5px;
  height:5px;
  border-radius:50%;
  flex-shrink:0;
}
.legend-dot.red {
  background:#bd776d;
}
.legend-dot.gold {
  background:#b69d67;
}
.legend-dot.sage {
  background:#99ad8a;
}
.guide-card p {
  font-size:9px;
  line-height:1.9;
  border-top:1px solid var(--line);
  padding-top:14px;
  margin-top:16px;
}
.connection-note {
  padding:14px 20px;
}
.connection-note .eyebrow {
  font-size:8px;
  color:#a5ad9a;
  letter-spacing:1.3px;
}
.connection-note strong {
  display:block;
  font-size:11px;
  color:#7d8872;
  margin:7px 0;
}
.connection-note p {
  font-size:10px;
  color:#a0a694;
  line-height:1.9;
}
.empty-state {
  text-align:center;
  background:#fff;
  border:1px dashed #dcded3;
  border-radius:10px;
  padding:42px 24px;
  color:#8b957f;
}
.empty-symbol {
  font-size:34px;
  color:#c0b187;
  display:block;
  margin-bottom:9px;
}
.empty-state h3 {
  font-size:15px;
  color:#6d7b61;
}
.empty-state p {
  max-width:360px;
  margin:8px auto 20px;
  font-size:12px;
}
.empty-state .btn {
  margin-top:4px;
}
.loading,.boot-loading {
  padding:70px 20px;
  text-align:center;
  color:#939d87;
  font-size:13px;
}
.boot-loading {
  min-height:100vh;
  display:grid;
  place-items:center;
}
.loading:before,.boot-loading:before {
  content:'';
  display:block;
  width:22px;
  height:22px;
  border:2px solid #dfdacb;
  border-top-color:var(--gold);
  border-radius:50%;
  margin:0 auto 14px;
  animation:spin .9s linear infinite;
}
.boot-loading:before {
  display:none;
}
@keyframes spin {
  to {
    transform:rotate(360deg);
  }
}
.error-box {
  margin:16px 0;
  background:var(--red-pale);
  border:1px solid #edcec8;
  padding:23px;
  border-radius:10px;
  color:var(--red);
}
.error-box p {
  font-size:12px;
  margin:8px 0 15px;
}
.customer-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}
.customer-card {
  padding:24px 24px 0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.customer-card-heading {
  display:flex;
  gap:13px;
  align-items:center;
  margin-bottom:18px;
}
.customer-avatar {
  width:43px;
  height:43px;
  border:1px solid #e4e5d9;
  border-radius:9px;
  background:#f7f5eb;
  color:#9f8c5f;
  display:grid;
  place-items:center;
  font-size:22px;
}
.customer-card-heading h3 {
  font-size:17px;
  font-weight:500;
  overflow-wrap:anywhere;
}
.customer-card-heading .muted {
  font-size:10px;
}
.customer-contacts {
  display:flex;
  flex-direction:column;
  color:#88927c;
  font-size:11px;
  align-items:flex-start;
  margin:13px 0;
  gap:4px;
  overflow-wrap:anywhere;
}
.customer-summary {
  margin:14px 0;
}
.customer-summary p {
  font-size:12px;
  color:#7b8571;
  min-height:25px;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
.customer-source {
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:9px;
  color:#a1a893;
  margin:15px 0;
}
.info-note {
  background:#eeefe8;
  border:1px solid #e2e4d8;
  border-radius:10px;
  padding:20px 23px;
  margin-bottom:27px;
}
.info-note strong {
  font-size:13px;
  color:#6d7b5f;
}
.info-note p {
  font-size:12px;
  color:#88937b;
  margin-top:5px;
}
.field-section {
  margin-bottom:30px;
}
.field-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:15px;
}
.field-card {
  background:#fff;
  padding:20px;
  border:1px solid var(--line);
  border-radius:10px;
  overflow-wrap:anywhere;
}
.field-title {
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.field-title strong {
  font-size:14px;
}
.field-key {
  direction:ltr;
  text-align:right;
  font:12px/1.8 monospace;
  color:#a3926e;
  margin:10px 0;
}
.modules-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
}
.module-card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  display:flex;
  flex-direction:column;
  padding:23px;
  min-height:250px;
  position:relative;
}
.module-card.implemented {
  border-color:#d2dbc6;
}
.module-card.planned {
  background:#fafaf7;
}
.module-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:21px;
}
.module-index {
  font:20px Georgia,serif;
  color:#c1b38e;
}
.module-card h2 {
  font-size:17px;
  margin-bottom:10px;
}
.module-card p {
  font-size:11px;
  color:#8c967f;
  line-height:1.9;
  margin-bottom:20px;
}
.module-features {
  font-size:11px;
  color:#8c967f;
  padding-inline-start:17px;
  margin:0 0 18px;
}
.module-bottom {
  margin-top:auto;
  border-top:1px solid var(--line);
  padding-top:14px;
  font-size:10px;
  color:#9fa78f;
}
.table-wrap {
  overflow:auto;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
}
.audit-table {
  width:100%;
  border-collapse:collapse;
  white-space:nowrap;
}
.audit-table th {
  background:#efefe8;
  text-align:right;
  font-size:11px;
  font-weight:500;
  padding:14px 20px;
  color:#7d896f;
}
.audit-table td {
  padding:16px 20px;
  border-top:1px solid var(--line);
  font-size:12px;
  color:#7f8a71;
}
.record-dialog {
  width:min(720px,calc(100vw - 32px));
  max-height:calc(100dvh - 48px);
  padding:0;
  border:1px solid #dedfd3;
  border-radius:14px;
  box-shadow:0 20px 120px #25321f40;
  background:#fcfcf9;
  color:var(--ink);
}
.record-dialog::backdrop {
  background:#26302370;
  backdrop-filter:blur(3px);
}
.record-dialog form {
  display:flex;
  flex-direction:column;
  max-height:calc(100dvh - 50px);
}
.dialog-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:25px 28px 20px;
  border-bottom:1px solid var(--line);
  gap:14px;
  background:#fff;
}
.dialog-header h2 {
  font-size:22px;
}
.dialog-header p {
  font-size:11px;
  margin-top:4px;
}
.dialog-close {
  background:#f4f4ed;
  color:#8d947e;
  border-radius:50%;
  width:30px;
  height:30px;
  font-size:24px;
  line-height:1;
  flex-shrink:0;
}
.dialog-body {
  padding:24px 28px;
  overflow:auto;
  overscroll-behavior:contain;
  min-height:0;
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:19px 20px;
}
.form-field {
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}
.form-field.full {
  grid-column:1/-1;
}
.form-field label {
  font-size:11px;
  font-weight:500;
  color:#748263;
}
.form-field input,.form-field select,.form-field textarea {
  border:1px solid #dbdfd0;
  border-radius:6px;
  padding:10px 12px;
  background:#fff;
  color:#536345;
  min-height:42px;
  min-width:0;
  width:100%;
  font-size:12px;
}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus {
  border-color:#ae9767;
}
.form-field input:disabled {
  background:#eeeee6;
  color:#a3aa97;
}
.form-field textarea {
  resize:vertical;
  min-height:82px;
}
.form-field input::placeholder {
  color:#b1b7a4;
}
.field-hint {
  font-size:9px;
  color:#a0aa90;
  line-height:1.9;
}
.checkbox-field {
  flex-direction:row;
  align-items:center;
  gap:10px;
  justify-content:flex-start;
}
.checkbox-field input {
  width:17px;
  height:17px;
  min-height:17px;
  accent-color:var(--gold);
}
.checkbox-field label {
  order:2;
}
.form-subheading {
  font-size:14px;
  border-top:1px solid var(--line);
  padding-top:20px;
  margin:24px 0 17px;
}
.dialog-footer {
  border-top:1px solid var(--line);
  background:#fff;
  padding:16px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.dialog-buttons {
  display:flex;
  gap:9px;
}
.form-error {
  font-size:11px;
  color:var(--red);
  line-height:1.9;
  white-space:pre-line;
}
.form-error:empty {
  display:none;
}
.dialog-error {
  background:var(--red-pale);
  padding:13px 28px;
  border-top:1px solid #efd5cf;
  max-height:130px;
  overflow:auto;
  flex-shrink:0;
}
.notifications {
  position:fixed;
  bottom:25px;
  left:25px;
  z-index:100;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-width:calc(100vw - 50px);
}
.toast {
  background:#374632;
  color:#f9fbf4;
  padding:14px 23px;
  border:1px solid #607254;
  border-radius:9px;
  font-size:12px;
  box-shadow:0 5px 30px #1c301b20;
}
.login-page {
  min-height:100dvh;
  display:grid;
  grid-template-columns:1fr 1fr;
  background:#f8f8f2;
  direction:rtl;
}
.login-art {
  background:#293c30;
  position:relative;
  overflow:hidden;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:55px 65px;
  color:#e6eadc;
}
.login-art .brand {
  align-self:flex-start;
  z-index:1;
}
.login-art .brand-mark {
  background:none;
  border-color:#a99060;
  color:#c1a679;
}
.login-art .brand-name {
  color:#e9e9db;
}
.login-art .brand-caption {
  color:#a5b49a;
}
.login-story {
  margin:auto 0;
  position:relative;
  z-index:1;
  padding:65px 0;
}
.login-story .eyebrow {
  color:#aa9369;
  letter-spacing:2px;
  font-size:10px;
}
.login-story h1 {
  white-space:pre-line;
  font-size:42px;
  font-weight:400;
  line-height:1.8;
  color:#e9eddf;
  margin:27px 0;
}
.login-story p {
  font-size:13px;
  line-height:2.2;
  color:#a8b79b;
  max-width:350px;
}
.login-art-footer {
  font:10px Arial,sans-serif;
  letter-spacing:2px;
  color:#829675;
  position:relative;
  z-index:1;
}
.orb {
  position:absolute;
  border:1px solid #778c542f;
  border-radius:50%;
  pointer-events:none;
}
.orb-one {
  width:650px;
  height:650px;
  left:-330px;
  top:-130px;
}
.orb-two {
  width:470px;
  height:470px;
  right:-190px;
  bottom:-270px;
  box-shadow:0 0 0 60px #78895806,0 0 0 120px #78895804;
}
.login-panel {
  display:grid;
  place-items:center;
  padding:50px 45px;
}
.login-content {
  width:100%;
  max-width:350px;
}
.login-content h2 {
  font-size:31px;
  font-weight:500;
  margin:25px 0 9px;
}
.login-content>.muted {
  font-size:12px;
  margin-bottom:32px;
}
.login-form {
  display:flex;
  flex-direction:column;
  gap:20px;
}
.login-form .form-field label {
  font-size:12px;
}
.login-form .form-field input {
  min-height:48px;
}
.login-form .btn {
  margin-top:4px;
}
.login-help {
  border-top:1px solid #e1e4d7;
  margin-top:33px;
  padding-top:24px;
}
.login-help strong {
  font-size:11px;
  color:#7b8a6a;
}
.login-help p {
  font-size:10px;
  line-height:2;
  color:#a0aa90;
  margin-top:8px;
}
.login-authority {
  font-size:10px;
  line-height:2;
  color:#a0aa90;
  margin-top:20px;
}
[hidden] {
  display:none!important;
}
@media(min-width:1600px) {
  .main {
    padding-top:35px;
  }
  .dashboard-layout {
    grid-template-columns:minmax(0,1fr) 280px;
  }
  .task-card {
    padding:24px 27px 0;
  }
  .task-title {
    font-size:19px;
  }
  .context-row p,.next-action p {
    font-size:13px;
  }
  .stat-card {
    padding:21px;
  }
  .task-list {
    gap:19px;
  }
}
@media(max-width:1250px) {
  .app-shell {
    grid-template-columns:210px minmax(0,1fr);
  }
  .sidebar {
    padding-inline:15px;
  }
  .main {
    padding-inline:26px;
  }
  .topbar {
    padding-inline:26px;
  }
  .dashboard-layout {
    grid-template-columns:minmax(0,1fr) 215px;
    gap:18px;
  }
  .stats-grid {
    gap:9px;
  }
  .stat-card {
    padding:14px 12px;
  }
  .stat-label {
    font-size:10px;
  }
  .stat-label .glyph {
    display:none;
  }
  .stat-footnote {
    font-size:8px;
  }
  .task-card {
    padding-inline:17px;
  }
  .today-note,.guide-card {
    padding-inline:17px;
  }
  .today-note h3 {
    font-size:19px;
  }
  .topbar-location,.topbar-separator {
    display:none;
  }
  .toolbar {
    gap:10px;
  }
  .tab {
    padding-inline:10px;
  }
  .search {
    min-width:205px;
  }
  .modules-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:1050px) {
  .dashboard-layout {
    grid-template-columns:minmax(0,1fr);
  }
  .dashboard-aside {
    display:none;
  }
  .topbar .timezone {
    display:none;
  }
  .stats-grid {
    gap:9px;
  }
  .stat-card {
    padding:12px;
  }
  .main {
    padding-inline:25px;
  }
  .field-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .customer-grid {
    grid-template-columns:1fr;
  }
  .login-art {
    padding-inline:40px;
  }
  .login-story h1 {
    font-size:35px;
  }
  .login-panel {
    padding-inline:30px;
  }
  .page-heading {
    gap:13px;
  }
  h1 {
    font-size:27px;
  }
}
@media(max-width:800px) {
  .app-shell {
    display:block;
  }
  .sidebar {
    position:fixed;
    inset-inline-start:0;
    top:0;
    width:244px;
    transform:translateX(100%);
    transition:transform .2s;
    box-shadow:-15px 0 70px #263a2333;
  }
  .menu-open .sidebar {
    transform:translateX(0);
  }
  .menu-open:after {
    content:'';
    position:fixed;
    inset:0;
    background:#25381f40;
    z-index:15;
    pointer-events:none;
  }
  .menu-toggle {
    display:block;
    position:relative;
    z-index:25;
  }
  .menu-open .menu-toggle {
    background:#fff;
    border:1px solid var(--line);
    border-radius:6px;
  }
  .topbar {
    height:68px;
    padding-inline:18px;
  }
  .topbar-start {
    gap:5px;
  }
  .main {
    padding:20px 22px 40px;
  }
  .authority-banner {
    margin-bottom:25px;
  }
  .page-heading {
    margin-bottom:24px;
  }
  .page-description {
    max-width:350px;
  }
  .stats-grid {
    margin-bottom:25px;
  }
  .sidebar-note {
    margin-top:35px;
  }
  .login-page {
    grid-template-columns:1fr;
  }
  .login-art {
    min-height:auto;
    height:220px;
    padding:26px 35px;
  }
  .login-art .brand {
    align-self:flex-start;
  }
  .login-story {
    padding:0;
    margin:15px 0 0;
  }
  .login-story .eyebrow,.login-story p,.login-art-footer {
    display:none;
  }
  .login-story h1 {
    font-size:23px;
    white-space:normal;
    margin:0;
  }
  .login-panel {
    padding:38px 28px;
  }
  .login-content {
    max-width:420px;
  }
  .login-content h2 {
    margin-top:22px;
  }
  .login-art .orb-one {
    left:-150px;
    top:-450px;
  }
  .login-art .orb-two {
    display:none;
  }
}
@media(max-width:570px) {
  h1 {
    font-size:25px;
  }
  .main {
    padding:17px 16px 35px;
  }
  .topbar {
    padding-inline:9px;
  }
  .topbar-start {
    gap:0;
  }
  .workspace-title {
    font-size:10px;
  }
  .topbar-end {
    gap:4px;
  }
  .badge.demo {
    font-size:8px;
    padding:3px 6px;
  }
  .authority-banner {
    font-size:9px;
    padding:9px 10px;
    align-items:flex-start;
    line-height:1.9;
    margin-bottom:25px;
  }
  .authority-banner .glyph {
    margin-top:3px;
  }
  .page-heading {
    align-items:flex-start;
    gap:17px;
    flex-direction:column;
    margin-bottom:25px;
  }
  .page-heading h1 {
    margin-top:4px;
  }
  .heading-actions {
    width:100%;
  }
  .heading-actions .btn {
    padding:8px 14px;
    min-height:39px;
  }
  .page-description {
    font-size:11px;
  }
  .toolbar {
    flex-direction:column;
    align-items:stretch;
    gap:13px;
    margin-bottom:17px;
  }
  .search {
    max-width:none;
    min-width:0;
    min-height:42px;
  }
  .tabs {
    width:100%;
    justify-content:space-between;
  }
  .tab {
    flex:1;
    font-size:10px;
    padding:7px 5px;
  }
  .stats-grid {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
    margin-bottom:24px;
  }
  .stat-card {
    padding:10px 11px;
  }
  .stat-label {
    font-size:9px;
    white-space:nowrap;
  }
  .stat-value {
    font-size:27px;
  }
  .stat-footnote {
    display:none;
  }
  .stat-card:nth-child(4),.stat-card:nth-child(5) {
    grid-column:auto;
  }
  .section-heading {
    align-items:flex-start;
  }
  .section-heading h2 {
    font-size:16px;
  }
  .section-heading p {
    font-size:9px;
    max-width:250px;
  }
  .task-card {
    padding:15px 14px 0;
  }
  .task-top {
    align-items:flex-start;
    gap:8px;
  }
  .task-badges {
    gap:5px;
  }
  .task-badges .badge {
    font-size:8px;
    padding:2px 6px;
  }
  .task-customer {
    font-size:10px;
    gap:6px;
    line-height:1.7;
  }
  .task-title {
    font-size:16px;
    margin-top:14px;
  }
  .context-row {
    grid-template-columns:53px minmax(0,1fr);
    gap:7px;
  }
  .context-label {
    font-size:9px;
  }
  .context-row p {
    font-size:10px;
  }
  .next-action p {
    font-size:11px;
  }
  .task-metadata {
    gap:7px 10px;
    padding:13px 0;
  }
  .task-footer {
    gap:8px;
  }
  .record-actions {
    gap:8px;
  }
  .text-action {
    font-size:9px;
  }
  .customer-card {
    padding:20px 19px 0;
  }
  .field-grid,.modules-grid {
    grid-template-columns:1fr;
  }
  .module-card {
    min-height:220px;
  }
  .info-note {
    padding:17px;
  }
  .info-note p {
    font-size:11px;
  }
  .form-grid {
    grid-template-columns:1fr;
    gap:16px;
  }
  .form-field.full {
    grid-column:auto;
  }
  .record-dialog {
    width:calc(100vw - 20px);
    max-height:calc(100dvh - 20px);
    border-radius:10px;
  }
  .record-dialog form {
    max-height:calc(100dvh - 22px);
  }
  .dialog-header {
    padding:18px 18px 15px;
  }
  .dialog-header h2 {
    font-size:20px;
  }
  .dialog-header p {
    font-size:10px;
  }
  .dialog-body {
    padding:19px 18px;
  }
  .dialog-footer {
    padding:13px 18px;
  }
  .dialog-error {
    padding:13px 18px;
  }
  .dialog-footer>.small {
    font-size:9px;
  }
  .dialog-buttons .btn {
    font-size:11px;
    padding:8px 13px;
  }
  .notifications {
    left:15px;
    bottom:15px;
    max-width:calc(100vw - 30px);
  }
  .toast {
    font-size:11px;
    padding:12px 17px;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    scroll-behavior:auto!important;
    animation:none!important;
    transition:none!important;
  }
}
@media print {
  .sidebar,.topbar,.authority-banner,.heading-actions,.toolbar,.record-actions,.dashboard-aside,.notifications {
    display:none!important;
  }
  .app-shell {
    display:block;
  }
  .main {
    padding:0;
  }
  .task-card {
    break-inside:avoid;
    box-shadow:none;
  }
  .dashboard-layout {
    display:block;
  }
  .stats-grid {
    grid-template-columns:repeat(5,1fr);
  }
  body {
    background:white;
  }
}
.result-limit {
  font-size:10px;
  color:#969f88;
  margin-top:24px;
  text-align:center;
}

/* Inventory 0.2: Arabic RTL operational views; decimal amounts stay LTR-isolated. */
.inventory-tabs {
  width:fit-content;
  max-width:100%;
  margin-bottom:24px;
}
.inventory-stats {
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:20px;
}
.inventory-stats .stat-label {
  display:block;
}
.inventory-scope-note {
  display:flex;
  align-items:flex-start;
  gap:12px;
  background:#f2f0e9;
  border:1px solid #e3ddce;
  border-radius:10px;
  padding:13px 17px;
  margin-bottom:24px;
  font-size:11px;
  line-height:1.9;
  color:#77775f;
}
.inventory-scope-note .badge {
  flex-shrink:0;
}
.inventory-section {
  min-width:0;
  margin-bottom:30px;
}
.inventory-section .section-heading {
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:13px;
}
.inventory-section .section-heading p {
  margin-top:4px;
  max-width:780px;
}
.inventory-filters {
  display:grid;
  grid-template-columns:minmax(180px,1.25fr) minmax(160px,1fr) minmax(190px,.9fr);
  gap:17px;
  padding:19px 20px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  margin-bottom:27px;
  align-items:end;
}
.inventory-low-filter {
  align-self:center;
  margin-top:25px;
}
.inventory-low-filter label {
  font-size:11px;
  cursor:pointer;
}
.ledger-filters {
  grid-template-columns:minmax(200px,2fr) minmax(140px,1fr);
}
.inventory-table-wrap {
  max-width:100%;
}
.inventory-table {
  width:100%;
  border-collapse:collapse;
  text-align:start;
}
.inventory-table th {
  background:#f1f1e9;
  color:#707c62;
  font-size:11px;
  font-weight:500;
  text-align:start;
  padding:13px 15px;
  white-space:nowrap;
}
.inventory-table td {
  border-top:1px solid var(--line);
  padding:15px;
  color:#56634d;
  font-size:12px;
  line-height:1.8;
  vertical-align:middle;
}
.inventory-table tr:last-child td:first-child {
  border-end-start-radius:10px;
}
.inventory-table tbody tr:hover {
  background:#fcfcf8;
}
.inventory-table .record-actions {
  flex-wrap:nowrap;
}
.inventory-record-name {
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:115px;
  max-width:250px;
  overflow-wrap:anywhere;
}
.inventory-record-name>strong {
  font-size:12px;
  font-weight:600;
}
.inventory-code {
  font:11px/1.7 monospace;
  direction:ltr;
  unicode-bidi:isolate;
  display:inline-block;
  color:#8a7b59;
  overflow-wrap:anywhere;
  text-align:start;
}
.inventory-record-name>.inventory-code {
  align-self:flex-start;
}
.inventory-quantity {
  display:inline-flex;
  align-items:baseline;
  justify-content:flex-start;
  gap:6px;
  white-space:nowrap;
  font:13px/1.8 "Segoe UI",Arial,sans-serif;
  font-variant-numeric:tabular-nums;
  unicode-bidi:isolate;
}
.inventory-quantity strong {
  font-weight:600;
  color:var(--ink);
}
.inventory-unit {
  font-size:10px;
  font-weight:400;
  color:var(--muted);
}
.inventory-badges {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
}
.inventory-table .inventory-badges {
  min-width:115px;
}
.inventory-low-row td:first-child {
  border-inline-start:3px solid #c77963;
}
.inventory-reversed-row td:first-child {
  border-inline-start:3px solid #c8b383;
}
.inventory-route {
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:125px;
  max-width:240px;
  font-size:11px;
  overflow-wrap:anywhere;
}
.inventory-config-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px;
}
.inventory-config-grid>.inventory-section:last-child {
  grid-column:1/-1;
}
.inventory-config-grid .empty-state {
  min-height:180px;
  padding:25px 15px;
}
.inventory-source-note {
  min-width:180px;
  max-width:360px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:11px;
}
.inventory-permission-note {
  margin-bottom:23px;
  font-size:12px;
  color:#8a7953;
}
.inventory-detail-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px 22px;
  margin:22px 0;
}
.inventory-detail-grid>div {
  min-width:0;
}
.inventory-detail-grid dt {
  font-size:10px;
  color:var(--muted);
  margin-bottom:3px;
}
.inventory-detail-grid dd {
  margin:0;
  font-size:12px;
  color:var(--ink);
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.inventory-posting-summary {
  display:flex;
  flex-direction:column;
  gap:11px;
  background:#f0f2e9;
  border:1px solid #dde2d2;
  border-radius:9px;
  padding:17px;
  margin:21px 0 0;
  color:#66705b;
}
.inventory-posting-summary>div:not(.inventory-summary-balance) {
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px;
}
.inventory-posting-summary+.form-grid {
  margin-top:22px;
}
.inventory-summary-line {
  font-size:12px;
  line-height:1.9;
}
.inventory-summary-balance {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px 14px;
  border-top:1px solid #dfe3d6;
  padding-top:9px;
  font-size:11px;
}
.inventory-summary-balance>.inventory-quantity {
  margin-inline-start:auto;
}
.inventory-summary-balance>.small {
  flex-basis:100%;
}
.inventory-reason {
  font-size:12px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.inventory-reverse-button {
  margin-top:25px;
}
.inventory-conversion-preview {
  font-size:11px;
  color:#887953;
  margin-top:19px;
  padding:11px 14px;
  background:var(--gold-pale);
  border-radius:7px;
}
.inventory-increase strong {
  color:#47733e;
}
.inventory-decrease strong {
  color:var(--red);
}
.inventory-module-link {
  display:block;
  background:transparent;
  padding:7px 0 0;
  color:var(--gold-dark);
}
.module-card.partial {
  border-color:#d8c79e;
}
.inventory-sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.record-dialog [hidden] {
  display:none!important;
}
.form-field select:disabled,.form-field textarea:disabled {
  background:#eeeee6;
  color:#949c87;
}

/* Self-service account settings share the existing gold/ivory visual language. */
.account-panel {
  max-width:760px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.account-identity {
  display:flex;
  align-items:center;
  gap:16px;
  padding:26px 30px;
  background:linear-gradient(120deg,var(--gold-pale),#fffdf8);
  border-bottom:1px solid var(--line);
}
.account-identity .avatar {
  width:48px;
  height:48px;
  font-size:20px;
}
.account-email {
  direction:ltr;
  text-align:start;
  unicode-bidi:plaintext;
  overflow-wrap:anywhere;
  color:var(--muted);
  font-size:12px;
  margin:3px 0 8px;
}
.account-password-form {
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:28px 30px;
}
.account-password-form h3 {
  margin-bottom:3px;
}
.account-password-form>.field-hint {
  margin-top:-9px;
  line-height:1.9;
}
.account-password-disclosure {
  margin:0;
  font-size:12px;
  line-height:1.95;
}
.account-form-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  border-top:1px solid var(--line);
  padding-top:20px;
}
.account-success,.account-pending {
  padding:12px 15px;
  border-radius:8px;
  font-size:12px;
  line-height:1.9;
}
.account-success {
  color:#416140;
  background:var(--sage);
}
.account-pending {
  color:var(--gold-dark);
  background:var(--gold-pale);
}
.account-success:empty,.account-pending:empty {
  display:none;
}
@media(max-width:600px) {
  .account-identity,.account-password-form {
    padding:22px 18px;
  }
  .account-form-actions .btn {
    flex:1 1 100%;
  }
}
@media(max-width:1250px) {
  .inventory-filters {
    grid-template-columns:minmax(160px,1fr) minmax(160px,1fr);
  }
  .inventory-low-filter {
    grid-column:1/-1;
    margin-top:0;
  }
  .inventory-stats .stat-label {
    white-space:normal;
  }
}
@media(max-width:1050px) {
  .inventory-config-grid {
    grid-template-columns:1fr;
    gap:0;
  }
}
@media(max-width:570px) {
  .inventory-tabs {
    width:100%;
    margin-bottom:20px;
  }
  .inventory-tabs .tab {
    white-space:normal;
    padding:9px 7px;
    line-height:1.7;
    min-height:44px;
  }
  .inventory-stats {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .inventory-stats .stat-label {
    font-size:10px;
  }
  .inventory-scope-note {
    flex-direction:column;
    gap:8px;
    padding:13px;
    font-size:10px;
  }
  .inventory-filters,.ledger-filters {
    grid-template-columns:1fr;
    padding:15px;
    gap:14px;
  }
  .inventory-low-filter {
    margin-top:3px;
  }
  .inventory-section .section-heading {
    gap:10px;
  }
  .inventory-section h2 {
    font-size:17px;
  }
  .inventory-section .section-heading p {
    font-size:10px;
  }
  .inventory-table th,.inventory-table td {
    padding:12px;
  }
  .inventory-detail-grid {
    gap:14px;
  }
  .inventory-posting-summary {
    padding:13px;
  }
  .inventory-quantity {
    font-size:12px;
  }
  .inventory-posting-summary .inventory-quantity {
    font-size:14px;
  }
}
@media print {
  .inventory-tabs,.inventory-filters,.inventory-reverse-button,.inventory-table button {
    display:none!important;
  }
  .inventory-table-wrap {
    overflow:visible;
  }
  .inventory-table {
    font-size:9px;
  }
  .inventory-table th,.inventory-table td {
    padding:7px;
  }
  .inventory-stats {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
/* HubSpot is an additive, read-only source view. Local ERP layouts stay unchanged. */
.hubspot-toolbar {
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(230px,1fr);
  gap:16px;
  align-items:end;
}
.hubspot-toolbar .tabs { width:100%; }
.hubspot-toolbar .tab { flex:1; }
.hubspot-toolbar .search { width:100%; min-width:0; }
.hubspot-filter-note { margin:10px 0; color:var(--muted); font-size:12px; line-height:1.95; }
.hubspot-disclosure { min-width:0; }
.hubspot-disclosure > summary { cursor:pointer; color:var(--gold-dark); font-size:12px; line-height:1.8; padding:10px 0; }
.hubspot-disclosure > summary:focus-visible { outline:3px solid #b9914a80; outline-offset:3px; border-radius:4px; }
.hubspot-filter-details { margin:6px 0 20px; }
.hubspot-filter-details > summary { width:fit-content; }
.hubspot-source-details { margin-top:14px; border-top:1px solid var(--line); }
.hubspot-source-details > p { margin:9px 0; }
.hubspot-diagnostics { margin-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.hubspot-diagnostics p { margin:6px 0; }
.hubspot-diagnostics ul { margin:4px 0; padding-inline-start:20px; }
.hubspot-status,.hubspot-settings {
  padding:20px;
  margin-bottom:20px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.hubspot-status .section-heading { margin-bottom:14px; }
.hubspot-status-labels { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.hubspot-verification { margin-top:10px; }
.hubspot-timestamps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:16px 0; padding:14px 0; border-block:1px solid var(--line); }
.hubspot-timestamps strong { display:block; font-size:12px; font-weight:500; overflow-wrap:anywhere; }
.hubspot-refresh-row { display:flex; align-items:center; flex-wrap:wrap; gap:16px; }
.hubspot-warnings { color:var(--gold-dark); padding-inline-start:20px; margin-bottom:0; font-size:12px; }
.hubspot-settings { padding:0; overflow:hidden; }
.hubspot-settings summary { cursor:pointer; padding:18px 24px; color:var(--gold-dark); font-size:13px; font-weight:600; }
.hubspot-settings summary:focus-visible { outline:3px solid #b9914a80; outline-offset:-4px; }
.hubspot-settings[open] summary { border-bottom:1px solid var(--line); }
.hubspot-credentials-form { display:grid; gap:18px; max-width:850px; padding:24px; }
.hubspot-credentials-form .info-note { margin:0; }
.hubspot-credentials-form .checkbox-field label { line-height:1.95; }
.hubspot-scope-list { font-size:12px; }
.hubspot-scope-list ul { margin:8px 0 0; padding-inline-start:20px; }
.hubspot-scope-list li { width:fit-content; overflow-wrap:anywhere; }
.hubspot-layout { display:block; min-width:0; }
.hubspot-layout .section-heading { align-items:flex-start; gap:10px; flex-wrap:wrap; }
.hubspot-task-grid { --hubspot-columns:1; display:grid; grid-template-columns:repeat(var(--hubspot-columns),minmax(0,1fr)); gap:16px; align-items:start; }
.hubspot-task-grid > .empty-state { grid-column:1/-1; }
.hubspot-task-card { min-width:0; padding:20px 20px 0; border-inline-start-width:3px; box-shadow:0 2px 8px #263a2305; }
.hubspot-task-customer { min-width:0; }
.hubspot-customer-name { font-size:18px; line-height:1.65; font-weight:600; overflow-wrap:anywhere; margin:0; }
.hubspot-customer-link { color:var(--ink); }
.hubspot-customer-link:hover { color:var(--gold-dark); text-decoration:underline; text-underline-offset:3px; }
.hubspot-customer-link:focus-visible,.hubspot-task-card .source-link:focus-visible { outline:3px solid #b9914a80; outline-offset:3px; border-radius:3px; }
.hubspot-name-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; min-width:0; margin:0; }
.hubspot-name-row > .hubspot-customer-link,.hubspot-name-text { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.hubspot-whatsapp,.hubspot-email-alternative { display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px; max-width:100%; padding:6px 11px; border:1px solid #c5d7c8; border-radius:7px; background:#edf5ef; color:#285c39; font-size:12px; font-weight:600; line-height:1.6; text-align:center; flex-shrink:0; }
.hubspot-whatsapp:hover { background:#e0eee3; }
.hubspot-whatsapp:disabled { opacity:1; color:#737870; border-color:var(--line); background:#f3f3ef; cursor:not-allowed; }
.hubspot-whatsapp:focus-visible,.hubspot-email-alternative:focus-visible { outline:3px solid #b9914a80; outline-offset:3px; }
.hubspot-email-alternative { color:var(--gold-dark); background:var(--gold-pale); border-color:var(--line); }
.hubspot-whatsapp-hint { font-size:10px; font-weight:400; line-height:1.8; color:#626c59; margin:3px 0 0; overflow-wrap:anywhere; }
.hubspot-customer-company { font-size:12px; color:var(--muted); overflow-wrap:anywhere; margin:2px 0 0; }
.hubspot-additional-contacts { margin-top:4px; }
.hubspot-task-badges { justify-content:flex-start; gap:6px; margin:12px 0 15px; }
.hubspot-task-badges .badge { font-size:11px; line-height:1.65; padding:4px 9px; }
.hubspot-latest-state { padding-bottom:13px; }
.hubspot-task-card .context-label { color:#818974; font-size:11px; white-space:normal; }
.hubspot-latest-state p { font-size:13px; line-height:1.85; color:#626c59; margin-top:3px; white-space:pre-wrap; }
.hubspot-next-action { background:#f7f8f4; border-radius:7px; padding:10px 12px; }
.hubspot-task-card .task-title { font-size:15px; line-height:1.85; font-weight:500; margin:3px 0 0; }
.hubspot-task-card .hubspot-preview,.hubspot-customer-name > .hubspot-customer-link,.hubspot-customer-name > .hubspot-name-text,.hubspot-customer-company { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.hubspot-task-card .task-metadata { padding:13px 0 9px; margin:0; }
.hubspot-task-card .due-date { font-size:12px; line-height:1.85; color:#68735f; }
.hubspot-task-card .due-date.overdue { color:var(--red); }
.hubspot-deferral-summary { color:var(--gold-dark); font-size:11px; line-height:1.8; margin:0 0 8px; }
.hubspot-task-details { border-top:1px solid var(--line); margin-top:4px; }
.hubspot-task-details > summary { min-height:40px; padding:10px 0; font-size:12px; }
.hubspot-task-details[open] > summary { margin-bottom:10px; }
.hubspot-task-details > p { margin:8px 0; line-height:1.9; }
.hubspot-full-title p,.hubspot-contact-state p { font-size:13px; line-height:1.9; white-space:pre-wrap; overflow-wrap:anywhere; }
.hubspot-body-details { margin-top:14px; }
.hubspot-contact-panel { margin:24px 0; border:1px solid var(--line); border-radius:var(--radius); background:var(--white); padding:0 20px; }
.hubspot-contact-panel > summary { padding:16px 0; font-weight:600; font-size:13px; }
.hubspot-contact-panel[open] { padding-bottom:18px; }
.hubspot-contact-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.hubspot-contact-card { min-width:0; background:var(--white); border:1px solid var(--line); border-radius:9px; padding:16px; overflow-wrap:anywhere; }
.hubspot-contact-card h3 { font-size:15px; }
.hubspot-contact-card .customer-contacts { display:grid; margin:9px 0; gap:4px; }
.hubspot-contact-card .customer-contacts span { text-align:start; font-size:12px; }
.hubspot-contact-state { margin-top:12px; }
.hubspot-contact-meta { margin-top:10px; }
.hubspot-linked-contacts { display:grid; gap:10px; margin-top:14px; }
.hubspot-contact-card.compact { padding:13px; background:var(--paper); border-radius:7px; }
.hubspot-task-body { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.95; color:var(--muted); margin:6px 0 14px; }
.hubspot-task-card .task-footer { padding:11px 0 13px; }
.hubspot-task-card .source-link { font-size:12px; }
.hubspot-task-card.is-critical { border-color:#e4c2bc; border-inline-start-color:var(--red); background:#fffaf8; }
.hubspot-task-card.is-critical .hubspot-next-action { background:#fbefec; }
@media(min-width:1000px) {
  .hubspot-task-grid { --hubspot-columns:2; }
}
@media(min-width:1600px) {
  .hubspot-task-grid { --hubspot-columns:3; }
  .hubspot-contact-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:1250px) {
  .hubspot-timestamps { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
  .hubspot-toolbar,.hubspot-contact-list { grid-template-columns:minmax(0,1fr); }
  .hubspot-toolbar .tabs { flex-wrap:wrap; }
  .hubspot-toolbar .tab { white-space:normal; min-height:44px; }
  .hubspot-status { padding:18px; }
  .hubspot-credentials-form { padding:18px; }
  .hubspot-settings summary { padding:18px; }
  .hubspot-refresh-row { align-items:stretch; flex-direction:column; }
  .hubspot-timestamps { gap:14px; }
  .hubspot-status .section-heading { flex-wrap:wrap; }
  .hubspot-task-card { padding:18px 17px 0; }
  .hubspot-task-card .task-title { font-size:15px; }
  .hubspot-task-badges .badge { font-size:11px; padding:4px 9px; }
  .hubspot-task-details > summary { min-height:44px; }
  .hubspot-contact-panel { padding-inline:17px; }
}
@media print {
  .hubspot-settings,.hubspot-toolbar,.hubspot-refresh-row { display:none!important; }
  .hubspot-task-grid { display:block; }
  .hubspot-task-card { margin-bottom:12px; }
}
.hubspot-result-note { margin:0 0 24px; color:var(--muted); font-size:11px; line-height:2; }
.hubspot-unresolved { margin-top:28px; padding:20px; border:1px solid var(--line); border-radius:var(--radius); background:var(--gold-pale); }
.hubspot-unresolved > summary { cursor:pointer; color:var(--gold-dark); font-size:13px; font-weight:600; }
.hubspot-unresolved > summary:focus-visible { outline:3px solid #b9914a80; outline-offset:4px; }
.hubspot-unresolved > p { margin:14px 0; }

.hubspot-setup-locked { padding:20px 24px; }
.hubspot-setup-locked h3 { color:var(--gold-dark); font-size:13px; }
.hubspot-setup-locked .info-note { margin:12px 0 0; }

.hubspot-owner-annotation { margin:14px 0; padding:13px 15px; border:1px solid var(--line); border-radius:9px; background:var(--gold-pale); font-size:12px; line-height:1.95; overflow-wrap:anywhere; }
.hubspot-owner-annotation strong { display:block; font-weight:600; }
.hubspot-owner-annotation .overdue { color:var(--red); }
.hubspot-task-card.is-critical .hubspot-owner-annotation { background:var(--red-pale); border-color:#e8c8c4; }

/* 0.4: one customer source, explicit bounded lookup, internal task references. */
.hubspot-mode-tabs { margin:0 0 18px; flex-wrap:wrap; }
.hubspot-mode-tabs .tab { min-height:44px; white-space:normal; }
.hubspot-phone-details { margin:2px 0 0; font-size:10px; }
.hubspot-phone-details > summary { color:var(--muted); min-height:28px; cursor:pointer; }
.hubspot-phone-details[open] { margin-bottom:6px; }
.customer-lookup { min-width:0; }
.customer-lookup > h2 { font-size:20px; margin:0 0 8px; }
.customer-lookup-controls { display:flex; align-items:flex-end; gap:10px; margin:20px 0 10px; flex-wrap:wrap; }
.customer-lookup-controls .form-field { flex:1 1 260px; min-width:0; }
.customer-lookup-controls .btn { min-height:44px; }
.customer-lookup-status { overflow-wrap:anywhere; line-height:1.9; }
.customer-lookup-warning { display:block; color:var(--red); }
.customer-lookup-results { margin:16px 0; align-items:start; }
.customer-lookup-results > .empty-state { grid-column:1/-1; }
.customer-lookup-select { width:100%; margin-top:14px; min-height:44px; white-space:normal; }
.customer-lookup-next { min-height:44px; margin:4px 0 18px; }
.customer-lookup-limits { margin-top:14px; }
.task-customer-association { display:flex; flex-direction:column; align-items:flex-start; gap:8px; border:1px solid var(--line); background:var(--surface-soft,#f8f9f5); border-radius:12px; padding:16px; min-width:0; }
.task-customer-association > strong { overflow-wrap:anywhere; }
.task-customer-association p { margin:0; }
.task-customer-association .record-actions { flex-wrap:wrap; }
.task-customer-association .btn { min-height:44px; white-space:normal; }
.customer-lookup-results { --hubspot-columns:1; grid-template-columns:repeat(var(--hubspot-columns),minmax(0,1fr)); }
@media (min-width:900px) { .customer-lookup-results { --hubspot-columns:2; } }
@media (min-width:1400px) { .customer-lookup-results { --hubspot-columns:3; } }
@media (max-width:600px) {
  .customer-lookup-controls { align-items:stretch; }
  .customer-lookup-controls .form-field { flex-basis:100%; }
  .customer-lookup-controls .btn { flex:1; }
  .hubspot-mode-tabs .tab { flex:1 1 150px; }
}
.hubspot-review-tabs { grid-column:1/-1; }
.hubspot-pagination { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:16px; margin:20px 0; }
.hubspot-pagination .btn { min-height:44px; }
.hubspot-review-control { display:flex; align-items:center; flex-wrap:wrap; gap:8px; border-top:1px solid var(--line); padding-top:12px; margin-top:12px; }
.hubspot-review-control .btn { min-height:44px; }
.hubspot-review-control p { margin:0; width:100%; }
.hubspot-review-note { font-size:10px; }
.task-customer-association { grid-column:1/-1; }
.hubspot-toolbar > .tabs { grid-column:1/-1; }
@media (min-width:1100px) {
  .hubspot-toolbar { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
  .hubspot-toolbar > .tabs,.hubspot-toolbar > .search,.hubspot-toolbar > .hubspot-focus-field,.hubspot-toolbar > .hubspot-priority-field { grid-column:span 2; }
}

/* 0.5: compact company tasks, explicit date precision, existing-account assignment. */
.company-task-toolbar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 25px; align-items:end; }
.company-task-toolbar > .tabs,.company-task-search { grid-column:span 2; }
.company-task-toolbar > .tabs { flex-wrap:wrap; }
.company-task-toolbar .tab { min-height:44px; white-space:normal; }
.company-task-search { max-width:none; min-width:0; width:100%; }
.company-task-toolbar .form-field { gap:5px; }
.company-task-toolbar .form-field label { color:var(--muted); }
.company-task-heading { margin-bottom:17px; }
.company-task-heading p { font-size:12px; max-width:none; }
.company-task-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:15px; }
.company-task-list > .empty-state { grid-column:1/-1; }
.company-task-card { min-width:0; padding:18px 19px 0; }
.company-task-card .task-title { margin:10px 0 6px; font-size:16px; font-weight:600; line-height:1.9; }
.company-task-card .task-top { align-items:flex-start; flex-wrap:wrap; gap:8px; }
.company-task-card .task-badges { justify-content:flex-start; }
.company-task-card .badge { font-size:10px; padding:3px 8px; }
.company-task-card .task-type-badge { background:var(--gold-pale); color:var(--gold-dark); max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.company-task-customer { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.company-task-card .task-metadata { padding:10px 0 12px; align-items:flex-start; gap:4px 14px; }
.company-task-card .due-date,.company-task-assignee,.company-task-department { font-size:11px; line-height:1.9; color:#68735f; overflow-wrap:anywhere; }
.company-task-card .due-date.overdue { color:var(--red); }
.company-task-card .due-date { width:100%; }
.company-task-notes { font-size:12px; line-height:1.95; padding:10px 12px; border-radius:7px; background:var(--paper); white-space:pre-wrap; overflow-wrap:anywhere; margin-bottom:11px; }
.company-task-completed { font-size:11px; color:#617254; margin-bottom:10px; }
.company-task-details { border-top:1px solid var(--line); padding:0; }
.company-task-details > summary { min-height:40px; display:list-item; padding:9px 0; font-size:11px; cursor:pointer; }
.company-task-details > p { font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; margin:4px 0 12px; }
.company-task-details > .source-link { display:inline-block; margin-bottom:10px; }
.company-task-details > .context-label { display:block; margin-top:8px; }
.company-task-details .company-task-provenance { font-size:10px; color:var(--muted); margin-top:10px; }
.company-task-card .task-footer { align-items:flex-start; flex-wrap:wrap; gap:5px 12px; padding:10px 0 12px; }
.company-task-card .record-id { font-size:10px; padding-top:10px; }
.company-task-card .record-actions { margin-inline-start:auto; gap:5px 9px; }
.company-task-card .record-actions .btn { min-height:40px; font-size:11px; }
.company-task-card.is-critical,.company-task-card.is-critical.is-done { border-color:#e4c2bc; border-inline-start-color:var(--red); background:#fffaf8; }
.company-task-card.is-critical .company-task-notes { background:#fbefec; }
.company-task-pagination { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:15px; margin:24px 0 13px; }
.company-task-pagination .btn { min-height:44px; }
.company-task-footnote { font-size:11px; color:var(--muted); text-align:center; line-height:1.9; }
.company-task-form-details { grid-column:1/-1; border-top:1px solid var(--line); margin-top:3px; }
.company-task-form-details > summary { cursor:pointer; font-size:12px; min-height:44px; padding:12px 0; }
.company-task-form-details[open] > summary { margin-bottom:10px; }
.company-task-history { list-style:none; padding:0; margin:0; display:grid; gap:14px; }
.company-task-history > li { padding:12px 16px; border-inline-start:3px solid var(--gold); background:var(--paper); border-radius:6px; }
.company-task-history p { margin:5px 0; overflow-wrap:anywhere; }
.task-add-type { align-self:flex-start; min-height:36px; }
@media (min-width:1700px) { .company-task-list { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:1000px) { .company-task-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); } .company-task-toolbar > .tabs,.company-task-search { grid-column:1/-1; } }
@media (max-width:800px) { .company-task-list { grid-template-columns:minmax(0,1fr); } }
@media (max-width:520px) {
  .company-task-toolbar { gap:12px; }
  .company-task-toolbar .tab { flex:1 1 100px; font-size:11px; }
  .company-task-card { padding:15px 15px 0; }
  .company-task-card .record-actions { width:100%; margin-inline-start:0; }
  .company-task-card .record-actions .btn { min-height:44px; }
  .company-task-heading { flex-wrap:wrap; }
  .company-task-toolbar .form-field select { padding-inline:7px; font-size:11px; }
}
@media print { .company-task-toolbar,.company-task-pagination { display:none!important; } .company-task-list { display:block; } .company-task-card { break-inside:avoid; margin-bottom:12px; } }

/* 0.6 samples: evidence-first compact ledger, preserving the ivory/gold RTL shell. */
.samples-tabs { margin-bottom:16px; flex-wrap:wrap; }
.samples-filters { display:grid; grid-template-columns:repeat(4,minmax(135px,1fr)); gap:10px 12px; padding:16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--white); }
.samples-filters .form-field { gap:4px; }
.samples-filter-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:end; }
.samples-filter-client { grid-column:1/-1; }
.samples-filter-note { margin:9px 3px 17px; }
.sample-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.sample-stat { display:flex; gap:12px; align-items:center; padding:13px 16px; border:1px solid var(--line); border-radius:12px; background:var(--white); }
.sample-stat strong { color:var(--gold-dark); font-size:24px; font-weight:600; }
.sample-stat span { color:var(--muted); font-size:12px; }
.sample-batches,.sample-supplier-list { display:grid; gap:12px; }
.sample-batch-card { padding:18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--white); box-shadow:var(--shadow); }
.sample-batch-heading { display:flex; justify-content:space-between; align-items:start; gap:10px; margin-bottom:12px; }
.sample-batch-heading .badge { max-width:50%; white-space:normal; text-align:center; }
.sample-record { display:grid; gap:9px; margin:8px 0 12px; }
.sample-record>.badge { justify-self:start; white-space:normal; }
.sample-events { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.sample-event { display:grid; gap:3px; border-inline-start:2px solid var(--line); padding:7px 10px; background:var(--paper); border-radius:6px; }
.sample-event.recorded { border-inline-start-color:var(--gold); background:var(--gold-pale); }
.sample-event>span { font-size:12px; }
.sample-evidence,.sample-note { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; }
.sample-item-list { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.sample-item { display:grid; gap:3px; border:1px solid var(--line); padding:10px; border-radius:8px; overflow-wrap:anywhere; }
.sample-item .badge { justify-self:start; white-space:normal; }
.sample-fragrance { font-size:12px; color:var(--gold-dark); }
.sample-detail-actions { display:flex; gap:8px; flex-wrap:wrap; margin:16px 0; }
.sample-history { border-top:1px solid var(--line); padding-top:14px; }
.sample-history-entry { margin-top:10px; padding:12px; border:1px solid var(--line); border-radius:10px; }
.sample-history-entry>summary { cursor:pointer; font-weight:600; color:var(--gold-dark); }
.sample-history-entry>p { margin-top:8px; }
.sample-supplier { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--white); }
.sample-supplier>div { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sample-dialog { width:min(960px,calc(100vw - 32px)); }
.sample-association { padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--gold-pale); margin-bottom:14px; }
.sample-association button { margin-top:9px; }
.sample-event-editor { border:1px solid var(--line); border-radius:10px; padding:12px; margin:14px 0; }
.sample-event-editor>.form-field { display:flex; flex-direction:row-reverse; justify-content:end; align-items:center; gap:9px; }
.sample-event-editor input[type=checkbox] { width:18px; height:18px; accent-color:var(--gold); }
.sample-event-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.sample-event-fields>.form-field:last-child { grid-column:1/-1; }
.sample-items-editor { margin:16px 0; }
.sample-item-editors { display:grid; gap:12px; margin:12px 0; }
.sample-item-editor { min-width:0; padding:12px; border:1px solid var(--line); border-radius:10px; }
.sample-item-editor legend { padding:0 6px; color:var(--gold-dark); font-weight:600; }
.sample-item-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.sample-line-receipt-note { margin-top:10px; }
.sample-dialog [hidden],.samples-filters [hidden] { display:none!important; }
@media(max-width:1000px) {
  .samples-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sample-stats { gap:8px; }
  .sample-stat { flex-direction:column; align-items:start; gap:2px; padding:12px; }
}
@media(max-width:650px) {
  .sample-batch-heading { flex-direction:column; }
  .sample-batch-heading .badge { max-width:100%; }
  .sample-events,.sample-item-list,.sample-event-fields,.sample-item-grid { grid-template-columns:1fr; }
  .sample-stats { grid-template-columns:1fr; }
  .sample-stat { flex-direction:row; align-items:center; gap:12px; }
  .sample-dialog { width:calc(100vw - 16px); }
  .sample-supplier { align-items:start; }
  .samples-filter-actions { grid-column:1/-1; }
}
@media(max-width:380px) { .samples-filters { grid-template-columns:1fr; } }

/* 0.7: draft-only employee permission workspace. The approved ivory/gold shell stays intact. */
.sidebar { overflow-y:auto; }
.sidebar-backdrop { display:none; }
.permission-boundary { border:1px solid #e4d6b9; background:var(--gold-pale); padding:22px 24px; border-radius:var(--radius); margin-bottom:20px; }
.permission-boundary h2 { margin:8px 0 3px; }
.permission-toolbar,.permission-directory-summary,.permission-form-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.permission-toolbar { margin-bottom:12px; }
.permission-directory-summary { margin:12px 0; }
.permission-status:empty { display:none; }
.permission-status { color:var(--gold-dark); margin:10px 0; }
.permission-page-error { padding:14px; margin:12px 0; background:var(--red-pale); border-radius:10px; }
.permission-selector { max-width:650px; margin-bottom:22px; }
.permission-layout { display:grid; grid-template-columns:minmax(240px,.82fr) minmax(360px,1.6fr); align-items:start; gap:22px; }
.permission-context,.permission-draft-form { background:var(--white); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:24px; min-width:0; }
.permission-context { display:grid; gap:16px; }
.permission-context p,.permission-draft-form p { overflow-wrap:anywhere; }
.permission-employee-heading,.permission-draft-heading { display:flex; align-items:center; gap:10px; justify-content:space-between; flex-wrap:wrap; }
.permission-effective,.permission-mapping { border-top:1px solid var(--line); padding-top:16px; }
.permission-effective .badge,.permission-mapping .badge { margin:6px 0 10px; }
.permission-effective p+p,.permission-mapping p+p { margin-top:7px; }
.permission-draft-heading { margin-bottom:20px; }
.permission-capabilities { border:0; padding:0; margin:20px 0 12px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; min-width:0; }
.permission-capabilities legend { font-weight:600; margin-bottom:10px; }
.permission-capability { display:flex; gap:12px; padding:14px; border:1px solid var(--line); border-radius:10px; cursor:pointer; align-items:flex-start; min-width:0; }
.permission-capability:has(input:checked) { border-color:var(--gold); background:#fcfaf5; }
.permission-capability input { flex:0 0 20px; width:20px; height:20px; margin:4px 0 0; accent-color:var(--gold-dark); }
.permission-capability input:disabled { cursor:not-allowed; }
.permission-capability strong { display:block; font-size:14px; }
.permission-capability .small { font-size:12px; margin-top:4px; }
.permission-validation:empty { display:none; }
.permission-dependency { color:#8c4f20; background:#fff5e7; border-radius:9px; padding:12px 14px; font-size:13px; margin:10px 0; }
.permission-form-actions { margin-top:22px; border-top:1px solid var(--line); padding-top:18px; }
.permission-dirty { color:var(--muted); font-size:12px; margin-top:10px; }
.permission-latest { margin-top:18px; padding:18px; border:1px dashed var(--gold); border-radius:10px; background:var(--gold-pale); }
.permission-latest p { margin:8px 0; }
.permission-departments { border:1px solid var(--line); border-radius:12px; background:white; padding:16px 20px; margin:22px 0 10px; }
.permission-departments summary { cursor:pointer; font-weight:600; }
.permission-department-list { margin-top:10px; }
.permission-department-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; border-top:1px solid var(--line); padding:10px 0; }
.permission-department-row .btn { margin-inline-start:auto; }
.permission-empty { margin:14px 0 20px; padding:38px 24px; border:1px dashed var(--line); border-radius:var(--radius); background:#fff; }
.permission-directory-dialog .dialog-body > .info-note { margin:0; }
@media(max-width:1150px) { .permission-layout { grid-template-columns:minmax(0,1fr); } .permission-context { grid-template-columns:repeat(2,minmax(0,1fr)); } .permission-employee-heading,.permission-context > p,.permission-context > .btn { grid-column:1/-1; } }
@media(max-width:800px) { .menu-open .sidebar-backdrop { display:block; position:fixed; inset:0; border:0; background:transparent; z-index:16; cursor:default; } }
@media(max-width:570px) { .permission-context { grid-template-columns:minmax(0,1fr); } .permission-capabilities { grid-template-columns:minmax(0,1fr); } .permission-context,.permission-draft-form,.permission-boundary { padding:18px; } .permission-toolbar .btn { flex:1 1 auto; } .permission-form-actions .btn { width:100%; min-height:44px; } .permission-selector select { max-width:100%; } }
@media print { .permission-toolbar,.permission-form-actions,.permission-context > .btn { display:none!important; } .permission-layout { display:block; } .permission-context,.permission-draft-form { box-shadow:none; margin-bottom:15px; break-inside:avoid; } }
