:root {
  --frame: #29456d;
  --frame-strong: #3973c5;
  --surface-raised: #0d1728;
}

.functional-menu {
  padding: 7px 6px;
}

.menu-area {
  margin-bottom: 5px;
  border: 1px solid #1b2c46;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 15, 27, .72);
}

.menu-area.open {
  border-color: #29466f;
  background: rgba(12, 22, 38, .95);
}

.menu-area-header {
  width: 100%;
  min-height: 29px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: #dbe8ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-align: left;
}

.menu-area.open .menu-area-header {
  color: #83b5ff;
  background: linear-gradient(90deg, rgba(44, 111, 241, .15), transparent);
  border-bottom: 1px solid #1b2c46;
}

.functional-list {
  padding: 3px;
}

.functional-list .compact-item {
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 5px;
  color: #b8cae8;
}

.functional-list .compact-item:hover {
  background: rgba(62, 126, 226, .11);
  color: #fff;
}

.functional-list .compact-item.active {
  background: linear-gradient(90deg, #1b4d9b, #173969);
  box-shadow: inset 2px 0 #70a9ff;
}

.access-mode {
  color: #7087aa;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.menu-empty {
  padding: 10px;
  color: var(--muted);
}

.functional-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.functional-home-card {
  min-height: 100px;
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--frame);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(36, 92, 174, .16), rgba(9, 17, 31, .97));
  color: var(--text);
  text-align: left;
}

.functional-home-card strong {
  font-size: 15px;
}

.functional-home-card span {
  color: var(--muted);
}

.framed-table-card {
  border: 1px solid var(--frame) !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(14, 25, 43, .98), rgba(7, 14, 26, .98)) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .025);
}

.users-block-head {
  min-height: 31px;
  margin: -10px -10px 7px;
  padding: 7px 9px;
  align-items: center;
  border-bottom: 1px solid #203754;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(90deg, rgba(32, 83, 160, .19), rgba(10, 19, 34, .35));
}

.users-block-head h3,
.users-block-head h4 {
  color: #edf4ff;
  font-size: 12px;
}

.users-children-grid,
.users-grandchildren-grid {
  gap: 8px;
}

.users-related-card {
  min-width: 0;
}

.users-related-wrap {
  border-radius: 6px;
}

.users-master-row,
.selectable-data-table .clickable-row,
.users-related-table .clickable-row {
  cursor: pointer;
}

.selectable-data-table .clickable-row:hover td,
.users-related-table .clickable-row:hover td {
  background: rgba(42, 105, 202, .13);
}

.generic-table-stack {
  display: grid;
  gap: 8px;
  padding: 9px 10px 12px;
}

.generic-table-card {
  min-width: 0;
  padding: 8px;
}

.generic-table-wrap {
  max-height: calc(100vh - 165px);
  border-radius: 7px;
}

.company-panel {
  margin: 10px;
  padding: 12px;
}

.table-text-action {
  min-height: 20px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #78adff;
  font-weight: 700;
}

.table-text-action:hover {
  color: #fff;
  text-decoration: underline;
}

.table-text-action.muted-action {
  color: #8196b8;
}

.table-text-action:disabled,
.button:disabled,
.mini-button:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 5, 12, .78);
  backdrop-filter: blur(5px);
}

.record-modal {
  width: min(980px, 96vw);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #386cb4;
  border-radius: 14px;
  background: #0b1424;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58), 0 0 0 1px rgba(92, 151, 238, .08);
}

.record-modal-head {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 13px;
  border-bottom: 1px solid #284464;
  background: linear-gradient(100deg, rgba(31, 81, 157, .28), rgba(10, 20, 36, .95) 55%);
}

.record-modal-head h2 {
  margin: 2px 0 0;
  font-size: 16px;
}

.modal-kicker {
  color: #70a8ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid #345270;
  border-radius: 8px;
  background: #111e31;
  color: #d8e8ff;
  font-size: 20px;
  line-height: 1;
}

.record-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.modal-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-actions {
  position: sticky;
  bottom: -12px;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin: 5px -12px -12px;
  padding: 10px 12px;
  border-top: 1px solid #253c5a;
  background: rgba(11, 20, 36, .97);
}

.modal-read-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.modal-read-grid > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #1c304b;
  border-radius: 7px;
  background: #0e192b;
}

.modal-read-grid dt {
  margin-bottom: 3px;
  color: #7790b6;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.modal-read-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #e1ebfa;
}

.field-inline-row.single {
  grid-template-columns: minmax(0, 1fr);
}

.boot-state {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: #8ea7cc;
  background: #050a14;
}

@media (max-width: 1050px) {
  .functional-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-form,
  .modal-read-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .functional-home-grid,
  .modal-form,
  .modal-read-grid {
    grid-template-columns: 1fr;
  }

  .modal-layer {
    padding: 7px;
  }

  .record-modal {
    width: 100%;
    max-height: 96vh;
  }
}

