html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f6f8fb;
  color: #172033;
}

.page-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1.5rem 0;
}

.page-heading h1,
.detail-header h2,
.section-heading h3 {
  margin: 0;
}

.page-kicker {
  color: #667085;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 .25rem;
}

.secondary-button {
  background: #ffffff;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  color: #172033;
  font-weight: 700;
  padding: .55rem .85rem;
}

.empty-state {
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  padding: 1.25rem;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  color: #667085;
  margin-top: .35rem;
}

.device-dashboard {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
}

.device-list {
  display: grid;
  gap: .65rem;
}

.device-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  color: #172033;
  display: grid;
  gap: .75rem;
  grid-template-columns: .75rem minmax(0, 1fr) auto;
  padding: .85rem;
  text-decoration: none;
}

.device-card:hover,
.device-card-selected {
  border-color: #2f6fed;
  color: #172033;
}

.device-card-main {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.device-card-main strong,
.device-card-main span,
.device-card-meta {
  overflow-wrap: anywhere;
}

.device-card-main span,
.device-card-meta,
.muted-text {
  color: #667085;
  font-size: .9rem;
}

.status-dot {
  border-radius: 999px;
  height: .7rem;
  width: .7rem;
}

.status-online,
.status-pill-online {
  background: #0f9f6e;
}

.status-offline,
.status-pill-offline {
  background: #8a94a6;
}

.status-unknown,
.status-pill-unknown {
  background: #c47f17;
}

.device-detail {
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  min-width: 0;
  padding: 1rem;
}

.device-workspace {
  display: grid;
  gap: 1rem;
}

.device-tabs {
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px 8px 0 0;
  padding: .5rem .5rem 0;
}

.device-tab-link {
  align-items: center;
  display: flex;
  gap: .55rem;
  min-height: 3rem;
}

.device-tab-main {
  display: grid;
  gap: .05rem;
  line-height: 1.2;
  min-width: 0;
}

.device-tab-main strong,
.device-tab-main span {
  overflow-wrap: anywhere;
}

.device-tab-main span {
  color: #667085;
  font-size: .82rem;
}

.detail-header,
.section-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.status-pill {
  border-radius: 999px;
  color: #ffffff;
  font-size: .82rem;
  font-weight: 700;
  padding: .35rem .65rem;
}

.status-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 1.25rem;
}

.status-grid div {
  background: #f6f8fb;
  border: 1px solid #e4e9f2;
  border-radius: 8px;
  min-width: 0;
  padding: .75rem;
}

.status-grid dt {
  color: #667085;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.status-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.compact-status-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 1rem 0;
}

.compact-status-grid div {
  background: #f6f8fb;
  border: 1px solid #e4e9f2;
  border-radius: 6px;
  min-width: 0;
  padding: .55rem .65rem;
}

.compact-status-grid dt {
  color: #667085;
  font-size: .76rem;
  font-weight: 700;
  margin-bottom: .18rem;
}

.compact-status-grid dd {
  font-size: .9rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.device-mode-panel {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: .75rem;
  padding: .85rem 1rem;
}

.device-mode-panel strong {
  display: block;
  font-size: 1.05rem;
}

.device-mode-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: flex-end;
}

.device-data-tabs {
  margin-top: 1rem;
}

.device-content-tabs {
  border-bottom: 1px solid #d9e1ee;
}

.device-content-tabs .nav-link {
  border: 0;
  border-bottom: 3px solid transparent;
  color: #465266;
  font-weight: 700;
  min-height: 2.5rem;
}

.device-content-tabs .nav-link.active {
  background: transparent;
  border-bottom-color: #1f6feb;
  color: #1f6feb;
}

.device-content-panel {
  padding-top: .75rem;
}

.process-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.process-toolbar h3 {
  margin: 0;
}

.process-toolbar span,
.process-subtext {
  color: #667085;
  display: block;
  font-size: .85rem;
}

.process-toolbar-actions,
.process-filter-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.process-filter-form input[type="search"] {
  border: 1px solid #c8d2e0;
  border-radius: 6px;
  min-height: 2.25rem;
  min-width: 12rem;
  padding: .45rem .6rem;
}

.process-auto-refresh-toggle {
  align-items: center;
  border: 1px solid #c8d2e0;
  border-radius: 6px;
  color: #2f3a4a;
  display: inline-flex;
  font-weight: 700;
  gap: .4rem;
  min-height: 2.25rem;
  padding: .35rem .65rem;
}

.process-auto-refresh-toggle input {
  margin: 0;
}

.process-table-wrap {
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  margin-top: .75rem;
  max-height: 600px;
  overflow: auto;
}

.process-table {
  border-collapse: collapse;
  margin-bottom: 0;
  min-width: 52rem;
  width: 100%;
}

.browser-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.browser-toolbar span {
  color: #667085;
  font-size: .9rem;
}

.browser-usage-table {
  min-width: 58rem;
}

.browser-title {
  max-width: 22rem;
}

.process-table th,
.process-table td {
  border-bottom: 1px solid #e4e9f2;
  padding: .7rem;
  text-align: left;
  vertical-align: top;
}

.process-table th {
  background: #f6f8fb;
  color: #465266;
  font-size: .85rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.process-table td {
  overflow-wrap: anywhere;
}

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

.process-action-column {
  white-space: nowrap;
  width: 6rem;
}

.process-action-form {
  margin: 0;
}

.pid-list,
.process-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.danger-button {
  background: #c4361b;
  border: 1px solid #a02b16;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
  padding: .35rem .65rem;
}

.add-button {
  background: #1f7a4d;
  border: 1px solid #17623d;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 800;
  padding: .35rem .65rem;
}

.add-button-sm {
  border-radius: 5px;
  font-size: .9rem;
  line-height: 1.1;
  min-width: 1.75rem;
  padding: .25rem .5rem;
}

.add-button:hover,
.add-button:focus {
  background: #17623d;
  border-color: #124d31;
  color: #ffffff;
}

.danger-button-sm {
  border-radius: 5px;
  font-size: .82rem;
  line-height: 1.1;
  min-width: 1.75rem;
  padding: .25rem .5rem;
}

.danger-button:hover,
.danger-button:focus {
  background: #a02b16;
  border-color: #8a2412;
  color: #ffffff;
}

.process-details {
  display: grid;
  gap: .3rem;
}

.process-detail-line {
  /* display: grid; */
  gap: .15rem;
}

.process-detail-line span {
  color: #667085;
  font-size: .78rem;
  font-weight: 700;
}

.process-detail-line strong,
.process-path {
  display: block;
  font-weight: 500;
  max-width: 34rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-name {
  display: block;
  max-width: 15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-banner {
  border-radius: 8px;
  font-weight: 600;
  margin: 0 0 1rem;
  padding: .65rem .85rem;
}

.status-banner-info {
  background: #e3f1ff;
  border: 1px solid #b8d7f7;
  color: #1c4b88;
}

.status-banner-error {
  background: #fde6e1;
  border: 1px solid #f4b8ad;
  color: #8a2412;
}

.primary-button {
  background: #2f6fed;
  border: 1px solid #2554b9;
  border-radius: 6px;
  color: #ffffff;
  font-weight: 700;
  padding: .55rem .95rem;
}

.primary-button:hover,
.primary-button:focus {
  background: #2554b9;
  border-color: #1d448f;
  color: #ffffff;
}

.detail-header-actions,
.page-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.app-rules-page .device-context {
  align-items: center;
  display: flex;
  gap: .5rem;
  margin: 0 0 1rem;
}

.app-rules-page .device-context strong {
  font-size: 1.05rem;
}

.rule-form-card {
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  margin: 0 0 1.25rem;
  padding: 1rem;
}

.rule-form-card h2 {
  margin: 0 0 .25rem;
}

.rule-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

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

.rule-form-field {
  display: grid;
  gap: .35rem;
}

.rule-form-field span {
  color: #465266;
  font-size: .85rem;
  font-weight: 700;
}

.rule-form-field input,
.rule-form-field select {
  background: #ffffff;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  font: inherit;
  padding: .5rem .65rem;
}

.rule-form-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

.inline-api-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.compact-field {
  display: grid;
  gap: .25rem;
}

.compact-field span {
  color: #465266;
  font-size: .8rem;
  font-weight: 700;
}

.compact-field select {
  background: #ffffff;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  font: inherit;
  padding: .45rem .6rem;
}

.rule-table-wrap {
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  margin-top: .75rem;
  overflow-x: auto;
}

.rule-table {
  border-collapse: collapse;
  min-width: 46rem;
  width: 100%;
}

.rule-table th,
.rule-table td {
  border-bottom: 1px solid #e4e9f2;
  padding: .7rem;
  text-align: left;
  vertical-align: top;
}

.rule-table th {
  background: #f6f8fb;
  color: #465266;
  font-size: .85rem;
}

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

.rule-action-column {
  width: 6rem;
}

.rule-action-form {
  margin: 0;
}

.rule-pill {
  border-radius: 999px;
  color: #ffffff;
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .55rem;
}

.rule-pill-allow {
  background: #0f9f6e;
}

.rule-pill-block {
  background: #c4361b;
}

@media (max-width: 700px) {
  .rule-form-grid {
    grid-template-columns: 1fr;
  }
}

.authorizations-page .section-heading {
  margin: 1.5rem 0 .5rem;
}

.auth-list {
  display: grid;
  gap: .75rem;
  margin-bottom: 1rem;
}

.auth-card {
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  padding: 1rem;
}

.auth-card-header {
  align-items: flex-start;
  display: flex;
  gap: .5rem;
  justify-content: space-between;
  margin-bottom: .65rem;
}

.auth-card-header h3 {
  margin: 0 0 .15rem;
}

.auth-card-header p {
  margin: 0;
}

.auth-meta {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 .75rem;
}

.auth-meta div {
  background: #f6f8fb;
  border: 1px solid #e4e9f2;
  border-radius: 6px;
  padding: .55rem .65rem;
}

.auth-meta dt {
  color: #667085;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: .15rem;
}

.auth-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.auth-message {
  background: #fff8e6;
  border: 1px solid #f3d97a;
  border-radius: 6px;
  color: #6b4d00;
  font-size: .9rem;
  margin: 0 0 .75rem;
  padding: .5rem .75rem;
}

.auth-actions {
  align-items: stretch;
  display: grid;
  gap: .65rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-actions form {
  align-items: center;
  display: flex;
  gap: .5rem;
  margin: 0;
}

.auth-actions label {
  align-items: center;
  color: #465266;
  display: flex;
  font-size: .85rem;
  font-weight: 700;
  gap: .35rem;
}

.auth-actions select,
.auth-actions input[type="text"] {
  background: #ffffff;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  flex: 1;
  font: inherit;
  padding: .45rem .55rem;
}

.auth-revoke-form,
.auth-deny-form {
  grid-column: span 2;
}

.status-pill-pending {
  background: #c47f17;
}

.status-pill-approved {
  background: #0f9f6e;
}

.status-pill-denied,
.status-pill-revoked,
.status-pill-expired {
  background: #8a94a6;
}

.auth-table-wrap {
  background: #ffffff;
  border: 1px solid #d9e1ee;
  border-radius: 8px;
  margin-top: .5rem;
  overflow-x: auto;
}

.auth-table {
  border-collapse: collapse;
  min-width: 36rem;
  width: 100%;
}

.auth-table th,
.auth-table td {
  border-bottom: 1px solid #e4e9f2;
  padding: .65rem;
  text-align: left;
}

.auth-table th {
  background: #f6f8fb;
  color: #465266;
  font-size: .85rem;
}

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

.pending-auth-table {
  min-width: 44rem;
}

.auth-table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.compact-button {
  min-height: 2rem;
  padding: .25rem .55rem;
}

.auth-pill {
  border-radius: 999px;
  color: #ffffff;
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .5rem;
}

.auth-pill-pending {
  background: #c47f17;
}

.auth-pill-approved {
  background: #0f9f6e;
}

.auth-pill-denied,
.auth-pill-revoked,
.auth-pill-expired {
  background: #8a94a6;
}

@media (max-width: 900px) {
  .device-dashboard {
    grid-template-columns: 1fr;
  }

  .status-grid,
  .compact-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page-heading,
  .detail-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading form,
  .secondary-button {
    width: 100%;
  }

  .device-card {
    grid-template-columns: .75rem minmax(0, 1fr);
  }

  .device-card-meta {
    grid-column: 2;
  }

  .status-grid,
  .compact-status-grid {
    grid-template-columns: 1fr;
  }

  .process-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .browser-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-toolbar-actions,
  .process-filter-form,
  .process-filter-form input[type="search"] {
    justify-content: stretch;
    width: 100%;
  }
}
