:root {
  --ink: #17212b;
  --muted: #687681;
  --line: #dfe6e6;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --navy: #10272a;
  --navy-soft: #18383b;
  --primary: #0f746b;
  --primary-dark: #0a5d56;
  --primary-pale: #e4f3ef;
  --security: #28485e;
  --warning: #a46a15;
  --danger: #b33a42;
  --shadow: 0 12px 34px rgba(20, 42, 44, 0.08);
  --radius: 18px;
  --sidebar: 260px;
}

/* Equipment workspace and sensitive-data safeguards */
.device-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 18px;
}

.device-toolbar .search-box {
  width: min(100%, 520px);
}

.device-result-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.device-result-count strong {
  color: var(--ink);
}

.access-state {
  align-items: center;
  background: #eef2f3;
  border-radius: 999px;
  color: #52616b;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 6px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.access-state-current {
  background: #e4f3ed;
  color: #14634f;
}

.access-state-due_soon {
  background: #fff4d8;
  color: #91600e;
}

.access-state-overdue,
.access-state-missing {
  background: #fae6e7;
  color: #a3323b;
}

.access-state-unverified,
.access-state-stale {
  background: #fff0df;
  color: #985119;
}

.access-state-inactive {
  background: #edf0f1;
  color: #6c777d;
}

.device-table .passbolt-link,
.device-table td .muted {
  display: block;
  margin-top: 7px;
}

.attention-count {
  align-items: center;
  background: #fae6e7;
  border-radius: 999px;
  color: #a3323b;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 30px;
  min-width: 30px;
  padding: 4px 9px;
}

.access-watch-list {
  display: grid;
}

.access-watch-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 13px 0;
}

.access-watch-item:first-child {
  border-top: 0;
}

.access-watch-item > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.access-watch-item strong,
.access-watch-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-watch-item small {
  color: var(--muted);
  font-size: 12px;
}

.device-expand,
.copy-button,
.row-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  text-decoration: none;
}

.device-expand {
  display: block;
  margin-top: 6px;
}

.device-expand:hover,
.copy-button:hover,
.row-action:hover {
  text-decoration: underline;
}

.device-detail-row td {
  background: #f7fafb;
  padding: 0 !important;
}

.device-detail-row:hover td {
  background: #f7fafb !important;
}

.device-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.device-detail-grid > div {
  align-items: start;
  background: #f7fafb;
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 16px 18px;
}

.device-detail-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.device-detail-grid strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.device-detail-grid .copy-button {
  justify-self: start;
  text-transform: none;
}

.device-detail-notes {
  grid-column: 1 / -1;
}

.device-detail-action {
  align-items: center !important;
  grid-column: 1 / -1;
  min-height: auto !important;
}

.security-hint {
  background: #f1f6f8;
  border: 1px solid #dce8ed;
  border-left: 3px solid var(--security);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 12px 14px;
}

.security-hint strong {
  color: var(--security);
}

.field-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.field-type-badge {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-count {
  align-items: center;
  background: #f7dfe1;
  border-radius: 999px;
  color: #8d2730;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  justify-content: center;
  margin-left: auto;
  min-height: 21px;
  min-width: 21px;
  padding: 3px 6px;
}

.row-actions,
.entity-actions,
.work-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.row-actions form,
.entity-actions form,
.work-actions form {
  margin: 0;
}

.row-action-danger {
  color: var(--danger);
}

.entity-actions {
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 12px;
}

.work-actions {
  margin-top: 12px;
}

.button-danger {
  background: transparent;
  border: 1px solid #e4b7bb;
  color: var(--danger);
}

.button-danger:hover {
  background: #fae8ea;
}

.danger-zone {
  align-items: center;
  background: #fffafa;
  border: 1px solid #ecd6d8;
  border-radius: var(--radius);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 22px;
  padding: 18px 20px;
}

.danger-zone p {
  color: var(--muted);
  font-size: 13px;
  margin: 3px 0 0;
}

.archive-groups {
  display: grid;
  gap: 22px;
}

.archive-group {
  display: grid;
  gap: 0;
}

.archive-group h3 {
  margin-bottom: 8px;
}

.archive-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 0;
}

.archive-item > span {
  display: grid;
  gap: 2px;
}

.archive-item small {
  color: var(--muted);
}

.notification-tabs .active {
  background: var(--primary-pale);
  color: var(--primary-dark);
}

.notification-section + .notification-section {
  margin-top: 20px;
}

.notification-list {
  display: grid;
}

.notification-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 15px 0;
}

.notification-item:first-child {
  border-top: 0;
}

.notification-item:hover strong {
  color: var(--primary);
}

.notification-icon {
  align-items: center;
  background: #fff0df;
  border-radius: 10px;
  color: #985119;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.notification-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notification-main strong,
.notification-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-main small {
  color: var(--muted);
  font-size: 12px;
}

.service-state,
.audit-action {
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-state-overdue {
  background: #fae6e7;
  color: #a3323b;
}

.service-state-soon {
  background: #fff0df;
  color: #985119;
}

.service-state-upcoming {
  background: #fff4d8;
  color: #91600e;
}

.audit-filters {
  align-items: end;
  flex-wrap: wrap;
}

.audit-filters .search-box {
  flex: 1 1 280px;
}

.date-filter {
  width: 150px;
}

.audit-table td:first-child {
  white-space: nowrap;
}

.audit-table td:nth-child(4) strong,
.audit-table td:nth-child(4) small {
  display: block;
}

.audit-table td:nth-child(4) small {
  color: var(--muted);
  font-size: 11px;
}

.audit-action {
  background: #eef2f3;
  color: #52616b;
}

.audit-action-login_failed,
.audit-action-archive {
  background: #fae6e7;
  color: #a3323b;
}

.audit-action-credential_access,
.audit-action-credential_verify,
.audit-action-restore {
  background: #e4f3ed;
  color: #14634f;
}

.audit-table details {
  max-width: 260px;
}

.audit-table details code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.pagination {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
  padding-top: 18px;
}

.pagination span {
  color: var(--muted);
  font-size: 13px;
}

.tool-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
}

.download-list {
  display: grid;
  margin-bottom: 18px;
}

.download-list a {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 0;
}

.download-list a:first-child {
  border-top: 0;
}

.download-list strong,
.download-list small {
  grid-column: 1;
}

.download-list small {
  color: var(--muted);
}

.download-list a > span {
  color: var(--primary);
  font-size: 22px;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.import-errors {
  background: #fff1f2;
  border: 1px solid #ecc8cc;
  border-radius: 10px;
  color: #8e2d35;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.import-errors ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.team-table td:first-child strong,
.team-table td:first-child small {
  display: block;
}

.team-table td:first-child small {
  color: var(--muted);
}

.access-inline-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-check {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  gap: 6px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .device-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .device-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .device-toolbar .filter-select {
    width: 100%;
  }

  .device-detail-grid {
    grid-template-columns: 1fr;
  }

  .device-detail-notes {
    grid-column: auto;
  }

  .danger-zone,
  .archive-item,
  .notification-item {
    align-items: stretch;
  }

  .danger-zone {
    flex-direction: column;
  }

  .notification-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .notification-item .access-state,
  .notification-item .service-state {
    grid-column: 2;
    justify-self: start;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 28px 20px 20px;
  overflow-y: auto;
  color: #eaf5f2;
  background:
    radial-gradient(circle at 10% 10%, rgba(63, 152, 139, 0.16), transparent 32%),
    var(--navy);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  color: #dff7f1;
  border: 1px solid rgba(170, 229, 216, 0.3);
  border-radius: 14px;
  background: rgba(72, 155, 142, 0.2);
  font-size: 1.15rem;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #ffffff;
  font-size: 0.93rem;
  letter-spacing: 0.16em;
}

.brand small {
  margin-top: 2px;
  color: #91aaa7;
  font-size: 0.67rem;
  white-space: nowrap;
}

.main-nav {
  display: grid;
  gap: 6px;
  margin-top: 46px;
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 13px;
  color: #a9c0bc;
  border-radius: 12px;
  font-weight: 600;
  transition: 150ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(109, 189, 174, 0.14);
}

.main-nav a.active {
  box-shadow: inset 3px 0 #55b8a7;
}

.nav-icon {
  display: inline-grid;
  width: 26px;
  place-items: center;
  font-size: 1.12rem;
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(159, 217, 207, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.sidebar-note strong {
  font-size: 0.78rem;
}

.sidebar-note small {
  margin-top: 3px;
  color: #8fa7a3;
  font-size: 0.69rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #65d2a5;
  box-shadow: 0 0 0 4px rgba(101, 210, 165, 0.12);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  flex: 0 0 auto;
  color: #0e3a35;
  border-radius: 12px;
  background: #cdece5;
  font-weight: 800;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-meta strong,
.user-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  color: #fff;
  font-size: 0.76rem;
}

.user-meta small {
  color: #839d99;
  font-size: 0.67rem;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: inherit;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 104px;
  padding: 22px clamp(24px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.topbar > div:nth-child(2) {
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.mobile-menu {
  display: none;
  font-size: 1.2rem;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #8bd2c5;
}

.breadcrumb {
  color: var(--muted);
}

.page-content {
  width: min(1540px, 100%);
  margin-inline: auto;
  padding: 34px clamp(24px, 4vw, 54px) 60px;
}

.messages {
  position: fixed;
  z-index: 80;
  top: 20px;
  right: 24px;
  width: min(430px, calc(100vw - 32px));
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px 16px;
  color: #fff;
  border-radius: 13px;
  background: #284246;
  box-shadow: var(--shadow);
}

.message-success {
  background: #146b5d;
}

.message-error {
  background: #9b3740;
}

.message span {
  flex: 1;
}

.message button {
  padding: 0;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700;
  transition: 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 7px 18px rgba(15, 116, 107, 0.18);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  color: #23413e;
  border-color: #c9d7d5;
  background: #fff;
}

.button-secondary:hover {
  border-color: #8bb6af;
}

.button-security {
  color: #f3f8fa;
  background: var(--security);
}

.button-ghost {
  color: var(--muted);
  background: transparent;
}

.button-large {
  min-height: 48px;
}

.button-full {
  width: 100%;
}

.text-link {
  color: var(--primary);
  font-weight: 700;
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(20, 42, 44, 0.025);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.metric-card {
  position: relative;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-card::after {
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 90px;
  height: 90px;
  border: 16px solid #eff4f2;
  border-radius: 50%;
  content: "";
}

.metric-card.metric-accent {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(145deg, #0b695f, #195d61);
}

.metric-card.metric-accent::after {
  border-color: rgba(255, 255, 255, 0.08);
}

.metric-label,
.metric-note {
  display: block;
  color: var(--muted);
}

.metric-label {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 700;
}

.metric-card > strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 13px 0 3px;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-note {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
}

.metric-accent .metric-label,
.metric-accent .metric-note {
  color: #cbe4df;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.panel-wide {
  grid-row: span 2;
}

.company-rows {
  margin-inline: -10px;
}

.company-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 1fr) 72px 72px 90px 20px;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border-top: 1px solid #edf1f0;
  border-radius: 12px;
}

.company-row:first-child {
  border-top-color: transparent;
}

.company-row:hover {
  background: #f7faf9;
}

.company-monogram {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #205951;
  border-radius: 13px;
  background: #ddf0eb;
  font-weight: 800;
}

.company-monogram.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.company-monogram.large {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 1.5rem;
}

.company-main,
.company-stat,
.company-cell span:last-child,
.device-table td:first-child {
  min-width: 0;
}

.company-main strong,
.company-main small,
.company-stat strong,
.company-stat small,
.company-cell strong,
.company-cell small,
.device-table td:first-child strong,
.device-table td:first-child small {
  display: block;
}

.company-main small,
.company-cell small,
.device-table td:first-child small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-stat {
  text-align: center;
}

.company-stat strong {
  font-size: 1rem;
}

.company-stat small,
.company-last {
  color: var(--muted);
  font-size: 0.67rem;
}

.row-arrow,
.row-link {
  color: #6c8a85;
  font-size: 1.45rem;
}

.timeline {
  display: grid;
}

.timeline-item {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #edf1f0;
}

.timeline-item:first-child {
  border-top: 0;
}

.timeline-date {
  display: grid;
  width: 48px;
  height: 38px;
  place-items: center;
  color: #825c1d;
  border-radius: 10px;
  background: #fff4df;
  font-size: 0.72rem;
  font-weight: 800;
}

.timeline-item strong,
.timeline-item small {
  display: block;
}

.timeline-item small {
  color: var(--muted);
  font-size: 0.71rem;
}

.audit-list {
  display: grid;
  gap: 13px;
}

.audit-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.audit-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #56a99a;
  box-shadow: 0 0 0 2px #bde1da;
}

.audit-item strong,
.audit-item small {
  display: block;
}

.audit-item strong {
  font-size: 0.76rem;
  font-weight: 600;
}

.audit-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
}

.empty-state {
  padding: 45px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  padding: 20px 10px;
}

.empty-state h3 {
  margin: 8px 0 4px;
  color: var(--ink);
}

.empty-state p {
  margin-bottom: 0;
  font-size: 0.8rem;
}

.empty-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--primary);
  border-radius: 13px;
  background: var(--primary-pale);
  font-size: 1.1rem;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.search-box {
  display: flex;
  min-width: 240px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #cfdad8;
  border-radius: 11px;
  background: #fff;
}

.search-box:focus-within {
  border-color: #6ca99f;
  box-shadow: 0 0 0 3px rgba(15, 116, 107, 0.09);
}

.search-box input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-select {
  min-height: 40px;
  padding: 8px 34px 8px 12px;
  border: 1px solid #cfdad8;
  border-radius: 11px;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 11px 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf1f0;
  font-size: 0.8rem;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fafcfc;
}

.company-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 9px;
  color: #53625f;
  border-radius: 999px;
  background: #edf1f0;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-active {
  color: #176150;
  background: #ddf4ea;
}

.status-paused {
  color: #815813;
  background: #fff0d4;
}

.status-archived {
  color: #6e7478;
  background: #eceff1;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.form-panel {
  padding: 28px;
}

.editor-aside {
  min-width: 0;
}

.sticky-panel {
  position: sticky;
  top: 20px;
}

.sticky-panel h3 {
  margin-bottom: 8px;
}

.sticky-panel .button {
  margin-top: 8px;
}

.muted,
.help-text {
  color: var(--muted);
}

.sticky-panel p {
  font-size: 0.78rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  min-width: 0;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: #364944;
  font-size: 0.73rem;
  font-weight: 700;
}

.form-control {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  border: 1px solid #cbd7d4;
  border-radius: 10px;
  outline: 0;
  background: #fff;
}

textarea.form-control {
  min-height: 86px;
  resize: vertical;
}

.form-control:focus {
  border-color: #5d9e93;
  box-shadow: 0 0 0 3px rgba(15, 116, 107, 0.1);
}

.form-control:disabled {
  color: #7c8885;
  background: #f2f5f4;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.checkbox-group label {
  margin: 0;
  order: 2;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.required,
.field-error {
  color: var(--danger);
}

.required {
  margin-left: 3px;
}

.field-error,
.help-text {
  display: block;
  margin-top: 5px;
  font-size: 0.67rem;
}

.span-2 {
  grid-column: span 2;
}

.form-alert {
  margin-bottom: 18px;
  padding: 11px 13px;
  color: #8c2b33;
  border: 1px solid #efc8cb;
  border-radius: 10px;
  background: #fff0f1;
  font-size: 0.78rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.company-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
  padding: 24px 26px;
  color: #effaf7;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 20%, rgba(86, 180, 163, 0.2), transparent 32%),
    linear-gradient(135deg, #153235, #173f40);
  box-shadow: var(--shadow);
}

.company-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 230px;
}

.company-identity .company-monogram {
  color: #17493f;
  background: #ccebe3;
}

.company-identity p {
  margin: 7px 0 0;
  color: #96b3af;
  font-size: 0.78rem;
}

.company-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 22px;
  margin: 0;
}

.company-facts div {
  min-width: 0;
}

.company-facts dt,
.detail-list dt,
.entity-card dt {
  color: #7f9995;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.company-facts dd,
.detail-list dd,
.entity-card dd {
  margin: 3px 0 0;
}

.company-facts dd {
  overflow: hidden;
  color: #f2f8f7;
  font-size: 0.77rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-tabs {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  gap: 4px;
  margin: 20px 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
}

.section-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.section-tabs a:hover {
  color: var(--primary);
  background: #eef6f4;
}

.section-tabs span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 7px;
  background: #e4ecea;
  font-size: 0.61rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0;
}

.detail-list dd {
  color: #2a3d39;
  font-size: 0.8rem;
}

.note-text {
  color: #465b57;
  font-size: 0.83rem;
}

.anchored-section {
  margin-top: 20px;
  scroll-margin-top: 78px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.entity-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 17px;
  border: 1px solid #e1e8e6;
  border-radius: 14px;
  background: #fcfdfd;
}

.entity-card h3 {
  margin-bottom: 3px;
}

.entity-card p {
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 0.73rem;
}

.entity-card dl {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}

.entity-card dd {
  color: #354a46;
  font-size: 0.73rem;
}

.entity-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--primary);
  border-radius: 13px;
  background: var(--primary-pale);
  font-size: 1.15rem;
}

.inline-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px;
  text-align: left;
  border: 1px dashed #cbd8d5;
  border-radius: 14px;
  background: #fafcfb;
}

.inline-empty h3 {
  margin: 0 0 3px;
}

.device-table code {
  padding: 4px 7px;
  color: #234944;
  border-radius: 7px;
  background: #edf5f3;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.7rem;
}

.passbolt-link {
  color: #244e66;
  font-weight: 800;
}

.work-list {
  position: relative;
  display: grid;
}

.work-list::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 35px;
  width: 1px;
  background: #d8e3e1;
  content: "";
}

.work-item {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 17px;
  padding: 10px 0 20px;
}

.work-item time {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 62px;
  place-content: center;
  text-align: center;
  border: 1px solid #d4e2df;
  border-radius: 14px;
  background: #fff;
}

.work-item time strong,
.work-item time span {
  display: block;
}

.work-item time strong {
  color: var(--primary);
  font-size: 1.25rem;
  line-height: 1;
}

.work-item time span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.61rem;
  text-transform: uppercase;
}

.work-body {
  padding-top: 5px;
}

.work-body h3 {
  margin-bottom: 4px;
}

.work-body p {
  margin-bottom: 9px;
  color: #566964;
  font-size: 0.78rem;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.work-meta span {
  padding: 4px 8px;
  color: #5c6d69;
  border-radius: 7px;
  background: #f0f4f3;
  font-size: 0.64rem;
}

.work-meta .service-date {
  color: #805716;
  background: #fff1d9;
}

.custom-fields-form {
  max-width: 900px;
}

.modal {
  width: min(680px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(7, 25, 27, 0.28);
}

.modal.modal-large {
  width: min(920px, calc(100vw - 30px));
}

.modal::backdrop {
  background: rgba(7, 25, 27, 0.64);
  backdrop-filter: blur(3px);
}

.modal form {
  display: flex;
  max-height: calc(100vh - 40px);
  flex-direction: column;
}

.modal header,
.modal footer {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 18px 22px;
  background: #fff;
}

.modal header {
  border-bottom: 1px solid var(--line);
}

.modal footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  background: #fbfcfc;
}

.login-page {
  min-height: 100vh;
  background: #edf3f1;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.1fr) minmax(390px, 0.9fr);
}

.login-brand-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 6vw, 78px);
  color: #fff;
  background:
    radial-gradient(circle at 85% 25%, rgba(98, 195, 176, 0.2), transparent 28%),
    radial-gradient(circle at 10% 90%, rgba(49, 116, 120, 0.3), transparent 30%),
    #102a2d;
}

.brand-large .brand-mark {
  width: 50px;
  height: 50px;
}

.login-message {
  max-width: 670px;
}

.login-message h1 {
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.login-message p {
  max-width: 590px;
  margin-bottom: 0;
  color: #a9c5c0;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}

.security-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.security-points span {
  padding: 7px 11px;
  color: #b8d3ce;
  border: 1px solid rgba(185, 220, 214, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.68rem;
}

.login-form-panel {
  display: grid;
  min-height: 100vh;
  padding: 34px;
  place-items: center;
}

.login-form {
  width: min(420px, 100%);
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-form h2 {
  margin: 6px 0 8px;
  font-size: 1.8rem;
}

.login-form > .muted {
  margin-bottom: 25px;
  font-size: 0.78rem;
}

.login-form .form-group {
  margin-bottom: 17px;
}

.login-help {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.preview-notice,
.demo-banner {
  color: #294743;
  border: 1px solid #c7dfda;
  border-radius: 12px;
  background: #edf8f5;
}

.preview-notice {
  display: grid;
  gap: 2px;
  margin-bottom: 20px;
  padding: 12px 14px;
  font-size: 0.74rem;
}

.preview-notice span {
  color: var(--muted);
  font-size: 0.68rem;
}

.demo-banner {
  margin-bottom: 18px;
  padding: 10px 14px;
  font-size: 0.73rem;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .company-facts {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 920px) {
  :root {
    --sidebar: 248px;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: 180ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-overlay {
    position: fixed;
    z-index: 15;
    inset: 0;
    display: block;
    background: rgba(5, 20, 21, 0.48);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .dashboard-grid,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .panel-wide {
    grid-row: auto;
  }

  .company-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-facts {
    width: 100%;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
    gap: 65px;
  }

  .login-message h1 {
    font-size: 2.8rem;
  }

  .login-form-panel {
    min-height: auto;
    padding: 50px 24px;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 88px;
    align-items: flex-start;
    padding: 18px 16px;
  }

  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions .button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.7rem;
  }

  .page-content {
    padding: 22px 14px 45px;
  }

  .metric-grid,
  .detail-grid,
  .form-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 128px;
  }

  .company-row {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
  }

  .company-row .company-stat,
  .company-row .company-last {
    display: none;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .span-2 {
    grid-column: span 1;
  }

  .company-facts {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .section-tabs {
    margin-inline: -4px;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
    border-radius: 15px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-header .button {
    width: 100%;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .modal .span-2 {
    grid-column: span 1;
  }

  .login-brand-panel {
    padding: 32px 24px;
    gap: 52px;
  }

  .login-message h1 {
    font-size: 2.2rem;
  }

  .login-form {
    padding: 27px 22px;
  }
}
