:root {
  color-scheme: light;
  --page: #eaf4ff;
  --page-bright: #f8fbff;
  --glass-heavy: rgba(248, 252, 255, 0.68);
  --glass-medium: rgba(248, 252, 255, 0.56);
  --glass-light: rgba(255, 255, 255, 0.48);
  --glass-solid: rgba(252, 254, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.88);
  --glass-line: rgba(104, 139, 181, 0.18);
  --glass-line-strong: rgba(79, 119, 169, 0.28);
  --text: #10243f;
  --muted: #617793;
  --muted-soft: #8395aa;
  --brand: #1267f4;
  --brand-dark: #0850ce;
  --brand-bright: #44c9ff;
  --ok: #13865b;
  --warn: #a9620b;
  --bad: #c13b46;
  --focus: rgba(18, 103, 244, 0.28);
  --button-glow-x: 50%;
  --button-glow-y: 14%;
  --surface-shadow:
    0 32px 80px rgba(52, 96, 145, 0.16),
    0 8px 28px rgba(75, 119, 168, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 0 rgba(94, 139, 188, 0.1);
  --control-shadow:
    0 12px 28px rgba(61, 101, 145, 0.13),
    0 2px 7px rgba(70, 112, 156, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(78, 122, 171, 0.12);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Microsoft YaHei",
    system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(110% 82% at 8% -14%, rgba(255, 255, 255, 0.98) 0 35%, transparent 66%),
    radial-gradient(92% 96% at 108% 18%, rgba(162, 207, 255, 0.5) 0, transparent 67%),
    radial-gradient(100% 80% at 4% 108%, rgba(158, 210, 255, 0.3) 0, transparent 66%),
    linear-gradient(145deg, #f7fbff 0%, #e8f3ff 45%, #f5faff 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(116deg, transparent 9%, rgba(255, 255, 255, 0.36) 28%, transparent 49%),
    linear-gradient(168deg, transparent 52%, rgba(128, 187, 255, 0.09) 76%, transparent 92%);
}

#app {
  min-height: 100vh;
  isolation: isolate;
}

::selection {
  color: #062f70;
  background: rgba(67, 190, 255, 0.3);
}

button,
input,
select {
  font: inherit;
}

button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(243, 249, 255, 0.43)),
    var(--glass-light);
  box-shadow: var(--control-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.005em;
  transition:
    transform 0.24s cubic-bezier(0.2, 0.85, 0.2, 1),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.24s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

button::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    circle 88px at var(--button-glow-x) var(--button-glow-y),
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.36) 31%,
    transparent 67%
  );
  opacity: 0;
  transition: opacity 0.16s ease-out;
}

button::after {
  content: "";
  position: absolute;
  display: none;
  top: 2px;
  left: 12%;
  width: 76%;
  height: 42%;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent);
  filter: blur(5px);
  opacity: 0.62;
}

button > * {
  position: relative;
  z-index: 1;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button.primary {
  color: #fff;
  border-color: rgba(163, 231, 255, 0.88);
  background:
    radial-gradient(circle at 22% 9%, rgba(164, 242, 255, 0.92), transparent 28%),
    linear-gradient(145deg, #1377ff 0%, #1764ef 47%, #27baf7 100%);
  box-shadow:
    0 15px 30px rgba(12, 96, 226, 0.28),
    0 3px 8px rgba(21, 103, 226, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -2px 0 rgba(5, 60, 177, 0.28),
    inset 1px 0 0 rgba(172, 236, 255, 0.52),
    inset -1px 0 0 rgba(50, 100, 255, 0.28);
  text-shadow: 0 1px 2px rgba(4, 54, 149, 0.28);
}

button.primary::before {
  background: radial-gradient(
    circle 104px at var(--button-glow-x) var(--button-glow-y),
    rgba(255, 255, 255, 0.82),
    rgba(109, 227, 255, 0.38) 28%,
    transparent 68%
  );
}

button.primary::after {
  top: 1px;
  height: 48%;
  background: linear-gradient(180deg, rgba(236, 255, 255, 0.74), transparent);
  opacity: 0.82;
}

button.danger {
  color: var(--bad);
  border-color: rgba(216, 95, 108, 0.24);
  background: linear-gradient(180deg, rgba(255, 249, 250, 0.86), rgba(255, 236, 239, 0.58));
  box-shadow:
    0 10px 24px rgba(175, 65, 76, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

button:disabled {
  cursor: not-allowed;
  color: var(--muted-soft);
  opacity: 0.58;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 5px 14px rgba(75, 105, 139, 0.05);
}

button:disabled::before {
  display: none;
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
  transition-duration: 90ms;
}

button:active:not(:disabled)::before {
  opacity: 0.88;
}

button.is-pointer-lit:not(:disabled)::before {
  opacity: 0.9;
}

@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 1);
    box-shadow:
      0 16px 34px rgba(54, 95, 141, 0.17),
      0 3px 8px rgba(65, 108, 151, 0.11),
      inset 0 1px 0 rgba(255, 255, 255, 1),
      inset 0 -1px 0 rgba(78, 122, 171, 0.12);
  }

  button:hover:not(:disabled)::before {
    opacity: 0.9;
  }

  button.primary:hover:not(:disabled) {
    box-shadow:
      0 18px 38px rgba(12, 96, 226, 0.35),
      0 4px 10px rgba(21, 103, 226, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.94),
      inset 0 -2px 0 rgba(5, 60, 177, 0.28),
      inset 1px 0 0 rgba(172, 236, 255, 0.58);
  }
}

.button-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.9;
  transform-origin: center;
}

input,
select {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  padding: 0 17px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 251, 255, 0.69)),
    var(--glass-solid);
  box-shadow:
    inset 0 1px 2px rgba(70, 108, 151, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.86),
    0 7px 18px rgba(68, 107, 150, 0.08);
  outline: none;
  font-size: 16px;
  letter-spacing: 0.002em;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input::placeholder {
  color: #8a9aaf;
  opacity: 1;
}

input:focus,
select:focus {
  border-color: rgba(49, 142, 255, 0.66);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(30, 126, 255, 0.12),
    inset 0 1px 1px rgba(37, 100, 171, 0.06),
    0 10px 24px rgba(43, 112, 192, 0.1);
}

input[readonly] {
  color: var(--muted);
  background: rgba(238, 246, 254, 0.82);
}

.shell {
  width: min(1440px, calc(100% - 44px));
  margin: 0 auto;
  padding: 16px 0 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 108px;
  padding: 18px 28px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.69), rgba(240, 248, 255, 0.46)),
    var(--glass-medium);
  box-shadow:
    0 24px 56px rgba(51, 97, 148, 0.15),
    0 5px 16px rgba(67, 112, 158, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(86, 131, 178, 0.1);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  backdrop-filter: blur(28px) saturate(165%);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 3%;
  bottom: 0;
  width: 34%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(97, 208, 255, 0.58), rgba(255, 185, 226, 0.3), transparent);
  filter: blur(0.3px);
}

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

.mark {
  position: relative;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(157, 224, 255, 0.72);
  border-radius: 17px;
  background:
    radial-gradient(circle at 30% 19%, rgba(135, 240, 255, 0.96), transparent 27%),
    linear-gradient(145deg, #178bff, #1856d4 55%, #133582);
  box-shadow:
    0 12px 26px rgba(19, 85, 189, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -3px 8px rgba(2, 41, 126, 0.32);
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform;
  animation: mark-y-axis-turn 6.4s cubic-bezier(0.2, 0.85, 0.2, 1) infinite;
}

.mark::after {
  content: "";
  position: absolute;
  inset: 5px 7px auto;
  height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent);
  filter: blur(3px);
}

.mark span {
  position: relative;
  z-index: 1;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(173, 225, 255, 0.28);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(160deg, rgba(14, 80, 187, 0.64), rgba(7, 34, 103, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 2px 6px rgba(5, 36, 104, 0.22);
  font-size: 15px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.brand h1 {
  margin: 3px 0 0;
  color: #0d2039;
  font-size: 25px;
  line-height: 1.04;
  font-weight: 760;
  letter-spacing: -0.026em;
  font-optical-sizing: auto;
}

.product-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.product-line b {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--brand-dark);
  background: rgba(201, 225, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 730;
}

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.nav-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
  width: min(520px, 48vw);
  padding: 4px;
  border: 0;
  border-radius: 21px;
  background: rgba(224, 239, 253, 0.18);
  --nav-gap: 3px;
  --nav-padding: 4px;
}

.nav-tabs::before {
  content: "";
  position: absolute;
  top: var(--nav-padding);
  left: var(--nav-padding);
  height: calc(100% - var(--nav-padding) - var(--nav-padding));
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(245, 250, 255, 0.45)),
    rgba(255, 255, 255, 0.38);
  box-shadow:
    0 12px 25px rgba(58, 99, 145, 0.16),
    0 2px 7px rgba(69, 112, 157, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(93, 137, 185, 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  transform: translateX(0);
  transition:
    transform 0.24s cubic-bezier(0.77, 0, 0.175, 1),
    box-shadow 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-tabs.nav-count-3::before {
  width: calc((100% - var(--nav-padding) - var(--nav-padding) - var(--nav-gap) - var(--nav-gap)) / 3);
}

.nav-tabs.nav-count-4::before {
  width: calc(
    (100% - var(--nav-padding) - var(--nav-padding) - var(--nav-gap) - var(--nav-gap) - var(--nav-gap)) / 4
  );
}

.nav-tabs.nav-active-1::before {
  transform: translateX(calc(100% + var(--nav-gap)));
}

.nav-tabs.nav-active-2::before {
  transform: translateX(calc(200% + var(--nav-gap) + var(--nav-gap)));
}

.nav-tabs.nav-active-3::before {
  transform: translateX(calc(300% + var(--nav-gap) + var(--nav-gap) + var(--nav-gap)));
}

.nav-tabs.is-positioning::before {
  transition: none;
}

.nav-tabs.is-sliding::before {
  box-shadow:
    0 15px 30px rgba(51, 93, 142, 0.2),
    0 3px 9px rgba(65, 108, 154, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(78, 125, 177, 0.14);
}

.nav-tab {
  position: relative;
  z-index: 1;
  min-height: 48px;
  flex: 1 1 0;
  border: 0;
  border-radius: 18px;
  padding: 0 13px;
  color: #334b68;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 16px;
  font-weight: 620;
  transition:
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-tab::after {
  display: none;
}

.nav-tab.active {
  color: var(--brand-dark);
  background: transparent;
  box-shadow: none;
  font-weight: 730;
}

@media (hover: hover) and (pointer: fine) {
  .nav-tab:hover:not(:disabled) {
    color: var(--brand-dark);
    background: transparent;
    box-shadow: none;
    transform: none;
  }
}

.nav-tab.is-pointer-lit:not(:disabled) .nav-icon {
  animation: nav-icon-hop-once 480ms cubic-bezier(0.2, 0.85, 0.2, 1) 1;
}

#refreshAll.is-pointer-lit:not(:disabled) .button-icon {
  animation: refresh-icon-turn-once 540ms cubic-bezier(0.2, 0.85, 0.2, 1) 1;
}

#logout.is-pointer-lit:not(:disabled) .logout-arrow {
  animation: logout-icon-slide-once 460ms cubic-bezier(0.2, 0.85, 0.2, 1) 1;
}

.panel {
  position: relative;
  margin-top: 34px;
  padding: clamp(28px, 3vw, 42px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.62), rgba(239, 248, 255, 0.38)),
    var(--glass-heavy);
  box-shadow: var(--surface-shadow);
  -webkit-backdrop-filter: blur(34px) saturate(158%);
  backdrop-filter: blur(34px) saturate(158%);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: calc(32px - 2px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(145deg, #000 0 26%, transparent 52% 76%, #000 100%);
  mask-image: linear-gradient(145deg, #000 0 26%, transparent 52% 76%, #000 100%);
}

.workbench {
  min-height: calc(100vh - 190px);
}

.view-surface {
  will-change: opacity, transform, filter;
}

.view-surface.view-entering {
  animation: view-materialize 0.38s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

.view-surface.view-leaving {
  opacity: 0;
  transform: translateY(7px) scale(0.992);
  filter: blur(4px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    filter 0.14s ease;
}

.section-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 32px;
}

.section-head h2,
.modal h2,
.admin .panel h2 {
  margin: 0;
  color: #0d213b;
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: -0.028em;
  font-optical-sizing: auto;
}

.admin .panel h2 {
  margin-bottom: 28px;
  font-size: 27px;
}

.section-head p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.012em;
}

.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.agent-form,
.form {
  position: relative;
  z-index: 1;
  display: grid;
}

.agent-form {
  gap: 26px;
}

.form {
  gap: 16px;
}

.mode-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.mode-row > label,
.field label {
  display: block;
  margin-bottom: 9px;
  color: #203a58;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 680;
  letter-spacing: 0.012em;
}

.mode-row > label {
  margin: 0;
}

.segmented {
  display: inline-flex;
  width: fit-content;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: rgba(218, 233, 247, 0.48);
  box-shadow:
    inset 0 1px 2px rgba(65, 105, 150, 0.07),
    inset 0 -1px 0 rgba(255, 255, 255, 0.64);
}

.segmented button {
  min-width: 142px;
  min-height: 48px;
  border: 0;
  border-radius: 17px;
  padding: 0 20px;
  color: #5e7896;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 16px;
}

.segmented button::after {
  display: none;
}

.segmented button.active {
  color: var(--brand);
  border: 1px solid rgba(255, 255, 255, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 250, 255, 0.48)),
    rgba(255, 255, 255, 0.38);
  box-shadow:
    0 11px 24px rgba(51, 97, 149, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(82, 129, 180, 0.12);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  font-weight: 730;
}

@media (hover: hover) and (pointer: fine) {
  .segmented button:hover:not(:disabled) {
    transform: none;
    box-shadow: none;
  }

  .segmented button.active:hover:not(:disabled) {
    box-shadow:
      0 13px 28px rgba(51, 97, 149, 0.17),
      inset 0 1px 0 rgba(255, 255, 255, 1),
      inset 0 -1px 0 rgba(82, 129, 180, 0.12);
  }
}

.agent-fields {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(190px, 280px);
  gap: 20px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-brand {
  margin-bottom: 18px;
}

.task-queue,
.task-error {
  margin-top: 10px;
}

.task-actions {
  margin-top: 12px;
}

.admin-create-panel {
  margin-bottom: 14px;
}

.toolbar-row {
  margin-top: 2px;
}

.toolbar-row button {
  min-height: 54px;
  border-radius: 999px;
  padding-inline: 23px;
  font-size: 16px;
}

.secondary-action {
  font-weight: 690;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--ok);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.notice {
  min-height: 21px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.notice.bad {
  color: var(--bad);
}

.notice.ok {
  color: var(--ok);
}

.path-bar {
  position: relative;
  z-index: 1;
  min-height: 56px;
  margin: 12px 0 20px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  padding: 0 19px;
  color: #294563;
  background: rgba(245, 250, 255, 0.53);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 8px 20px rgba(67, 108, 151, 0.07);
  font-size: 15px;
  font-weight: 590;
}

.file-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-color: rgba(91, 133, 178, 0.32) transparent;
}

.file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
  padding: 12px 14px 12px 18px;
  background: rgba(248, 252, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 20px rgba(66, 108, 153, 0.07);
}

.file-item.selectable {
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding-left: 14px;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.file-item.selectable.selected {
  border-color: rgba(80, 166, 255, 0.5);
  background: rgba(238, 248, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(44, 123, 207, 0.11);
}

.file-content {
  min-width: 0;
}

.file-select {
  position: relative;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  cursor: pointer;
}

.file-select input,
.check-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.file-select span,
.check-row input + span::before {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  border: 1px solid rgba(86, 132, 181, 0.42);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 1px 1px rgba(72, 112, 154, 0.08),
    0 4px 10px rgba(66, 106, 149, 0.08);
  content: "";
}

.file-select input:checked + span,
.check-row input:checked + span::before {
  border-color: rgba(44, 143, 255, 0.84);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center / 15px 15px no-repeat,
    linear-gradient(145deg, #1377ff, #25b7f6);
}

.file-select input:focus-visible + span,
.check-row input:focus-visible + span::before {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.selection-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  margin: -6px 0 14px;
  padding: 8px 10px 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 19px;
  background: rgba(245, 250, 255, 0.46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.check-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  color: #294563;
  font-size: 14px;
  font-weight: 640;
  cursor: pointer;
}

.check-row > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.selection-summary {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 13px;
}

.package-button {
  min-height: 46px;
  padding-inline: 22px;
}

.file-name {
  overflow-wrap: anywhere;
  color: #17304d;
  font-size: 15px;
  font-weight: 700;
}

.file-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.task-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.task {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 21px;
  background: rgba(248, 252, 255, 0.53);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(60, 103, 148, 0.08);
}

.task-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.task-title {
  margin: 0;
  overflow-wrap: anywhere;
  color: #17304d;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.006em;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 660;
}

.badge.success {
  color: var(--ok);
  border-color: rgba(19, 134, 91, 0.2);
  background: rgba(216, 249, 235, 0.64);
}

.badge.failed,
.badge.canceled {
  color: var(--bad);
  border-color: rgba(193, 59, 70, 0.19);
  background: rgba(255, 230, 233, 0.66);
}

.badge.running,
.badge.queued,
.badge.canceling {
  color: var(--warn);
  border-color: rgba(169, 98, 11, 0.19);
  background: rgba(255, 241, 215, 0.69);
}

.result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--glass-line);
}

.result a,
.link-list a {
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.auth-panel {
  width: min(480px, 100%);
  margin: 0;
  padding: 36px;
  animation: auth-materialize 0.5s cubic-bezier(0.2, 0.84, 0.2, 1) both;
}

.auth-panel .brand {
  margin-bottom: 28px !important;
}

.auth-panel .brand p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-panel .actions {
  margin-top: 3px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 32%);
  gap: 20px;
}

.admin {
  position: relative;
}

.admin > .panel:first-child {
  margin-bottom: 28px !important;
}

.admin-grid.single {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.admin-grid .panel {
  margin-top: 0;
}

.actions.compact {
  gap: 7px;
  flex-wrap: nowrap;
}

.actions.compact button {
  min-height: 38px;
  border-radius: 14px;
  padding: 0 11px;
  font-size: 12px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: #2f4967;
  font-size: 14px;
  font-weight: 610;
}

.checkline input {
  width: 19px;
  height: 19px;
  min-height: auto;
  margin: 0;
  accent-color: var(--brand);
  box-shadow: none;
}

.table-wrap {
  position: relative;
  z-index: 1;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.77);
  border-radius: 21px;
  background: rgba(248, 252, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 25px rgba(60, 101, 145, 0.07);
  scrollbar-color: rgba(88, 132, 178, 0.34) transparent;
}

.table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
  color: #1e3855;
  font-size: 14px;
}

.table th,
.table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(99, 137, 180, 0.12);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: #5e7590;
  background: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.015em;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table input,
.table select {
  min-height: 46px;
  border-radius: 15px;
  padding-inline: 13px;
  font-size: 14px;
}

.settings-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  background: rgba(248, 252, 255, 0.53);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 9px 22px rgba(62, 105, 150, 0.07);
}

.setting-row span {
  color: var(--muted);
  font-size: 14px;
}

.setting-row b {
  color: #16324f;
  font-size: 15px;
  font-weight: 720;
}

.storage-settings {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: rgba(248, 252, 255, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 28px rgba(62, 105, 150, 0.08);
}

.settings-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.settings-subhead h3 {
  margin: 0;
  color: #15304d;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.018em;
}

.settings-subhead p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.storage-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.storage-field-grid .storage-wide {
  grid-column: 1 / -1;
}

.empty {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed rgba(89, 134, 181, 0.32);
  border-radius: 22px;
  color: #71869f;
  background: rgba(248, 252, 255, 0.26);
  font-size: 14px;
  letter-spacing: 0.008em;
}

.empty .empty-icon {
  width: 24px;
  height: 24px;
  color: #91a7be;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(33, 59, 88, 0.28);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
  backdrop-filter: blur(10px) saturate(125%);
  animation: modal-backdrop-in 0.2s ease-out both;
}

.modal {
  width: min(480px, 100%);
  margin: 0;
  transform-origin: 50% 45%;
}

.modal-backdrop > .panel {
  animation: modal-materialize 0.36s cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.modal h2 {
  font-size: 25px;
}

.task-modal {
  width: min(660px, 100%);
}

.modal-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.modal-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.link-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  margin: 14px 0;
}

.link-list a {
  display: block;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 17px;
  background: rgba(247, 252, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.modal-actions {
  position: relative;
  z-index: 1;
  margin-top: 17px;
}

@keyframes auth-materialize {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.975);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes modal-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-materialize {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.965);
    filter: blur(9px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes view-materialize {
  from {
    opacity: 0.2;
    transform: translateY(10px) scale(0.99);
    filter: blur(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes gentle-fade {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

@keyframes nav-icon-hop-once {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  42% {
    transform: translateY(-3px) scale(1.08);
  }

  72% {
    transform: translateY(1px) scale(0.98);
  }
}

@keyframes refresh-icon-turn-once {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes logout-icon-slide-once {
  0% {
    transform: translateX(-2px);
  }

  62% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes mark-y-axis-turn {
  0%,
  72% {
    transform: perspective(520px) rotateY(0);
  }

  100% {
    transform: perspective(520px) rotateY(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel,
  .modal-backdrop,
  .modal-backdrop > .panel,
  .view-surface.view-entering {
    animation: gentle-fade 160ms ease-out both;
  }

  .view-surface.view-leaving {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  button,
  .nav-tabs::before {
    transition:
      color 120ms ease,
      border-color 120ms ease,
      opacity 120ms ease;
  }

  button:active:not(:disabled) {
    transform: none;
  }

  .mark,
  .nav-icon,
  #refreshAll .button-icon,
  #logout .logout-arrow {
    animation: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .panel,
  button,
  .segmented button.active,
  .nav-tabs::before,
  .modal-backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .topbar,
  .panel {
    background: rgba(248, 252, 255, 0.96);
  }

  button,
  .segmented button.active,
  .nav-tabs::before {
    background: rgba(251, 253, 255, 0.97);
  }

  button.primary {
    background: #176bed;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #3f5875;
    --glass-line: rgba(34, 68, 106, 0.46);
    --glass-line-strong: rgba(25, 57, 94, 0.64);
  }

  .topbar,
  .panel,
  button,
  input,
  select,
  .table-wrap,
  .file-item,
  .task,
  .setting-row {
    border-color: rgba(38, 75, 116, 0.54);
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(calc(100% - 28px), 1440px);
    padding: 14px 0 34px;
  }

  .topbar {
    top: 10px;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding: 18px;
    border-radius: 25px;
  }

  .toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .nav-tabs {
    width: 100%;
  }

  .nav-tab {
    min-height: 46px;
    padding: 0 5px;
    font-size: 14px;
  }

  .panel {
    margin-top: 20px;
    padding: 25px;
    border-radius: 28px;
  }

  .panel::before {
    border-radius: 26px;
  }

  .workbench {
    min-height: auto;
  }

  .mode-row,
  .agent-fields,
  .row,
  .settings-grid,
  .storage-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .storage-field-grid .storage-wide {
    grid-column: auto;
  }

  .mode-row {
    align-items: start;
    gap: 12px;
  }

  .mode-row > label {
    margin-bottom: 0;
  }

  .admin > .panel:first-child {
    margin-bottom: 20px !important;
  }

  .admin-grid .panel {
    margin-top: 0;
  }

  .table-wrap {
    margin-inline: -6px;
  }
}

@media (max-width: 520px) {
  body {
    background:
      radial-gradient(130% 75% at 5% -8%, rgba(255, 255, 255, 0.98) 0 31%, transparent 68%),
      radial-gradient(120% 84% at 110% 30%, rgba(160, 208, 255, 0.42), transparent 68%),
      linear-gradient(150deg, #f8fbff 0%, #e9f4ff 50%, #f5faff 100%);
  }

  .shell {
    width: calc(100% - 24px);
    padding-top: 12px;
  }

  .topbar {
    top: 8px;
    gap: 17px;
    padding: 17px;
    border-radius: 24px;
  }

  .mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }

  .brand {
    gap: 14px;
  }

  .brand h1 {
    font-size: 25px;
  }

  .product-line {
    font-size: 13px;
  }

  .nav-tabs {
    gap: 1px;
    padding: 3px;
    --nav-gap: 1px;
    --nav-padding: 3px;
  }

  .nav-tabs::before {
    border-radius: 16px;
  }

  .nav-tab {
    min-height: 45px;
    border-radius: 16px;
    font-size: 14px;
  }

  .nav-icon {
    width: 16px;
    height: 16px;
  }

  .panel {
    padding: 22px;
    border-radius: 27px;
  }

  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin-bottom: 27px;
  }

  .section-head > div:first-child {
    display: contents;
  }

  .section-head h2 {
    grid-column: 1;
    grid-row: 1;
  }

  .section-head p {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .section-head .head-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .section-head h2,
  .modal h2,
  .admin .panel h2 {
    font-size: 28px;
  }

  .section-head p {
    margin-top: -2px;
    font-size: 12px;
  }

  .head-actions {
    gap: 7px;
    flex-wrap: nowrap;
  }

  .head-actions button {
    min-height: 44px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 14px;
  }

  .head-actions .button-icon {
    width: 17px;
    height: 17px;
  }

  .agent-form {
    gap: 23px;
  }

  .segmented {
    width: min(100%, 290px);
  }

  .segmented button {
    min-width: 0;
    flex: 1;
    min-height: 47px;
    padding: 0 14px;
    font-size: 15px;
  }

  input,
  select {
    min-height: 55px;
    border-radius: 17px;
    font-size: 15px;
  }

  .toolbar-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .toolbar-row button {
    width: 100%;
    min-height: 52px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 15px;
  }

  .toolbar-row .button-icon {
    width: 17px;
    height: 17px;
  }

  .account-pill {
    min-height: 45px;
    padding: 0 4px;
    font-size: 13px;
  }

  .path-bar {
    min-height: 54px;
    margin: 9px 0 17px;
    border-radius: 17px;
  }

  .empty {
    min-height: 190px;
    border-radius: 20px;
    text-align: center;
  }

  .file-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

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

  .file-item.selectable button {
    grid-column: 1 / -1;
  }

  .file-item button {
    width: 100%;
  }

  .selection-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 10px 11px 10px 15px;
  }

  .selection-summary {
    grid-column: 1;
  }

  .package-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 48px;
  }

  .storage-settings {
    padding: 19px;
    border-radius: 21px;
  }

  .settings-subhead {
    align-items: center;
  }

  .auth-wrap {
    padding: 18px 12px;
  }

  .auth-panel {
    padding: 26px 22px;
  }

  .auth-panel .brand {
    margin-bottom: 25px !important;
  }

  .admin .panel h2 {
    margin-bottom: 22px;
  }

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

  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .modal {
    width: 100%;
    border-radius: 28px;
  }

  .modal-head {
    gap: 12px;
  }
}

@media (max-width: 370px) {
  .shell {
    width: calc(100% - 18px);
  }

  .topbar {
    padding: 15px;
  }

  .brand h1 {
    font-size: 22px;
  }

  .mark {
    width: 51px;
    height: 51px;
  }

  .nav-tab {
    font-size: 13px;
    gap: 5px;
  }

  .nav-icon {
    width: 15px;
    height: 15px;
  }

  .panel {
    padding: 19px;
  }

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

  .section-head .head-actions {
    grid-column: 1;
    grid-row: 3;
    justify-content: flex-start;
  }

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