#workspace {
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 65% 0, #f4f2fe70, transparent 70%), #f8faff;
}
#workspace aside {
  background: #ffffff70;
  border-right: 1px solid #edf0f8;
  padding: 0 14px 18px;
}
.brand {
  height: 82px;
  border: 0;
  margin-bottom: 10px;
  padding: 0 14px;
}
.brand img {
  width: 132px;
}
#navigation {
  gap: 7px;
}
#navigation button {
  height: 45px;
  border: 0;
  font-size: 15px;
  font-weight: 500;
  border-radius: 11px;
  background: transparent;
  color: #58628b;
  padding: 10px 18px;
}
#navigation button svg {
  width: 22px;
  height: 22px;
}
#navigation button.active {
  color: #6b2cff;
  background: #eee6ff;
  box-shadow: none;
  font-weight: 650;
}
#navigation .access-navigation {
  order: 9;
  margin-top: 12px;
  border-top: 1px solid #eee;
}
.aside-bottom {
  border: 0;
  background: transparent;
  font-size: 14px;
}
main {
  position: relative;
  padding: 22px 20px 16px;
}
main > header {
  height: 61px;
  align-items: flex-start;
  margin: 0 0 15px;
}
h1 {
  font-size: 33px;
  letter-spacing: -1px;
  margin: 0;
}
#subtitle {
  font-size: 15px;
  line-height: 1.45;
  color: #69749d;
}
.topbar {
  position: absolute;
  top: 28px;
  right: 22px;
  width: 57%;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 26px;
}
.global-search {
  margin: 0;
  flex: 1;
  border: 0;
  gap: 12px;
  background: transparent;
}
.global-search input {
  height: 40px;
  min-width: 100px;
  width: 100%;
  padding: 0 14px 0 42px;
  border: 1px solid #dce0f0;
  border-radius: 9px;
  font-size: 14px;
  background: #fff;
}
.global-search > svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
}
#global-scope {
  display: none;
}
.global-search #status {
  height: 40px;
  min-width: 138px;
  max-width: 160px;
  font-size: 14px;
  background: #fff;
  padding: 0 12px;
  border: 1px solid #dce0f0;
  border-radius: 8px;
}
#attention-button {
  display: none;
}
.admin-profile {
  padding: 0;
  gap: 12px;
  white-space: nowrap;
}
.admin-profile strong {
  font-size: 15px;
  font-weight: 500;
}
.admin-profile small {
  display: none;
}
#admin-avatar {
  width: 40px;
  height: 40px;
  background: #daccff;
  color: #5721ef;
}
.content {
  display: grid;
  gap: 16px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
.content:has(#right-column:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) 380px;
}
.left-column {
  display: grid;
  gap: 16px;
}
.metrics {
  margin: 0;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric {
  min-height: 128px;
  padding: 20px 22px;
  align-items: flex-start;
  gap: 24px;
  border: 1px solid #e4e8f7;
  border-radius: 11px;
  background: #fff;
}
.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}
.metric span {
  color: #5e6195;
  font-size: 14px;
  font-weight: 650;
}
.metric strong {
  font-size: 30px;
  color: #090e32;
  line-height: 1.35;
}
.metric small {
  font-size: 14px;
  white-space: nowrap;
  line-height: 1.5;
  margin-top: 6px;
  color: #7881ae;
}
.metric.tone-0 small {
  color: #00a855;
}
.tone-1 .metric-icon {
  background: #defbe9;
  color: #00a454 !important;
}
.tone-2 .metric-icon {
  background: #fff1dc;
  color: #ff9700 !important;
}
.tone-3 .metric-icon {
  background: #ffe7ec;
  color: #fc3351 !important;
}
.panel {
  border-radius: 11px;
  border: 1px solid #e5e9f6;
  padding: 18px;
  background: #fff;
  box-shadow: none;
}
#records {
  padding: 10px;
}
#records .records-heading {
  display: none;
}
#toolbar-host {
  display: none;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
th {
  text-align: left;
  font-size: 14px;
  font-weight: 550;
  color: #58648f;
  background: #f8f8fe;
  padding: 16px 14px;
  white-space: nowrap;
  border: 0;
}
td {
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid #edf0f9;
  white-space: nowrap;
}
.accounts-table {
  min-width: 900px;
}
.accounts-table th:first-child {
  border-radius: 9px 0 0 9px;
}
.accounts-table th:last-child {
  border-radius: 0 9px 9px 0;
}
.accounts-table tr.selected td {
  background: #f2ecfe;
}
.account-cell {
  padding: 0;
  border: 0;
  background: transparent !important;
  display: flex;
  gap: 16px;
  align-items: center;
  text-align: left;
}
.account-cell strong {
  font-size: 14px;
  color: #0c1037;
  font-weight: 650;
}
.account-cell small {
  display: block;
  font-size: 14px;
  color: #838ab0;
  margin-top: 3px;
}
.account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eee6ff;
  color: #7337ff;
  flex-shrink: 0;
}
.account-avatar svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
td > button {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 18px;
  color: #5c628b;
}
.sort-hint {
  font-size: 14px;
  color: #8b8cbb;
}
.last-active {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.last-active i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00b965;
  flex-shrink: 0;
}
.last-active i.quiet {
  background: #f5ac00;
}
.last-active i.unused {
  background: #f63b59;
}
.trip-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.spark-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}
.spark-bars i {
  width: 4px;
  background: #8550ff;
}
.usage-bar {
  margin-top: 6px;
  width: 86px;
  height: 7px;
  background: #e4e1f1;
  border-radius: 8px;
  overflow: hidden;
}
.usage-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7334ff, #ab7aff);
  border-radius: 8px;
}
.expiry-warning {
  display: table;
  background: #ffe9ed;
  color: #ee304b;
  border-radius: 8px;
  padding: 2px 10px;
  font-size: 14px;
  margin-top: 4px;
}
#right-column {
  gap: 16px;
}
#details {
  border: 0;
  padding: 0;
  background: transparent;
  display: grid;
  gap: 16px;
}
.selected-card,
.recent-activity,
.admin-actions {
  background: white;
  border: 1px solid #e4e8f6;
  border-radius: 11px;
  padding: 18px;
}
.selected-account-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 0;
}
.selected-account-heading h3 {
  font-size: 18px;
  margin: 0 0 3px;
  line-height: 1.3;
}
.selected-account-heading small {
  font-size: 14px;
  color: #8187ab;
}
.selected-account-heading .account-avatar {
  width: 48px;
  height: 48px;
}
.selected-account-heading > div {
  flex: 1;
  min-width: 0;
}
.selected-account-heading > button {
  border: 0;
  background: transparent;
  padding: 0 3px;
  line-height: 1.2;
}
.badge {
  font-size: 14px;
  padding: 2px 11px;
  border-radius: 8px;
  font-weight: 450;
}
.account-facts {
  display: grid;
  gap: 14px;
  margin: 0;
  border: 0;
  padding: 0;
}
.fact-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.fact-row > svg,
.contact-heading svg,
.admin-actions svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #626994;
}
.fact-row > span {
  color: #7881ae;
}
.fact-row strong {
  font-size: 14px;
  font-weight: 450;
}
.registration-contact {
  border-top: 1px solid #edf0f8;
  padding-top: 16px;
  margin-top: 20px;
  font-size: 14px;
}
.contact-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #7981ac;
  margin-bottom: 8px;
}
.registration-contact a {
  color: #171b45;
  font-size: 14px;
}
.registration-contact strong {
  font-weight: 500;
}
.recent-activity header {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
  align-items: center;
}
.recent-activity h2,
.admin-actions h2 {
  font-size: 17px;
  margin: 0;
}
.text-button {
  font-size: 14px;
  color: #7c3cff;
  padding: 0;
  border: 0;
  background: transparent;
}
.activity-line {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  margin-top: 8px;
}
.activity-line .account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.activity-line > span:nth-child(2) {
  flex: 1;
}
.activity-line small {
  font-size: 14px;
  color: #858bb2;
}
.admin-actions > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.admin-actions button {
  padding: 9px 10px;
  font-size: 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.admin-actions .danger {
  background: #fff0f2;
  color: #ed2546;
  border: 0;
}
.admin-actions .danger svg {
  color: inherit;
}
#pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 14px 8px 4px;
  border: 0;
}
#page-label {
  margin-right: auto;
  color: #8189b1;
  font-size: 14px;
}
#pagination button {
  font-size: 14px;
  padding: 7px 12px;
}
.registry-table td {
  padding: 18px 14px;
}
.overview-totals {
  gap: 16px;
}
dialog {
  border: 1px solid #e4e8f6;
  border-radius: 16px;
  padding: 24px;
  color: #111639;
}
dialog::backdrop {
  background: #1c164045;
  backdrop-filter: blur(4px);
}
@media (min-width: 1450px) {
  .accounts-table {
    min-width: 0;
  }
  td {
    padding: 14px 10px;
  }
  .account-cell {
    gap: 14px;
  }
}
@media (max-width: 1350px) {
  .topbar {
    width: 51%;
  }
  .content:has(#right-column:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .metric {
    padding: 18px 12px;
    gap: 12px;
  }
  .metric small {
    white-space: normal;
  }
  .metric-icon {
    width: 42px;
    height: 42px;
  }
  .fact-row {
    gap: 8px;
  }
}
@media (max-width: 1050px) {
  #workspace {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .topbar {
    position: static;
    width: 100%;
    margin: 0 0 18px;
  }
  .content:has(#right-column:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
  main > header {
    height: auto;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #right-column {
    grid-row: auto;
  }
  .metric {
    min-height: 110px;
  }
}
@media (max-width: 650px) {
  #workspace {
    display: block;
  }
  #workspace aside {
    position: static;
    width: 100%;
    padding: 10px;
    border: 0;
  }
  .brand {
    height: 44px;
    margin: 0;
  }
  .brand img {
    width: 110px;
  }
  #navigation {
    display: flex;
    overflow-x: auto;
    padding: 8px 0;
  }
  .aside-bottom {
    display: none;
  }
  #navigation button {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 12px;
  }
  #navigation .access-navigation {
    order: 0;
    margin: 0;
    border: 0;
  }
  main {
    padding: 16px 12px;
  }
  .topbar {
    height: auto;
    gap: 10px;
  }
  .admin-profile {
    display: none;
  }
  .global-search {
    width: 100%;
  }
  .global-search > svg {
    left: 24px;
  }
  .global-search #status {
    min-width: 115px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 14px 10px;
    gap: 10px;
  }
  .metric span,
  .metric small {
    font-size: 14px;
  }
  .metric strong {
    font-size: 27px;
  }
  .metric-icon {
    width: 36px;
    height: 36px;
  }
  .metric-icon svg {
    width: 23px;
  }
  .content {
    gap: 12px;
  }
  h1 {
    font-size: 29px;
  }
  #subtitle {
    font-size: 14px;
  }
  td,
  th {
    padding: 14px;
  }
  .fact-row {
    grid-template-columns: 20px 1fr auto;
  }
  .account-facts {
    gap: 14px;
  }
  .accounts-table {
    min-width: 950px;
  }
}

#page-buttons {
  display: flex;
  gap: 5px;
}
#page-buttons .current {
  background: #dccdff;
  color: #6f2aff;
  border-color: #dccdff;
  font-weight: 650;
}
main > header > div {
  max-width: 43%;
}
@media (max-width: 1050px) {
  main > header > div {
    max-width: 100%;
  }
}

/* Account facts stay readable in the reference's single-column panel. */
.account-facts {
  grid-template-columns: minmax(0, 1fr);
}
.fact-row strong {
  overflow-wrap: normal;
}
.metric {
  padding: 20px 16px;
  gap: 16px;
}
.metric small {
  white-space: normal;
}
.accounts-table th {
  white-space: normal;
}
.accounts-table td:first-child {
  min-width: 185px;
}
.accounts-table th,
.accounts-table td {
  padding: 14px 8px;
}
.accounts-table .account-cell {
  gap: 10px;
}
.accounts-table .spark-bars {
  margin-left: 8px;
}
.accounts-table .sort-hint {
  display: none;
}
#navigation [data-view="trips"] {
  order: 1;
}
#navigation [data-view="reports"] {
  order: 2;
}
#navigation [data-settings] {
  order: 3;
}

/* Strong navy text and outline icons follow the approved reference. */
#navigation button,
th,
.metric span,
.metric small,
#subtitle,
.account-cell small,
.selected-account-heading small,
.fact-row > span,
.fact-row > svg,
.contact-heading,
.contact-heading svg,
.activity-line small,
.admin-actions svg,
.aside-bottom {
  color: #141937;
}
#navigation button svg {
  stroke: #141937;
}
#navigation button.active,
#navigation button.active svg {
  color: #6b2cff;
  stroke: #6b2cff;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.6;
}
.contact-line svg,
.selected-account-heading button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  flex-shrink: 0;
}
.contact-line span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.registration-contact a {
  color: #141937;
  text-decoration: none;
}
.registration-contact a:hover {
  text-decoration: underline;
}
#scroll-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #141937;
  font-size: 14px;
  min-height: 48px;
}
.accounts-table th:last-child {
  border-radius: 0 9px 9px 0;
}

.registration-contact .contact-line {
  display: flex;
  gap: 10px;
  align-items: center;
}
