@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #07070c;
  --bg-topbar: var(--bg);
  --bg-sidebar: var(--bg);
  --bg-panel: color-mix(in srgb, var(--bg) 90%, white);
  --bg-panel-soft: color-mix(in srgb, var(--bg) 94%, white);
  --bg-panel-strong: color-mix(in srgb, var(--bg) 84%, white);
  --bg-folder-card: color-mix(in srgb, var(--bg) 97%, white);
  --bg-folder-preview: color-mix(in srgb, var(--bg) 96%, white);
  --panel: color-mix(in srgb, var(--bg-panel) 72%, transparent);
  --panel-strong: color-mix(in srgb, var(--bg-panel-strong) 88%, transparent);
  --upload-zone-bg: color-mix(in srgb, var(--bg-panel-soft) 48%, transparent);
  --soft: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #f3f4f6;
  --muted: #a8adb7;
  --media-hover-bg: rgba(8, 8, 14, 0.82);
  --media-hover-text: #ffffff;
  --media-hover-muted: #b5bac4;
  --accent: #a036c0;
  --primary-accent: #a036c0;
  --secondary-accent: #4f8cff;
  --secondary-accent-text: #ffffff;
  --menu-accent: #a036c0;
  --menu-accent-text: #ffffff;
  --notification-color: #a036c0;
  --primary-accent-text: #ffffff;
  --active-control-text: #ffffff;
  --accent-2: #cf72ee;
  --danger: #ff6b8b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --upload-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  --popover-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  --control-bg: color-mix(in srgb, var(--bg-panel-soft) 74%, transparent);
  --control-bg-hover: color-mix(in srgb, var(--bg-panel-soft) 78%, #030306);
  --modal-bg: color-mix(in srgb, var(--bg-panel-soft) 90%, #030306);
  --modal-bg-strong: color-mix(in srgb, var(--bg-panel-strong) 78%, #050509);
  --field-bg: color-mix(in srgb, var(--bg-panel-soft) 72%, #030306);
  --field-bg-hover: color-mix(in srgb, var(--field-bg) 94%, black 6%);
  --blur: blur(18px);
  --card-bottom-height: 92px;
  --grid-frame-width: 100%;
  --folder-columns: 1;
  --media-card-width: 170px;
  --folder-card-width: 340px;
  --main-content-right-padding: 24px;
  --scroll-track: rgba(255, 255, 255, 0.035);
  --scroll-thumb: rgba(255, 255, 255, 0.08);
  --scroll-thumb-hover: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

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

html[data-theme="dark"] {
  color-scheme: dark;
  background: var(--bg);
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 72% 44% at 50% -10%, color-mix(in srgb, var(--primary-accent) 5%, transparent), transparent 86%),
    radial-gradient(ellipse 72% 44% at 50% 112%, color-mix(in srgb, var(--secondary-accent) 5%, transparent), transparent 86%),
    var(--bg);
  color: var(--text);
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent-2);
}

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

.glass-panel,
.login-card,
.upload-zone,
.message {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
}

.modal {
  background: var(--modal-bg);
  border: 1px solid var(--line);
  box-shadow: var(--popover-shadow);
  backdrop-filter: var(--blur);
}

.popover {
  background:
    radial-gradient(
      circle at 100% 100%,
      color-mix(in srgb, var(--primary-accent) 4%, transparent) 0,
      color-mix(in srgb, var(--primary-accent) 2%, transparent) 30%,
      transparent 62%
    ),
    var(--bg-folder-card);
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24);
  backdrop-filter: none;
}

.login-body,
.not-found-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.not-found-body {
  background: var(--bg);
}

.plain-404 {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.login-card {
  width: min(380px, 100%);
  padding: 34px;
  border-radius: 18px;
  text-align: center;
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: 25px;
}

.login-card p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.login-body {
  overflow: auto;
  background:
    radial-gradient(ellipse 68% 55% at 18% 12%, color-mix(in srgb, var(--primary-accent) 9%, transparent), transparent 72%),
    radial-gradient(ellipse 62% 50% at 82% 88%, color-mix(in srgb, var(--secondary-accent) 8%, transparent), transparent 74%),
    #07070c;
}

.auth-stage {
  width: min(940px, calc(100vw - 40px));
}

.auth-container {
  position: relative;
  width: 100%;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(11, 11, 18, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.auth-form-panel {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 50%;
  height: 100%;
  place-items: center;
  padding: 52px;
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1), opacity 280ms ease;
}

.auth-sign-in-panel {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
}

.auth-container.show-sign-up .auth-sign-in-panel {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
}

.auth-sign-up-panel {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.auth-container.show-sign-up .auth-sign-up-panel {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(100%);
}

.auth-form-content {
  width: min(100%, 350px);
}

.auth-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: color-mix(in srgb, var(--primary-accent) 78%, white);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form-content h1,
.auth-overlay-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.auth-form-content h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
}

.auth-form-content > p {
  margin: 14px 0 26px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-provider-list {
  display: grid;
  gap: 11px;
}

.auth-provider {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  padding: 8px 14px 8px 58px;
  color: #f7f5fa;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.auth-provider:not(:disabled):hover,
.auth-provider:not(:disabled):focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
}

.auth-provider.discord {
  border-color: color-mix(in srgb, #5865f2 58%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, #5865f2 76%, #11111a);
}

.auth-provider.discord:hover,
.auth-provider.discord:focus-visible {
  border-color: color-mix(in srgb, #7983f5 76%, white);
  background: color-mix(in srgb, #5865f2 86%, #11111a);
}

.auth-provider.google {
  border-color: rgba(255, 255, 255, 0.72);
  color: #111318;
  background: #eef0f3;
}

.auth-provider.google:hover,
.auth-provider.google:focus-visible {
  border-color: rgba(255, 255, 255, 0.9);
  background: #f7f8fa;
}

.auth-provider.github {
  border-color: rgba(255, 255, 255, 0.18);
  color: #f7f7f8;
  background: #24292f;
}

.auth-provider.github:hover,
.auth-provider.github:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  background: #2f363d;
}

.auth-provider:disabled {
  color: rgba(242, 238, 246, 0.58);
  cursor: not-allowed;
}

.auth-provider > span:nth-child(2) {
  display: block;
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 210ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-provider:not(:disabled):hover > span:nth-child(2),
.auth-provider:not(:disabled):focus-visible > span:nth-child(2) {
  opacity: 0;
  transform: translateX(18px);
}

.auth-provider small {
  color: rgba(242, 238, 246, 0.45);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.auth-provider-mark {
  position: absolute;
  left: 14px;
  top: 50%;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
  transition: left 260ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-provider:not(:disabled):hover .auth-provider-mark,
.auth-provider:not(:disabled):focus-visible .auth-provider-mark {
  left: 50%;
  transform: translate(-50%, -50%);
}

.auth-provider-logo {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: none;
}

.auth-provider.google .auth-provider-mark {
  color: #4285f4;
  border: 1px solid rgba(17, 19, 24, 0.09);
  background: #ffffff;
}

.auth-provider.github .auth-provider-mark {
  background: #30363d;
}

.auth-form-content .auth-access-note {
  display: none;
}

.auth-overlay-container {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-container.show-sign-up .auth-overlay-container {
  transform: translateX(-100%);
}

.auth-overlay {
  position: relative;
  left: -100%;
  width: 200%;
  height: 100%;
  color: #f8f5fb;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--primary-accent) 38%, transparent), transparent 42%),
    linear-gradient(145deg, #15131f 0%, #21142b 52%, #12121b 100%);
  transform: translateX(0);
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-overlay::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  content: "";
  pointer-events: none;
}

.auth-container.show-sign-up .auth-overlay {
  transform: translateX(50%);
}

.auth-overlay-panel {
  position: absolute;
  top: 0;
  display: flex;
  width: 50%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px;
  text-align: center;
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}

.auth-overlay-left {
  transform: translateX(-12%);
}

.auth-container.show-sign-up .auth-overlay-left {
  transform: translateX(0);
}

.auth-overlay-right {
  right: 0;
}

.auth-container.show-sign-up .auth-overlay-right {
  transform: translateX(12%);
}

.auth-mevi-wrap {
  position: relative;
  width: min(100%, 330px);
  height: 170px;
  margin-bottom: 16px;
}

.auth-mevi-portrait {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  transform: translateX(-50%);
}

.auth-mevi-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.auth-speech {
  position: absolute;
  z-index: 2;
  top: 36px;
  left: calc(50% + 58px);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  padding: 9px 14px;
  color: #f8f5fb;
  background: rgba(7, 7, 12, 0.6);
  font-size: 15px;
  font-weight: 750;
  transform: rotate(-4deg);
  transform-origin: left center;
  white-space: nowrap;
}

.auth-speech::before {
  position: absolute;
  bottom: 7px;
  left: -7px;
  width: 12px;
  height: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(7, 7, 12, 0.82);
  content: "";
  transform: rotate(45deg);
}

.auth-overlay-panel h2 {
  font-size: 26px;
}

.auth-overlay-panel p {
  max-width: 300px;
  margin: 12px 0 24px;
  color: rgba(242, 238, 246, 0.68);
  line-height: 1.55;
}

.auth-switch {
  min-width: 132px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 11px;
  padding: 10px 18px;
  color: #f8f5fb;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  font-weight: 700;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.auth-switch:hover,
.auth-switch:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
  .login-body {
    padding: 16px;
  }

  .auth-stage {
    width: min(100%, 480px);
  }

  .auth-container {
    min-height: 720px;
  }

  .auth-overlay-container {
    left: 0;
    width: 100%;
    height: 245px;
    transform: none;
  }

  .auth-container.show-sign-up .auth-overlay-container {
    transform: none;
  }

  .auth-overlay {
    left: 0;
    transform: translateX(-50%);
  }

  .auth-container.show-sign-up .auth-overlay {
    transform: translateX(0);
  }

  .auth-overlay-panel {
    padding: 20px 28px;
  }

  .auth-overlay-left,
  .auth-container.show-sign-up .auth-overlay-left,
  .auth-container.show-sign-up .auth-overlay-right {
    transform: none;
  }

  .auth-mevi-portrait {
    width: 82px;
    height: 82px;
    transform: translateX(-72%);
  }

  .auth-mevi-wrap {
    width: 230px;
    height: 88px;
    margin-bottom: 2px;
  }

  .auth-speech {
    top: 20px;
    left: calc(50% + 20px);
    font-size: 13px;
  }

  .auth-overlay-panel h2 {
    font-size: 20px;
  }

  .auth-overlay-panel p {
    margin: 6px 0 12px;
    font-size: 12px;
  }

  .auth-switch {
    min-height: 36px;
    padding: 7px 14px;
  }

  .auth-form-panel {
    top: 245px;
    width: 100%;
    height: calc(100% - 245px);
    padding: 30px;
  }

  .auth-container.show-sign-up .auth-sign-in-panel {
    opacity: 0;
    transform: translateX(-100%);
  }

  .auth-sign-up-panel {
    opacity: 1;
    transform: translateX(100%);
  }

  .auth-container.show-sign-up .auth-sign-up-panel {
    transform: translateX(0);
  }
}

.auth-container.auth-static {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-static .auth-mevi-panel {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 52px;
  overflow: hidden;
  color: #f8f5fb;
  background:
    radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--primary-accent) 34%, transparent), transparent 44%),
    linear-gradient(145deg, #15131f 0%, #21142b 52%, #12121b 100%);
  text-align: center;
}

.auth-static .auth-mevi-panel::after {
  position: absolute;
  inset: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  content: "";
  pointer-events: none;
}

.auth-static .auth-mevi-panel h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: 0;
}

.auth-static .auth-mevi-panel > p {
  max-width: 310px;
  margin: 12px 0 0;
  color: rgba(242, 238, 246, 0.68);
  line-height: 1.55;
}

.auth-help {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: rgba(248, 245, 251, 0.82);
  background: rgba(255, 255, 255, 0.06);
  cursor: help;
  font-size: 14px;
  font-weight: 800;
}

.auth-help-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: 248px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  color: #f8f5fb;
  background: rgba(7, 7, 12, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.auth-help:hover .auth-help-tooltip,
.auth-help:focus-visible .auth-help-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.auth-static .auth-form-panel,
.auth-static .auth-sign-in-panel {
  position: relative;
  inset: auto;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 560px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

@media (max-width: 720px) {
  .auth-container.auth-static {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-static .auth-mevi-panel {
    min-height: 265px;
    padding: 28px;
  }

  .auth-static .auth-mevi-panel::after {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  }

  .auth-static .auth-form-panel,
  .auth-static .auth-sign-in-panel {
    top: auto;
    min-height: 430px;
    padding: 34px 28px;
  }

  .auth-static .auth-mevi-wrap {
    width: 250px;
    height: 112px;
    margin-bottom: 6px;
  }

  .auth-static .auth-mevi-portrait {
    width: 105px;
    height: 105px;
    transform: translateX(-50%);
  }

  .auth-static .auth-speech {
    top: 20px;
    left: calc(50% + 38px);
  }
}

.discord-button,
.text-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 14px;
  color: var(--text);
  background: var(--control-bg);
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.discord-button {
  width: 100%;
  border-color: rgba(160, 54, 192, 0.55);
  background: linear-gradient(135deg, var(--accent), #6a2fc2);
}

.text-button:hover,
.secondary-button:hover,
.discord-button:hover,
.icon-button:hover {
  transform: none;
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
}

.nav-item:hover {
  color: var(--text);
}

.accent-fill {
  border-color: color-mix(in srgb, var(--primary-accent) 54%, var(--line));
  color: var(--text);
  background: color-mix(in srgb, var(--primary-accent) 12%, var(--control-bg));
}

.accent-fill:hover,
.accent-fill:focus-visible {
  border-color: color-mix(in srgb, var(--primary-accent) 76%, var(--line-strong));
  background: color-mix(in srgb, var(--primary-accent) 18%, var(--control-bg-hover));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-accent) 18%, transparent);
}

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

.danger-fill {
  border-color: rgba(255, 107, 139, 0.46);
  background: color-mix(in srgb, var(--danger) 10%, var(--control-bg));
  color: #ffd0da;
}

.danger-fill:hover,
.danger-fill:focus-visible {
  border-color: rgba(255, 107, 139, 0.68);
  background: color-mix(in srgb, var(--danger) 16%, var(--control-bg-hover));
  box-shadow: inset 0 0 0 1px rgba(255, 107, 139, 0.14);
}

.action-button {
  position: relative;
  min-width: 118px;
  height: 42px;
  padding: 0 15px 0 48px;
  overflow: hidden;
  border-radius: 13px;
  font-weight: 800;
  letter-spacing: 0;
  isolation: isolate;
}

.action-button .action-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  transform: translateY(-50%);
  transition: left 260ms cubic-bezier(0.22, 1, 0.36, 1), transform 260ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms ease;
}

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

.action-button .action-icon-x svg {
  width: 20px;
  height: 20px;
}

.action-button .action-text {
  display: inline-block;
  white-space: nowrap;
  transition: opacity 210ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.action-button-animated:hover .action-icon,
.action-button-animated:focus-visible .action-icon {
  left: 50%;
  transform: translate(-50%, -50%);
}

.action-button-animated:hover .action-text,
.action-button-animated:focus-visible .action-text {
  opacity: 0;
  transform: translateX(18px);
}

.action-button:active .action-icon {
  transform: translateY(-50%) scale(0.86);
}

.action-button-animated:active .action-icon {
  transform: translate(-50%, -50%) scale(0.86);
}

.action-button-static {
  min-width: 88px;
  padding: 0 14px;
  gap: 8px;
}

.action-button-static .action-icon {
  position: static;
  width: 18px;
  height: 18px;
  transform: none;
}

.action-button-static:active .action-icon {
  transform: scale(0.9);
}

.action-primary {
  border-color: var(--line);
  color: var(--text);
  background: var(--control-bg);
}

.action-primary:hover,
.action-primary:focus-visible {
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
  box-shadow: none;
}

.action-primary:hover .action-icon,
.action-primary:focus-visible .action-icon {
  color: #9ee9b8;
}

.action-neutral {
  border-color: var(--line);
  color: var(--text);
  background: var(--control-bg);
}

.action-neutral:hover,
.action-neutral:focus-visible {
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
}

.action-neutral:hover .action-icon,
.action-neutral:focus-visible .action-icon {
  color: var(--danger);
}

.action-danger {
  border-color: var(--line);
  color: var(--text);
  background: var(--control-bg);
}

.action-danger:hover,
.action-danger:focus-visible {
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
  box-shadow: none;
}

.action-danger:hover .action-icon,
.action-danger:focus-visible .action-icon {
  color: var(--danger);
}

.action-positive {
  border-color: var(--line);
  color: var(--text);
  background: var(--control-bg);
}

.action-positive:hover,
.action-positive:focus-visible {
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
}

.action-positive:hover .action-icon,
.action-positive:focus-visible .action-icon {
  color: #9ee9b8;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  overflow: hidden;
  --sidebar-current-width: 76px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 14px 22px 14px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-topbar);
  backdrop-filter: var(--blur);
  transition: grid-template-columns 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

.top-spacer,
.top-main,
.top-tools,
.content-tools,
.tool-buttons,
.title-actions,
.card-actions,
.modal-actions,
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-spacer {
  min-width: 0;
  width: 56px;
  display: grid;
  place-items: center;
  justify-self: start;
}

.top-main {
  position: relative;
  display: block;
  min-width: 0;
  height: 44px;
  transition: width 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

.search-hidden .top-main {
  display: block;
}

.top-tools {
  position: absolute;
  top: 17px;
  right: 22px;
  justify-self: end;
  gap: 10px;
}

.mevi-dock {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 6;
  display: flex;
  width: 54px;
  height: 52px;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  border: 0;
  border-radius: 17px;
  padding: 2px;
  color: var(--text);
  background: #08080d;
  box-shadow: none;
  overflow: hidden;
  transition: width 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease, transform 180ms ease;
}

.mevi-dock::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, var(--primary-accent), var(--secondary-accent), var(--primary-accent), var(--secondary-accent), var(--primary-accent));
  background-size: 300% 100%;
  opacity: 0;
  transition: opacity 180ms ease;
  content: "";
  animation: none;
  will-change: background-position;
}

.mevi-dock::after {
  position: absolute;
  inset: 1px;
  border-radius: 16px;
  background: linear-gradient(180deg, #0c0c13, #08080d);
  content: "";
}

.mevi-dock:hover,
.mevi-dock:focus-within,
.mevi-dock.active {
  width: 368px;
}

.mevi-dock:hover::before,
.mevi-dock:focus-within::before,
.mevi-dock.active::before {
  opacity: 1;
  animation: meviDockBorder 7.5s linear infinite;
}

.mevi-dock.is-tool-hidden {
  opacity: 0;
  pointer-events: none;
}

.mevi-dock-input {
  position: relative;
  z-index: 1;
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0 8px 0 16px;
  color: var(--text);
  background: transparent !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 15px;
  font-weight: 760;
  opacity: 0;
  outline: none;
  text-align: center;
  transform: translateX(18px);
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1), padding 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mevi-dock-input:hover,
.mevi-dock-input:focus {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.mevi-dock-input::placeholder {
  color: color-mix(in srgb, var(--text) 80%, var(--muted));
  opacity: 1;
  transition: opacity 150ms ease;
}

.mevi-dock-input:focus::placeholder {
  opacity: 0;
}

.mevi-dock:hover .mevi-dock-input,
.mevi-dock:focus-within .mevi-dock-input,
.mevi-dock.active .mevi-dock-input {
  opacity: 1;
  transform: translateX(0);
}

.mevi-dock-button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.mevi-dock-button:focus-visible {
  outline: none;
}

.mevi-dock-avatar {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 14px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.mevi-dock-avatar::before,
.mevi-dock-avatar::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mevi-dock-avatar::before {
  background-image: url('/assets/mevi-avatar.webp');
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mevi-dock-avatar::after {
  background-image: url('/assets/mevi-dock.webp');
  opacity: 0;
  transform: translateY(8px) scale(0.92);
}

.mevi-dock:hover .mevi-dock-avatar,
.mevi-dock:focus-within .mevi-dock-avatar,
.mevi-dock.active .mevi-dock-avatar {
  transform: scale(1.05);
}

.mevi-dock:hover .mevi-dock-avatar::before,
.mevi-dock:focus-within .mevi-dock-avatar::before,
.mevi-dock.active .mevi-dock-avatar::before {
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
}

.mevi-dock:hover .mevi-dock-avatar::after,
.mevi-dock:focus-within .mevi-dock-avatar::after,
.mevi-dock.active .mevi-dock-avatar::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes meviDockBorder {
  from { background-position: 0% 50%; }
  to { background-position: 300% 50%; }
}

.mevi-panel {
  position: fixed;
  top: 88px;
  right: 22px;
  z-index: 55;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(420px, calc(100vw - 116px));
  height: min(660px, calc(100vh - 104px));
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg) 90%, #0f1018);
  box-shadow: var(--upload-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px) scale(0.985);
  transform-origin: top right;
  transition: opacity 190ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mevi-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.mevi-panel[hidden] {
  display: none;
}

.mevi-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, #151621);
}

.mevi-avatar,
.mevi-message-avatar {
  border: 1px solid color-mix(in srgb, var(--primary-accent) 45%, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  background-color: color-mix(in srgb, var(--primary-accent) 22%, #12121b);
  background-image: url('/assets/mevi-avatar.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.mevi-avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.mevi-header > div:nth-child(2) {
  display: grid;
  gap: 3px;
}

.mevi-header strong {
  font-size: 15px;
}

.mevi-header span {
  color: var(--muted);
  font-size: 11px;
}

.mevi-ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mevi-ready i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6ee79d;
  box-shadow: 0 0 10px rgba(110, 231, 157, 0.38);
}

.mevi-messages {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.mevi-messages::before {
  display: block;
  margin-top: auto;
  content: "";
}

.mevi-messages::-webkit-scrollbar {
  display: none;
  width: 0;
}

.mevi-message {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 92%;
}

.mevi-message.user {
  align-self: flex-end;
}

.mevi-message.assistant {
  align-self: flex-start;
}

.mevi-message-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 11px;
}

.mevi-message-avatar.user-avatar {
  background-color: color-mix(in srgb, var(--secondary-accent) 20%, #12121b);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--secondary-accent) 45%, #12121b), #12121b);
}

.mevi-message-body {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 14px;
  padding: 9px 11px;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-panel-soft) 58%, #07070c);
  line-height: 1.45;
  white-space: pre-wrap;
}

.mevi-message.user .mevi-message-body {
  border-color: color-mix(in srgb, var(--primary-accent) 34%, var(--line));
  background: color-mix(in srgb, var(--primary-accent) 18%, rgba(255, 255, 255, 0.04));
}

.mevi-message.assistant .mevi-message-body {
  border-bottom-left-radius: 14px;
}

.mevi-message.assistant .mevi-message-body::before {
  position: absolute;
  left: -8px;
  top: 50%;
  border-top: 7px solid transparent;
  border-right: 8px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-bottom: 7px solid transparent;
  transform: translateY(-50%);
  content: "";
}

.mevi-message.assistant .mevi-message-body::after {
  position: absolute;
  left: -6px;
  top: 50%;
  border-top: 6px solid transparent;
  border-right: 7px solid color-mix(in srgb, var(--bg-panel-soft) 58%, #07070c);
  border-bottom: 6px solid transparent;
  transform: translateY(-50%);
  content: "";
}

.mevi-message.user .mevi-message-body {
  border-bottom-right-radius: 14px;
}

.mevi-message.user .mevi-message-body::before {
  position: absolute;
  right: -8px;
  top: 50%;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 8px solid color-mix(in srgb, var(--primary-accent) 34%, var(--line));
  transform: translateY(-50%);
  content: "";
}

.mevi-message.user .mevi-message-body::after {
  position: absolute;
  right: -6px;
  top: 50%;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid color-mix(in srgb, var(--primary-accent) 18%, rgba(255, 255, 255, 0.04));
  transform: translateY(-50%);
  content: "";
}

.mevi-message.thinking .mevi-message-body {
  color: var(--muted);
}

.mevi-result-list,
.mevi-plan {
  width: calc(100% - 36px);
  margin-left: 36px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 15px;
  background: color-mix(in srgb, var(--bg) 86%, #12131c);
}

.mevi-result-list {
  display: grid;
  max-height: 260px;
  overflow: auto;
  scrollbar-width: none;
}

.mevi-result-list::-webkit-scrollbar {
  display: none;
}

.mevi-result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.mevi-result-item:last-child {
  border-bottom: 0;
}

.mevi-result-item > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.mevi-result-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.mevi-result-item strong,
.mevi-result-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mevi-result-item span,
.mevi-result-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.mevi-result-note {
  padding: 9px 10px;
  text-align: center;
}

.mevi-plan {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.mevi-plan > strong {
  font-size: 13px;
}

.mevi-plan p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.mevi-plan-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mevi-plan ul {
  display: grid;
  gap: 5px;
  max-height: 150px;
  margin: 0;
  padding: 9px 9px 9px 27px;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.mevi-plan-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 9px 9px 9px 29px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
}

.mevi-plan-warning {
  border-left: 2px solid var(--danger);
  padding-left: 9px;
  color: #ffd0da;
  font-size: 12px;
}

.mevi-plan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mevi-plan.completed,
.mevi-plan.cancelled,
.mevi-plan.failed {
  opacity: 0.66;
}

.mevi-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: end;
  gap: 9px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-panel-soft) 58%, transparent);
}

.mevi-form textarea {
  width: 100%;
  min-height: 40px;
  max-height: 144px;
  resize: none;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 11px;
  color: var(--text);
  background: var(--field-bg);
  outline: 0;
}

.mevi-form textarea:focus {
  border-color: var(--line-strong);
  background: var(--field-bg-hover);
}

.mevi-form textarea::placeholder {
  color: var(--muted);
}

.mevi-form .icon-button {
  width: 38px;
  height: 38px;
}

.mevi-form .icon-button.is-stop {
  color: #fff;
  background: #b9434f;
  border-color: rgba(255, 255, 255, 0.2);
}

.mevi-form .icon-button.is-stop:hover {
  background: #c94d59;
  border-color: rgba(255, 255, 255, 0.3);
}

.top-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  -ms-overflow-style: none;
  scrollbar-width: none;
  transition: transform 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

.top-main .search-input {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  transition: width 220ms ease-in-out, opacity 190ms ease-in-out, transform 220ms ease-in-out, border-color 150ms ease, background 150ms ease;
}

.search-hidden .top-main .search-input {
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(-12px, -50%) scaleX(0.94);
}

.nav-indicator {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--menu-accent);
  pointer-events: none;
  transition:
    width 260ms cubic-bezier(0.22, 1, 0.36, 1),
    height 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    background 150ms ease;
}

.nav-item {
  position: relative;
  z-index: 1;
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  padding: 0;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, background 180ms ease, transform 180ms ease;
}

.nav-item.active {
  color: var(--menu-accent-text);
  background: transparent;
}

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

.nav-item.active:hover {
  color: var(--menu-accent-text);
  background: transparent;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.profile-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  object-fit: cover;
}

.profile-fallback {
  color: var(--accent-2);
  font-weight: 800;
}

.profile-name {
  color: var(--text);
  font-weight: 700;
}

.profile-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  padding: 4px 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.sidebar {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  justify-items: center;
  gap: 0;
  min-width: 0;
  padding: 10px 10px 14px;
  border-right: 0;
  background: var(--bg-sidebar);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 160ms ease;
}

.sidebar::after {
  position: absolute;
  top: 72px;
  right: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  content: "";
  pointer-events: none;
}

.sidebar-home-icon,
.sidebar-icon {
  position: relative;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.sidebar-home-icon {
  z-index: 2;
  background-color: #fff;
  background-image: url('/assets/mevi-logo.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 82%;
  user-select: none;
  -webkit-user-drag: none;
}

.sidebar-home-icon:hover,
.sidebar-home-icon:focus-visible,
.sidebar-home-icon.active {
  background-color: var(--primary-accent);
  background-image: url('/assets/mevi-logo.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: 82%;
}

.sidebar-profile-icon {
  margin-top: 10px;
  border-radius: 999px;
}

.sidebar-profile-icon .profile-avatar {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 999px;
  transition: transform 220ms ease-in-out;
}

.sidebar-settings-divider {
  width: 42px;
  height: 1px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--primary-accent), transparent);
}

.sidebar-profile-icon:hover .profile-avatar {
  transform: scale(1.08);
}

.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  line-height: 1.35;
  text-align: left;
}

.confirm-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary-accent);
}

.confirm-check.is-danger {
  border-color: rgba(255, 107, 139, 0.42);
  color: #ffd0da;
  background: rgba(255, 107, 139, 0.1);
}

.confirm-check.is-danger input {
  accent-color: var(--danger);
}

.sidebar-icon:not(.sidebar-home-icon):hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-folder-icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary-accent);
}

.sidebar-icon:not(.sidebar-home-icon).active {
  border-color: color-mix(in srgb, var(--primary-accent) 62%, transparent);
  background: color-mix(in srgb, var(--primary-accent) 16%, rgba(255, 255, 255, 0.055));
}

.sidebar-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.sidebar-folder-icon img,
.group-tile-cell img {
  object-fit: cover;
  padding: 0;
}

.sidebar-icon-list {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 16px, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, transparent 16px, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.sidebar-icon-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.sidebar-icon-list.drop-out {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.sidebar-group-shell {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  width: 100%;
  border-radius: 24px;
  isolation: isolate;
  transition: gap 175ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-group-shell::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--group-color) 26%, #020206 74%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease-in-out;
}

.sidebar-group-shell > .sidebar-icon,
.sidebar-group-shell > .sidebar-group-expanded {
  position: relative;
  z-index: 1;
}

.sidebar-item,
.sidebar-group-expanded .sidebar-icon {
  transition: transform 170ms cubic-bezier(0.22, 1, 0.36, 1), opacity 150ms ease, border-color 150ms ease, background 150ms ease;
}

.sidebar-group-icon {
  border-color: color-mix(in srgb, var(--group-color) 52%, var(--line));
  background: color-mix(in srgb, var(--group-color) 24%, rgba(255, 255, 255, 0.05));
}

.sidebar-group-shell.expanded {
  gap: 8px;
}

.sidebar-group-shell.expanded::before {
  opacity: 1;
}

.sidebar-group-expanded {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
  height: auto;
  padding: 4px 0;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: height 175ms cubic-bezier(0.4, 0, 0.2, 1), padding 175ms cubic-bezier(0.4, 0, 0.2, 1), opacity 130ms ease-in-out, transform 175ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: height, opacity, transform;
}

.sidebar-group-shell.expanded.collapsing {
  gap: 0;
}

.sidebar-group-shell.expanded.collapsing::before {
  opacity: 0;
}

.sidebar-group-shell.collapsing .sidebar-group-expanded {
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.sidebar-drop-placeholder {
  position: relative;
  display: block;
  width: 52px;
  height: 16px;
  pointer-events: none;
}

.sidebar-drop-placeholder.in-group {
  width: 46px;
  height: 14px;
}

.sidebar-drop-placeholder::before {
  position: absolute;
  top: 50%;
  right: 3px;
  left: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary-accent) 28%, transparent);
  content: "";
  transform: translateY(-50%);
}

.sidebar-group-expanded .sidebar-icon {
  width: 46px;
  height: 46px;
  border-radius: 17px;
  background: color-mix(in srgb, var(--group-color) 18%, rgba(0, 0, 0, 0.34));
}

.group-tile {
  display: grid;
  width: 38px;
  height: 38px;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 120ms ease-in-out, transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.group-open-glyph {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--primary-accent);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 120ms ease-in-out, transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.group-open-glyph svg {
  width: 27px;
  height: 27px;
}

.sidebar-group-shell.expanded .sidebar-group-icon .group-tile {
  opacity: 0;
  transform: scale(0.82);
}

.sidebar-group-shell.expanded .sidebar-group-icon .group-open-glyph {
  opacity: 1;
  transform: scale(1);
}

.group-tile-cell {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border-radius: 8px;
  color: var(--primary-accent);
  background: transparent;
  overflow: hidden;
}

.group-tile-cell:empty {
  display: none;
}

.group-tile-cell svg {
  width: 16px;
  height: 16px;
}

.group-tile-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-icon.drop-before::before,
.sidebar-icon.drop-after::after,
.sidebar-group-shell.drop-before::before,
.sidebar-group-shell.drop-after::after {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary-accent);
  content: "";
}

.sidebar-icon.drop-before::before,
.sidebar-group-shell.drop-before::before {
  top: -7px;
}

.sidebar-icon.drop-after::after,
.sidebar-group-shell.drop-after::after {
  bottom: -7px;
}

.sidebar-icon.drop-into {
  border-color: var(--primary-accent);
  background: color-mix(in srgb, var(--primary-accent) 24%, rgba(255, 255, 255, 0.07));
}

.sidebar-icon.drag-source {
  opacity: 0.52;
}

.sidebar-info-panel {
  position: fixed;
  z-index: 90;
  display: grid;
  gap: 3px;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: none;
  pointer-events: none;
}

.sidebar-info-panel::before {
  position: absolute;
  top: 50%;
  left: -7px;
  width: 14px;
  height: 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.sidebar-info-panel strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.sidebar-info-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.main {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  padding: 24px var(--main-content-right-padding) 24px 24px;
  overflow: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.main::-webkit-scrollbar,
.folder-list::-webkit-scrollbar,
.move-list::-webkit-scrollbar,
.top-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.sidebar-head,
.main-title,
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sidebar-head {
  margin-bottom: 16px;
  padding: 0 4px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar h2,
.main-title h1 {
  margin: 0;
  letter-spacing: 0;
}

.sidebar h2 {
  font-size: 18px;
}

.main-title {
  min-height: 78px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 20px;
}

.page-head {
  position: relative;
  min-height: 88px;
  margin-bottom: 14px;
}

.page-back {
  position: absolute;
  left: 0;
}

.page-title {
  width: 100%;
  padding-inline: 210px;
  text-align: center;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(22px, 2vw, 31px);
}

.image-count {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.content-tools {
  position: absolute;
  right: 0;
  top: 10px;
  display: grid;
  justify-items: end;
}

.tool-buttons {
  gap: 10px;
}

.search-input {
  width: 196px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--field-bg) 84%, transparent);
  color: var(--text);
  opacity: 0.82;
  transition: width 220ms ease-in-out, opacity 190ms ease-in-out, border-color 150ms ease, background 150ms ease;
}

.search-input:hover {
  border-color: var(--line-strong);
  background: var(--field-bg);
}

.search-input:focus {
  width: 248px;
  border-color: var(--line-strong);
  background: var(--field-bg-hover);
  opacity: 1;
}

.search-input::placeholder {
  color: var(--muted);
  transition: color 150ms ease, opacity 150ms ease;
}

.search-input:hover::placeholder {
  color: var(--text);
}

.search-input:focus::placeholder {
  opacity: 0;
}

#clearRecycleButton[hidden],
#restoreAllRecycleButton[hidden] {
  display: none !important;
}

.page-head.home-root {
  height: 0;
  min-height: 0;
  margin-bottom: 0;
}

.page-head.home-root .page-title {
  display: none;
}

.main-title h1 {
  font-size: clamp(22px, 2vw, 31px);
  word-break: break-word;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0;
  color: var(--text);
  background: var(--control-bg);
  cursor: pointer;
  text-decoration: none;
  transition: width 190ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease, margin 190ms cubic-bezier(0.22, 1, 0.36, 1), transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.icon-button.mini {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.icon-button.accent {
  border-color: var(--line);
  background: var(--control-bg);
}

.top-tools .icon-button {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: var(--control-bg);
}

.top-tools .icon-button[hidden] {
  display: none;
}

.top-tools .icon-button:hover,
.top-tools .icon-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
}

.top-tools .icon-button.is-tool-hidden {
  width: 0;
  margin-left: -10px;
  border-color: transparent;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: scale(0.82);
}

.upload-log-button {
  position: relative;
}

.upload-log-icon {
  display: grid;
  place-items: center;
  transform: rotate(0deg);
  transition: transform 280ms cubic-bezier(0.45, 0, 0.55, 1);
  will-change: transform;
}

.upload-log-button.is-open .upload-log-icon {
  transform: rotate(180deg);
}

.upload-log-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: none;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid var(--bg-topbar);
  border-radius: 999px;
  color: var(--secondary-accent-text);
  background: var(--secondary-accent);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.upload-log-button.has-unread .upload-log-badge {
  display: grid;
}

.create-plus-button {
  display: grid;
  width: 100%;
  height: 56px;
  margin: 0 0 18px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  color: var(--text);
  background: color-mix(in srgb, var(--primary-accent) 18%, transparent);
  cursor: pointer;
  transition: background 150ms ease;
}

.create-plus-button:hover {
  background: color-mix(in srgb, var(--primary-accent) 23%, transparent);
}

.create-plus-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.create-plus-button svg {
  width: 24px;
  height: 24px;
  transition: transform 150ms ease;
}

.create-plus-button:hover svg,
#railPlusButton:hover svg {
  animation: plus-rock 780ms ease-in-out;
}

.tool-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.tool-icon-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-icon-alternate {
  opacity: 0;
  transform: translate3d(0, 3px, 0) scale(0.62) rotate(-18deg);
}

.show-alternate-icon .tool-icon-primary {
  opacity: 0;
  transform: translate3d(0, -3px, 0) scale(0.62) rotate(18deg);
}

.show-alternate-icon .tool-icon-alternate {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
}

.tool-morph .tool-icon {
  animation: toolMorphTap 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-tag .tool-icon {
  animation: toolTagTap 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-sort .tool-icon {
  animation: toolSortTap 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toolMorphTap {
  50% { transform: scale(0.82); }
}

@keyframes toolTagTap {
  45% { transform: rotate(-12deg) scale(0.9); }
  75% { transform: rotate(5deg) scale(1.03); }
}

@keyframes toolSortTap {
  45% { transform: translateY(2px) scaleY(0.82); }
  75% { transform: translateY(-1px) scaleY(1.04); }
}

.sidebar-userbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.sidebar-userbar .profile-button {
  width: 100%;
  min-width: 0;
}

.profile-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.profile-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.settings-gear-button:hover svg,
.rail-bottom:hover svg {
  animation: gear-rock 880ms ease-in-out;
}

.settings-gear-button svg,
.rail-bottom svg,
.create-plus-button svg,
#railPlusButton svg {
  transform-origin: center;
}

@keyframes gear-rock {
  0% { transform: rotate(0deg); }
  45% { transform: rotate(62deg); }
  100% { transform: rotate(0deg); }
}

@keyframes plus-rock {
  0% { transform: scale(1) rotate(0deg); }
  45% { transform: scale(1.12) rotate(90deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.icon-button.danger {
  color: #ffd0da;
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible {
  border-color: rgba(255, 107, 139, 0.38);
  background: color-mix(in srgb, var(--danger) 9%, var(--control-bg-hover));
  color: #ffd0da;
}

.icon-button.active {
  color: var(--active-control-text);
  border-color: color-mix(in srgb, var(--primary-accent) 48%, var(--line-strong));
  background: color-mix(in srgb, var(--primary-accent) 28%, var(--soft));
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
}

.inline-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--field-bg);
  outline: none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

input:focus,
input:hover,
select:focus,
select:hover,
textarea:focus,
textarea:hover {
  border-color: var(--line-strong);
  background: var(--field-bg-hover);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.045);
}

.inline-form input {
  flex: 1;
}

.folder-list,
.folder-group {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 4px;
}

.folder-list {
  min-height: 0;
  padding-right: 0;
  padding-bottom: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.folder-group {
  margin-top: 4px;
  border-radius: 14px;
}

.folder-group.drag-over {
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.folder-group.collapsed-group {
  gap: 3px;
  margin-top: 7px;
}

.group-head {
  display: grid;
  grid-template-columns: var(--group-bar-width, 14px) minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  border-left: 0;
  border-radius: 10px;
}

.group-head span {
  flex: 1;
}

.group-name-button {
  min-width: 0;
  border: 0;
  padding: 7px 6px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-name-button:hover {
  color: #fff;
}

.group-head.static {
  padding: 0 10px;
}

.sidebar-heading {
  width: 100%;
  border: 0;
  padding: 5px 10px 0;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.section-toggle {
  cursor: pointer;
  border-radius: 10px;
}

.section-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-divider {
  height: 1px;
  margin: 10px 8px 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-accent) 70%, transparent), transparent);
}

.group-color-dot {
  width: var(--group-bar-width, 14px);
  min-height: 7px;
  height: 2px;
  justify-self: start;
  border-radius: 999px;
  background: var(--group-color, var(--accent));
  box-shadow: 0 0 4px color-mix(in srgb, var(--group-color, var(--accent)) 28%, transparent);
  cursor: pointer;
}

.drop-zone {
  min-height: 4px;
  border-radius: 8px;
}

.drop-zone.drag-over {
  min-height: 30px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.folder-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  transition: border-color 150ms ease, background 150ms ease;
}

.folder-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.folder-pin-badge {
  display: inline-grid;
  width: 20px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--secondary-accent);
}

.folder-pin-badge[hidden] {
  display: none;
}

.folder-pin-badge svg {
  width: 13px;
  height: 13px;
  color: var(--secondary-accent);
}

.folder-row.grouped-folder {
  gap: 3px;
  margin-top: -9px;
  margin-left: 8px;
}

.folder-row.grouped-folder .folder-nav-button {
  padding-right: 4px;
}

.folder-row.grouped-folder .order-button {
  display: inline-grid;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  padding: 0;
  flex: 0 0 22px;
  border-radius: 8px;
  line-height: 1;
}

.folder-row.grouped-folder .order-button svg {
  width: 13px;
  height: 13px;
  display: block;
}

.folder-row > .icon-button.mini,
.group-head > .icon-button.mini {
  border-color: transparent;
  background: transparent;
  opacity: 0;
}

.folder-row:hover > .icon-button.mini,
.folder-row:focus-within > .icon-button.mini,
.group-head:hover > .icon-button.mini,
.group-head:focus-within > .icon-button.mini {
  opacity: 1;
}

.folder-row > .icon-button.mini:hover,
.group-head > .icon-button.mini:hover {
  border-color: transparent;
  background: transparent;
  color: #fff;
}

.folder-group .drop-zone {
  min-height: 12px;
  border: 1px dashed transparent;
}

.folder-group .drop-zone.drag-over {
  min-height: 52px;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.folder-row.drop-before,
.folder-row.drop-after,
.folder-group.drop-before,
.folder-group.drop-after {
  position: relative;
}

.folder-row.drop-before::before,
.folder-row.drop-after::after,
.folder-group.drop-before::before,
.folder-group.drop-after::after {
  position: absolute;
  right: 8px;
  left: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--secondary-accent);
  content: "";
}

.folder-row.drop-before::before,
.folder-group.drop-before::before {
  top: -4px;
}

.folder-row.drop-after::after,
.folder-group.drop-after::after {
  bottom: -4px;
}

.folder-row:hover {
  border-color: color-mix(in srgb, var(--secondary-accent) 35%, var(--line));
  background: color-mix(in srgb, var(--secondary-accent) 13%, transparent);
}

.folder-row.active {
  border-color: color-mix(in srgb, var(--secondary-accent) 48%, var(--line));
  background: color-mix(in srgb, var(--secondary-accent) 18%, transparent);
}

.folder-nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  min-height: 42px;
  border: 0;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.folder-card,
.list-row.folder-row {
  cursor: pointer;
}

.folder-card .icon-button,
.list-row.folder-row .icon-button {
  cursor: pointer;
}

.folder-card .card-actions {
  opacity: 0;
  pointer-events: none;
  transition: opacity 130ms ease;
}

.folder-card:hover .card-actions,
.folder-card:focus-within .card-actions {
  opacity: 1;
  pointer-events: auto;
}

.folder-nav-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--folder-dot-color, var(--accent));
  box-shadow: none;
}

.upload-zone {
  display: grid;
  width: min(100%, 914px);
  min-height: 116px;
  margin: 0 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-style: solid;
  border-radius: 20px;
  color: var(--muted);
  background: var(--upload-zone-bg);
  box-shadow: var(--upload-shadow);
  cursor: pointer;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.upload-control-row {
  position: relative;
}

.upload-row {
  position: relative;
  width: min(calc(100% - 174px), 914px);
  min-height: 116px;
  margin: 0 auto 18px;
}

.upload-row.placeholder-only {
  visibility: hidden;
}

.select-all-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  width: 136px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--text);
  background: var(--control-bg);
  cursor: pointer;
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.select-all-button:hover,
.select-all-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
}

.select-all-button.has-selection {
  border-color: var(--line-strong);
}

.selection-control {
  position: absolute;
  z-index: 5;
  display: block;
  width: 148px;
  height: 38px;
  isolation: isolate;
  overflow: visible;
}

.selection-control[hidden] {
  display: none !important;
}

.bulk-actions {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 12px;
  overflow: hidden;
  pointer-events: none;
}

.bulk-actions::before,
.bulk-actions::after {
  position: absolute;
  top: 9px;
  width: 1px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line-strong) 68%, transparent);
  opacity: 0;
  transform: scaleY(0.35);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  content: "";
}

.bulk-actions::before {
  left: 43px;
}

.bulk-actions::after {
  right: 43px;
}

.bulk-actions.show::before,
.bulk-actions.show::after {
  opacity: 0.58;
  transform: scaleY(1);
}

.bulk-actions .action-button {
  position: absolute;
  top: 0;
  width: 40px;
  min-width: 40px;
  height: 38px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms ease, background 150ms ease;
}

.bulk-actions .action-button .action-text {
  display: none;
}

.bulk-actions .action-button .action-icon {
  position: static;
  width: 18px;
  height: 18px;
  transform: none;
}

.bulk-actions .bulk-move-action {
  left: 0;
  transform: translateX(-42px);
}

.bulk-actions .bulk-delete-action {
  right: 0;
  transform: translateX(42px);
}

.bulk-actions.show .action-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.selection-control > .select-all-button {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 148px;
  min-width: 148px;
  height: 38px;
  padding-inline: 15px;
  transform: none;
}

.selection-control.has-selection > .select-all-button {
  padding-inline: 39px;
}

.select-all-button .select-count-text {
  display: block;
  width: 100%;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}

.select-all-button.action-neutral:hover .action-icon,
.select-all-button.action-neutral:focus-visible .action-icon {
  color: var(--text);
}

.menu-tag-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.tag-filter-menu,
.sort-menu {
  display: grid;
  gap: 0;
}

.menu-section-header {
  padding: 7px 10px 3px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-section-divider {
  height: 1px;
  margin: 6px 0;
  background: color-mix(in srgb, var(--line-strong) 78%, transparent);
}

.tag-filter-menu .menu-item,
.sort-menu .menu-item {
  min-height: 34px;
  padding-block: 6px;
}

.tag-filter-menu .menu-item.selected,
.sort-menu .menu-item.selected {
  color: var(--secondary-accent-text);
  background: color-mix(in srgb, var(--secondary-accent) 34%, var(--bg-panel-strong));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--secondary-accent) 42%, transparent);
}

.tag-filter-menu .menu-item.selected:hover,
.sort-menu .menu-item.selected:hover {
  background: color-mix(in srgb, var(--secondary-accent) 40%, var(--bg-panel-strong));
}

.bulk-delete-list {
  display: grid;
  gap: 5px;
  max-height: 190px;
  margin-top: 12px;
  overflow: auto;
}

.bulk-delete-list span {
  overflow: hidden;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-delete-extra {
  display: grid;
  gap: 10px;
}

.bulk-delete-single {
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item.menu-reset,
.menu-item.menu-reset:hover {
  margin-top: 5px;
  color: #ffd0da;
  background: rgba(255, 107, 139, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 139, 0.38);
}

.clear-recycle-button {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 38px;
  border: 1px solid rgba(255, 107, 139, 0.42);
  border-radius: 13px;
  color: #ffd0da;
  background: color-mix(in srgb, var(--danger) 10%, var(--control-bg));
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.clear-recycle-button:hover,
.clear-recycle-button:focus-visible {
  border-color: rgba(255, 107, 139, 0.62);
  background: color-mix(in srgb, var(--danger) 16%, var(--control-bg-hover));
}

.restore-all-recycle-button {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 13px;
  color: #111218;
  background: #f4f4f6;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.restore-all-recycle-button:hover,
.restore-all-recycle-button:focus-visible {
  border-color: #ffffff;
  background: #ffffff;
}

.restore-all-recycle-button:disabled,
.clear-recycle-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.restore-all-recycle-button[hidden],
.clear-recycle-button[hidden] {
  display: none !important;
}

.select-all-button:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--bg-panel-strong) 34%, transparent);
}

.drop-target-stack {
  position: absolute;
  top: 0;
  right: calc(100% + 14px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 160px;
  gap: 10px;
  min-height: 116px;
}

.upload-zone strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.upload-zone.dragging {
  border-color: #55d88a;
  background: var(--upload-zone-bg);
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(85, 216, 138, 0.58),
    0 0 18px rgba(85, 216, 138, 0.24),
    var(--upload-shadow);
}

.upload-zone.invalid-drag {
  border-color: var(--danger);
  background: var(--upload-zone-bg);
  color: var(--text);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--danger) 58%, transparent), 0 0 16px color-mix(in srgb, var(--danger) 24%, transparent), var(--upload-shadow);
}

.home-drop-target,
.folder-recycle-target {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 116px;
  place-items: center;
  border: 1px solid rgba(220, 160, 75, 0.42);
  border-radius: 18px;
  color: #e6aa5a;
  background: rgba(190, 120, 42, 0.12);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.folder-recycle-target {
  order: 2;
  grid-column: 2;
  border-color: rgba(255, 107, 139, 0.42);
  color: #ff829a;
  background: rgba(255, 107, 139, 0.1);
}

.home-drop-target {
  order: 1;
  grid-column: 1;
}

.home-drop-target[hidden],
.folder-recycle-target[hidden] {
  display: none;
}

.home-drop-target.dragging {
  border-color: rgba(230, 170, 90, 0.84);
  color: #ffd89d;
  background: rgba(190, 120, 42, 0.24);
  box-shadow: 0 0 0 1px rgba(230, 170, 90, 0.16), 0 12px 34px rgba(190, 120, 42, 0.16);
}

.folder-recycle-target.dragging {
  border-color: rgba(255, 150, 170, 0.82);
  color: #ffd0da;
  background: rgba(255, 107, 139, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 107, 139, 0.18), 0 12px 34px rgba(255, 107, 139, 0.18);
}

.message {
  display: none;
  position: fixed;
  top: 92px;
  left: calc(var(--sidebar-current-width) + 24px);
  z-index: 50;
  width: fit-content;
  min-width: 0;
  max-width: min(420px, calc(100vw - var(--sidebar-current-width) - 48px));
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--notification-text);
  background: var(--notification-color);
  text-align: center;
  box-shadow: var(--upload-shadow);
}

.message.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.message.progress {
  color: rgba(246, 246, 249, 0.94);
  background: rgba(55, 56, 64, 0.96);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: var(--upload-shadow);
}

.notification-progress-ring {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.28) 100deg,
    rgba(255, 255, 255, 0.94) 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0);
  animation: notification-loading-ring 780ms linear infinite;
}

@keyframes notification-loading-ring {
  to { transform: rotate(360deg); }
}

.message.error {
  border-color: rgba(255, 107, 139, 0.46);
  color: #ffd0da;
  background: rgba(150, 35, 57, 0.92);
}

.message.success {
  border-color: color-mix(in srgb, var(--notification-color) 70%, white 8%);
  color: var(--notification-text);
}

.upload-progress {
  position: fixed;
  top: 82px;
  left: calc(var(--sidebar-current-width) + ((100vw - var(--sidebar-current-width)) / 2));
  z-index: 52;
  display: inline-flex;
  min-height: 42px;
  max-width: min(430px, calc(100vw - var(--sidebar-current-width) - 40px));
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--primary-accent) 78%, var(--line));
  border-radius: 14px;
  padding: 9px 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-panel) 94%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary-accent) 10%, transparent), var(--upload-shadow);
  font-size: 13px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.upload-progress.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.upload-progress-arrow,
.upload-progress-check,
.download-progress-spinner {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--primary-accent);
}

.upload-progress-arrow svg,
.upload-progress-check svg,
.download-progress-spinner svg {
  width: 18px;
  height: 18px;
}

.upload-progress-arrow {
  animation: upload-progress-arrow 900ms cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.upload-progress.completed .upload-progress-check {
  color: #9ee9b8;
}

.download-progress-spinner {
  color: var(--primary-accent);
  animation: download-progress-spin 850ms linear infinite;
}

@keyframes upload-progress-arrow {
  0%, 100% { transform: translateY(3px); opacity: 0.58; }
  50% { transform: translateY(-3px); opacity: 1; }
}

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

.bulk-bar {
  display: none;
  position: absolute;
  top: 98px;
  left: 24px;
  z-index: 45;
  width: fit-content;
  margin: 0;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-panel) 78%, transparent);
  box-shadow: var(--shadow);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.bulk-bar.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.custom-scrollbar {
  position: fixed;
  z-index: 35;
  display: none;
  width: 7px;
  border: 1px solid color-mix(in srgb, var(--primary-accent) 14%, rgba(255, 255, 255, 0.08));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-accent) 4%, transparent);
  opacity: 0;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  transition: opacity 180ms ease;
}

.custom-scrollbar.show {
  display: block;
}

.custom-scrollbar.show.active,
.custom-scrollbar.dragging {
  opacity: 1;
  pointer-events: auto;
}

.custom-scrollbar-thumb {
  width: 100%;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--primary-accent) 26%, rgba(255, 255, 255, 0.14));
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-accent) 18%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: grab;
  transition: background 150ms ease;
}

.custom-scrollbar-thumb:hover,
.custom-scrollbar.dragging .custom-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary-accent) 26%, transparent);
}

.custom-scrollbar.dragging .custom-scrollbar-thumb {
  cursor: grabbing;
}

.content-grid {
  display: grid;
  width: min(100%, var(--grid-frame-width));
  margin-inline: auto;
  grid-template-columns: repeat(auto-fill, var(--media-card-width));
  gap: 16px;
  align-items: start;
  justify-content: start;
}

.content-grid > *,
.folder-card-grid > * {
  transform-origin: top left;
}

.content-grid.list-view {
  grid-template-columns: 1fr;
}

.content-section-title {
  grid-column: 1 / -1;
  display: grid;
  min-height: 38px;
  align-items: center;
  gap: 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 38px;
}

.content-section-title.has-divider {
  margin-top: 0;
  padding-top: 0;
}

.content-section-title.has-divider::before {
  display: block;
  width: 100%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary-accent) 78%, transparent), transparent);
  content: "";
}

.folder-card-grid {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
}

.folder-card-grid.grid-view {
  grid-template-columns: repeat(var(--folder-columns), minmax(0, 1fr));
  justify-content: stretch;
}

.folder-card-grid.list-view {
  grid-template-columns: 1fr;
}

.media-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--card-bottom-height);
  min-width: 0;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-panel);
  overflow: hidden;
  contain: layout paint;
  transition: border-color 160ms ease, background 160ms ease;
}

.media-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.media-card.selected {
  border-color: var(--secondary-accent);
  outline: 1px solid var(--secondary-accent);
  outline-offset: -2px;
}

.folder-card,
.list-row.folder-row {
  background: var(--bg-folder-card);
}

.folder-card.drop-hover,
.list-row.folder-row.drop-hover {
  border-color: var(--secondary-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--secondary-accent) 58%, transparent), 0 0 18px color-mix(in srgb, var(--secondary-accent) 24%, transparent);
}

.media-card.is-removing,
.list-row.is-removing {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
  transition: opacity 130ms ease, transform 130ms ease;
}

.list-row.selected {
  border-color: var(--secondary-accent);
  outline: 1px solid var(--secondary-accent);
  outline-offset: -2px;
}

.folder-card-grid.grid-view .folder-card {
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: 1fr;
  aspect-ratio: auto;
  min-height: 96px;
}

.folder-card-grid.grid-view .folder-card .card-bottom {
  display: block;
  min-height: 0;
  padding: 12px 12px;
  border-top: 0;
  border-left: 1px solid var(--line);
  background: var(--bg-folder-card);
}

.folder-card-grid.grid-view .folder-card .folder-info {
  grid-template-rows: 20px 17px 24px;
  min-height: 0;
  gap: 4px;
  align-content: center;
}

.folder-card-grid.grid-view .folder-card .folder-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 100px;
  font-size: 14px;
}

.folder-card-grid.grid-view .folder-card .folder-media-count {
  padding-right: 100px;
  font-size: 12px;
}

.folder-card-grid.grid-view .folder-card .card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  justify-content: end;
  gap: 4px;
  padding-left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 130ms ease;
}

.folder-card-grid.grid-view .folder-card:hover .card-actions,
.folder-card-grid.grid-view .folder-card:focus-within .card-actions {
  opacity: 1;
  pointer-events: auto;
}

.folder-card-grid.grid-view .folder-card .folder-preview svg {
  width: 38px;
  height: 38px;
}

.folder-card-grid.grid-view .folder-card.has-folder-icon .folder-glyph svg {
  width: 44px;
  height: 44px;
}

.media-preview,
.folder-preview {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--accent-2);
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--primary-accent) 6%, transparent), transparent 64%),
    var(--bg-panel-strong);
  cursor: pointer;
  position: relative;
  transform-origin: center top;
}

.folder-preview {
  background:
    radial-gradient(circle at center, color-mix(in srgb, var(--primary-accent) 6%, transparent), transparent 64%),
    var(--bg-folder-preview);
}

.folder-preview svg {
  width: 54px;
  height: 54px;
  color: var(--primary-accent);
}

.folder-glyph {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.folder-icon-image {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.folder-card.has-folder-icon .folder-preview {
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-folder-preview) 42%, transparent);
}

.folder-card.has-folder-icon .folder-preview::after,
.list-preview.has-folder-icon .folder-preview::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.18);
  content: "";
  pointer-events: none;
}

.folder-card.has-folder-icon .folder-glyph {
  display: none;
}

.media-preview img,
.media-preview video {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  opacity: 1;
  transition: opacity 180ms ease;
}

.media-preview img[hidden],
.media-preview video[hidden] {
  display: none;
}

.media-preview.is-loading img,
.media-preview.is-loading video {
  opacity: 0;
}

.media-preview.is-loading::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    color-mix(in srgb, var(--primary-accent) 28%, transparent) 105deg,
    var(--primary-accent) 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  content: "";
  animation: media-loading-ring 820ms linear infinite;
  pointer-events: none;
}

@keyframes media-loading-ring {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.card-bottom {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  min-height: var(--card-bottom-height);
  align-content: center;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-panel-strong) 84%, transparent);
  transition: opacity 150ms ease, background 150ms ease;
}

.file-card .card-bottom {
  opacity: 0;
  pointer-events: none;
  background: var(--media-hover-bg);
}

.file-card:hover .card-bottom,
.file-card:has(:focus-visible) .card-bottom {
  opacity: 1;
  pointer-events: auto;
}

.card-info {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0 2px;
}

.card-info strong,
.card-info span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card .hover-info {
  opacity: 0;
  min-height: 36px;
  transition: opacity 150ms ease;
}

.file-card:hover .hover-info,
.list-row .hover-info {
  opacity: 1;
}

.folder-info {
  display: grid;
  gap: 7px;
  min-height: 38px;
  align-content: start;
}

.folder-info strong {
  white-space: normal;
}

.folder-media-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.file-card .card-info strong,
.list-row.file-row .card-info strong {
  color: var(--media-hover-text);
}

.tag-row {
  display: flex;
  width: 100%;
  gap: 5px;
  min-width: 0;
}

.folder-card-tags {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  z-index: 2;
  align-content: start;
  justify-content: center;
  pointer-events: none;
}

.folder-card-grid.grid-view .folder-card .folder-card-tags {
  justify-content: start;
}

.folder-info .folder-card-tags {
  position: static;
  inset: auto;
  z-index: auto;
  height: 24px;
  overflow: hidden;
  align-content: start;
  justify-content: start;
  pointer-events: auto;
}

.tag-track {
  display: flex;
  min-width: max-content;
  gap: 5px;
  transition: transform 1800ms ease;
}

.folder-card-tags.is-overflowing:hover .tag-track {
  transform: translateX(calc(-1 * var(--tag-scroll-distance, 0px)));
}

.folder-card-tags:empty {
  display: none;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 20px;
  max-width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  overflow: hidden;
  background: var(--tag-color);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: pre;
}

.drag-preview-card {
  position: fixed;
  top: -260px;
  left: -180px;
  z-index: 9999;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 42px;
  width: 140px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  overflow: hidden;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-panel) 62%, transparent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  opacity: 0.78;
  pointer-events: none;
}

.drag-preview-frame {
  display: grid;
  min-height: 0;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
}

.drag-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drag-preview-card > div:last-child {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-info span {
  color: var(--media-hover-muted);
  font-size: 12px;
}

.card-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 26px;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
}

.card-actions .icon-button {
  width: 26px;
  height: 26px;
  border-radius: 9px;
}

.card-actions .icon-button:hover,
.top-tools .icon-button:hover,
.content-tools .icon-button:hover,
.folder-row .icon-button:hover,
.group-head .icon-button:hover {
  transform: none;
}

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

.selection-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.checkmark {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(7, 7, 12, 0.76);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.checkmark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 10px;
  border: solid var(--secondary-accent-text);
  border-width: 0 2px 2px 0;
  content: "";
  opacity: 0;
  transform: translate(-50%, -60%) rotate(45deg);
  transform-origin: center;
}

.custom-checkbox:checked + .checkmark {
  border-color: var(--secondary-accent);
  background-color: var(--secondary-accent);
  box-shadow: none;
}

.custom-checkbox:checked + .checkmark::after {
  animation: checkAnim 180ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.selection-batch-update .media-card,
.selection-batch-update .list-row,
.selection-batch-update .selection-checkbox,
.selection-batch-update .checkmark {
  transition: none !important;
}

.selection-batch-update .custom-checkbox:checked + .checkmark::after {
  opacity: 1;
  transform: translate(-50%, -60%) rotate(45deg) scale(1);
  animation: none;
}

.custom-checkbox:focus-visible + .checkmark {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
}

.file-card .selection-checkbox {
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.file-card:hover .selection-checkbox,
.file-card:has(:focus-visible) .selection-checkbox,
.file-card.selected .selection-checkbox,
.all-media-selected .file-card:not(.bulk-unselected) .selection-checkbox,
.all-media-selected .list-row.file-row:not(.bulk-unselected) .selection-checkbox {
  opacity: 1;
  pointer-events: auto;
}

.all-media-selected .file-card:not(.bulk-unselected),
.all-media-selected .list-row.file-row:not(.bulk-unselected) {
  border-color: var(--secondary-accent);
  outline: 1px solid var(--secondary-accent);
}

.all-media-selected .file-card:not(.bulk-unselected) .checkmark,
.all-media-selected .list-row.file-row:not(.bulk-unselected) .checkmark {
  border-color: var(--secondary-accent);
  background-color: var(--secondary-accent);
  box-shadow: none;
}

.all-media-selected .file-card:not(.bulk-unselected) .checkmark::after,
.all-media-selected .list-row.file-row:not(.bulk-unselected) .checkmark::after {
  opacity: 1;
  transform: translate(-50%, -60%) rotate(45deg) scale(1);
}

@keyframes checkAnim {
  from {
    opacity: 0;
    transform: translate(-50%, -60%) rotate(45deg) scale(0.35);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -60%) rotate(45deg) scale(1);
  }
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 42vh;
  place-items: center;
  padding: 38px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.list-row {
  display: grid;
  grid-template-columns: 72px minmax(180px, 1fr) 100px 150px 100px auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg-panel) 54%, transparent);
  box-shadow: none;
  backdrop-filter: none;
  contain: layout paint;
  content-visibility: auto;
  contain-intrinsic-size: 82px;
  user-select: none;
}

.list-row.file-row {
  cursor: pointer;
}

.list-row.file-row {
  grid-template-columns: 26px 72px minmax(180px, 1fr) 100px 150px 100px auto;
}

.list-preview {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.list-preview .media-preview {
  width: 100%;
  height: 100%;
}

.list-preview .folder-preview {
  width: 100%;
  height: 100%;
}

.list-preview .folder-preview-compact .folder-glyph svg {
  width: 27px;
  height: 27px;
}

.list-preview.has-folder-icon .folder-preview {
  overflow: hidden;
}

.list-preview.has-folder-icon .folder-glyph {
  display: none;
}

.list-preview:not(.has-folder-icon) svg {
  color: var(--accent-2);
}

.list-name {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.list-name strong,
.list-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row > span {
  color: var(--muted);
}

.list-row .card-actions {
  justify-content: flex-end;
}

.list-check {
  position: relative;
  top: auto;
  left: auto;
  justify-self: center;
  align-self: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
}

.tag-editor {
  display: grid;
  gap: 8px;
}

.tag-edit-row {
  display: grid;
  grid-template-columns: 1fr minmax(210px, 260px) 30px;
  gap: 8px;
  align-items: center;
}

.color-inputs {
  display: grid;
  grid-template-columns: 42px minmax(112px, 1fr) 30px;
  gap: 8px;
  align-items: center;
  justify-content: start;
}

.tag-color-value {
  height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

.tag-color-swatch {
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.tag-color-swatch:hover,
.tag-color-swatch:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.045), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  outline: none;
}

.tag-edit-row .icon-button.mini {
  width: 30px;
  height: 30px;
  padding: 0;
  place-self: center;
}

.tag-edit-row .icon-button.mini svg {
  width: 15px;
  height: 15px;
}

.popover {
  position: fixed;
  z-index: 120;
  min-width: 190px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 7px 0;
  overflow: hidden;
  border-radius: 16px;
}

.move-list {
  display: grid;
  max-height: 280px;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  padding: 8px 14px;
  color: color-mix(in srgb, var(--text) 86%, var(--muted));
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.menu-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  vertical-align: middle;
}

.menu-item:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 7%, var(--bg-panel-soft));
  box-shadow: none;
}

.menu-item.danger {
  color: #ffd0da;
}

.menu-item.danger:hover {
  color: #fff0f3;
  background: color-mix(in srgb, var(--danger) 20%, var(--bg-panel-soft));
}

.context-menu {
  display: grid;
  width: 100%;
}

.context-popover {
  min-width: 210px;
}

.settings-popover {
  background: color-mix(in srgb, var(--bg-panel-soft) 92%, #030306);
  backdrop-filter: var(--blur);
}

.popover:not(.settings-popover) .menu-item:hover {
  background: color-mix(in srgb, var(--primary-accent) 7%, var(--bg-folder-card));
}

.popover:not(.settings-popover) .tag-filter-menu .menu-item.selected:hover,
.popover:not(.settings-popover) .sort-menu .menu-item.selected:hover {
  color: var(--secondary-accent-text);
  background: color-mix(in srgb, var(--secondary-accent) 40%, var(--bg-panel-strong));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--secondary-accent) 48%, transparent);
}

.context-popover .menu-item:hover {
  background: color-mix(in srgb, var(--primary-accent) 7%, var(--bg-folder-card));
}

.context-popover .menu-item.danger:hover {
  background: color-mix(in srgb, var(--danger) 18%, var(--bg-folder-card));
}

.context-menu .menu-item svg {
  color: color-mix(in srgb, var(--text) 62%, var(--muted));
}

.context-menu .menu-item:hover svg {
  color: var(--text);
}

.context-menu .menu-item.danger svg,
.context-menu .menu-item.danger:hover svg {
  color: var(--danger);
}

.context-menu-divider {
  width: 100%;
  height: 1px;
  margin: 5px 0;
  background: color-mix(in srgb, var(--line-strong) 72%, transparent);
}

.upload-log-popover {
  width: min(420px, calc(100vw - 24px));
  max-width: min(420px, calc(100vw - 24px));
  padding: 0;
}

.upload-log-menu {
  display: grid;
  width: 100%;
}

.upload-log-menu > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.upload-log-menu > header > div {
  display: grid;
  gap: 2px;
}

.upload-log-menu > header strong {
  color: var(--text);
  font-size: 14px;
}

.upload-log-menu > header span {
  color: var(--muted);
  font-size: 11px;
}

.upload-log-clear {
  flex: 0 0 auto;
}

.upload-log-list {
  display: grid;
  max-height: min(440px, calc(100vh - 130px));
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.upload-log-list::-webkit-scrollbar {
  display: none;
}

.upload-log-entry {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.upload-log-entry:last-child {
  border-bottom: 0;
}

.upload-log-entry > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.upload-log-entry strong,
.upload-log-entry span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-log-entry strong {
  color: var(--text);
  font-size: 12px;
}

.upload-log-entry > div > span {
  color: var(--muted);
  font-size: 11px;
}

.upload-log-status {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--control-bg);
}

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

.upload-log-entry.is-success .upload-log-status {
  color: #9ee9b8;
}

.upload-log-entry.is-skipped .upload-log-status {
  color: #ffd89d;
}

.upload-log-entry.is-failed .upload-log-status {
  color: #ff8ca4;
}

.upload-log-entry.is-uploading .upload-log-status {
  color: var(--primary-accent);
  animation: upload-progress-arrow 900ms cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.upload-log-empty {
  margin: 0;
  padding: 28px 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.68);
}

#modalRoot.settings-previewing .modal-backdrop {
  display: none;
}

.color-picker-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-top: 2px;
}

.color-picker-controls .icon-button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.color-picker-controls .color-confirm {
  border-color: rgba(89, 214, 133, 0.46);
  color: #d8ffe5;
  background: rgba(89, 214, 133, 0.2);
}

.color-picker-controls .color-cancel {
  border-color: rgba(255, 107, 139, 0.42);
  color: #ffd0da;
  background: rgba(255, 107, 139, 0.16);
}

.color-picker-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 100;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 14px;
  justify-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--modal-bg);
  box-shadow: var(--popover-shadow);
  backdrop-filter: var(--blur);
  transform: translate(-50%, -50%);
}

.color-picker-panel strong {
  font-size: 15px;
}

.color-panel-preview {
  width: 88px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.rgb-sliders {
  display: grid;
  width: 100%;
  gap: 10px;
}

.color-mode-body {
  width: 100%;
}

.color-area {
  position: relative;
  width: 100%;
  height: 168px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, var(--picker-hue));
  overflow: hidden;
  cursor: crosshair;
}

.color-area-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hue-slider {
  width: 100%;
  margin-top: 12px;
  accent-color: var(--primary-accent);
}

.color-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 6px;
}

.color-mode-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--control-bg);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.color-mode-tabs button svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.color-mode-tabs button.active,
.color-mode-tabs button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
}

.timezone-select,
.auto-clean-select {
  width: min(360px, 100%);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  color-scheme: dark;
}

.timezone-select option,
.auto-clean-select option {
  color: var(--text);
  background: var(--bg-panel-strong);
}

.crop-panel {
  display: grid;
  width: 100%;
  gap: 18px;
  justify-items: center;
  padding: 4px 0;
  text-align: center;
}

.crop-panel h2,
.crop-panel p {
  margin: 0;
}

.crop-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.crop-stage {
  position: relative;
  display: grid;
  width: min(100%, 82vw);
  max-width: 100%;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  cursor: crosshair;
  user-select: none;
}

.crop-stage.can-move-selection {
  cursor: move;
}

.crop-panel .modal-actions {
  justify-content: center;
}

.crop-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.crop-selection {
  position: absolute;
  display: none;
  border: 2px solid #fff;
  background: color-mix(in srgb, var(--primary-accent) 18%, transparent);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.crop-stage.has-selection .crop-selection {
  display: block;
}

.rgb-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rgb-row input[type="range"] {
  width: 100%;
  accent-color: var(--primary-accent);
}

.rgb-row output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.hex-row {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hex-row input.invalid {
  border-color: rgba(255, 107, 139, 0.55);
}

.modal {
  width: min(680px, 100%);
  border-radius: 22px;
}

.modal-small {
  width: min(420px, 100%);
}

.modal-settings {
  width: min(980px, 100%);
  height: min(720px, calc(100vh - 56px));
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(11, 11, 18, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.list-row.folder-row .list-preview {
  background: transparent;
}

.list-row.folder-row .list-preview .folder-glyph svg {
  width: 27px;
  height: 27px;
}

.modal-crop {
  width: min(900px, 100%);
  padding: 22px;
}

.confirm-modal,
.prompt-modal,
.settings-modal,
.settings-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.confirm-modal h2,
.prompt-modal h2,
.settings-modal h2,
.settings-panel h2 {
  margin: 0;
  font-size: 20px;
}

.confirm-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.rename-url-warning {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.modal-actions {
  justify-content: flex-end;
}

.save-fill {
  border-color: color-mix(in srgb, var(--primary-accent) 54%, var(--line));
  color: var(--text);
  background: color-mix(in srgb, var(--primary-accent) 12%, var(--control-bg));
}

.cancel-fill {
  border-color: var(--line);
  color: var(--text);
  background: var(--control-bg);
}

.save-fill:hover,
.save-fill:focus-visible {
  border-color: color-mix(in srgb, var(--primary-accent) 76%, var(--line-strong));
  background: color-mix(in srgb, var(--primary-accent) 18%, var(--control-bg-hover));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-accent) 18%, transparent);
}

.cancel-fill:hover,
.cancel-fill:focus-visible {
  border-color: var(--line-strong);
  background: var(--control-bg-hover);
}

.settings-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 0;
  padding: 0;
}

.settings-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--control-bg) 84%, transparent);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.settings-close-button:hover,
.settings-close-button:focus-visible {
  border-color: var(--line);
  color: #ff8ea3;
  background: color-mix(in srgb, var(--control-bg) 84%, transparent);
}

.settings-close-button svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.settings-close-button:hover svg,
.settings-close-button:focus-visible svg {
  transform: scale(1.12);
}

.settings-sidebar {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px 20px 22px;
  border-right: 1px solid var(--line);
  overflow: hidden;
  background: #0a0a10;
}

.settings-sidebar > * {
  position: relative;
  z-index: 1;
}

.settings-main {
  display: grid;
  height: 100%;
  min-height: 0;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0 28px 22px;
  background:
    radial-gradient(ellipse 70% 36% at 96% 0%, rgba(84, 128, 255, 0.045), transparent 72%),
    linear-gradient(145deg, #12121a 0%, #17171f 58%, #101018 100%);
}

.settings-sidebar-header {
  padding: 0 14px 22px;
  border-bottom: 1px solid var(--line);
}

.settings-sidebar-header h2 {
  margin: 0;
  font-size: 23px;
}

.settings-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  min-height: 76px;
  padding: 17px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.settings-label {
  display: grid;
  gap: 4px;
  align-content: start;
}

.settings-label strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.settings-label span,
.muted-section {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.settings-control {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 1px;
}

.settings-section > .settings-switch,
.settings-section > .mevi-provider-select,
.settings-section > .custom-select {
  margin-top: 1px;
}

.settings-section > .custom-select,
.settings-control > .custom-select {
  width: min(360px, 100%);
}

.settings-menu {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 22px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.settings-menu button {
  position: relative;
  min-height: 48px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  padding: 11px 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.settings-menu button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.settings-menu button.active {
  border-left-color: var(--secondary-accent);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 800;
}

.settings-pane {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 0;
  min-width: 0;
  padding: 94px 0 0;
  overflow: auto;
}

.settings-pane.logs-pane {
  display: flex;
  height: auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.settings-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.settings-logs {
  display: flex;
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 14px;
  overflow: hidden;
}

.settings-logs-toolbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.settings-logs-toolbar .action-button {
  flex: 0 0 auto;
}

.audit-table-wrap {
  height: 0;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--control-bg) 52%, transparent);
  scrollbar-color: color-mix(in srgb, var(--primary-accent) 34%, transparent) transparent;
  scrollbar-width: thin;
}

.audit-table-wrap::-webkit-scrollbar {
  width: 7px;
  height: 0;
}

.audit-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.audit-table-wrap::-webkit-scrollbar-thumb {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-accent) 22%, transparent);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.audit-table th,
.audit-table td {
  height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.audit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #14141c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) {
  width: 22%;
}

.audit-table th:nth-child(2),
.audit-table td:nth-child(2) {
  width: 23%;
}

.audit-table th:nth-child(3),
.audit-table td:nth-child(3) {
  width: 25%;
}

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

.audit-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.audit-table td {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-table td:nth-child(2) {
  white-space: nowrap;
}

.audit-table td:nth-child(2) strong {
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-time {
  color: var(--muted);
  font-size: 11px;
}

.audit-action {
  display: inline-block;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  overflow: hidden;
  color: var(--text);
  background: var(--control-bg);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coming-soon-panel .settings-pane {
  height: 100%;
  align-content: stretch;
}

.coming-soon-panel .settings-empty {
  min-height: 100%;
}

.hotkeys-pane {
  gap: 24px;
}

.hotkeys-intro {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hotkeys-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.hotkey-column {
  display: grid;
  align-content: start;
  gap: 0;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.hotkey-column h3 {
  margin: 0;
  padding: 18px 0 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.hotkey-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 54px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.hotkey-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hotkey-keys kbd {
  min-width: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: color-mix(in srgb, var(--bg-panel-strong) 62%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

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

.stat-card {
  width: 100%;
  justify-content: flex-start;
}

.storage-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding-top: 20px;
}

.storage-stat-header {
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.storage-free-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.storage-progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--control-bg) 88%, transparent);
}

.storage-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
  transition: width 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.settings-about {
  display: grid;
  align-content: start;
}

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

.settings-about-link {
  width: fit-content;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  transition: color 150ms ease, opacity 150ms ease;
}

.settings-about-link:hover,
.settings-about-link:focus-visible {
  color: var(--secondary-accent);
  opacity: 0.92;
  text-decoration: none;
}

.mevi-settings {
  display: grid;
  align-content: start;
}

.mevi-enable-section {
  min-height: 76px;
}

.settings-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  cursor: pointer;
}

.settings-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.settings-switch-track {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 16%, #0c0c13);
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.settings-switch-track::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: color-mix(in srgb, var(--danger) 12%, #f5f3f5);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.34);
  transform: translateY(-50%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), background 220ms ease, box-shadow 220ms ease;
}

.settings-switch input:checked + .settings-switch-track {
  border-color: color-mix(in srgb, #9ee9b8 48%, var(--line));
  background: color-mix(in srgb, #9ee9b8 22%, #0c0c13);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #9ee9b8 10%, transparent);
}

.settings-switch input:checked + .settings-switch-track::after {
  transform: translate(21px, -50%);
  background: color-mix(in srgb, #9ee9b8 18%, #f5f3f5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34), 0 0 12px rgba(158, 233, 184, 0.18);
}

.settings-switch input:focus-visible + .settings-switch-track {
  outline: 2px solid rgba(255, 255, 255, 0.24);
  outline-offset: 3px;
}

.mevi-provider-select,
.mevi-model-select,
.mevi-key-input,
.mevi-endpoint-input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  color: var(--text);
  background: var(--field-bg);
  font: inherit;
  line-height: 40px;
  transition: border-color 150ms ease, background 150ms ease;
}

.mevi-provider-select,
.mevi-model-select {
  max-width: 100%;
  cursor: pointer;
}

.native-hidden-select {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  min-width: 0;
  width: 100%;
}

.custom-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 11px 0 13px;
  color: var(--text);
  background: var(--field-bg);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.custom-select-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}

.custom-select-button:hover,
.custom-select-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--field-bg-hover);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.045);
  outline: none;
}

.custom-select-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.mevi-model-row .custom-select,
.mevi-endpoint-row .custom-select {
  width: 100%;
}

.custom-select-menu {
  display: grid;
  gap: 0;
  max-height: min(320px, calc(100vh - 120px));
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.custom-select-menu::-webkit-scrollbar {
  display: none;
}

.custom-select-menu .menu-item.selected {
  background: color-mix(in srgb, var(--secondary-accent) 18%, var(--control-bg-hover));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--secondary-accent) 26%, transparent);
}

.mevi-provider-select:focus,
.mevi-model-select:focus,
.mevi-key-input:focus,
.mevi-endpoint-input:focus {
  border-color: var(--line-strong);
  background: var(--field-bg-hover);
  outline: none;
}

.mevi-provider-list {
  display: grid;
}

.mevi-provider-card {
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.mevi-provider-card.is-provider-hidden {
  display: none !important;
}

.mevi-provider-header,
.mevi-key-row,
.mevi-model-row,
.mevi-endpoint-row {
  display: grid;
  align-items: center;
  gap: 10px;
}

.mevi-provider-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.mevi-provider-header strong {
  font-size: 14px;
}

.mevi-provider-status {
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mevi-provider-status.configured,
.mevi-provider-status.connected {
  color: #9ee9b8;
}

.mevi-provider-status.checking {
  color: #b9cfff;
}

.mevi-provider-status.error {
  color: #ff9eb2;
}

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

.mevi-key-save,
.mevi-key-check {
  min-width: 82px;
  height: 40px;
  border-radius: 11px;
}

.mevi-model-row,
.mevi-endpoint-row {
  grid-template-columns: 72px minmax(0, 1fr);
}

.mevi-model-row label,
.mevi-endpoint-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mevi-settings.disabled .mevi-provider-card,
.mevi-settings.disabled > .settings-section:nth-child(2) {
  opacity: 0.46;
}

.mevi-settings :disabled {
  cursor: not-allowed;
}

.settings-panel .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-sidebar-footer {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.settings-logout {
  margin-top: 0;
  align-self: flex-start;
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  color: var(--text);
  background: var(--control-bg);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: width 260ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms ease, background 180ms ease, color 180ms ease, transform 120ms ease;
}

.settings-logout-icon {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  place-items: center;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.settings-logout-icon svg {
  width: 17px;
  height: 17px;
}

.settings-logout-text {
  max-width: 0;
  padding-right: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  transition: max-width 260ms cubic-bezier(0.22, 1, 0.36, 1), padding-right 260ms ease, opacity 150ms ease 40ms;
}

.settings-logout:hover,
.settings-logout:focus-visible {
  width: 112px;
  border-color: var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--control-bg-hover);
}

.settings-logout:hover .settings-logout-icon,
.settings-logout:focus-visible .settings-logout-icon {
  transform: translateX(2px);
  color: var(--danger);
}

.settings-logout:hover .settings-logout-text,
.settings-logout:focus-visible .settings-logout-text {
  max-width: 70px;
  padding-right: 14px;
  opacity: 1;
  color: var(--danger);
}

.settings-logout:active {
  transform: translate(1px, 1px);
}

.settings-statistics-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  color: var(--muted);
  background: var(--control-bg);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.settings-statistics-button:hover,
.settings-statistics-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--control-bg-hover);
}

.settings-statistics-button svg {
  width: 18px;
  height: 18px;
  transition: transform 160ms ease;
}

.settings-statistics-button:hover svg,
.settings-statistics-button:focus-visible svg {
  transform: scale(1.1);
}

.settings-panel .save-fill {
  min-width: 92px;
}

.settings-panel .cancel-fill {
  min-width: 92px;
}

.hidden-color-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}


.color-swatch {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.settings-color-picker {
  flex-basis: 220px;
}

.modal-preview {
  width: min(980px, 100%);
}

.preview-modal {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.preview-frame {
  display: grid;
  min-height: 52vh;
  max-height: 72vh;
  place-items: center;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.preview-frame img,
.preview-frame video {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-footer strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

  .topbar {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 10px;
  }

  .top-spacer {
    display: none;
  }

  .top-main {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    height: auto;
  }

  .top-main .search-input {
    position: static;
    transform: none;
    width: min(100%, 320px);
    justify-self: stretch;
  }

  .top-nav {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
  }

  .top-tools {
    position: static;
    justify-self: center;
    margin-left: 0;
  }

  .sidebar {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .main {
    padding: 18px;
  }

  .upload-zone {
    width: 100%;
    margin: 0;
  }

  .upload-row {
    width: 100%;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
  }

  .selection-control {
    position: static;
    width: min(100%, 148px);
    margin-bottom: 12px;
  }

  .clear-recycle-button {
    position: static;
    margin-bottom: 12px;
  }

  .restore-all-recycle-button {
    position: static;
    margin-bottom: 12px;
  }

  .drop-target-stack {
    position: static;
    width: 116px;
  }

  .content-grid {
    width: 100%;
    --media-card-width: 150px;
    --grid-frame-width: 100%;
    grid-template-columns: repeat(auto-fill, var(--media-card-width));
  }

  .folder-card-grid.grid-view {
    --folder-card-width: 280px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--folder-card-width)), var(--folder-card-width)));
  }

  .folder-card-grid.grid-view .folder-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 104px;
  }

  .page-head {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .page-title {
    padding-inline: 56px;
  }

  .content-tools {
    position: static;
    grid-column: 1 / -1;
    justify-content: center;
  }

  .list-row,
  .list-row.file-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .list-row.file-row {
    grid-template-columns: 26px 54px minmax(0, 1fr) auto;
  }

  .list-row > span {
    display: none;
  }
}

@media (max-width: 620px) {
  .mevi-panel {
    top: 72px;
    right: 10px;
    width: calc(100vw - 96px);
    height: min(620px, calc(100vh - 96px));
  }

  .settings-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .settings-sidebar {
    min-height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-sidebar-header {
    padding: 0 0 14px;
  }

  .settings-menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-top: 14px;
  }

  .settings-menu button {
    min-height: 42px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    text-align: center;
  }

  .settings-menu button.active {
    border-left-color: transparent;
    border-bottom-color: var(--secondary-accent);
  }

  .settings-logout {
    margin-top: 16px;
  }

  .settings-main {
    min-height: 420px;
    padding: 0 18px 18px;
  }

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

  .hotkeys-grid {
    grid-template-columns: 1fr;
  }

  .hotkey-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .top-nav {
    width: 100%;
  }

  .top-nav {
    overflow-x: auto;
  }

  .profile-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
