:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f9fafb;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --font: Inter, "PingFang SC", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 960px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.brand {
  height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.brand:hover .brand-copy strong {
  color: var(--blue);
}

.brand-mark,
.avatar,
.creator-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
}

.nav-item:hover {
  background: #f3f4f6;
}

.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: #eef2ff;
}

.main-shell {
  min-width: 0;
}

.topbar {
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
}

.search {
  width: 340px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--muted);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.topbar-actions,
.head-actions,
.studio-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  color: var(--muted);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  color: #4b5563;
  font-size: 14px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 12px;
}

.content {
  padding: 24px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  height: 38px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-ghost {
  background: var(--panel);
  color: #374151;
  border-color: var(--border);
}

.btn-ghost:hover {
  background: #f9fafb;
}

.btn-secondary {
  background: var(--panel);
  color: #6b7280;
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #f3f4f6;
  color: #374151;
}

.btn.compact {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.view-panel[hidden] {
  display: none;
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  font-size: 26px;
  line-height: 1;
}

.metric-card.blue strong { color: var(--blue); }
.metric-card.green strong { color: var(--green); }
.metric-card.amber strong { color: var(--amber); }
.metric-card.red strong { color: var(--red); }

.studio-band {
  min-height: 68px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.studio-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.studio-status.ready .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.studio-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.studio-copy strong {
  font-size: 14px;
}

.studio-copy span,
.studio-meta span {
  color: var(--muted);
  font-size: 12px;
}

.studio-meta span {
  padding: 5px 8px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.studio-page-grid,
.settings-grid,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

body.auth-required .app-shell {
  display: none;
}

body:not(.auth-required) .login-gate {
  display: none;
}

.login-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 45%, #f7f7f8 100%);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card h1 {
  font-size: 24px;
}

.login-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-card input {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  outline: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.panel-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.segmented {
  display: flex;
  align-items: center;
  padding: 3px;
  background: #f3f4f6;
  border-radius: 8px;
}

.segmented button {
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.segmented button.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.task-table-wrap {
  overflow: auto;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
}

.task-table-wide th:nth-child(3),
.task-table-wide td:nth-child(3),
.task-table-wide th:nth-child(4),
.task-table-wide td:nth-child(4),
.task-table-wide th:nth-child(6),
.task-table-wide td:nth-child(6) {
  max-width: 260px;
}

.task-table th {
  height: 40px;
  padding: 0 16px;
  color: var(--muted);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.task-table td {
  height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}

.task-table tr {
  transition: background 120ms ease;
}

.task-table tbody tr:hover,
.task-table tr.selected {
  background: var(--blue-soft);
}

.task-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.task-title-cell strong,
.task-title-cell small {
  display: block;
}

.task-title-cell small,
.path-text {
  color: var(--muted);
  font-size: 12px;
}

.path-text {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 11px;
  flex: 0 0 auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge.blue {
  color: #1d4ed8;
  background: var(--blue-soft);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-filter-bar {
  min-height: 58px;
  padding: 10px 16px;
  display: flex;
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}

.task-filter-bar label {
  flex: 1 1 260px;
  max-width: 360px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.task-filter-bar input,
.task-filter-bar select {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--text);
}

.task-filter-bar select {
  width: min(360px, 42%);
}

.auto-publish-state {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #166534;
  background: #f0fdf4;
  font-size: 13px;
  font-weight: 600;
}

.auto-publish-state.active {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.status-badge.neutral {
  color: #4b5563;
  background: #f3f4f6;
}

.status-badge.green {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-badge.red {
  color: var(--red);
  background: var(--red-soft);
}

.status-badge.neutral {
  color: #4b5563;
  background: #f3f4f6;
}

.detail-panel {
  position: sticky;
  top: 88px;
}

.detail-head,
.detail-section,
.action-stack {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-head h2 {
  margin: 12px 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.detail-head p,
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.progress-log {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.progress-item {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 200ms ease;
}

.progress-item:last-child {
  border-bottom: none;
}

.progress-step {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--blue);
  min-width: 60px;
  padding-top: 1px;
}

.progress-msg {
  color: var(--text);
  line-height: 1.4;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-section label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.caption-box,
.info-line {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.caption-box p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
}

.caption-box span,
.info-line span {
  color: var(--muted);
  font-size: 12px;
}

.info-line {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.info-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.action-stack {
  display: grid;
  gap: 10px;
}

.action-stack .btn {
  width: 100%;
}

.timeline {
  display: grid;
}

.timeline-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 4px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-item time {
  color: var(--faint);
  font-size: 12px;
}

.timeline-item strong {
  font-size: 12px;
}

.timeline-item span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.empty-row,
.empty-detail {
  color: var(--muted);
  text-align: center;
  padding: 40px 16px;
  font-size: 13px;
}

.panel-body {
  padding: 18px;
}

.panel-body h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.large-status {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--red-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.large-status.ready {
  background: var(--green-soft);
}

.large-status h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.large-status p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.config-list {
  display: grid;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.config-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.config-row:last-child {
  border-bottom: 0;
}

.config-row span {
  color: var(--muted);
  font-size: 12px;
}

.config-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.step-list,
.policy-list {
  display: grid;
  gap: 12px;
}

.step-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
}

.step-item > span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.step-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.step-item p,
.policy-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.policy-list p {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-grid,
.admin-page {
  margin-bottom: 16px;
}

.admin-form {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 9px 10px;
  outline: 0;
  font: inherit;
  font-weight: 400;
}

.admin-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-list-item strong,
.admin-list-item span {
  display: block;
}

.admin-list-item strong {
  font-size: 13px;
}

.admin-list-item span {
  color: var(--muted);
  font-size: 12px;
}

.admin-task-panel {
  margin-bottom: 24px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.modal {
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.26);
}

.modal-small {
  width: min(520px, 100%);
}

.modal-head {
  min-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 16px;
}

.modal-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.file-field input[type="file"] {
  height: auto;
  min-height: 44px;
  padding: 8px;
  border: 1px dashed var(--border);
  background: #f9fafb;
}

.file-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.assignee-picker {
  gap: 6px;
}

.assignee-picker input[type="search"] {
  background: #f9fafb;
}

.import-result {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  background: #fef2f2;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--text);
  background: var(--panel-soft);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
  font-size: 13px;
  line-height: 1.5;
  z-index: 50;
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: var(--red);
}

@media (max-width: 1100px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .brand-copy,
  .nav-item span:last-child,
  .user-pill span:last-child {
    display: none;
  }

  .nav-item {
    justify-content: center;
  }

  .metrics-grid,
  .workspace-grid,
  .studio-page-grid,
  .settings-grid,
  .admin-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

}

/* Stats Panel */
.stats-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}

.stats-card {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 16px !important;
}

.stats-card-label {
  font-size: 13px !important;
  color: var(--muted) !important;
  margin-bottom: 8px !important;
}

.stats-card-num {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  line-height: 1 !important;
  margin-bottom: 6px !important;
}

.stats-card-sub {
  font-size: 12px !important;
  color: var(--muted) !important;
}

.task-table-wide th,
.task-table-wide td {
  text-align: center !important;
  padding: 10px 12px !important;
}

.task-table-wide th:first-child,
.task-table-wide td:first-child {
  text-align: left;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .stats-summary-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .stats-card-num {
    font-size: 22px !important;
  }
  .admin-page .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .admin-page .panel-actions {
    width: 100%;
  }
  .admin-page .panel-actions select {
    width: 100%;
  }
  .task-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .task-table th,
  .task-table td {
    white-space: nowrap;
  }
  .admin-page .panel {
    padding: 12px;
  }
  /* Task page mobile */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-header .btn {
    width: 100%;
    justify-content: center;
  }
  .filter-bar {
    flex-direction: column;
    gap: 8px;
  }
  .filter-bar select,
  .filter-bar input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Operations statistics */
.stats-panel { overflow: hidden; }

.stats-toolbar {
  min-height: 72px;
  height: auto;
  padding: 12px 20px;
}

.stats-toolbar .panel-actions select {
  width: 132px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 32px 0 10px;
  color: var(--text);
  background: var(--panel);
  font-size: 13px;
}

.stats-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin: 20px !important;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.stats-card {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 20px !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: var(--panel) !important;
}

.stats-card:last-child { border-right: 0 !important; }

.stats-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #2563eb;
}

.stats-card:nth-child(2)::before { background: #0891b2; }
.stats-card:nth-child(3)::before { background: #16a34a; }
.stats-card:nth-child(4)::before { background: #ca8a04; }
.stats-card:nth-child(5)::before { background: #7c3aed; }
.stats-card:nth-child(6)::before { background: #dc2626; }

.stats-card-label {
  margin-bottom: 12px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 600;
}

.stats-card-num {
  margin-bottom: 12px !important;
  color: var(--text) !important;
  font-size: 30px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums;
}

.stats-card-sub {
  padding-left: 8px;
  border-left: 2px solid #dbeafe;
  color: var(--muted) !important;
  font-size: 12px !important;
  line-height: 1.4;
}

.stats-section-head {
  min-height: 48px;
  margin: 0 20px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
}

.stats-section-head h2 { margin: 0; font-size: 14px; }

.stats-table-wrap {
  margin: 0 20px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.stats-table { min-width: 780px; }
.stats-table th:not(:first-child),
.stats-table td:not(:first-child) { text-align: right; }
.stats-table td { height: 48px; font-variant-numeric: tabular-nums; }

.stats-detail-tabs {
  margin: 0 20px 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.stats-tabs-bar {
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: stretch;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-soft);
}

.stats-tab {
  position: relative;
  min-width: 0;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.stats-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}

.stats-tab:hover { color: var(--text); }
.stats-tab.active { color: var(--blue); }
.stats-tab.active::after { background: var(--blue); }
.stats-tab:not(.active) .stats-list-count {
  color: var(--muted);
  background: #e5e7eb;
}

.stats-detail-list {
  min-width: 0;
  overflow: hidden;
}

.stats-list-head {
  min-height: 64px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.stats-list-head h2,
.stats-list-head p { margin: 0; }
.stats-list-head h2 { font-size: 14px; }
.stats-list-head p { margin-top: 3px; color: var(--muted); font-size: 12px; }

.stats-list-count {
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #1d4ed8;
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stats-record-table { min-width: 540px; }
.stats-reply-table { min-width: 720px; }
.stats-record-table td { height: 54px; }
.stats-record-table td strong,
.stats-record-table td small { display: block; }
.stats-record-table td small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.stats-time-cell { width: 126px; color: var(--muted); white-space: nowrap; }
.stats-message-text {
  display: block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pagination-bar {
  min-height: 56px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.pagination-total,
.pagination-status {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-status {
  min-width: 88px;
  text-align: center;
}

.stats-pagination {
  min-height: 48px;
  margin: -8px 20px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

@media (max-width: 1100px) {
  .stats-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .stats-card,
  .stats-card:nth-child(3) { border-right: 1px solid var(--border) !important; }
  .stats-card:nth-child(even) { border-right: 0 !important; }
  .stats-card:nth-child(-n+4) { border-bottom: 1px solid var(--border) !important; }
  .stats-card:nth-child(n+5) { border-bottom: 0 !important; }
  .stats-card:last-child { border-right: 0 !important; }
}

.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #f5c46b;
  border-radius: 8px;
  background: #fff8e8;
}
.update-banner[hidden] { display: none; }
.update-banner strong { display: block; font-size: 14px; }
.update-banner p { margin: 4px 0 0; color: #795b20; font-size: 12px; white-space: pre-wrap; }

.release-table { min-width: 860px; }
.release-table td strong,
.release-table td small { display: block; }
.release-table td small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.release-notes {
  display: -webkit-box;
  max-width: 360px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}
.release-hash { color: var(--muted); font-size: 11px; }

@media (max-width: 768px) {
  .stats-toolbar { align-items: stretch; flex-direction: column; }
  .stats-toolbar .panel-actions,
  .stats-toolbar .panel-actions select { width: 100%; }
  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 14px !important;
  }
  .stats-card,
  .stats-card:nth-child(3) {
    border-right: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .stats-card:nth-child(even) { border-right: 0 !important; }
  .stats-card:nth-child(-n+4) { border-bottom: 1px solid var(--border) !important; }
  .stats-card:nth-child(n+5) { border-bottom: 0 !important; }
  .stats-card:last-child { border-right: 0 !important; }
  .stats-section-head { margin: 0 14px; }
  .stats-table-wrap { margin: 0 14px 14px; }
  .stats-detail-tabs { margin: 0 14px 14px; }
  .stats-tabs-bar { gap: 16px; overflow-x: auto; }
  .stats-tab { flex: 0 0 auto; }
  .admin-page .panel { padding: 0; }
  .task-filter-bar { align-items: stretch; }
  .task-filter-bar label,
  .task-filter-bar select { width: 100%; max-width: none; }
  .stats-pagination { margin: -4px 14px 14px; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: 94vh; }
}

@media (max-width: 480px) {
  .admin-shell { display: block; }

  .admin-shell .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .admin-shell .brand { display: none; }

  .admin-shell .nav {
    display: flex;
    gap: 4px;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .admin-shell .nav::-webkit-scrollbar { display: none; }

  .admin-shell .nav-item {
    width: auto;
    min-width: 96px;
    flex: 0 0 auto;
    padding: 8px 4px;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
  }

  .admin-shell .nav-item span:last-child { display: inline; }
  .admin-shell .nav-icon { flex: 0 0 auto; }

  .admin-shell .topbar {
    top: 49px;
    height: 54px;
    padding: 0 12px;
  }

  .admin-shell .topbar-actions { gap: 6px; }
  .admin-shell .user-pill { padding-left: 6px; }
  .admin-shell .content { padding: 14px 10px; }
  .admin-shell .page-head { margin-bottom: 14px; }
  .admin-shell .page-head h1 { font-size: 20px; }
  .admin-shell .page-head p { font-size: 12px; }

  .stats-toolbar { padding: 12px 14px; }
  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 10px !important;
  }

  .stats-card,
  .stats-card:nth-child(3),
  .stats-card:nth-child(even) {
    min-height: 110px;
    padding: 14px !important;
    border-right: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
  }

  .stats-card:nth-child(even) { border-right: 0 !important; }
  .stats-card:last-child { border-right: 0 !important; }
  .stats-card-num { font-size: 24px !important; }
  .stats-card-label,
  .stats-card-num { margin-bottom: 8px !important; }

  .stats-section-head { margin: 0 10px; }
  .stats-table-wrap { margin: 0 10px 10px; }
  .stats-detail-tabs { margin: 0 10px 10px; }
  .stats-tabs-bar { padding: 0 10px; gap: 18px; }
  .stats-tab { font-size: 12px; }
  .stats-list-head { padding: 10px 12px; }
  .stats-record-table td { height: 50px; }

  .pagination-bar {
    min-height: 0;
    padding: 10px 12px;
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions {
    width: 100%;
    justify-content: space-between;
  }

  .pagination-actions .btn { flex: 1 1 0; }
  .pagination-status { min-width: 92px; align-self: center; }
  .modal-head { padding: 12px; }
  .admin-form { padding: 12px; }
  .toast { right: 10px; bottom: 10px; left: 10px; max-width: none; }
}

/* Operations command redesign */
:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fb;
  --panel-ink: #111820;
  --border: #dfe5ea;
  --border-strong: #c9d3dc;
  --text: #18212b;
  --muted: #657282;
  --faint: #98a4b3;
  --blue: #1463ff;
  --blue-soft: #eaf1ff;
  --green: #138a63;
  --green-soft: #e8f7f0;
  --amber: #b86a08;
  --amber-soft: #fff4df;
  --red: #c72f3b;
  --red-soft: #fff0f1;
  --steel: #334155;
  --cyan: #008ea8;
  --shadow: 0 1px 1px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(21, 35, 52, 0.08);
  --shadow-soft: 0 16px 44px rgba(18, 30, 43, 0.12);
  --font: "Inter", "PingFang SC", "Microsoft YaHei", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --data-font: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
}

body {
  background:
    linear-gradient(180deg, rgba(20, 99, 255, 0.05), rgba(20, 99, 255, 0) 280px),
    var(--bg);
  color: var(--text);
}

button,
a,
input,
select,
textarea {
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(20, 99, 255, 0.22);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, #111820 0%, #17212c 100%);
  border-right: 0;
  color: #e7edf5;
  box-shadow: 12px 0 30px rgba(17, 24, 32, 0.14);
}

.brand {
  height: 76px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: linear-gradient(135deg, #f0444f 0%, #1463ff 100%);
  box-shadow: 0 10px 28px rgba(240, 68, 79, 0.28);
  letter-spacing: 0;
}

.brand-copy strong {
  color: #ffffff;
  font-size: 19px;
  letter-spacing: 0;
}

.brand-copy span {
  color: #9fb0c3;
}

.brand:hover .brand-copy strong {
  color: #ffffff;
}

.brand:hover .brand-mark {
  transform: translateY(-1px);
}

.nav {
  padding: 14px 12px;
  gap: 6px;
}

.nav-item {
  position: relative;
  min-height: 42px;
  color: #a9b7c7;
  border-radius: 7px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.nav-item.active {
  background: #ffffff;
  color: #111820;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #f0444f;
}

.nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: inherit;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--data-font);
  font-size: 11px;
}

.nav-item.active .nav-icon {
  color: #ffffff;
  background: #111820;
}

.main-shell {
  background: transparent;
}

.topbar {
  height: 64px;
  padding: 0 28px;
  background: rgba(244, 246, 248, 0.88);
  border-bottom: 1px solid rgba(201, 211, 220, 0.72);
  backdrop-filter: blur(16px);
}

.topbar strong {
  letter-spacing: 0;
}

.content {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.page-head {
  min-height: 58px;
  margin-bottom: 18px;
  padding: 0 2px;
}

.page-head h1 {
  font-size: 26px;
  font-weight: 760;
  letter-spacing: 0;
}

.page-head p {
  max-width: 720px;
  color: #687789;
}

.panel {
  border-color: rgba(201, 211, 220, 0.9);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 68px;
  height: auto;
  padding: 14px 18px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.panel-head h2 {
  font-size: 15px;
  font-weight: 760;
}

.panel-head p {
  color: #718092;
}

.btn {
  border-radius: 7px;
  font-weight: 700;
}

.btn-primary {
  background: #111820;
  box-shadow: 0 8px 18px rgba(17, 24, 32, 0.16);
}

.btn-primary:hover {
  background: #253241;
  transform: translateY(-1px);
}

.btn-ghost,
.btn-secondary {
  background: #ffffff;
  border-color: #cfd8e2;
}

.btn-ghost:hover,
.btn-secondary:hover {
  background: #f6f8fa;
  border-color: #b9c6d2;
}

.segmented {
  background: #e8edf3;
  border-radius: 7px;
}

.segmented button {
  border-radius: 5px;
}

.user-pill {
  color: #435266;
}

.avatar {
  background: #111820;
}

.stats-panel {
  overflow: hidden;
  border-radius: 7px;
}

.stats-toolbar {
  min-height: 78px;
  padding: 16px 20px;
}

.stats-toolbar .panel-actions select,
.task-filter-bar select,
.task-filter-bar input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.login-card input {
  border-color: #cfd8e2;
  border-radius: 7px;
  background: #ffffff;
}

.stats-toolbar .panel-actions select:hover,
.task-filter-bar select:hover,
.task-filter-bar input:hover,
.admin-form input:hover,
.admin-form select:hover,
.admin-form textarea:hover {
  border-color: #aebdcb;
}

.stats-summary-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr)) !important;
  gap: 1px !important;
  margin: 0 !important;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #dfe5ea;
}

.stats-card {
  min-height: 146px;
  padding: 20px 18px 18px !important;
  border: 0 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 254, 0.98)) !important;
}

.stats-card::before {
  left: 18px;
  right: 18px;
  top: 14px;
  height: 4px;
  border-radius: 999px;
}

.stats-card-label {
  margin-top: 10px;
  color: #657282 !important;
  font-size: 12px !important;
  letter-spacing: 0;
}

.stats-card-num {
  color: #111820 !important;
  font-family: var(--data-font);
  font-size: clamp(24px, 2vw, 34px) !important;
  font-weight: 780 !important;
}

.stats-card-sub {
  padding-left: 10px;
  border-left-color: #cbd7e4;
  color: #687789 !important;
}

.stats-section-head {
  min-height: 56px;
  margin: 0;
  padding: 0 20px;
  border-top: 0;
  background: #ffffff;
}

.stats-section-head h2 {
  font-size: 15px;
  font-weight: 760;
}

.stats-table-wrap {
  margin: 0 20px 20px;
  border-color: #d7e0e8;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.task-table th {
  height: 42px;
  color: #627083;
  background: #f3f6f9;
  border-bottom-color: #dce4ec;
  font-size: 11px;
  text-transform: none;
}

.task-table td {
  height: 62px;
  color: #1f2a37;
  border-bottom-color: #edf1f5;
}

.task-table tbody tr:hover {
  background: #f2f7ff;
}

.task-table td:first-child,
.stats-time-cell,
.stats-table td {
  font-family: var(--data-font);
}

.status-badge {
  border-radius: 999px !important;
  font-weight: 750 !important;
}

.stats-record-table td strong {
  color: #17212c;
  font-weight: 750;
}

.stats-record-table td small {
  color: #748397;
}

.stats-message-text {
  max-width: 360px;
}

.task-filter-bar {
  padding: 14px 16px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--border);
}

.task-filter-bar label {
  color: #657282;
}

.pagination-bar {
  background: #fbfcfd;
}

.pagination-actions .btn {
  min-width: 76px;
}

.modal-backdrop {
  background: rgba(17, 24, 32, 0.46);
  backdrop-filter: blur(6px);
}

.modal {
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.modal-head {
  background: #fbfcfd;
}

.login-gate {
  background:
    radial-gradient(circle at 24% 18%, rgba(20, 99, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #f4f6f8, #e9eef4);
}

.login-card {
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand-copy,
  .nav-item span:last-child,
  .user-pill span:last-child {
    display: none;
  }

  .nav {
    padding: 12px 10px;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
  }

  .nav-item.active::before {
    left: -10px;
  }

  .stats-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  body {
    min-width: 0;
  }

  .admin-shell {
    display: block;
  }

  .admin-shell .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: 100%;
    height: auto;
    display: block;
    background: #111820;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(17, 24, 32, 0.18);
  }

  .admin-shell .brand {
    display: flex;
    height: 58px;
    padding: 0 14px;
    justify-content: flex-start;
  }

  .admin-shell .brand-copy {
    display: grid;
  }

  .admin-shell .brand-copy strong {
    font-size: 16px;
  }

  .admin-shell .nav {
    display: flex;
    gap: 8px;
    padding: 8px 10px 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .admin-shell .nav::-webkit-scrollbar {
    display: none;
  }

  .admin-shell .nav-item {
    width: auto;
    min-width: max-content;
    min-height: 36px;
    flex: 0 0 auto;
    padding: 7px 10px;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #c0cad7;
  }

  .admin-shell .nav-item span:last-child {
    display: inline;
  }

  .admin-shell .nav-item.active {
    background: #ffffff;
    color: #111820;
  }

  .admin-shell .nav-item.active::before {
    display: none;
  }

  .admin-shell .nav-icon {
    width: 22px;
    height: 22px;
  }

  .admin-shell .topbar {
    position: sticky;
    top: 104px;
    height: auto;
    min-height: 54px;
    padding: 8px 12px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .user-pill {
    display: none;
  }

  .content {
    padding: 16px 10px 20px;
  }

  .page-head {
    margin-bottom: 12px;
  }

  .page-head h1 {
    font-size: 21px;
  }

  .page-head p {
    font-size: 12px;
  }

  .panel,
  .stats-panel {
    border-radius: 7px;
  }

  .panel-head,
  .stats-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .panel-actions,
  .panel-actions .btn,
  .stats-toolbar .panel-actions,
  .stats-toolbar .panel-actions select {
    width: 100%;
  }

  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin: 0 !important;
  }

  .stats-card {
    min-height: 126px;
    padding: 18px 14px 14px !important;
  }

  .stats-card:nth-child(n) {
    border: 0 !important;
  }

  .stats-card-num {
    font-size: 24px !important;
  }

  .stats-section-head {
    padding: 0 14px;
  }

  .stats-table-wrap {
    margin: 0 10px 10px;
  }

  .task-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .task-filter-bar label,
  .task-filter-bar select,
  .task-filter-bar input {
    width: 100%;
    max-width: none;
  }

  .task-table th,
  .task-table td {
    padding: 10px 12px !important;
    white-space: nowrap;
  }

  .stats-message-text {
    max-width: 220px;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .pagination-actions {
    width: 100%;
  }

  .pagination-actions .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 360px) {
  .admin-shell .topbar {
    top: 102px;
  }

  .admin-shell .brand {
    height: 56px;
  }

  .admin-shell .nav {
    padding-top: 7px;
  }

  .stats-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-card {
    min-height: 112px;
  }

  .topbar > div:first-child {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .language-switch {
    flex: 1 1 auto;
  }

  .language-switch button {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
