@font-face {
  font-family: "agGridQuartz";
  src: url("/vendor/ag-grid/ag-grid-quartz-icons.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "LDC DSEG7";
  src: url("/assets/fonts/dseg/DSEG7Classic-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color: #e6edf3;
  background: #0d1117;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #0d1117;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  background: radial-gradient(
    circle at 50% 30%,
    #172635 0,
    #0d1117 48%,
    #080b0f 100%
  );
}
.login-card {
  width: min(430px, calc(100vw - 32px));
  border: 1px solid #30363d;
  border-radius: 10px;
  background: #161b22;
  padding: 28px;
  box-shadow: 0 28px 90px #000a;
}
.login-card h1 {
  margin: 8px 0;
  font-size: 1.6rem;
}
.login-card p {
  color: #9ba7b1;
  line-height: 1.45;
}
.login-card form {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}
.login-card details {
  margin-top: 18px;
  border-top: 1px solid #30363d;
  padding-top: 14px;
}
.login-card summary {
  color: #d5b267;
  cursor: pointer;
}
label {
  display: grid;
  gap: 4px;
  color: #aeb8c1;
  font-size: 0.72rem;
}
input,
select,
textarea {
  border: 1px solid #3b4650;
  border-radius: 5px;
  outline: 0;
  background: #0d1117;
  padding: 7px 9px;
  color: #e6edf3;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px #58a6ff20;
}
button {
  border: 1px solid #3b4650;
  border-radius: 5px;
  background: #21262d;
  padding: 6px 9px;
  cursor: pointer;
}
button:hover:not(:disabled),
button:focus-visible {
  border-color: #58a6ff;
  color: #9dccf5;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button.primary {
  border-color: #2475b8;
  background: #1f6feb;
  color: #fff;
  font-weight: 700;
}
button.danger {
  border-color: #91444a;
  background: #50272c;
  color: #ffb4b9;
}
.kicker {
  color: #58a6ff;
  font:
    800 0.6rem/1.2 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 0.1em;
}

.global-warning-region:empty {
  display: none;
}
.status-banner {
  position: fixed;
  z-index: 15000;
  top: 34px;
  left: 50%;
  width: min(920px, calc(100vw - 24px));
  min-height: 30px;
  transform: translateX(-50%);
  border: 1px solid #ffffff28;
  border-radius: 0 0 5px 5px;
  padding: 6px 14px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 9px 30px #0008;
}
#emergency-banner {
  top: 66px;
}
.status-banner.critical {
  background: #9c252b;
}
.status-banner.emergency {
  background: #815612;
}
.status-banner button {
  margin-left: 8px;
  padding: 2px 7px;
}

.workbench {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}
.workbench-header {
  display: flex;
  z-index: 9000;
  flex: 0 0 34px;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #30363d;
  background: #161b22;
  padding: 0 7px;
}
.header-start,
.header-actions,
.header-region,
.header-contributions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}
.header-contributions:empty {
  display: none;
}
.header-clock-region {
  flex: 0 0 auto;
}
.header-clock {
  display: grid;
  min-width: 68px;
  justify-items: end;
  color: #dbe5ec;
  font-family:
    ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  line-height: 1;
  white-space: nowrap;
}
.header-clock-date {
  color: #7f8b95;
  font-size: 0.49rem;
}
.header-clock-time {
  margin-top: 2px;
  font-family: "LDC DSEG7", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.015em;
}
.brand-button {
  display: grid;
  width: 26px;
  height: 25px;
  place-items: center;
  padding: 0;
  border-color: #3b4650;
  color: #58a6ff;
  font:
    800 0.6rem/1 ui-monospace,
    monospace;
}
.brand-name {
  color: #dbe5ec;
  font-size: 0.72rem;
  font-weight: 750;
}
.brand-divider {
  width: 1px;
  height: 15px;
  background: #3b4650;
}
.brand-subtitle {
  color: #7f8b95;
  font:
    0.58rem/1 ui-monospace,
    monospace;
}
.layout-message {
  overflow: hidden;
  max-width: 190px;
  margin-left: 4px;
  color: #7f8b95;
  font:
    0.58rem/1 ui-monospace,
    monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-live-status {
  display: block;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 50%;
  background: #8b949e;
  color: transparent;
  font-size: 0;
}
.app-live-status[data-status="connected"] {
  background: #45d181;
  box-shadow: 0 0 0 3px #45d18120;
}
.app-live-status[data-status="connecting"],
.app-live-status[data-status="degraded"] {
  background: #e9b949;
}
.app-live-status[data-status="offline"],
.app-live-status[data-status="revoked"] {
  background: #ff6b72;
}
.save-state {
  overflow: hidden;
  max-width: 160px;
  color: #7f8b95;
  font:
    0.56rem/1 ui-monospace,
    monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-actions > button,
.user-control > button {
  padding: 4px 7px;
  font-size: 0.64rem;
}
.tenant-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.57rem;
}
.tenant-control select {
  max-width: 190px;
  height: 25px;
  padding: 2px 6px;
  font-size: 0.64rem;
}
.app-menu-root,
.user-control,
.app-menu-group {
  position: relative;
}
.app-menu-popover,
.app-submenu,
.user-menu {
  position: absolute;
  z-index: 12000;
  top: calc(100% + 5px);
  min-width: 232px;
  border: 1px solid #30363d;
  border-radius: 5px;
  background: #161b22fa;
  padding: 4px;
  box-shadow: 0 18px 48px #0009;
}
.app-menu-popover {
  left: 0;
}
.app-submenu {
  top: -5px;
  left: calc(100% + 3px);
}
.user-menu {
  right: 0;
  min-width: 130px;
}
.app-menu-popover button,
.app-submenu button,
.user-menu button {
  display: flex;
  width: 100%;
  min-height: 26px;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 5px 7px;
  font-size: 0.67rem;
  text-align: left;
  white-space: nowrap;
}
.app-menu-popover button:hover,
.app-menu-popover button:focus-visible,
.app-submenu button:hover,
.app-submenu button:focus-visible,
.user-menu button:hover {
  outline: 0;
  background: #252c35;
  color: #dce7f0;
}
.menu-icon {
  display: inline-grid;
  width: 15px;
  place-items: center;
  color: #58a6ff;
}
.menu-chevron {
  margin-left: auto;
  color: #7f8b95;
  font-size: 0.85rem;
}
.app-menu-separator {
  height: 1px;
  margin: 4px 5px;
  background: #30363d;
}
.layout-header-actions {
  display: flex;
  gap: 4px;
}
.panel-title-contributions {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 3px;
  padding-right: 3px;
}
.panel-title-contributions:empty {
  display: none;
}
.layout-header-actions button,
.header-contributions button {
  min-height: 24px;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.59rem;
}

#dockview {
  flex: 1 1 auto;
  min-height: 0;
}
.module-surface-host {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d1117;
}
.module-surface-host > * {
  width: 100%;
  height: 100%;
}
.dv-tabs-and-actions-container {
  min-height: 32px !important;
  height: 32px !important;
}
.dv-tab {
  height: 32px !important;
  font-size: 0.66rem !important;
}
.dv-content-container {
  background: #0d1117;
}
.window-shelf {
  display: flex;
  z-index: 9000;
  flex: 0 0 29px;
  min-height: 29px;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  border-top: 1px solid #30363d;
  background: #161b22;
  padding: 3px 8px;
}
.window-shelf[data-count="0"] {
  display: none;
}
.window-shelf .jsPanel-replacement {
  position: static;
  width: auto;
  min-width: 170px;
  height: 22px;
  border: 1px solid #30363d;
  border-radius: 4px;
  background: #21262d;
  color: #c9d1d9;
  box-shadow: none;
}
.window-shelf .jsPanel-title {
  overflow: hidden;
  padding: 0 7px;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workbench-window {
  overflow: hidden;
  border: 1px solid #3b4650;
  border-radius: 8px;
  background: #161b22 !important;
  box-shadow: 0 26px 75px #000c;
}
.workbench-window .jsPanel-hdr {
  border-bottom: 1px solid #30363d;
  background: #161b22 !important;
  color: #dce6ed !important;
}
.workbench-window .jsPanel-title {
  font-size: 0.72rem;
  font-variant: normal;
  font-weight: 700;
}
.workbench-window .jsPanel-content {
  background: #0d1117 !important;
  color: #e6edf3 !important;
}
.jsPanel-modal-backdrop {
  background: #010409b8 !important;
  backdrop-filter: blur(2px);
}
.window-form {
  display: grid;
  gap: 11px;
  height: 100%;
  overflow: auto;
  padding: 18px;
}
.window-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 8px;
}
.load-error {
  position: fixed;
  z-index: 30000;
  right: 18px;
  bottom: 18px;
  max-width: 420px;
  border: 1px solid #9f464d;
  border-radius: 8px;
  background: #402126;
  padding: 15px;
  color: #ffd1d4;
}
.load-error p {
  margin: 6px 0 0;
}
.diagnostic-surface,
.unavailable-surface {
  padding: 20px;
}
.diagnostic-surface h2,
.unavailable-surface h2 {
  margin: 5px 0 8px;
  font-size: 1rem;
}
.diagnostic-surface p,
.unavailable-surface p {
  color: #8b949e;
  font-size: 0.72rem;
}
.pjd-document-preview {
  min-height: 190px;
  overflow: auto;
  border: 1px solid #30363d;
  border-radius: 5px;
  background: #fff;
  color: #111;
}
.pjd-document-preview:empty::before {
  display: grid;
  min-height: 190px;
  place-items: center;
  color: #68727c;
  content: "Velg en lokal fil for trygg forhåndsvisning";
  font-size: 0.72rem;
}
.pjd-local-warning {
  margin: 0;
  color: #d5b267;
  font-size: 0.66rem;
}
.document-frame {
  width: 100%;
  min-height: 360px;
  border: 0;
}
.document-image,
.document-svg svg,
.document-tiff {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
}
.document-text {
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #111;
  font:
    0.7rem/1.45 ui-monospace,
    monospace;
  white-space: pre-wrap;
}
.error-text {
  color: #ff7b72 !important;
}

@media (max-width: 850px) {
  .brand-subtitle,
  .save-state,
  .tenant-control span {
    display: none;
  }
  .tenant-control select {
    max-width: 130px;
  }
}

/* Confirmation prompts also work when only administration is open. */
.mission-update-dialog { width: min(760px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; padding: 20px; background: #202830; color: #e3eaf0; }
.mission-update-choice { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #43505e; flex-wrap: wrap; }
.mission-update-dialog { border: 1px solid #65727e; border-radius: 8px; }
.mission-update-dialog::backdrop { background: #0008; }
.mission-update-dialog button { margin: 8px 8px 0 0; padding: 6px 10px; cursor: pointer; }
