:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --line: #dfe7f1;
  --line-strong: #cbd7e6;
  --text: #1d2939;
  --muted: #667085;
  --blue: #2563eb;
  --blue-bg: #eaf1ff;
  --cs-bg: #f5f7fb;
  --cs-card: #ffffff;
  --cs-line: #dfe8f4;
  --cs-blue: #155cff;
  --cs-ink: #172437;
  --cs-text: #253853;
  --cs-muted: #66758d;
  --ui-primary: #18181b;
  --ui-primary-hover: #27272a;
  --ui-primary-active: #09090b;
  --ui-primary-text: #ffffff;
  --ui-default-bg: #ffffff;
  --ui-default-hover: #f4f4f5;
  --ui-default-active: #e4e4e7;
  --ui-text: #18181b;
  --ui-muted: #71717a;
  --ui-border: #e4e4e7;
  --ui-border-strong: #d4d4d8;
  --ui-bg: #ffffff;
  --ui-bg-soft: #fafafa;
  --ui-bg-raised: #ffffff;
  --ui-bg-elevated: #f5f7fb;
  --ui-danger: #dc2626;
  --ui-danger-hover: #b91c1c;
  --ui-danger-soft: #fef2f2;
  --ui-success: #16a34a;
  --ui-success-soft: #f0fdf4;
  --ui-warning: #ea580c;
  --ui-warning-soft: #fff7ed;
  --ui-ring: rgba(24, 24, 27, 0.14);
  --ui-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.06);
  --ui-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10);
  --ui-radius-xs: 4px;
  --ui-radius-sm: 6px;
  --ui-radius-md: 8px;
  --ui-radius-lg: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--bg);
}

html[data-theme="dark"] {
  --bg: #08111f;
  --surface: #101b2d;
  --line: #263a55;
  --line-strong: #365174;
  --text: #f4f8ff;
  --muted: #9fb0c6;
  --blue: #6aa2ff;
  --blue-bg: #172b4e;
  --cs-bg: #08111f;
  --cs-card: #111d2f;
  --cs-line: #263a55;
  --cs-blue: #83b4ff;
  --cs-ink: #f4f8ff;
  --cs-text: #dce8f7;
  --cs-muted: #9fb0c6;
  --ui-primary: #2f6cff;
  --ui-primary-hover: #4f86ff;
  --ui-primary-active: #1d58db;
  --ui-primary-text: #ffffff;
  --ui-default-bg: #101b2d;
  --ui-default-hover: #16243a;
  --ui-default-active: #1d314e;
  --ui-text: #f4f8ff;
  --ui-muted: #9fb0c6;
  --ui-border: #263a55;
  --ui-border-strong: #365174;
  --ui-bg: #070d1a;
  --ui-bg-soft: #0b1526;
  --ui-bg-raised: #101b2d;
  --ui-bg-elevated: #132238;
  --ui-danger: #f87171;
  --ui-danger-hover: #ef4444;
  --ui-danger-soft: #321b1d;
  --ui-success: #4ade80;
  --ui-success-soft: #10291d;
  --ui-warning: #fb923c;
  --ui-warning-soft: #2f2114;
  --ui-ring: rgba(47, 108, 255, 0.28);
  --ui-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
  --ui-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.30);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 0;
  min-height: 100%;
}

body.front-route-admin {
  background: var(--cs-bg);
  color: var(--text);
  letter-spacing: 0;
}

button,
a,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--ui-ring);
}

.admin-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.cs-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 70px;
  display: grid;
  grid-template-columns: 216px minmax(320px, 560px) minmax(max-content, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--cs-line);
  backdrop-filter: saturate(160%) blur(10px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-toggle,
.sidebar-close {
  width: 38px;
  height: 38px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #fff;
  color: #17233d;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.16s cubic-bezier(.2, 0, 0, 1), border-color 0.16s cubic-bezier(.2, 0, 0, 1), transform 0.16s cubic-bezier(.2, 0, 0, 1);
}

.sidebar-toggle:hover,
.sidebar-close:hover {
  background: #f4f8ff;
  border-color: #c7d7ed;
  transform: translateY(-1px);
}

.sidebar-toggle .cs-icon,
.sidebar-close .cs-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.sidebar-close {
  display: none;
}

.brand-image-lockup {
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-image-lockup::before,
.brand-image-lockup::after {
  display: none;
  content: none;
}

.app-brand .brand-image-lockup {
  height: 70px;
}

.brand-logo-stack {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  height: 46px;
  max-width: 260px;
  line-height: 0;
  flex: 0 0 auto;
}

.brand-logo-image {
  display: block;
  width: auto;
  height: 46px;
  max-width: 260px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.brand-logo-dark {
  display: none;
}

.app-brand .brand-logo-stack {
  height: 34px;
  max-width: 184px;
}

.app-brand .brand-logo-image {
  height: 34px;
  max-width: 184px;
}

html[data-theme="dark"] .brand-logo-light {
  display: none;
}

html[data-theme="dark"] .brand-logo-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .brand-logo-light {
    display: none;
  }

  html:not([data-theme="light"]) .brand-logo-dark {
    display: block;
  }
}

.app-search {
  width: min(560px, 100%);
  max-width: 560px;
  height: 44px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9e3ef;
  border-radius: 12px;
  background: #fff;
  padding: 0 6px 0 12px;
  color: #526176;
  box-shadow: 0 10px 28px rgba(15, 35, 70, 0.045);
}

.app-search:focus-within {
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08), 0 12px 30px rgba(15, 35, 70, 0.06);
}

.app-search span {
  display: grid;
  place-items: center;
  color: #526176;
}

.app-search input,
.app-search input:not([type="checkbox"]):not([type="radio"]) {
  height: 40px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 6px;
  color: #18243a;
  font-size: 14px;
  font-weight: 760;
}

.app-search input:hover,
.app-search input:focus {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.app-search input::placeholder {
  color: #8b98aa;
  font-weight: 720;
}

.app-search kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  border: 1px solid #dce5f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  font: 800 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.04);
}

.app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
}

.theme-icon {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #17233d;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s cubic-bezier(.2, 0, 0, 1);
}

.theme-icon .cs-icon {
  width: 22px;
  height: 22px;
}

.theme-icon:hover {
  background: #f8fbff;
  color: var(--cs-blue);
  transform: rotate(12deg);
}

.nav-cta,
.app-upload {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--ui-primary);
  border-radius: 8px;
  background: var(--ui-primary);
  color: var(--ui-primary-text);
  padding: 0 16px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-cta:hover,
.app-upload:hover {
  background: var(--ui-primary-hover);
  border-color: var(--ui-primary-hover);
  color: var(--ui-primary-text);
  transform: translateY(-1px);
  box-shadow: var(--ui-shadow-md);
}

.app-upload .cs-icon {
  width: 16px;
  height: 16px;
}

.top-popover-wrap {
  position: relative;
}

.app-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: #253853;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.app-bell .cs-icon {
  width: 20px;
  height: 20px;
}

.app-bell span {
  position: absolute;
  right: 4px;
  top: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ef3349;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
}

.top-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 80;
  width: 310px;
  border: 1px solid var(--cs-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(20, 36, 64, 0.14);
  padding: 12px;
}

.top-popover[hidden] {
  display: none;
}

.top-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.top-popover-head a {
  color: var(--cs-blue);
  text-decoration: none;
  font-weight: 900;
}

.notice-list-panel {
  display: grid;
  gap: 8px;
}

.notice-item {
  border: 1px solid #e7edf5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.notice-item strong {
  display: block;
  color: #17233d;
}

.notice-item span {
  display: block;
  margin-top: 5px;
  color: #66758d;
  font-size: 12px;
  line-height: 1.5;
}

.app-user-menu {
  width: 190px;
  padding: 6px;
}

.app-user-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  color: #253853;
  text-decoration: none;
  font-weight: 900;
}

.app-user-menu a:hover {
  background: #f4f8ff;
  color: var(--cs-blue);
}

.app-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172f;
  text-decoration: none;
  font-weight: 900;
}

.app-user-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.app-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dbeafe, #8bb5ff);
  color: #0f5dff;
  font-weight: 900;
}

.app-user strong {
  display: block;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.app-user em {
  display: inline-flex;
  width: max-content;
  max-width: 120px;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--cs-blue);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user i {
  font-style: normal;
  color: #6b7890;
}

.app-user i .cs-icon {
  width: 16px;
  height: 16px;
}

.cloud-app {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  background: var(--cs-bg);
}

.cloud-sidebar {
  position: sticky;
  top: 70px;
  align-self: start;
  height: calc(100vh - 70px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 28px 16px 30px;
  background: #fff;
  border-right: 1px solid var(--cs-line);
  transition: grid-template-columns 0.2s cubic-bezier(.2, 0, 0, 1), width 0.2s cubic-bezier(.2, 0, 0, 1), padding 0.2s cubic-bezier(.2, 0, 0, 1), transform 0.22s cubic-bezier(.2, 0, 0, 1), opacity 0.18s cubic-bezier(.2, 0, 0, 1);
}

.cloud-sidebar-backdrop {
  display: none;
}

.side-menu {
  display: grid;
  gap: 4px;
}

.side-menu a {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: #253853;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s cubic-bezier(.2, 0, 0, 1), box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.side-menu a:hover {
  transform: translateX(2px);
  background: #f8fbff;
  border-color: transparent;
}

.side-menu a.active {
  background: #eaf1ff;
  color: #155cff;
}

.side-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.side-icon .cs-icon {
  width: 18px;
  height: 18px;
}

.side-section-label {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 6px 14px 0;
  color: #8a97aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.side-divider {
  height: 1px;
  margin: 10px 8px;
  background: #edf2f8;
}

.cloud-workspace {
  min-width: 0;
  max-width: 100%;
  padding: 28px 28px 44px;
  background: #f5f7fb;
  color: var(--text);
  overflow: visible;
}

.admin-console-v2,
.admin-stage {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.admin-static-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--cs-line);
  border-radius: 12px;
  background: #fff;
  color: #66758d;
  text-align: center;
  font-weight: 850;
  box-shadow: 0 18px 48px rgba(31, 52, 82, 0.06);
}

.admin-static-loading i {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(21, 92, 255, 0.18);
  border-top-color: var(--cs-blue);
  border-radius: 50%;
  animation: adminStaticSpin 0.8s linear infinite;
}

.admin-static-loading strong {
  color: #17233d;
  font-size: 17px;
}

.admin-static-loading span {
  max-width: 520px;
  line-height: 1.6;
}

@keyframes adminStaticSpin {
  to {
    transform: rotate(360deg);
  }
}

body.sidebar-collapsed .cloud-app {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.sidebar-collapsed .cloud-sidebar {
  width: 0;
  min-width: 0;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  border-right: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

html[data-theme="dark"] body.front-route-admin,
html[data-theme="dark"] .cloud-app,
html[data-theme="dark"] .cloud-workspace {
  background: #0b1526;
  color: #eaf2ff;
}

html[data-theme="dark"] .app-topbar {
  background: rgba(8, 17, 31, 0.96);
  border-bottom-color: #263a55;
  box-shadow: none;
}

html[data-theme="dark"] .cloud-sidebar {
  background: #08111f;
  border-right-color: #263a55;
}

html[data-theme="dark"] .side-menu a {
  color: #c7d5e8;
}

html[data-theme="dark"] .side-menu a:hover {
  background: #101d31;
  color: #eaf2ff;
}

html[data-theme="dark"] .side-menu a.active {
  background: #1d3d72;
  color: #83b4ff;
}

html[data-theme="dark"] .side-section-label {
  color: #73849d;
}

html[data-theme="dark"] .side-divider {
  background: #263a55;
}

html[data-theme="dark"] .app-search,
html[data-theme="dark"] .top-popover,
html[data-theme="dark"] .app-user,
html[data-theme="dark"] .app-bell,
html[data-theme="dark"] .theme-icon,
html[data-theme="dark"] .sidebar-toggle,
html[data-theme="dark"] .sidebar-close,
html[data-theme="dark"] .admin-static-loading {
  background: #111d2f;
  border-color: #2b405d;
  color: #dce8f7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .app-search:focus-within {
  border-color: #5a8dff;
  box-shadow: 0 0 0 3px rgba(90, 141, 255, 0.16);
}

html[data-theme="dark"] .app-search span {
  color: #9fb0c6;
}

html[data-theme="dark"] .app-search input,
html[data-theme="dark"] .app-search input:not([type="checkbox"]):not([type="radio"]) {
  background: transparent;
  color: #edf5ff;
}

html[data-theme="dark"] .app-search input::placeholder {
  color: #8798ad;
}

html[data-theme="dark"] .app-search kbd,
html[data-theme="dark"] .app-user em {
  background: #1d3d72;
  color: #83b4ff;
  border-color: #315b98;
}

html[data-theme="dark"] .notice-item {
  background: #101b2d;
  border-color: #2b405d;
  color: #dce8f7;
}

html[data-theme="dark"] .notice-item strong,
html[data-theme="dark"] .admin-static-loading strong {
  color: #f4f8ff;
}

html[data-theme="dark"] .notice-item span,
html[data-theme="dark"] .admin-static-loading span {
  color: #a8b9cf;
}

html[data-theme="dark"] .app-user strong {
  color: #f4f8ff;
}

html[data-theme="dark"] .app-user-menu a {
  color: #dce8f7;
}

html[data-theme="dark"] .app-user-menu a:hover {
  background: #1a3356;
  color: #83b4ff;
}

html[data-theme="dark"] .nav-cta,
html[data-theme="dark"] .app-upload {
  background: #f8fafc;
  border-color: #f8fafc;
  color: #0f172a;
}

html[data-theme="dark"] .nav-cta:hover,
html[data-theme="dark"] .app-upload:hover {
  background: #fff;
  border-color: #fff;
  color: #0f172a;
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 12000;
  min-width: 112px;
  max-width: min(360px, calc(100vw - 32px));
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 10px;
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

html[data-theme="dark"] .admin-toast {
  border-color: rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  color: #101828;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.38);
}

@media (max-width: 1024px) {
  .app-topbar {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .app-search {
    display: none;
  }

  .cloud-app {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 70px);
  }

  body.sidebar-collapsed .cloud-app {
    grid-template-columns: 1fr;
  }

  .cloud-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 80;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(282px, 84vw);
    height: auto;
    max-height: none;
    padding: 16px 18px 28px;
    background: #fff;
    box-shadow: 24px 0 70px rgba(17, 32, 54, 0.18);
    transform: translateX(-105%);
    opacity: 1;
    overflow: auto;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

  body.sidebar-open .cloud-sidebar {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-grid;
    align-self: flex-end;
    margin-bottom: 8px;
  }

  .cloud-sidebar-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    background: rgba(15, 27, 47, 0.35);
    backdrop-filter: blur(2px);
  }

  body.sidebar-open .cloud-sidebar-backdrop {
    display: block;
  }

  .cloud-sidebar-backdrop[hidden] {
    display: none;
  }

  html[data-theme="dark"] .cloud-sidebar {
    background: #08111f;
    border-right-color: #263a55;
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.36);
  }

  html[data-theme="dark"] .cloud-sidebar-backdrop {
    background: rgba(0, 0, 0, 0.52);
  }
}

@media (max-width: 640px) {
  .app-topbar {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 16px;
  }

  .app-brand .brand-image-lockup {
    height: 42px;
  }

  .app-brand .brand-logo-stack,
  .app-brand .brand-logo-image {
    height: 38px;
    max-width: 212px;
  }

  .app-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 40px minmax(132px, 1fr) 40px auto;
    gap: 8px;
    align-items: center;
  }

  .app-actions .theme-icon,
  .app-bell {
    width: 38px;
    height: 38px;
  }

  .app-upload {
    height: 38px;
    min-width: 0;
    padding: 0 12px;
    border-radius: 8px;
    white-space: nowrap;
  }

  .app-upload span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }

  .app-user {
    min-width: 0;
    gap: 8px;
  }

  .app-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
  }

  .app-user strong {
    max-width: 76px;
    font-size: 13px;
  }

  .app-user em {
    max-width: 82px;
  }

  .app-user i {
    display: none;
  }

  .top-popover {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 64px;
    width: auto;
  }

  .cloud-workspace {
    padding: 18px 16px 30px;
  }
}

@media (max-width: 1024px) {
  .cloud-sidebar {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .cloud-sidebar .side-menu {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }

  .sidebar-close {
    flex: 0 0 auto;
  }
}

@media (max-width: 640px) {
  .app-brand {
    width: 100%;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .app-brand .brand-image-lockup {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  .app-brand .brand-logo-stack {
    width: min(252px, calc(100vw - 96px));
    max-width: min(252px, calc(100vw - 96px));
    height: 40px;
    flex: 0 1 auto;
  }

  .app-brand .brand-logo-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 40px;
    object-fit: contain;
  }
}

@media (max-width: 370px) {
  .app-brand .brand-logo-stack {
    width: min(224px, calc(100vw - 88px));
    max-width: min(224px, calc(100vw - 88px));
    height: 36px;
  }

  .app-brand .brand-logo-image {
    max-height: 36px;
  }
}
