:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef6f4;
  --text: #17202a;
  --muted: #5f6f82;
  --line: #d8e0ea;
  --line-strong: #b7c4d2;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --teal: #0f766e;
  --amber: #b45309;
  --red: #b42318;
  --green-soft: #dff7ec;
  --amber-soft: #fff2cc;
  --red-soft: #ffe4df;
  --shadow: 0 18px 40px rgba(22, 34, 51, 0.10);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #edf4f2 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

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

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 40px;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
}

.login-brand,
.login-panel,
.users-panel,
.subscriptions-panel,
.usage-panel,
.tokens-panel,
.prices-panel,
.packages-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-brand {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.10)),
    var(--surface);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 56px;
  border-radius: 8px;
  background: #162033;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 24px;
}

.brand-mark.small {
  width: 82px;
  height: 40px;
  margin: 0;
  font-size: 0.82rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: 2.1rem;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.brand-copy {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.login-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
}

label {
  display: grid;
  gap: 7px;
  color: #2f3d4f;
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

input[readonly] {
  background: #f3f6f9;
  color: var(--muted);
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.button {
  gap: 9px;
  padding: 9px 14px;
}

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

.button.primary {
  background: var(--primary);
  color: #ffffff;
}

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

.button.ghost {
  border-color: var(--line-strong);
  background: #ffffff;
  color: #26394f;
}

.button.ghost:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.button.danger {
  border-color: #f2b8ad;
  background: var(--red-soft);
  color: var(--red);
}

.button.danger:hover {
  border-color: var(--red);
}

.button.wide {
  width: 100%;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-color: var(--line);
  background: #ffffff;
  color: #2b3b4f;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(10px);
}

.topbar-title,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title h1 {
  margin: 0;
  font-size: 1.35rem;
}

.topbar-title .eyebrow {
  margin-bottom: 2px;
}

.admin-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
}

.admin-tab {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-tab.is-active {
  border-color: rgba(37, 99, 235, 0.35);
  background: #e7efff;
  color: var(--primary-dark);
}


.session-user {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 700;
}

main {
  flex: 1 1 auto;
  width: min(1500px, calc(100% - 32px));
  min-height: 0;
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.toolbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar-refresh {
  width: 42px;
  height: 42px;
}

.search-box {
  position: relative;
  display: block;
}

.search-box .icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  padding-left: 40px;
}

.workspace {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 0;
  overflow: hidden;
}

.workspace.with-details {
  align-items: stretch;
}

.workspace:not(.with-details) {
  grid-template-rows: minmax(0, 1fr);
}

.workspace:not(.with-details) .users-panel {
  height: 100%;
  min-height: 0;
}

.tokens-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.prices-view,
.packages-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.prices-panel,
.packages-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 18px;
  box-shadow: none;
  overflow: hidden;
}

.token-prices-table {
  min-width: 980px;
}

.subscription-packages-table {
  min-width: 1080px;
}

.details-table {
  min-width: 1240px;
}


.price-toolbar-actions,
.package-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-actions-cell,
.package-actions-cell {
  min-width: 120px;
}

.token-prices-table input,
.subscription-packages-table input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.84rem;
}


.tokens-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 18px;
  box-shadow: none;
  overflow: hidden;
}

.all-token-usage-table {
  min-width: 1080px;
}

.token-usage-controls.all-token-controls {
  grid-template-columns: 108px 108px 136px minmax(150px, 1fr);
}

.all-token-controls .token-period-field input {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 0.8rem;
}

.all-token-controls .token-period-field input[type="date"] {
  width: 108px;
}

.all-token-controls .token-edrpou-field input {
  width: 136px;
}

.all-token-controls .token-usage-total {
  min-height: 30px;
  padding: 4px 9px;
}


.users-panel {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  overflow: hidden;
  box-shadow: none;
}

.details-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}


.details-panel[data-visible-panels="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.details-panel[data-visible-panels="1"],
.details-panel[data-visible-panels="0"] {
  grid-template-columns: minmax(0, 1fr);
}

.details-panel[data-visible-panels="0"] {
  grid-template-rows: auto;
}

.details-toggle-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.details-toggle {
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 5px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.details-toggle.is-active {
  border-color: rgba(37, 99, 235, 0.45);
  background: #e7efff;
  color: var(--primary-dark);
}


.subscriptions-panel,
.usage-panel,
.tokens-panel,
.prices-panel,
.packages-panel {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 18px;
  box-shadow: none;
  overflow: hidden;
}

.table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  max-height: none;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.details-table,
.usage-table {
  min-width: 680px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f7fb;
  color: #42546a;
  font-size: 0.78rem;
  text-align: left;
  text-transform: uppercase;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 6px 12px;
  vertical-align: middle;
}

th,
td,
th *,
td * {
  cursor: default;
}

th button,
td button,
th [role="button"],
td [role="button"] {
  cursor: pointer;
}

th input,
td input,
th textarea,
td textarea {
  cursor: auto;
}

tbody tr {
  transition: background-color 0.14s ease;
}

tbody tr:hover,
tbody tr.selected {
  background: #eef6ff;
}

.table-head-note {
  display: block;
  margin-top: 2px;
  color: #66778d;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  white-space: nowrap;
}

.subscription-main-row td {
  border-bottom: 1px dashed var(--line-strong);
}

.subscription-main-row td[rowspan] {
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.subscription-subrow td {
  padding-top: 0;
}

.subscription-field {
  display: block;
  min-width: 130px;
}

.subscription-field-value {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.subscription-field input {
  width: 100%;
  min-width: 130px;
}

.subscription-period-cell .subscription-field {
  min-width: 160px;
}

.subscription-image-cell .subscription-field {
  min-width: 170px;
}

.token-group-row {
  background: #f7fbff;
  font-weight: 900;
}

.token-group-row td {
  border-top: 1px solid var(--line-strong);
}

.token-group-row .token-date-cell {
  white-space: nowrap;
}

.token-date-content {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.token-tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 900;
  line-height: 1;
}

.token-tree-toggle:hover {
  border-color: var(--primary);
  background: #eef6ff;
}

.token-group-row.is-collapsed td {
  border-bottom-color: var(--line-strong);
}

.token-detail-row {
  background: #ffffff;
  color: #526173;
  font-size: 0.82rem;
}

.token-detail-row td {
  padding-top: 4px;
  padding-bottom: 4px;
}

.token-detail-row td:first-child {
  position: relative;
  padding-left: 50px;
}

.token-detail-row td:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 26px;
  border-left: 1px solid var(--line-strong);
}

.token-detail-row td:first-child::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 26px;
  width: 14px;
  border-top: 1px solid var(--line-strong);
}

.user-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: #e6eef8;
  color: #1f3b65;
  font-size: 0.78rem;
  font-weight: 900;
}

.name-stack {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.name-stack strong {
  display: block;
  flex: 0 1 auto;
  overflow: hidden;
  max-width: 240px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-stack span,
.usage-text {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.name-stack span {
  flex: 0 0 auto;
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-text.subscription-docs {
  white-space: nowrap;
}

.subscription-stack {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.subscription-stack.compact {
  min-width: 240px;
  max-width: 700px;
}

.subscription-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.subscription-summary .badge,
.subscription-summary .subscription-usage-grid {
  flex: 0 0 auto;
}

.subscription-usage-grid {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 6px;
  row-gap: 2px;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
}

.subscription-usage-row {
  display: contents;
}

.subscription-usage-value {
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.subscription-code {
  display: block;
  overflow: hidden;
  max-width: 280px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-summary .subscription-code {
  flex: 1 1 auto;
  min-width: 44px;
  max-width: none;
}

.subscription-period {
  flex: 1 1 auto;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions-cell {
  width: 64px;
  text-align: right;
}

#users-table td {
  padding: 3px 10px;
}

#users-table .user-name {
  gap: 6px;
  min-height: 22px;
}

#users-table .avatar {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: 6px;
  font-size: 0.62rem;
}

#users-table .name-stack {
  gap: 6px;
}

#users-table .name-stack strong,
#users-table .name-stack span,
#users-table .usage-text {
  font-size: 0.78rem;
  line-height: 1.1;
}

#users-table .subscription-summary {
  gap: 6px;
}

#users-table .subscription-stack.compact {
  min-width: 220px;
  max-width: 640px;
}

#users-table .subscription-cost-cell {
  width: 116px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

#users-table .badge {
  min-height: 20px;
  padding: 1px 7px;
  font-size: 0.7rem;
}

#users-table .icon-button {
  width: 26px;
  height: 26px;
  min-height: 26px;
}

#users-table .icon-button .icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.button.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.details-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.details-header > div {
  min-width: 0;
}

.details-refresh {
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
}

.details-refresh .icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.details-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}


.token-usage-controls {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  align-items: end;
  margin: -4px 0 12px;
}

.token-period-field {
  display: grid;
  gap: 4px;
  color: #2f3d4f;
  font-size: 0.78rem;
  font-weight: 900;
}

.token-period-field input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.84rem;
}

.token-usage-total {
  display: grid;
  gap: 2px;
  justify-content: start;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.token-usage-total strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.1;
  white-space: nowrap;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-transform: inherit;
}

.table-sort:hover {
  color: var(--primary-dark);
}

.details-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.details-table input {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.84rem;
}

.details-actions-cell {
  min-width: 180px;
  white-space: nowrap;
}

.details-actions-cell .button + .button,
.details-actions-cell .button + .icon-button,
.details-actions-cell .icon-button + .button,
.details-actions-cell .icon-button + .icon-button {
  margin-left: 6px;
}

.danger-icon {
  border-color: #f2b8ad;
  background: var(--red-soft);
  color: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge.admin {
  background: #e7efff;
  color: #1d4ed8;
}

.badge.user {
  background: #e9f6f2;
  color: var(--teal);
}

.badge.active {
  background: var(--green-soft);
  color: #0f6b48;
}

.badge.expired {
  background: var(--red-soft);
  color: var(--red);
}

.badge.empty {
  background: #edf1f5;
  color: #596a7d;
}

.badge.warning {
  background: var(--amber-soft);
  color: var(--amber);
}

.progress {
  width: 120px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf1;
  margin-bottom: 5px;
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  max-width: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.progress span.warning {
  background: var(--amber);
}

.progress span.danger {
  background: var(--red);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 32px;
  text-align: center;
}

.empty-state.compact {
  min-height: 160px;
  padding: 18px;
}

.empty-state h2 {
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  min-height: 42px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17202a;
  color: #ffffff;
  padding: 11px 14px;
  font-weight: 800;
  box-shadow: var(--shadow);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--red);
}

@media (min-width: 1181px) {
  .workspace.with-details {
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(180px, 32vh) minmax(320px, 1fr);
  }

  .workspace.with-details .users-panel,
  .workspace.with-details .details-panel {
    min-height: 0;
    align-self: stretch;
  }

  .workspace.with-details .table-wrap {
    height: 100%;
    max-height: none;
  }

  .workspace.with-details .subscriptions-panel,
  .workspace.with-details .usage-panel {
    height: 100%;
  }
}

@media (max-width: 1180px) {
  .workspace,
  .details-panel {
    grid-template-columns: 1fr;
  }

  .workspace.with-details {
    grid-template-rows: minmax(160px, 30fr) minmax(0, 70fr);
  }

  .details-panel {
    grid-template-rows: auto;
    grid-auto-rows: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    width: min(560px, calc(100% - 28px));
  }

  .login-brand {
    min-height: auto;
    padding: 32px;
  }

  h1 {
    font-size: 1.65rem;
  }

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

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .admin-tabs {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 20px, 1500px);
    padding-top: 16px;
  }

  .topbar {
    padding: 12px 10px;
  }

  .session-user {
    display: none;
  }

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

  .login-panel {
    padding: 18px;
  }

}

.workspace.with-details.details-collapsed {
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
}

.workspace.with-details.details-collapsed .users-panel {
  height: 100%;
  min-height: 0;
}

.workspace.with-details.details-collapsed .details-panel {
  align-self: end;
  min-height: 0;
  overflow: visible;
}

.details-panel[data-visible-panels="0"] {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.details-panel[data-visible-panels="0"] .details-toggle-bar {
  width: fit-content;
  max-width: 100%;
  margin: 0;
}
