/* Canonical Navis component styles. Other clients may bundle an exact pinned
   export; host styles own layout, not a second set of tokens and controls. */
:root {
  --web-font-family: 'DM Sans', Inter, system-ui, sans-serif;
  --web-ink: #202a3d;
  --web-muted: #687188;
  --web-border: #dfe4ef;
  --web-surface: #ffffff;
  --web-canvas: #f6f7fb;
  --web-surface-subtle: #f4f6fc;
  --web-primary: #315bea;
  --web-primary-hover: #2449c7;
  --web-on-primary: #ffffff;
  --web-success: #267451;
  --web-warning: #815a15;
  --web-danger: #a33c3c;
  --web-danger-action: #a33c3c;
  --web-radius: 10px;
  --web-radius-control: 8px;
  --web-focus-color: #dfad37;
  --web-control-border: #cbd2df;
  --web-secondary-surface: #ffffff;
  --web-secondary-border: #cbd3e2;
  --web-secondary-ink: #42506a;
  --web-secondary-hover: #f3f6fb;
  --web-danger-hover: #842e2e;
  --web-success-surface: #f2faf6;
  --web-warning-surface: #fff8ee;
  --web-danger-surface: #fff3f3;
  --web-neutral-surface: #edf0f4;
  --web-readonly-surface: #f2f4f7;
  --web-readonly-ink: #536078;
  --web-selection-ink: #2449c7;
  --web-selection-surface: #edf2ff;
  --web-selection-border: #315bea;
}

/* Hosts opt into a system, light or dark scheme; one semantic palette serves all. */
.web-theme-system { color-scheme: light dark; }
.web-theme-light { color-scheme: light; }
.web-theme-dark { color-scheme: dark; }
:is(.web-theme-system, .web-theme-light, .web-theme-dark) {
  --web-ink: light-dark(#202a3d, #e8edf8);
  --web-muted: light-dark(#687188, #b6c3d9);
  --web-border: light-dark(#dfe4ef, #46536a);
  --web-surface: light-dark(#ffffff, #1e2b3e);
  --web-canvas: light-dark(#f6f7fb, #172130);
  --web-surface-subtle: light-dark(#f4f6fc, #253248);
  --web-control-border: light-dark(#8792a6, #7787a0);
  --web-secondary-surface: light-dark(#ffffff, #253248);
  --web-secondary-border: light-dark(#8792a6, #7787a0);
  --web-secondary-ink: light-dark(#42506a, #e8edf8);
  --web-secondary-hover: light-dark(#f3f6fb, #303e56);
  --web-success: light-dark(#267451, #a3d9bc);
  --web-warning: light-dark(#815a15, #f5d38a);
  --web-danger: light-dark(#a33c3c, #ffb6b6);
  --web-success-surface: light-dark(#f2faf6, #163a2c);
  --web-warning-surface: light-dark(#fff8ee, #3d321d);
  --web-danger-surface: light-dark(#fff3f3, #42272e);
  --web-neutral-surface: light-dark(#edf0f4, #253248);
  --web-readonly-surface: light-dark(#f2f4f7, #253248);
  --web-readonly-ink: light-dark(#536078, #b6c3d9);
  --web-focus-color: light-dark(#916809, #dfad37);
  --web-selection-ink: light-dark(#2449c7, #a8bbff);
  --web-selection-surface: light-dark(#edf2ff, #25355c);
  --web-selection-border: light-dark(#315bea, #85a0ff);
  --web-link: light-dark(#2449c7, #a8bbff);
}

.document-classification { display: inline-block; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; font-size: .76rem; font-weight: 700; line-height: 1.4; }
.document-classification[data-classification="restricted"] { color: #fff; background: #a33c3c; border-color: #a33c3c; }
.document-classification[data-classification="confidential"] { color: #71500a; background: #fff4d8; border-color: #c7a244; }
.document-classification[data-classification="internal"] { color: #2449c7; background: #edf2ff; border-color: #abbcf4; }
.document-classification[data-classification="public"] { color: #166a45; background: #eaf6ef; border-color: #92c8aa; }
.document-classification[data-classification="unclassified"] { color: #465166; background: #edf0f4; border-color: #bbc3d0; }

[data-deployment-environment][hidden] { display: none; }

/* Status badges keep semantic variants across workspace, administration and privacy. */
.web-component-status, .status, .invitation-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--web-border);
  border-radius: 999px;
  color: var(--web-muted);
  background: var(--web-surface);
  font-size: .76rem;
  font-weight: 700;
}
:is(.web-component-status[data-tone="success"], .status.success, .status.enabled, .status.completed, .status.available, .invitation-status.accepted) {
  color: var(--web-success);
  background: var(--web-success-surface);
}
:is(.web-component-status[data-tone="warning"], .status.warning, .status.pending, .status.deletion_pending, .invitation-status:not(.accepted):not(.revoked):not(.expired)) {
  color: var(--web-warning);
  background: var(--web-warning-surface);
}
:is(.web-component-status[data-tone="danger"], .status.blocked, .status.contained, .status.partially_completed, .invitation-status.expired) {
  color: var(--web-danger);
  background: var(--web-danger-surface);
}
:is(.status.neutral, .status.disabled, .invitation-status.revoked) {
  color: var(--web-muted);
  background: var(--web-neutral-surface);
}

/* Feedback and fields have one default appearance; context can add layout. */
.web-feedback, .message {
  min-height: 20px;
  color: var(--web-success);
  font-size: .8rem;
}
:is(.web-feedback, .message)[data-tone="danger"] { color: var(--web-danger); }
:is(.web-feedback, .message)[data-tone="warning"] { color: var(--web-warning); }
:is(.web-feedback, .message)[data-tone="neutral"] { color: var(--web-muted); }
.web-field,
:where(.entity-form, .entity-detail-grid, #entity-action-fields, .entity-invite-form, .invitation-form, .invitation-actions, .login-card, .login, .dialog-shell) :is(input:not([type="checkbox"]):not([type="radio"]), select),
.secure-send-policy-form input[type="number"] {
  box-sizing: border-box;
  width: 100%;
  min-inline-size: 0;
  border: 1px solid var(--web-control-border);
  border-radius: var(--web-radius-control);
  padding: 10px;
  background: var(--web-surface);
  color: var(--web-ink);
  font: inherit;
}
:where(.entity-detail-grid) input[readonly],
:is(.web-theme-system, .web-theme-light, .web-theme-dark) .web-field[readonly] { background: var(--web-readonly-surface); color: var(--web-readonly-ink); }
.web-check { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--web-primary); }

/* Dialogs share chrome and spacing, while each workflow owns its content. */
dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(520px, calc(100% - 28px));
  box-shadow: 0 28px 80px rgba(17, 28, 52, .28);
}
dialog::backdrop { background: rgba(15, 24, 43, .55); backdrop-filter: blur(2px); }
.dialog-shell, dialog form { padding: 24px; }
:is(.dialog-heading, .dialog-head) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
:is(.dialog-heading, .dialog-head) h2, .dialog-shell > h2 { margin: 0; }
:is(.dialog-heading, .dialog-head) button {
  border: 0;
  background: transparent;
  color: var(--web-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
@media (max-width: 480px) {
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions > :is(button, a) { width: 100%; }
  .dialog-shell, dialog form { padding: 20px; }
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--web-focus-color);
  outline-offset: 2px;
}

/* One action language across the workspace, workbench, and administration. */
button.primary, button.secondary, button.danger,
a.primary, a.secondary, a.danger {
  border: 1px solid transparent;
  border-radius: var(--web-radius-control);
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button.primary, a.primary { background: var(--web-primary); color: var(--web-on-primary); }
button.secondary, a.secondary { background: var(--web-secondary-surface); border-color: var(--web-secondary-border); color: var(--web-secondary-ink); }
button.danger, a.danger { background: var(--web-danger-action); color: var(--web-on-primary); }
button.primary:hover, a.primary:hover { background: var(--web-primary-hover); }
button.secondary:hover, a.secondary:hover { background: var(--web-secondary-hover); }
button.danger:hover, a.danger:hover { background: var(--web-danger-hover); }
button.primary:active, button.secondary:active, button.danger:active { transform: translateY(1px); }
button:disabled, button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
  button.primary, button.secondary, button.danger,
  a.primary, a.secondary, a.danger { transition: none; }
}

/* Portable section navigation and inbox surfaces; hosts provide their content. */
.web-section-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
.web-section-nav :is([aria-current="true"], [aria-current="page"]) {
  color: var(--web-selection-ink);
  background: var(--web-selection-surface);
  border-color: var(--web-selection-border);
}
.web-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; padding: 2px 7px; border-radius: 999px; color: var(--web-selection-ink); background: var(--web-selection-surface); font-size: .8rem; font-weight: 700; }
.web-panel, .web-notification { padding: 16px; border: 1px solid var(--web-border); border-radius: var(--web-radius); color: var(--web-ink); background: var(--web-surface); }
.web-notification { margin-block: 12px; overflow-wrap: anywhere; }
.web-notification[data-unread="true"] { border-inline-start: 4px solid var(--web-selection-border); }
.web-notification[data-active="true"] { outline: 2px solid var(--web-focus-color); outline-offset: 3px; }
.web-notification > p { color: var(--web-muted); }
.web-notification > .web-component-status { margin-inline-start: 8px; }
.web-notification button { margin-inline-end: 8px; margin-block-start: 8px; }

/* Opt-in desktop density. Content and enlarged text can still grow controls. */
.web-density-compact :is(button.primary, button.secondary, button.danger, a.primary, a.secondary, a.danger) { min-block-size: 34px; padding: 7px 10px; }
.web-density-compact .web-field { min-block-size: 34px; padding: 6px 10px; }
.web-density-compact .web-section-nav { gap: 6px; margin-block: 10px; }
.web-density-compact .web-section-nav button { min-block-size: 32px; padding-block: 6px; }
.web-density-compact :is(.web-panel, .web-notification) { padding: 12px; }
.web-density-compact :is(.web-feedback, .web-count, .web-component-status) { font-size: max(12px, .923rem); }

/* Opt-in Unified desktop appearance; the Portal's default controls stay stable. */
.web-desktop { --web-font-family: system-ui, sans-serif; --web-secondary-surface: var(--web-surface); --web-secondary-ink: var(--web-ink); --web-muted: light-dark(#536078, #b6c3d9); }
@media (prefers-color-scheme: dark) { .web-desktop.web-theme-system { --web-muted: #b6c3d9; } }
.web-desktop :is(h1, h2, h3, strong, legend) { font-weight: 500; }
.web-desktop :is(button.primary, button.secondary, button.danger, a.primary, a.secondary, a.danger) { min-block-size: 32px; padding: 5px 10px; border-radius: 7px; font-weight: 400; line-height: 1.45; }
.web-desktop :is(button.primary, a.primary) { min-inline-size: 78px; font-weight: 500; }
.web-desktop .web-field { padding: 6px 9px; border-radius: 6px; }
.web-desktop .web-check { width: 13px; height: 13px; }
.web-desktop .web-panel { padding: 11px 12px; border-radius: 8px; }
.web-desktop .web-count { min-inline-size: 19px; padding: 1px 5px; font-weight: 400; }
.web-desktop :is(button.web-quiet, a.web-quiet) { background: transparent; border-color: transparent; color: var(--web-ink); }
.web-desktop :is(button.web-quiet, a.web-quiet):hover { background: var(--web-secondary-hover); }
.web-desktop .web-tabs { gap: 16px; margin: 0; }
.web-desktop .web-tabs button { display: inline-flex; align-items: center; gap: 6px; min-block-size: 34px; padding: 6px 0 8px; border: 0; border-block-end: 2px solid transparent; border-radius: 0; background: transparent; color: var(--web-muted); }
.web-desktop .web-tabs :is([aria-current="true"], [aria-current="page"]) { border-block-end-color: var(--web-selection-ink); color: var(--web-ink); font-weight: 500; }
.web-desktop .web-tabs button:active { transform: none; }
.web-icon { inline-size: 16px; block-size: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.web-avatar { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; inline-size: 28px; block-size: 28px; flex-shrink: 0; border: 1px solid var(--web-border); border-radius: 50%; color: var(--web-muted); background: var(--web-surface); }
.web-desktop button.web-person-action { display: flex; align-items: center; gap: 8px; inline-size: 100%; min-block-size: 40px; padding: 4px 0; border: 0; text-align: start; }
.web-person-action bdi { min-inline-size: 0; overflow-wrap: anywhere; }
.web-person-action > span:last-child { margin-inline-start: auto; flex-shrink: 0; }
.web-visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (pointer: coarse) {
  .web-desktop :is(button.primary, button.secondary, button.danger, a.primary, a.secondary, a.danger) { min-block-size: 44px; }
  .web-desktop .web-field { min-block-size: 44px; font-size: max(16px, 1rem); }
}

/* Scheme-aware chrome and a compact, labeled host preference control. */
:is(.web-theme-system, .web-theme-light, .web-theme-dark) dialog { color: var(--web-ink); background: var(--web-surface); }
.appearance-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-inline-size: 0; }
.appearance-control { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-inline-size: 0; color: var(--web-ink); font-size: .8rem; }
.appearance-control .web-field { inline-size: auto; max-inline-size: 100%; min-block-size: 32px; padding: 5px 8px; font: inherit; }
.appearance-picker { position: relative; }
.appearance-trigger { display: grid; place-items: center; inline-size: 40px; block-size: 40px; padding: 0; color: var(--web-ink); background: var(--web-surface); border: 1px solid var(--web-control-border); border-radius: 9px; cursor: pointer; }
.appearance-trigger svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.appearance-menu { position: absolute; z-index: 6; inset-block-start: calc(100% + 6px); inset-inline-start: 0; min-inline-size: 8rem; padding: 4px; border: 1px solid var(--web-control-border); border-radius: 9px; color: var(--web-ink); background: var(--web-surface); box-shadow: var(--shadow); }
.appearance-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; inline-size: 100%; min-block-size: 36px; padding: 6px 8px; border: 0; border-radius: 5px; color: inherit; background: transparent; font: inherit; text-align: start; white-space: nowrap; cursor: pointer; }
.appearance-menu button:is(:hover, :focus-visible), .appearance-trigger:is(:hover, [aria-expanded="true"]) { background: var(--web-surface-subtle); }
.appearance-menu button[aria-checked="true"]::after { content: '✓' / ''; }
.appearance-standalone { padding: 12px; }
@media (max-width: 480px) { .signin-header { flex-wrap: wrap; gap: 12px; } .appearance-tools { max-inline-size: 100%; } }

/* Account controls shared by the workspace and platform administration. */
.account .account-dropdown{position:relative;display:block;min-width:0}
.account-toggle{display:flex;align-items:center;gap:9px;max-width:100%;min-height:44px;border:0;border-radius:9px;padding:4px 6px;background:transparent;color:inherit;text-align:start;cursor:pointer;font:inherit}
.account-toggle[hidden],.account .account-menu[hidden]{display:none}
.account-toggle:hover,.account-toggle[aria-expanded="true"]{background:light-dark(#f6f7fb,var(--web-surface-subtle))}
.account-details{display:flex;flex-direction:column;min-width:0}
.account-details strong{overflow-wrap:anywhere}
.account-chevron{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.account .account-menu{position:absolute;inset-block-start:calc(100% + 6px);inset-inline-end:0;display:block;min-width:160px;max-width:calc(100vw - 28px);padding:6px;border:1px solid var(--border);border-radius:10px;background:light-dark(#fff,var(--web-surface));box-shadow:var(--shadow);z-index:6}
.account-menu button{width:100%;min-height:44px;border:0;border-radius:7px;padding:10px 12px;background:transparent;color:inherit;text-align:start;cursor:pointer}
.account-menu button:hover{background:light-dark(#f6f7fb,var(--web-surface-subtle))}
