:root {
  --bg: #030812;
  --bg-deep: #02050b;
  --panel: rgba(6, 20, 33, 0.88);
  --panel-solid: #071624;
  --panel-soft: rgba(8, 29, 45, 0.62);
  --panel-hover: rgba(12, 42, 61, 0.76);
  --line: rgba(66, 211, 246, 0.17);
  --line-strong: rgba(66, 225, 255, 0.48);
  --cyan: #30e5ff;
  --cyan-soft: #93f1ff;
  --mint: #54ffc2;
  --blue: #438dff;
  --warm: #ffc857;
  --danger: #ff647c;
  --text: #e7f8ff;
  --text-2: #a7c5d5;
  --muted: #678498;
  --muted-2: #436073;
  --radius: 3px;
  --topbar-h: 66px;
  --statusbar-h: 30px;
  --left-rail-w: 236px;
  --right-rail-w: 306px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.app-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 4%, rgba(14, 102, 143, 0.16), transparent 30%),
    radial-gradient(circle at 78% 86%, rgba(31, 76, 151, 0.12), transparent 34%),
    linear-gradient(132deg, #02050b, #04101b 42%, #020812);
}

.app-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(129, 221, 255, 0.025) 3px,
    rgba(129, 221, 255, 0.025) 4px
  );
  pointer-events: none;
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42, 172, 210, 0.034) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 172, 210, 0.034) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 92%);
}

.aura {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.09;
}

.aura-a {
  top: -280px;
  left: 34%;
  background: var(--cyan);
}

.aura-b {
  right: -200px;
  bottom: -300px;
  background: var(--blue);
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  height: var(--topbar-h);
  align-items: center;
  gap: 26px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(65, 200, 237, 0.16);
  background: linear-gradient(90deg, rgba(4, 13, 23, 0.98), rgba(4, 17, 29, 0.9));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 21%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 12px var(--cyan);
  opacity: 0.72;
}

.top-brand {
  display: flex;
  width: var(--left-rail-w);
  flex: none;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.top-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(69, 224, 255, 0.48);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(33, 204, 242, 0.2), rgba(11, 57, 98, 0.12));
  box-shadow: inset 0 0 20px rgba(46, 218, 255, 0.08), 0 0 18px rgba(46, 218, 255, 0.08);
}

.top-brand-mark svg {
  width: 25px;
  height: 25px;
  stroke: var(--cyan);
  stroke-width: 1.3;
}

.top-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-brand-copy strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.top-brand-copy small {
  color: #52798d;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.top-ticker {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.ticker-item {
  display: inline-flex;
  height: 27px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(72, 207, 243, 0.12);
  color: #7b9bae;
  background: rgba(7, 28, 44, 0.46);
  font-size: 10px;
  white-space: nowrap;
}

.ticker-item svg {
  width: 12px;
  height: 12px;
  color: #74b9ce;
}

.ticker-badge {
  border-color: rgba(83, 255, 194, 0.15);
  color: #7ac9a9;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px var(--mint);
  animation: pulse 2.2s ease-in-out infinite;
}

.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(71, 209, 244, 0.17);
  border-radius: 2px;
  color: #79a7bb;
  background: rgba(7, 25, 39, 0.42);
  cursor: pointer;
  transition: 0.18s ease;
}

.icon-button:hover {
  border-color: rgba(65, 223, 255, 0.52);
  color: var(--cyan);
  background: rgba(17, 64, 86, 0.4);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.admin-entry {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(61, 210, 246, 0.24);
  border-radius: 2px;
  color: #78bed5;
  background: linear-gradient(145deg, rgba(20, 94, 120, 0.22), rgba(7, 31, 48, 0.38));
  font-size: 11px;
  cursor: pointer;
}

.admin-entry:hover {
  color: var(--cyan-soft);
  border-color: rgba(63, 226, 255, 0.48);
}

.admin-entry svg {
  width: 15px;
  height: 15px;
}

.admin-entry[hidden] {
  display: none;
}

.clock {
  padding: 0 4px;
  color: #b9efff;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(49, 228, 255, 0.3);
}

.user-chip {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.user-chip:hover {
  border-color: rgba(69, 206, 242, 0.16);
  background: rgba(10, 35, 52, 0.5);
}

.user-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(70, 227, 255, 0.37);
  border-radius: 50%;
  color: var(--cyan-soft);
  background: radial-gradient(circle at 35% 30%, #1c6d8b, #0b2b40 70%);
  font-size: 12px;
  box-shadow: 0 0 12px rgba(45, 215, 255, 0.1);
}

.user-avatar.large {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.user-chip-copy {
  display: flex;
  min-width: 60px;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.user-chip-copy strong {
  max-width: 90px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-copy small {
  color: #607f92;
  font-size: 8px;
}

.chevron-down {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
  color: #577587;
}

.user-popover {
  position: absolute;
  z-index: 50;
  top: 48px;
  right: 0;
  width: 240px;
  padding: 14px;
  border: 1px solid rgba(60, 213, 248, 0.28);
  background: rgba(5, 20, 32, 0.98);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}

.popover-identity {
  display: flex;
  gap: 11px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.popover-identity div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popover-identity strong {
  font-size: 13px;
  font-weight: 500;
}

.popover-identity span:not(.user-avatar) {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.popover-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 2px;
  color: var(--muted);
  font-size: 10px;
}

.popover-row b {
  color: var(--text-2);
  font-weight: 500;
}

.user-popover button {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid rgba(255, 100, 124, 0.14);
  color: #d98a98;
  background: rgba(92, 25, 40, 0.13);
  font-size: 10px;
  cursor: pointer;
}

.user-popover button:hover {
  color: var(--danger);
  border-color: rgba(255, 100, 124, 0.35);
}

.user-popover button svg {
  width: 14px;
  height: 14px;
}

.app-layout {
  display: grid;
  grid-template-columns: var(--left-rail-w) minmax(0, 1fr) var(--right-rail-w);
  gap: 12px;
  height: calc(100vh - var(--topbar-h) - var(--statusbar-h));
  padding: 12px 14px 10px;
}

.left-rail,
.right-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
}

.rail-block,
.side-panel,
.browser-panel,
.metric-card {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(9, 30, 47, 0.75), rgba(4, 16, 27, 0.72)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(131, 231, 255, 0.025);
}

.rail-block::before,
.side-panel::before,
.browser-panel::before,
.metric-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 13px;
  height: 13px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  opacity: 0.5;
  pointer-events: none;
}

.rail-block::after,
.side-panel::after,
.browser-panel::after,
.metric-card::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  opacity: 0.36;
  pointer-events: none;
}

.rail-block {
  padding: 13px;
}

.rail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #a9d5e3;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.rail-heading small {
  color: #3f6479;
  font-family: Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.13em;
}

.space-nav,
.shortcut-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.space-nav button,
.shortcut-nav button {
  position: relative;
  display: flex;
  width: 100%;
  height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 2px;
  color: #84a2b4;
  background: transparent;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: 0.16s ease;
}

.space-nav button::before,
.shortcut-nav button::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -1px;
  width: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  opacity: 0;
}

.space-nav button:hover,
.shortcut-nav button:hover {
  color: #c1eafa;
  background: rgba(18, 57, 77, 0.34);
}

.space-nav button.active,
.shortcut-nav button.active {
  border-color: rgba(57, 211, 250, 0.24);
  color: var(--cyan-soft);
  background: linear-gradient(90deg, rgba(29, 154, 196, 0.17), rgba(13, 47, 66, 0.18));
}

.space-nav button.active::before,
.shortcut-nav button.active::before {
  opacity: 1;
}

.space-nav button svg,
.shortcut-nav button svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: #5f9bb1;
}

.space-nav button.active svg,
.shortcut-nav button.active svg {
  color: var(--cyan);
}

.space-nav button span,
.shortcut-nav button span {
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-nav button em {
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 9px;
  color: #75c7ae;
  background: rgba(37, 143, 111, 0.16);
  font-size: 9px;
  font-style: normal;
}

.space-block {
  flex: 0 0 auto;
}

.shortcut-block {
  flex: 0 0 auto;
}

.storage-mini {
  flex: 1;
}

.mini-gauge {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 4px 0 2px;
}

.gauge-ring {
  --value: 0;
  position: relative;
  display: grid;
  width: 128px;
  height: 128px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #071623 0 54%, transparent 55%),
    conic-gradient(
      from 210deg,
      var(--cyan) 0,
      var(--mint) calc(var(--value) * 1%),
      rgba(64, 102, 121, 0.14) calc(var(--value) * 1%),
      rgba(64, 102, 121, 0.14) 100%
    );
  filter: drop-shadow(0 0 15px rgba(49, 220, 255, 0.08));
}

.gauge-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(66, 204, 238, 0.09);
  border-radius: 50%;
}

.gauge-ring > div {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.gauge-ring strong {
  font-family: Consolas, monospace;
  font-size: 24px;
  font-weight: 500;
  color: var(--cyan-soft);
  text-shadow: 0 0 16px rgba(50, 227, 255, 0.28);
}

.gauge-ring span {
  color: #597a8d;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.gauge-ring.small {
  width: 78px;
  height: 78px;
}

.gauge-ring.small strong {
  font-size: 16px;
}

.gauge-ring.small span {
  font-size: 7px;
}

.gauge-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.gauge-copy > strong {
  color: #d4f7ff;
  font-family: Consolas, monospace;
  font-size: 16px;
  font-weight: 500;
}

.gauge-copy > span {
  color: #68889b;
  font-size: 9px;
}

.gauge-copy b {
  color: #8fb6c6;
  font-family: Consolas, monospace;
  font-weight: 400;
}

.gauge-copy small {
  color: #3f5e70;
  font-size: 8px;
}

.node-panel {
  min-height: 103px;
}

.node-state {
  display: flex;
  gap: 10px;
  align-items: center;
}

.node-pulse {
  position: relative;
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
}

.node-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(84, 255, 194, 0.26);
  border-radius: 50%;
  animation: nodePulse 2s ease-out infinite;
}

.node-state div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.node-state strong {
  font-size: 10px;
  font-weight: 500;
}

.node-state small {
  color: #4f7a6b;
  font-family: Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.node-metrics {
  display: flex;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(68, 195, 231, 0.1);
}

.node-metrics span {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.node-metrics small {
  color: #536f80;
  font-size: 7px;
}

.node-metrics b {
  color: #91bdca;
  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 400;
}

.workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 11px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  flex: none;
}

.metric-card {
  display: flex;
  min-width: 0;
  height: 88px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
}

.metric-card::after {
  width: 9px;
  height: 9px;
}

.metric-card > div:not(.metric-spark) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.metric-card > div > span {
  color: #68889c;
  font-size: 9px;
  letter-spacing: 0.07em;
}

.metric-card > div > strong {
  overflow: hidden;
  color: #dffaff;
  font-family: Consolas, "Microsoft YaHei UI", sans-serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card > div > small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #4b7185;
  font-size: 7px;
}

.metric-card > div > small i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.metric-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(55, 213, 250, 0.14);
  background: rgba(24, 107, 132, 0.12);
}

.metric-icon svg {
  width: 20px;
  height: 20px;
}

.accent-cyan .metric-icon,
.accent-cyan .metric-code {
  color: var(--cyan);
}

.accent-mint .metric-icon,
.accent-mint .metric-code {
  color: var(--mint);
}

.accent-blue .metric-icon,
.accent-blue .metric-code {
  color: #68a4ff;
}

.accent-warm .metric-icon,
.accent-warm .metric-code {
  color: var(--warm);
}

.accent-mint > div > strong {
  color: #baffdf;
}

.accent-blue > div > strong {
  color: #cbe1ff;
}

.accent-warm > div > strong {
  color: #ffe4a3;
}

.metric-code {
  position: absolute;
  right: 10px;
  bottom: 7px;
  font-family: Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.15em;
  opacity: 0.33;
}

.metric-spark {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 68px;
  height: 25px;
  opacity: 0.45;
}

.browser-panel {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.browser-toolbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 11px 14px 10px 16px;
  border-bottom: 1px solid rgba(65, 203, 239, 0.12);
  background: linear-gradient(90deg, rgba(9, 33, 50, 0.4), transparent);
}

.breadcrumb-area {
  min-width: 180px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.section-kicker > span {
  color: #8ed9eb;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.section-kicker > span::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 10px;
  margin-right: 7px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  vertical-align: -1px;
}

.section-kicker small {
  color: #3d6175;
  font-size: 8px;
}

.breadcrumbs {
  display: flex;
  min-height: 18px;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.breadcrumbs button {
  padding: 2px 4px;
  border: 0;
  color: #63899d;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.breadcrumbs button:hover {
  color: var(--cyan-soft);
}

.breadcrumbs button:last-child {
  color: #b2e3f0;
}

.breadcrumbs svg {
  width: 9px;
  height: 9px;
  color: #395a6d;
}

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

.search-box {
  display: flex;
  width: clamp(170px, 18vw, 260px);
  height: 35px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid rgba(66, 207, 242, 0.16);
  background: rgba(3, 14, 24, 0.52);
}

.search-box:focus-within {
  border-color: rgba(63, 224, 255, 0.48);
  box-shadow: 0 0 0 3px rgba(49, 218, 255, 0.04);
}

.search-box svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: #557a8e;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 10px;
}

.search-box input::placeholder {
  color: #405d6e;
}

.search-key {
  color: #385568;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.primary-action,
.secondary-action,
.ghost-button,
.danger-button {
  display: inline-flex;
  height: 35px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 2px;
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.18s ease;
}

.primary-action {
  border: 1px solid rgba(80, 235, 255, 0.58);
  color: #03121a;
  background: linear-gradient(90deg, #4ee5ce, #36dfff 55%, #419bff);
  box-shadow: 0 0 16px rgba(42, 206, 245, 0.11);
  font-weight: 600;
}

.primary-action:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(42, 206, 245, 0.24);
  transform: translateY(-1px);
}

.primary-action:disabled {
  cursor: default;
  opacity: 0.38;
}

.secondary-action,
.ghost-button {
  border: 1px solid rgba(65, 207, 243, 0.2);
  color: #8ab8c9;
  background: rgba(8, 31, 47, 0.55);
}

.secondary-action:hover,
.ghost-button:hover {
  color: var(--cyan-soft);
  border-color: rgba(69, 220, 253, 0.44);
  background: rgba(18, 62, 82, 0.55);
}

.danger-button {
  border: 1px solid rgba(255, 100, 124, 0.38);
  color: #ff9dac;
  background: rgba(109, 28, 45, 0.25);
}

.danger-button:hover {
  border-color: rgba(255, 100, 124, 0.7);
  background: rgba(142, 34, 55, 0.32);
}

.primary-action svg,
.secondary-action svg,
.ghost-button svg,
.danger-button svg {
  width: 14px;
  height: 14px;
}

.primary-action.wide {
  width: 100%;
}

.upload-split {
  position: relative;
  display: flex;
}

.upload-split > .primary-action:first-child {
  border-radius: 2px 0 0 2px;
}

.split-caret {
  width: 27px;
  padding: 0;
  border-left-color: rgba(3, 27, 38, 0.28);
  border-radius: 0 2px 2px 0;
}

.split-caret svg {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}

.upload-menu {
  position: absolute;
  z-index: 40;
  top: 39px;
  right: 0;
  width: 168px;
  padding: 5px;
  border: 1px solid rgba(59, 213, 247, 0.25);
  background: rgba(5, 21, 34, 0.98);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.44);
}

.upload-menu button {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 0;
  color: #86a8b8;
  background: transparent;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}

.upload-menu button:hover {
  color: var(--cyan-soft);
  background: rgba(17, 65, 84, 0.45);
}

.upload-menu svg {
  width: 14px;
  height: 14px;
}

.view-toggle {
  display: flex;
  height: 35px;
  padding: 3px;
  border: 1px solid rgba(63, 203, 238, 0.16);
  background: rgba(5, 20, 32, 0.45);
}

.view-toggle button {
  display: grid;
  width: 28px;
  place-items: center;
  border: 0;
  color: #4f7082;
  background: transparent;
  cursor: pointer;
}

.view-toggle button.active {
  color: var(--cyan);
  background: rgba(25, 116, 142, 0.24);
}

.view-toggle svg {
  width: 14px;
  height: 14px;
}

.browser-subbar {
  display: flex;
  height: 38px;
  flex: none;
  align-items: center;
  gap: 14px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(59, 186, 221, 0.1);
  background: rgba(3, 14, 23, 0.32);
}

.filter-tabs {
  display: flex;
  gap: 2px;
}

.filter-tabs button {
  position: relative;
  height: 27px;
  padding: 0 10px;
  border: 0;
  color: #57788a;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.filter-tabs button:hover {
  color: #9bccdb;
}

.filter-tabs button.active {
  color: var(--cyan-soft);
}

.filter-tabs button.active::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -6px;
  left: 8px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #4e6e80;
  font-size: 8px;
}

.subbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.filter-button {
  position: relative;
  display: inline-flex;
  height: 25px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(58, 198, 232, 0.16);
  color: #5f8799;
  background: rgba(10, 39, 54, 0.3);
  font-size: 8px;
  cursor: pointer;
}

.filter-button:hover {
  border-color: rgba(58, 218, 250, 0.34);
  color: var(--cyan-soft);
}

.filter-button svg {
  width: 11px;
  height: 11px;
}

.filter-button i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 6px var(--mint);
}

.sort-label svg {
  width: 10px;
  height: 10px;
  transform: rotate(90deg);
}

.selection-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7ea3b6;
  font-size: 9px;
}

.selection-tools b {
  color: var(--cyan);
  font-family: Consolas, monospace;
}

.selection-tools button {
  display: inline-flex;
  height: 25px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgba(59, 205, 240, 0.2);
  color: #8fc0cf;
  background: rgba(13, 49, 67, 0.4);
  font-size: 8px;
  cursor: pointer;
}

.selection-tools svg {
  width: 11px;
  height: 11px;
}

.file-surface {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(rgba(24, 89, 113, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 89, 113, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

.file-table-header {
  display: grid;
  grid-template-columns: 35px minmax(220px, 1fr) 78px 142px 140px 164px;
  height: 34px;
  flex: none;
  align-items: center;
  padding: 0 13px;
  border-bottom: 1px solid rgba(62, 175, 207, 0.1);
  color: #46697c;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.checkbox-cell {
  position: relative;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  cursor: pointer;
}

.checkbox-cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-cell span {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  border: 1px solid #3d6274;
  background: rgba(4, 18, 28, 0.7);
}

.checkbox-cell input:checked + span {
  border-color: var(--cyan);
  background: rgba(31, 186, 216, 0.24);
}

.checkbox-cell input:checked + span::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 3px;
  width: 4px;
  height: 7px;
  border-right: 1px solid var(--cyan);
  border-bottom: 1px solid var(--cyan);
  transform: rotate(42deg);
}

.file-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 3px 6px 12px;
  scrollbar-color: #204d63 transparent;
  scrollbar-width: thin;
}

.file-list::-webkit-scrollbar,
.activity-list::-webkit-scrollbar,
.version-list::-webkit-scrollbar {
  width: 5px;
}

.file-list::-webkit-scrollbar-thumb,
.activity-list::-webkit-scrollbar-thumb,
.version-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #204d63;
}

.file-row {
  position: relative;
  display: grid;
  grid-template-columns: 35px minmax(220px, 1fr) 78px 142px 140px 164px;
  min-height: 47px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid transparent;
  border-bottom-color: rgba(61, 158, 187, 0.065);
  transition: 0.14s ease;
}

.file-row:hover {
  border-color: rgba(53, 197, 233, 0.16);
  background: linear-gradient(90deg, rgba(22, 87, 111, 0.18), rgba(8, 33, 49, 0.18));
}

.file-row.selected {
  border-color: rgba(59, 218, 250, 0.24);
  background: linear-gradient(90deg, rgba(25, 145, 177, 0.16), rgba(12, 43, 60, 0.15));
}

.file-row::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -1px;
  width: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  opacity: 0;
}

.file-row:hover::before {
  opacity: 0.55;
}

.file-main {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.file-type-icon {
  position: relative;
  display: grid;
  width: 32px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(57, 191, 226, 0.18);
  border-radius: 2px;
  color: #54c9e5;
  background: rgba(18, 78, 98, 0.18);
  font-family: Consolas, monospace;
  font-size: 7px;
}

.file-type-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 7px;
  height: 7px;
  border-bottom: 1px solid rgba(62, 205, 240, 0.2);
  border-left: 1px solid rgba(62, 205, 240, 0.2);
  background: rgba(5, 22, 34, 0.9);
}

.file-type-icon svg {
  width: 17px;
  height: 17px;
}

.file-type-icon.folder {
  color: var(--cyan);
  border-color: rgba(49, 221, 255, 0.25);
  background: rgba(21, 110, 137, 0.16);
}

.file-type-icon.doc { color: #6db4ff; background: rgba(28, 71, 135, 0.18); }
.file-type-icon.sheet { color: #5bf4b3; background: rgba(22, 103, 78, 0.17); }
.file-type-icon.slide { color: #ffb35d; background: rgba(124, 70, 22, 0.18); }
.file-type-icon.image { color: #d18cff; background: rgba(84, 45, 130, 0.18); }
.file-type-icon.video { color: #ff7193; background: rgba(120, 35, 60, 0.18); }
.file-type-icon.archive { color: #e7ca72; background: rgba(110, 88, 25, 0.18); }

.file-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.file-copy strong {
  overflow: hidden;
  color: #c7e5ef;
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-copy small {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #456678;
  font-size: 8px;
}

.file-copy small .type-label {
  color: #5c8193;
  font-family: Consolas, monospace;
  font-size: 7px;
  text-transform: uppercase;
}

.file-copy small .version-tag {
  padding: 1px 4px;
  border: 1px solid rgba(55, 208, 243, 0.15);
  color: #5f96a9;
  border-radius: 2px;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.file-cell {
  overflow: hidden;
  padding-right: 8px;
  color: #66889a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-cell.mono {
  font-family: Consolas, monospace;
}

.file-row .grid-meta {
  display: none;
}

.file-owner {
  display: flex;
  gap: 6px;
  align-items: center;
}

.file-owner i {
  display: grid;
  width: 19px;
  height: 19px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #70b7cb;
  background: rgba(26, 94, 116, 0.25);
  font-size: 7px;
  font-style: normal;
}

.row-actions {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  opacity: 0.34;
  transition: opacity 0.14s;
}

.file-row:hover .row-actions {
  opacity: 1;
}

.row-actions button {
  display: grid;
  width: 24px;
  height: 26px;
  place-items: center;
  border: 1px solid transparent;
  color: #658b9e;
  background: transparent;
  cursor: pointer;
}

.row-actions button:hover {
  border-color: rgba(62, 213, 248, 0.22);
  color: var(--cyan-soft);
  background: rgba(15, 63, 83, 0.42);
}

.row-actions button.danger:hover {
  border-color: rgba(255, 100, 124, 0.25);
  color: var(--danger);
  background: rgba(104, 27, 43, 0.22);
}

.row-actions svg {
  width: 14px;
  height: 14px;
}

.file-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.file-list.grid-view + .file-table-header {
  display: none;
}

.grid-view .file-row {
  display: flex;
  min-height: 156px;
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(52, 169, 199, 0.12);
  background: linear-gradient(145deg, rgba(8, 29, 44, 0.54), rgba(4, 16, 26, 0.42));
}

.grid-view .file-row > .checkbox-cell {
  position: absolute;
  top: 11px;
  right: 11px;
}

.grid-view .file-main {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: auto;
}

.grid-view .file-type-icon {
  width: 44px;
  height: 46px;
  margin-bottom: 8px;
}

.grid-view .file-type-icon svg {
  width: 21px;
  height: 21px;
}

.grid-view .file-copy {
  width: 100%;
}

.grid-view .file-cell:not(.grid-meta) {
  display: none;
}

.grid-view .grid-meta {
  display: block;
  margin-top: 8px;
  color: #4e7183;
  font-size: 8px;
}

.grid-view .row-actions {
  position: absolute;
  right: 7px;
  bottom: 7px;
  opacity: 0;
}

.grid-view .file-row:hover .row-actions {
  opacity: 1;
}

.empty-state {
  display: flex;
  min-height: 280px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #4f7184;
}

.empty-state .empty-orbit {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 1px solid rgba(55, 200, 235, 0.14);
  border-radius: 50%;
}

.empty-state .empty-orbit::before,
.empty-state .empty-orbit::after {
  content: "";
  position: absolute;
  border: 1px dashed rgba(55, 200, 235, 0.12);
  border-radius: 50%;
}

.empty-state .empty-orbit::before { inset: 10px; }
.empty-state .empty-orbit::after { inset: 24px; }

.empty-state svg {
  width: 28px;
  height: 28px;
  color: #407e92;
}

.empty-state strong {
  color: #789aac;
  font-size: 12px;
  font-weight: 400;
}

.empty-state span {
  font-size: 9px;
}

.browser-footer {
  display: flex;
  height: 29px;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-top: 1px solid rgba(53, 169, 200, 0.08);
  color: #405d6f;
  background: rgba(3, 12, 20, 0.38);
  font-family: Consolas, "Microsoft YaHei UI", sans-serif;
  font-size: 8px;
}

.browser-sync {
  display: flex;
  align-items: center;
  gap: 6px;
}

.browser-sync i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 7px var(--mint);
}

.drop-hint {
  position: absolute;
  z-index: 10;
  inset: 10px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed rgba(52, 225, 255, 0.58);
  color: var(--cyan-soft);
  background: rgba(3, 18, 30, 0.9);
  box-shadow: inset 0 0 65px rgba(22, 174, 210, 0.11);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.file-surface.dragging .drop-hint {
  display: flex;
}

.drop-hint svg {
  width: 36px;
  height: 36px;
}

.drop-hint strong {
  font-size: 14px;
  font-weight: 400;
}

.drop-hint span {
  color: #597b8d;
  font-size: 9px;
}

.right-rail {
  overflow: hidden;
}

.side-panel {
  padding: 13px;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.side-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-heading span {
  color: #99c7d6;
  font-size: 10px;
}

.side-heading small {
  color: #3e6073;
  font-family: Consolas, monospace;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.side-heading > b {
  color: var(--cyan);
  font-family: Consolas, monospace;
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 0 12px rgba(48, 229, 255, 0.2);
}

.side-heading > svg {
  width: 15px;
  height: 15px;
  color: #517c8f;
}

.storage-panel {
  flex: none;
}

.storage-overview {
  display: flex;
  gap: 16px;
  align-items: center;
}

.storage-numbers {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
}

.storage-numbers > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.storage-numbers small {
  color: #536f81;
  font-size: 8px;
}

.storage-numbers strong {
  overflow: hidden;
  color: #a6d5e2;
  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-chart {
  display: flex;
  height: 39px;
  gap: 5px;
  align-items: flex-end;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(56, 176, 209, 0.09);
}

.bar-chart span {
  position: relative;
  flex: 1;
  min-width: 2px;
  border-top: 1px solid rgba(68, 229, 255, 0.7);
  background: linear-gradient(to top, rgba(35, 185, 220, 0.04), rgba(35, 218, 247, 0.44));
  box-shadow: 0 -3px 8px rgba(33, 205, 236, 0.08);
}

.bar-chart span::after {
  content: attr(data-label);
  position: absolute;
  right: -2px;
  bottom: -10px;
  color: #3e6174;
  font-size: 6px;
}

.activity-panel {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.activity-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  padding-right: 2px;
}

.activity-item {
  display: flex;
  gap: 9px;
  padding: 8px 3px;
  border-bottom: 1px solid rgba(54, 160, 190, 0.065);
}

.activity-mark {
  position: relative;
  display: grid;
  width: 25px;
  height: 25px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(57, 196, 230, 0.12);
  border-radius: 50%;
  color: #65a7bb;
  background: rgba(16, 61, 79, 0.2);
}

.activity-mark svg {
  width: 12px;
  height: 12px;
}

.activity-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.activity-copy strong {
  overflow: hidden;
  color: #829fae;
  font-size: 9px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy strong b {
  color: #b6dce8;
  font-weight: 400;
}

.activity-copy span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #3f6072;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.panel-link {
  display: flex;
  height: 27px;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 6px;
  border: 0;
  color: #4f7b8d;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.panel-link:hover {
  color: var(--cyan-soft);
}

.panel-link svg {
  width: 10px;
  height: 10px;
}

.trend-panel {
  flex: none;
}

.trend-label {
  padding: 3px 6px;
  border: 1px solid rgba(54, 204, 238, 0.13);
  color: #507d90 !important;
  font-size: 7px !important;
}

.trend-chart {
  height: 66px;
}

.trend-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trend-chart .axis {
  stroke: rgba(77, 161, 187, 0.1);
  stroke-width: 0.5;
}

.trend-chart .line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 4px rgba(48, 229, 255, 0.35));
}

.trend-chart .area {
  fill: url(#trendGradient);
}

.trend-chart text {
  fill: #3e6376;
  font-family: Consolas, monospace;
  font-size: 6px;
}

.system-panel {
  flex: none;
}

.system-bars {
  display: flex;
  height: 24px;
  gap: 3px;
  align-items: flex-end;
  overflow: hidden;
}

.system-bars span {
  flex: 1;
  background: linear-gradient(to top, rgba(49, 206, 241, 0.15), rgba(49, 228, 255, 0.8));
  animation: systemWave 2.2s ease-in-out infinite alternate;
}

.system-bars span:nth-child(2n) { animation-delay: -0.4s; }
.system-bars span:nth-child(3n) { animation-delay: -1s; }
.system-bars span:nth-child(4n) { animation-delay: -1.6s; }
.system-bars span:nth-child(5n) { animation-delay: -0.8s; }

.system-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: #3c5a6b;
  font-family: Consolas, monospace;
  font-size: 6px;
  letter-spacing: 0.07em;
}

.statusbar {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: var(--statusbar-h);
  align-items: center;
  gap: 24px;
  padding: 0 18px;
  border-top: 1px solid rgba(52, 171, 204, 0.12);
  color: #4e6b7d;
  background: rgba(3, 10, 17, 0.9);
  font-family: Consolas, "Microsoft YaHei UI", sans-serif;
  font-size: 7px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(12px);
}

.statusbar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-ok {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 7px var(--mint);
}

.statusbar-right {
  margin-left: auto;
  color: #395668;
}

.upload-dock {
  position: fixed;
  z-index: 60;
  right: calc(var(--right-rail-w) + 28px);
  bottom: calc(var(--statusbar-h) + 16px);
  width: 360px;
  border: 1px solid rgba(62, 216, 249, 0.35);
  background: rgba(5, 21, 33, 0.97);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

.upload-dock header {
  display: flex;
  height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid rgba(58, 194, 228, 0.14);
}

.upload-dock header div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upload-dock header span {
  color: #b7e4ef;
  font-size: 10px;
}

.upload-dock header small {
  color: #4f798c;
  font-size: 7px;
}

.upload-dock header button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 0;
  color: #5f8394;
  background: transparent;
  cursor: pointer;
}

.upload-dock header svg {
  width: 14px;
  height: 14px;
  transform: rotate(90deg);
}

.upload-dock.collapsed .upload-list {
  display: none;
}

.upload-dock.collapsed header svg {
  transform: rotate(-90deg);
}

.upload-list {
  max-height: 210px;
  overflow: auto;
  padding: 4px 10px 9px;
}

.upload-item {
  padding: 8px 2px;
  border-bottom: 1px solid rgba(55, 159, 189, 0.07);
}

.upload-item-head {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #7898a9;
  font-size: 9px;
}

.upload-item-head span {
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item-head b {
  color: #5d8b9d;
  font-family: Consolas, monospace;
  font-size: 8px;
  font-weight: 400;
}

.upload-progress {
  height: 2px;
  margin-top: 6px;
  background: rgba(41, 106, 128, 0.25);
}

.upload-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  box-shadow: 0 0 7px rgba(48, 229, 255, 0.4);
  transition: width 0.15s;
}

.upload-item.error .upload-progress i {
  background: var(--danger);
}

.app-dialog {
  width: min(92vw, 900px);
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(58, 214, 248, 0.32);
  border-radius: 2px;
  color: var(--text);
  background: transparent;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.app-dialog::backdrop {
  background: rgba(1, 5, 10, 0.76);
  backdrop-filter: blur(6px);
}

.dialog-frame {
  position: relative;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(145deg, rgba(8, 28, 44, 0.99), rgba(3, 14, 24, 0.99));
}

.dialog-frame::before,
.dialog-frame::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.dialog-frame::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--cyan);
  border-left: 1px solid var(--cyan);
}

.dialog-frame::after {
  right: 0;
  bottom: 0;
  border-right: 1px solid var(--cyan);
  border-bottom: 1px solid var(--cyan);
}

.dialog-header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(57, 192, 226, 0.14);
  background: linear-gradient(90deg, rgba(12, 48, 67, 0.4), transparent);
}

.dialog-title {
  display: flex;
  min-width: 0;
  gap: 11px;
  align-items: center;
}

.dialog-title > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.dialog-title strong {
  overflow: hidden;
  color: #d8f5ff;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-title small {
  overflow: hidden;
  color: #527689;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-type-badge {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(55, 208, 244, 0.25);
  color: var(--cyan);
  background: rgba(20, 95, 119, 0.17);
}

.file-type-badge.danger {
  border-color: rgba(255, 100, 124, 0.24);
  color: var(--danger);
  background: rgba(109, 28, 44, 0.15);
}

.file-type-badge svg {
  width: 19px;
  height: 19px;
}

.dialog-actions {
  display: flex;
  flex: none;
  gap: 6px;
  align-items: center;
}

.dialog-actions .ghost-button {
  height: 31px;
}

.dialog-body {
  padding: 18px;
}

.preview-dialog {
  width: min(94vw, 1160px);
  height: min(88vh, 780px);
}

.preview-dialog .dialog-frame {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.preview-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.preview-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(26, 97, 122, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 97, 122, 0.04) 1px, transparent 1px),
    rgba(1, 8, 14, 0.6);
  background-size: 32px 32px;
}

.preview-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.preview-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-stage video,
.preview-stage audio {
  max-width: 92%;
  max-height: 88%;
}

.preview-text {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: auto;
  padding: 34px 42px;
  color: #a9d4df;
  background:
    linear-gradient(rgba(24, 89, 113, 0.035) 1px, transparent 1px),
    rgba(2, 11, 18, 0.78);
  background-size: 100% 28px;
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-size: 12px;
  line-height: 2.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-loading,
.preview-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #577b8d;
  font-size: 10px;
}

.preview-loading span {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(52, 216, 249, 0.12);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.preview-unavailable svg {
  width: 42px;
  height: 42px;
  color: #3d7b8e;
}

.version-rail {
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(55, 181, 213, 0.12);
  background: rgba(3, 16, 26, 0.44);
}

.version-heading {
  display: flex;
  height: 45px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(55, 181, 213, 0.1);
}

.version-heading span {
  color: #92bdcc;
  font-size: 10px;
}

.version-heading small {
  color: #3f6375;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.version-list {
  height: calc(100% - 45px);
  overflow: auto;
  padding: 9px;
}

.version-item {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(51, 163, 192, 0.11);
  background: rgba(7, 28, 42, 0.35);
}

.version-item + .version-item {
  margin-top: 6px;
}

.version-item.current {
  border-color: rgba(57, 214, 246, 0.25);
  background: rgba(17, 66, 84, 0.26);
}

.version-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.version-item strong {
  color: #a6cfdb;
  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 400;
}

.version-item .current-tag {
  padding: 2px 5px;
  border: 1px solid rgba(78, 255, 195, 0.2);
  color: var(--mint);
  background: rgba(35, 111, 82, 0.15);
  font-size: 6px;
}

.version-item p {
  margin: 0 0 6px;
  color: #4d6f80;
  font-size: 8px;
  line-height: 1.6;
}

.version-item button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(52, 199, 233, 0.2);
  color: #7099aa;
  background: rgba(15, 54, 72, 0.34);
  font-size: 7px;
  cursor: pointer;
}

.form-dialog {
  width: min(92vw, 570px);
}

.form-dialog .dialog-body,
.mini-dialog .dialog-body {
  padding: 20px;
}

.dialog-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 17px;
  padding: 10px 11px;
  border: 1px solid rgba(64, 205, 238, 0.12);
  color: #658a9c;
  background: rgba(16, 60, 78, 0.14);
  font-size: 9px;
  line-height: 1.7;
}

.dialog-note svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: #58a8c0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.form-field > span {
  color: #7899aa;
  font-size: 9px;
}

.form-input,
.form-field select {
  display: flex;
  height: 37px;
  align-items: center;
  border: 1px solid rgba(65, 196, 228, 0.17);
  background: rgba(3, 15, 24, 0.55);
}

.form-input:focus-within,
.form-field select:focus {
  border-color: rgba(57, 220, 252, 0.45);
}

.form-input input {
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 11px;
}

.form-input.with-icon svg {
  width: 14px;
  height: 14px;
  margin-left: 10px;
  color: #517488;
}

.form-field select {
  width: 100%;
  padding: 0 9px;
  outline: 0;
  color: #b3d4df;
  font-size: 10px;
}

.form-field select option {
  color: #d9f2f9;
  background: #071827;
}

.share-user-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 130px;
  margin: -7px 0 14px;
  overflow: auto;
}

.share-user-option {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border: 1px solid rgba(54, 175, 207, 0.11);
  color: #80a3b3;
  background: rgba(8, 30, 44, 0.42);
  font-size: 9px;
  cursor: pointer;
  text-align: left;
}

.share-user-option:hover,
.share-user-option.selected {
  border-color: rgba(58, 212, 246, 0.32);
  color: #b8e6f1;
  background: rgba(18, 74, 93, 0.38);
}

.share-user-option i {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: rgba(24, 100, 121, 0.3);
  font-style: normal;
}

.share-user-option div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.share-user-option small {
  color: #4b6d7f;
  font-size: 7px;
}

.share-permission-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
  align-items: end;
}

.share-permission-row .primary-action {
  margin-bottom: 14px;
}

.subsection-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(51, 170, 202, 0.1);
}

.subsection-title span {
  color: #86a9b8;
  font-size: 9px;
}

.subsection-title small {
  color: #3d5e70;
  font-family: Consolas, monospace;
  font-size: 6px;
}

.share-list {
  display: flex;
  max-height: 140px;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
}

.share-record {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(50, 160, 190, 0.1);
  color: #7b9dad;
  background: rgba(6, 26, 39, 0.35);
  font-size: 8px;
}

.share-record div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.share-record small {
  color: #446678;
  font-size: 7px;
}

.share-record button {
  border: 0;
  color: #9e6670;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.mini-dialog {
  width: min(92vw, 460px);
}

.dialog-error {
  min-height: 16px;
  color: var(--danger);
  font-size: 9px;
}

.dialog-footer-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
}

.confirm-copy {
  margin: 3px 0 10px;
  color: #7898a9;
  font-size: 11px;
  line-height: 1.8;
}

.confirm-copy b {
  color: #d1eaf2;
  font-weight: 500;
}

.conflict-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.admin-dialog {
  width: min(96vw, 1260px);
  height: min(90vh, 760px);
}

.admin-dialog .dialog-frame {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.admin-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #619d8a;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.admin-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: 186px minmax(0, 1fr);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 10px;
  border-right: 1px solid rgba(55, 181, 214, 0.12);
  background: rgba(3, 14, 24, 0.4);
}

.admin-nav button {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid transparent;
  color: #65879a;
  background: transparent;
  font-size: 10px;
  cursor: pointer;
  text-align: left;
}

.admin-nav button:hover {
  color: #b1d9e4;
  background: rgba(17, 57, 74, 0.3);
}

.admin-nav button.active {
  border-color: rgba(58, 211, 245, 0.22);
  color: var(--cyan-soft);
  background: linear-gradient(90deg, rgba(27, 139, 172, 0.18), transparent);
}

.admin-nav svg {
  width: 15px;
  height: 15px;
}

.admin-content {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
  animation: fadeUp 0.2s ease;
}

.admin-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.admin-heading-row h3 {
  margin: 0;
  color: #c3e8f2;
  font-size: 14px;
  font-weight: 500;
}

.admin-heading-row p {
  margin: 5px 0 0;
  color: #4e7183;
  font-size: 8px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.admin-stat {
  padding: 14px;
  border: 1px solid rgba(57, 184, 216, 0.13);
  background: rgba(7, 28, 42, 0.36);
}

.admin-stat span {
  display: block;
  margin-bottom: 8px;
  color: #54788b;
  font-size: 8px;
}

.admin-stat strong {
  color: #b6e2ed;
  font-family: Consolas, monospace;
  font-size: 20px;
  font-weight: 500;
}

.admin-stat small {
  display: block;
  margin-top: 6px;
  color: #3b6072;
  font-size: 7px;
}

.admin-section {
  padding: 14px;
  border: 1px solid rgba(55, 175, 206, 0.11);
  background: rgba(5, 22, 34, 0.34);
}

.admin-section + .admin-section {
  margin-top: 12px;
}

.admin-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-section-title span {
  color: #98c0cf;
  font-size: 10px;
}

.admin-section-title small {
  color: #3f6072;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(55, 174, 205, 0.11);
  color: #496c7f;
  font-size: 7px;
  font-weight: 400;
  text-align: left;
}

.admin-table td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(51, 147, 173, 0.07);
  color: #7595a5;
  font-size: 8px;
}

.admin-table tr:hover td {
  background: rgba(15, 51, 68, 0.22);
}

.admin-table .name-cell {
  color: #b7dce6;
  font-size: 9px;
}

.admin-table .actions-cell {
  text-align: right;
  white-space: nowrap;
}

.table-action {
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(53, 191, 224, 0.16);
  color: #6f9aac;
  background: rgba(11, 42, 57, 0.4);
  font-size: 7px;
  cursor: pointer;
}

.table-action + .table-action {
  margin-left: 4px;
}

.table-action.danger {
  border-color: rgba(255, 100, 124, 0.14);
  color: #b17882;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(77, 255, 194, 0.14);
  color: #74c6a6;
  background: rgba(30, 108, 80, 0.12);
  font-size: 7px;
}

.status-pill.off {
  border-color: rgba(120, 143, 155, 0.13);
  color: #687f8b;
  background: rgba(47, 62, 71, 0.14);
}

.status-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.usage-bar {
  width: 100px;
  height: 4px;
  overflow: hidden;
  background: rgba(46, 108, 128, 0.2);
}

.usage-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
}

.admin-log-list {
  display: flex;
  flex-direction: column;
}

.admin-log-row {
  display: grid;
  grid-template-columns: 125px 100px minmax(160px, 1fr) 130px 115px;
  gap: 10px;
  min-height: 39px;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid rgba(51, 147, 173, 0.07);
  color: #69899a;
  font-size: 8px;
}

.admin-log-row:hover {
  background: rgba(15, 51, 68, 0.18);
}

.admin-log-row time {
  color: #415f71;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.admin-log-row b {
  color: #a7cbd7;
  font-weight: 400;
}

.admin-log-row .log-ip {
  color: #3f6273;
  font-family: Consolas, monospace;
  font-size: 7px;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.department-card {
  padding: 14px;
  border: 1px solid rgba(54, 184, 216, 0.13);
  background: linear-gradient(145deg, rgba(9, 34, 50, 0.5), rgba(4, 18, 29, 0.36));
}

.department-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.department-card header span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(54, 207, 241, 0.16);
  color: #5eaac1;
  background: rgba(18, 74, 94, 0.2);
}

.department-card header svg {
  width: 15px;
  height: 15px;
}

.department-card h4 {
  margin: 0 0 7px;
  color: #b0d8e3;
  font-size: 11px;
  font-weight: 400;
}

.department-card p {
  margin: 0 0 12px;
  color: #4a6c7e;
  font-size: 8px;
}

.department-card button {
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(55, 190, 223, 0.15);
  color: #658d9e;
  background: rgba(10, 42, 57, 0.35);
  font-size: 7px;
  cursor: pointer;
}

.storage-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 200, 87, 0.16);
  color: #a58c59;
  background: rgba(105, 76, 21, 0.09);
  font-size: 8px;
}

.storage-warning.warning {
  border-color: rgba(255, 100, 124, 0.2);
  color: #bb7a85;
  background: rgba(108, 28, 44, 0.1);
}

.toast-stack {
  position: fixed;
  z-index: 200;
  top: 78px;
  right: 18px;
  display: flex;
  width: 300px;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid rgba(58, 210, 244, 0.26);
  color: #9ec7d3;
  background: rgba(5, 24, 37, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.4);
  font-size: 9px;
  line-height: 1.6;
  animation: toastIn 0.22s ease;
  pointer-events: auto;
}

.toast.success {
  border-color: rgba(84, 255, 194, 0.26);
}

.toast.error {
  border-color: rgba(255, 100, 124, 0.3);
  color: #d5a0a9;
}

.toast svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  color: var(--cyan);
}

.toast.success svg { color: var(--mint); }
.toast.error svg { color: var(--danger); }

.spinner-inline {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(62, 211, 246, 0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

[hidden] {
  display: none !important;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes nodePulse {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes systemWave {
  0% { height: 20%; opacity: 0.42; }
  100% { height: 100%; opacity: 0.92; }
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1450px) {
  :root {
    --left-rail-w: 220px;
    --right-rail-w: 280px;
  }

  .ticker-item:nth-child(2),
  .ticker-item:nth-child(3) {
    display: none;
  }

  .file-table-header,
  .file-row {
    grid-template-columns: 35px minmax(210px, 1fr) 70px 120px 130px 164px;
  }
}

@media (max-width: 1220px) {
  .right-rail {
    display: none;
  }

  .app-layout {
    grid-template-columns: var(--left-rail-w) minmax(0, 1fr);
  }

  .upload-dock {
    right: 24px;
  }

  .file-table-header,
  .file-row {
    grid-template-columns: 35px minmax(210px, 1fr) 70px 120px 164px;
  }

  .file-table-header > span:nth-child(4),
  .file-row .file-cell.owner-cell {
    display: none;
  }

  .toolbar-actions .search-box {
    width: 190px;
  }
}

@media (max-width: 940px) {
  :root {
    --left-rail-w: 190px;
  }

  .top-ticker,
  .admin-entry span,
  .user-chip-copy,
  .search-key {
    display: none;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-card {
    height: 74px;
  }

  .browser-toolbar {
    flex-wrap: wrap;
  }

  .toolbar-actions {
    width: 100%;
  }

  .search-box {
    flex: 1;
  }

  .file-table-header,
  .file-row {
    grid-template-columns: 30px minmax(180px, 1fr) 65px 120px;
  }

  .file-table-header > span:nth-child(5),
  .file-row .file-cell.time-cell {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .app-layout {
    display: block;
    height: auto;
    padding: 10px;
  }

  .left-rail {
    display: none;
  }

  .topbar {
    gap: 10px;
    padding: 0 10px;
  }

  .top-brand {
    width: auto;
  }

  .top-brand-copy small,
  .clock {
    display: none;
  }

  .workspace {
    height: calc(100vh - 130px);
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .browser-toolbar {
    min-height: 116px;
    align-items: flex-start;
  }

  .toolbar-actions {
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
    flex-basis: 100%;
  }

  .secondary-action span {
    display: none;
  }

  .file-table-header {
    display: none;
  }

  .file-row {
    grid-template-columns: 28px minmax(150px, 1fr) 100px;
  }

  .file-row .file-cell:not(.time-cell) {
    display: none;
  }

  .row-actions {
    opacity: 1;
  }

  .preview-layout {
    grid-template-columns: 1fr;
  }

  .version-rail {
    display: none;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav button {
    flex: none;
    padding: 0 9px;
  }

  .admin-nav button span {
    display: none;
  }

  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .statusbar span:nth-child(2),
  .statusbar span:nth-child(3),
  .statusbar span:nth-child(4) {
    display: none;
  }
}
