:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;

  --sidebar-bg: #0f1217;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: rgba(255, 255, 255, 0.82);
  --sidebar-muted: rgba(255, 255, 255, 0.55);
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(59, 130, 246, 0.18);
  --sidebar-active-border: rgba(59, 130, 246, 0.28);

  --sidebar-w: 268px;
  --sidebar-w-collapsed: 84px;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* Layout */
.admin-layout {
  min-height: 100vh;
  display: flex;
}

.admin-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  transition: width 180ms ease, min-width 180ms ease;
  overflow: hidden;
}

.admin-main {
  flex: 1;
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
}

.admin-content {
  min-height: calc(100vh - 56px);
}

/* Brand */
.admin-sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px 14px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: 0.2px;
  font-size: 18px;
  min-width: 0;
}

.admin-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
}

.admin-brand__logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.admin-brand__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-icon-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.84);
  border-radius: 12px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, border-color 120ms ease;
}

.admin-icon-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-icon-btn:active {
  transform: translateY(1px);
}

.admin-icon-btn--top {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

/* Nav */
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
}

.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.admin-nav__item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.admin-nav__item.active {
  background: var(--sidebar-active);
  border-color: var(--sidebar-active-border);
  color: #fff;
}

.admin-nav__icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  flex: 0 0 auto;
}

.admin-nav__item.active .admin-nav__icon {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.30);
}

.admin-nav__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar__spacer {
  flex: 1;
}

/* Rates widget */
.admin-rates {
  border: 1px solid var(--sidebar-border);
  border-radius: 16px;
  padding: 12px;
  margin: 10px 6px 4px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-rates__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-rates__title {
  font-weight: 650;
  color: #fff;
}

.admin-rates__edit {
  border-radius: 10px;
}

.admin-rates__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-rates__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-rates__label {
  font-size: 12px;
  color: var(--sidebar-muted);
  letter-spacing: 0.03em;
}

.admin-rates__value {
  font-size: 13px;
  color: #fff;
}

.admin-rates__meta {
  margin-top: 10px;
  color: var(--sidebar-muted);
}

/* Collapsed sidebar */
.admin-layout.is-collapsed .admin-sidebar {
  width: var(--sidebar-w-collapsed);
  min-width: var(--sidebar-w-collapsed);
}

.admin-layout.is-collapsed .admin-brand__text {
  display: none;
}

.admin-layout.is-collapsed .admin-nav__text {
  display: none;
}

.admin-layout.is-collapsed .admin-nav {
  padding-left: 4px;
  padding-right: 4px;
}

.admin-layout.is-collapsed .admin-nav__item {
  justify-content: center;
  gap: 0;
}

.admin-layout.is-collapsed .admin-sidebar__brand {
  justify-content: center;
}

.admin-layout.is-collapsed #sidebarToggle {
  display: none;
}

.admin-layout.is-collapsed .admin-rates {
  display: none;
}

.admin-layout.is-collapsed .admin-nav__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.admin-layout.is-collapsed .admin-brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

/* Existing styling */
.navbar-brand {
  font-weight: 600;
  letter-spacing: 0.2px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 14px;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.table tbody td {
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.badge {
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.small-muted {
  font-size: 12px;
  color: var(--muted);
}

.kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kv .k {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kv .v {
  font-size: 13px;
}

.btn {
  border-radius: 10px;
}

.btn:disabled {
  opacity: 0.65;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.row-actions .btn {
  min-width: 110px;
}

.order-row-pulse {
  animation: pulseBg 900ms ease-in-out 1;
}

@keyframes pulseBg {
  0% { background: rgba(34,197,94,0.12); }
  100% { background: transparent; }
}

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1050;
  }

  .admin-layout.is-collapsed .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-main {
    margin-left: 0;
  }
}
.admin-account-summary__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-account-summary__grid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-account-summary__grid span {
  font-size: 11px;
  color: var(--sidebar-muted);
}

.admin-account-summary__grid strong {
  font-size: 13px;
  color: #fff;
}


.operator-cards {
  display: grid;
  gap: 16px;
}

.operator-card {
  border-radius: 18px;
}

.operator-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.operator-card__actions {
  flex-wrap: wrap;
}

.operator-card__section {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 16px;
}

.operator-card__title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.operator-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.operator-metric {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.operator-metric span {
  font-size: 12px;
  color: #64748b;
}

.operator-metric strong {
  font-size: 18px;
  line-height: 1.2;
}
