:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-deep: #050607;
  --surface: #101216;
  --surface-2: #15181d;
  --surface-3: #1b1f25;
  --surface-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f7f8fa;
  --text-soft: #c0c4ca;
  --muted: #858b94;
  --accent: #c7ff68;
  --accent-strong: #aaf43a;
  --accent-soft: rgba(199, 255, 104, 0.11);
  --danger: #ff716f;
  --danger-soft: rgba(255, 113, 111, 0.11);
  --warning: #ffc35c;
  --warning-soft: rgba(255, 195, 92, 0.11);
  --info: #79adff;
  --info-soft: rgba(121, 173, 255, 0.11);
  --success: #63db9a;
  --success-soft: rgba(99, 219, 154, 0.11);
  --sidebar: 248px;
  --topbar: 84px;
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% 2%, rgba(199, 255, 104, 0.045), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button,
a,
input,
select,
textarea,
[tabindex] {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  box-shadow: 0 0 0 3px rgba(199, 255, 104, 0.18);
  border-color: rgba(199, 255, 104, 0.72) !important;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
strong {
  letter-spacing: -0.02em;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #090b08;
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

body.auth-pending .login-view {
  visibility: hidden;
}

body:not(.is-authenticated) .skip-link {
  display: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.wordmark-copy {
  display: grid;
  line-height: 1;
}

.wordmark-copy strong,
.wordmark-large > span:last-child {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.wordmark-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.brand-symbol {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.brand-symbol img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 720;
  line-height: 1;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease), color 160ms var(--ease), opacity 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button img,
.icon-button img,
.field-icon,
.search-field img,
.dropzone-icon img,
.security-note img,
.nav-link img {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
  opacity: 0.82;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0d08;
  box-shadow: 0 10px 26px rgba(162, 239, 42, 0.12);
}

.button-primary img {
  filter: brightness(0);
  opacity: 0.9;
}

.button-primary:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button-secondary {
  border-color: var(--line-strong);
  background: #f3f5f7;
  color: #111317;
}

.button-secondary img {
  filter: brightness(0);
}

.button-ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

.button-ghost:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.button-danger {
  border-color: rgba(255, 113, 111, 0.4);
  background: var(--danger);
  color: #160606;
}

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

.button-full {
  width: 100%;
}

.button.is-busy {
  pointer-events: none;
  color: transparent;
  position: relative;
}

.button.is-busy::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: #111;
  animation: spin 700ms linear infinite;
}

.button-ghost.is-busy::after {
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--accent);
}

.field {
  display: grid;
  gap: 8px;
}

.field > span:first-child,
.field > label:first-child {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 680;
}

.input-wrap,
.select-wrap,
.search-field,
.select-field {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 150ms ease, background 150ms ease;
}

.input-wrap:focus-within,
.select-wrap:focus-within,
.search-field:focus-within,
.select-field:focus-within {
  border-color: rgba(199, 255, 104, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.login-card .input-wrap input:focus-visible {
  border-color: transparent !important;
  box-shadow: none;
}

.input-wrap input,
.search-field input,
.select-wrap select,
.select-field select,
.modal textarea,
.modal input,
.modal select,
.team-invite input,
.team-invite select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.input-wrap input,
.search-field input {
  height: 42px;
  padding: 0 44px;
}

.input-wrap input::placeholder,
.search-field input::placeholder,
.modal textarea::placeholder,
.modal input::placeholder,
.team-invite input::placeholder {
  color: #6e747d;
}

.field-icon,
.search-field > img {
  position: absolute;
  left: 14px;
  z-index: 1;
}

.input-action {
  position: absolute;
  right: 12px;
  min-width: 44px;
  min-height: 36px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.select-wrap select,
.select-field select {
  min-height: 42px;
  padding: 0 38px 0 13px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #80868f 50%), linear-gradient(135deg, #80868f 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

option {
  background: #17191e;
  color: var(--text);
}

.login-view {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(22px, 5vw, 64px);
  background: var(--bg-deep);
}

body.is-authenticated .login-view {
  display: none;
}

.login-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(199, 255, 104, 0.12), transparent 21rem),
    radial-gradient(circle at 18% 4%, rgba(121, 173, 255, 0.055), transparent 25rem),
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
  mask-image: radial-gradient(circle at center, black 18%, rgba(0,0,0,.42) 72%, transparent 100%);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow i,
.sync-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(199, 255, 104, 0.55);
}

.login-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: clamp(30px, 5vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.016) 58%),
    rgba(13, 15, 18, 0.94);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.56), 0 0 70px rgba(166, 244, 58, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18%;
  left: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199, 255, 104, 0.75), transparent);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 13px;
  text-align: center;
}

.login-logo {
  display: grid;
  width: 108px;
  height: 108px;
  overflow: visible;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(145, 229, 31, 0.14));
}

.login-brand-copy {
  display: grid;
  gap: 4px;
  line-height: 1;
}

.login-brand-copy strong {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.login-brand-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.24em;
}

.login-heading {
  margin-top: 28px;
  text-align: center;
}

.login-heading h1 {
  font-size: clamp(27px, 5vw, 34px);
  font-weight: 690;
  line-height: 1.08;
}

.login-heading p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.login-card .field {
  margin-top: 28px;
}

.login-submit {
  min-height: 50px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 0 18px;
}

.button-arrow {
  font-size: 18px;
}

.form-message {
  min-height: 20px;
  margin-top: 10px !important;
  color: var(--danger) !important;
  font-size: 12px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.security-note img {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.96);
  backdrop-filter: blur(20px);
}

.sidebar-top {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.sidebar-close {
  display: none;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  margin-top: 38px;
}

.nav-label {
  margin: 0 11px 8px;
  color: #9299a3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #9298a0;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  transform: translateX(2px);
}

.nav-link.is-active {
  border-color: rgba(199, 255, 104, 0.13);
  background: var(--accent-soft);
  color: var(--text);
}

.nav-link.is-active img {
  filter: brightness(0) saturate(100%) invert(94%) sepia(67%) saturate(716%) hue-rotate(27deg) brightness(105%) contrast(104%);
  opacity: 1;
}

.nav-count {
  min-width: 20px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0e08;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
}

.session-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #10130c;
  font-size: 10px;
  font-weight: 850;
}

.session-copy {
  display: grid;
  min-width: 0;
  margin-right: auto;
  line-height: 1.25;
}

.session-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-transform: capitalize;
}

.session-card .icon-button {
  width: 32px;
  height: 32px;
  border: 0;
}

.session-card .icon-button img {
  width: 15px;
  height: 15px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--topbar);
  align-items: center;
  gap: 16px;
  padding: 15px clamp(20px, 3.4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(22px);
}

.topbar-title {
  display: grid;
  gap: 2px;
}

.topbar-title h1 {
  font-size: 20px;
  font-weight: 680;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.menu-button {
  display: none;
}

.menu-button span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 2px 0;
  border-radius: 2px;
  background: var(--text);
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.sync-status i {
  width: 6px;
  height: 6px;
}

.sync-status.is-loading i {
  background: var(--warning);
  box-shadow: 0 0 10px rgba(255, 195, 92, 0.4);
  animation: pulse 1s ease-in-out infinite;
}

.sync-status.is-error i {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 113, 111, 0.4);
}

.main-content {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(26px, 4vw, 54px) clamp(20px, 3.4vw, 48px) 64px;
}

.page {
  animation: page-in 260ms var(--ease) both;
}

.hero-row,
.page-heading,
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.hero-row h2,
.page-heading h2 {
  margin-top: 6px;
  font-size: clamp(28px, 3.3vw, 42px);
  font-weight: 650;
  line-height: 1.08;
}

.hero-row p,
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.stat-card,
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)), var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.stat-card {
  position: relative;
  min-height: 138px;
  overflow: hidden;
  padding: 19px;
  border-radius: var(--radius);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -45px;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(199, 255, 104, 0.08);
  border-radius: 50%;
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.stat-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
}

.stat-icon img {
  width: 14px;
  height: 14px;
  filter: brightness(0) saturate(100%) invert(94%) sepia(67%) saturate(716%) hue-rotate(27deg) brightness(105%) contrast(104%);
}

.stat-value {
  display: block;
  margin-top: 20px;
  font-size: 34px;
  font-weight: 660;
  line-height: 1;
}

.stat-foot {
  display: block;
  margin-top: 9px;
  color: #969da7;
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  border-radius: var(--radius);
}

.panel-head {
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head.compact {
  padding: 0 0 18px;
  border-bottom: 0;
}

.panel-head h3,
.upload-guide h3 {
  margin-top: 3px;
  font-size: 17px;
  font-weight: 680;
}

.mini-clip-list,
.activity-list,
.upload-history,
.team-list {
  display: grid;
  min-height: 210px;
}

.mini-clip-row,
.activity-row,
.history-row,
.team-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.mini-clip-row:last-child,
.activity-row:last-child,
.history-row:last-child,
.team-row:last-child {
  border-bottom: 0;
}

.mini-thumb {
  position: relative;
  width: 68px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171a1f;
}

.mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-copy,
.activity-copy,
.history-copy,
.team-copy {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.mini-copy strong,
.activity-copy strong,
.history-copy strong,
.team-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-copy small,
.activity-copy small,
.history-copy small,
.team-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.status-badge,
.kind-badge,
.role-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-ready,
.status-complete,
.status-active {
  border-color: rgba(99, 219, 154, 0.22);
  background: var(--success-soft);
  color: var(--success);
}

.status-processing,
.status-uploading,
.status-created {
  border-color: rgba(121, 173, 255, 0.22);
  background: var(--info-soft);
  color: var(--info);
}

.status-error,
.status-cancelled,
.status-blocked {
  border-color: rgba(255, 113, 111, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
}

.status-processing::before,
.status-uploading::before {
  animation: pulse 1s ease-in-out infinite;
}

.page-heading {
  margin-bottom: 26px;
}

.folders-section {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(circle at 10% 0, rgba(199, 255, 104, 0.055), transparent 25rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--surface);
}

.folders-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.folders-head h3 {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
}

.folders-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.folder-search {
  width: min(290px, 100%);
  flex: 0 0 auto;
}

.folder-results-meta {
  min-height: 44px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.folder-grid > .empty-state {
  grid-column: 1 / -1;
}

.folder-card {
  position: relative;
  min-width: 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 14px;
  background: #0c0e11;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.folder-card:hover {
  z-index: 3;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.34);
  transform: translateY(-3px);
}

.folder-card.is-selected {
  border-color: rgba(199, 255, 104, 0.78);
  box-shadow: 0 0 0 1px rgba(199, 255, 104, 0.15), 0 20px 48px rgba(132, 214, 22, 0.12);
}

.folder-select {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.folder-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px 13px 0 0;
  background:
    radial-gradient(circle at 70% 15%, rgba(199, 255, 104, 0.15), transparent 38%),
    linear-gradient(140deg, #20242a, #0f1114);
}

.folder-cover::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(5, 6, 8, 0.72));
  pointer-events: none;
}

.folder-cover::after {
  content: attr(data-initials);
  position: absolute;
  right: 14px;
  bottom: 2px;
  color: rgba(255, 255, 255, 0.07);
  font-size: 54px;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.folder-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.001);
  transition: opacity 220ms ease, transform 420ms var(--ease), filter 220ms ease;
}

.folder-cover img.is-loaded {
  opacity: 1;
}

.folder-card:hover .folder-cover img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.035);
}

.folder-card-body {
  display: grid;
  gap: 5px;
  padding: 15px 16px 16px;
  text-align: center;
}

.folder-card-body strong {
  overflow: hidden;
  color: #f5f7f2;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.16em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.folder-card-body small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.folder-selection-mark {
  position: absolute;
  z-index: 4;
  right: 11px;
  bottom: 10px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(199, 255, 104, 0.5);
  border-radius: 50%;
  background: var(--accent);
  color: #091000;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 160ms ease, transform 180ms var(--ease);
}

.folder-card.is-selected .folder-selection-mark {
  opacity: 1;
  transform: scale(1);
}

.folder-menu {
  position: absolute;
  z-index: 6;
  top: 10px;
  right: 10px;
}

.folder-menu .menu-trigger {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(6, 7, 9, 0.7);
  color: #fff;
  backdrop-filter: blur(9px);
}

.selected-folder-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(199, 255, 104, 0.24);
  border-radius: 12px;
  background: rgba(199, 255, 104, 0.055);
}

.selected-folder-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
}

.selected-folder-icon img {
  width: 17px;
  height: 17px;
  filter: brightness(0) saturate(100%) invert(94%) sepia(67%) saturate(716%) hue-rotate(27deg) brightness(105%) contrast(104%);
}

.selected-folder-copy {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.selected-folder-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-folder-copy strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-card-skeleton {
  position: relative;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.folder-card-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.055), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}

.clips-publisher {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  background:
    radial-gradient(circle at 92% 0, rgba(199, 255, 104, 0.08), transparent 23rem),
    linear-gradient(145deg, rgba(255,255,255,.047), rgba(255,255,255,.014)),
    var(--surface);
}

.publisher-head,
.clips-created-head,
.composer-title,
.publisher-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.publisher-head {
  padding: 23px 24px 20px;
  border-bottom: 1px solid var(--line);
}

.publisher-head h3,
.clips-created-head h3,
.composer-title h3 {
  margin-top: 4px;
  font-size: 19px;
  font-weight: 690;
}

.publisher-head p,
.clips-created-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.publisher-head p strong {
  color: var(--text-soft);
}

.publisher-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(99, 219, 154, 0.2);
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.publisher-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.publisher-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 24px 24px;
}

.publisher-field {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.024);
}

.publisher-field-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.publisher-field-head > b {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(199,255,104,.2);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  letter-spacing: .05em;
}

.publisher-field-head > span {
  display: grid;
  min-width: 0;
}

.publisher-field-head strong {
  color: var(--text);
  font-size: 11px;
}

.publisher-field-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.publisher-state {
  grid-column: 1 / -1;
}

.publisher-prompt,
.publisher-hint {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.publisher-prompt-icon {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
}

.publisher-prompt-copy,
.publisher-hint-copy {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.publisher-prompt-copy strong,
.publisher-hint-copy strong {
  font-size: 11px;
}

.publisher-prompt-copy small,
.publisher-hint-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.publisher-prompt .button {
  flex: 0 0 auto;
}

.publisher-ready {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  background: rgba(199, 255, 104, 0.035);
}

.destination-summary {
  display: grid;
  min-width: 0;
}

.destination-summary small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.destination-summary strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-composer-body {
  padding: 22px 24px 24px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.upload-workspace,
.clips-publisher .upload-guide {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.composer-title {
  margin-bottom: 15px;
}

.clips-created {
  margin-top: 4px;
}

.clips-created-head {
  align-items: flex-end;
  margin-bottom: 18px;
}

.created-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 155px 160px;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.toolbar-collections {
  grid-template-columns: minmax(230px, 1fr) 210px 205px;
}

.results-meta {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  min-height: 260px;
}

.clip-card,
.collection-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)), var(--surface);
  transition: transform 180ms var(--ease), border-color 180ms ease, box-shadow 180ms ease;
}

.clip-card:hover,
.collection-card:hover {
  z-index: 2;
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.clip-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, transparent, rgba(255,255,255,.035), transparent),
    #14171b;
}

.clip-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease, transform 350ms var(--ease);
}

.clip-media > img.is-loaded {
  opacity: 1;
}

.clip-card:hover .clip-media > img {
  transform: scale(1.025);
}

.clip-status {
  position: absolute;
  top: 10px;
  left: 10px;
}

.preview-button {
  position: absolute;
  inset: 0;
  display: grid;
  width: 46px;
  height: 46px;
  margin: auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(7, 8, 10, 0.66);
  color: #fff;
  font-size: 16px;
  opacity: 0;
  backdrop-filter: blur(8px);
  transform: scale(.85);
  transition: opacity 170ms ease, transform 170ms var(--ease);
}

.clip-card:hover .preview-button,
.preview-button:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.clip-body {
  padding: 15px;
}

.clip-title-row,
.collection-title-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
}

.clip-title-row > div,
.collection-title-row > div {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.clip-title-row strong,
.collection-title-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip-title-row small,
.collection-title-row small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-menu {
  position: relative;
}

.menu-trigger {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.menu-trigger:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.menu-popover {
  position: absolute;
  z-index: 10;
  top: 34px;
  right: 0;
  display: none;
  width: 150px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #171a1f;
  box-shadow: 0 15px 40px rgba(0,0,0,.5);
}

.card-menu.is-open .menu-popover {
  display: grid;
}

.menu-popover button {
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 11px;
  text-align: left;
}

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

.menu-popover .danger-action {
  color: var(--danger);
}

.clip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.055);
  color: var(--muted);
  font-size: 9px;
}

.clip-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.clip-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #626973;
}

.clip-error {
  margin-top: 10px;
  padding: 8px 9px;
  border-radius: 7px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  min-height: 260px;
}

.collection-cover {
  position: relative;
  aspect-ratio: 2.15 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 75% 15%, rgba(199,255,104,.13), transparent 40%),
    linear-gradient(140deg, #1d2127, #0f1114);
}

.collection-cover::after {
  content: attr(data-initials);
  position: absolute;
  right: 16px;
  bottom: 8px;
  color: rgba(255,255,255,.07);
  font-size: 58px;
  font-weight: 850;
  letter-spacing: -.07em;
}

.collection-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms ease, transform 350ms var(--ease);
}

.collection-cover img.is-loaded {
  opacity: 1;
}

.collection-card:hover .collection-cover img {
  transform: scale(1.025);
}

.collection-kind {
  position: absolute;
  z-index: 2;
  top: 11px;
  left: 11px;
}

.collection-body {
  padding: 16px;
}

.collection-description {
  display: -webkit-box;
  min-height: 34px;
  margin-top: 11px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.collection-stats span {
  display: grid;
  gap: 2px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}

.collection-stats strong {
  font-size: 13px;
}

.collection-stats small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.pagination {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-button {
  display: inline-flex;
  min-width: 38px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.page-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #0b0e08;
}

.page-indicator {
  padding: 0 7px;
  color: var(--muted);
  font-size: 10px;
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  min-height: 62px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.055);
  color: var(--text-soft);
  font-size: 11px;
}

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

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

.table-primary {
  display: grid;
  gap: 3px;
}

.table-primary strong {
  color: var(--text);
  font-size: 12px;
}

.table-primary small {
  max-width: 420px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.table-actions button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 700;
}

.table-actions button:hover {
  border-color: var(--line-strong);
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.table-actions button.danger-action {
  color: var(--danger);
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 14px;
}

.upload-composer,
.upload-guide,
.team-invite,
.team-list-panel {
  padding: 22px;
}

.file-limit {
  color: var(--muted);
  font-size: 9px;
}

.upload-composer > .field {
  margin-bottom: 15px;
}

.dropzone {
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--ease);
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: rgba(199, 255, 104, 0.6);
  background: var(--accent-soft);
}

.dropzone.is-dragging {
  transform: scale(.995);
}

.dropzone-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid rgba(199,255,104,.17);
  border-radius: 13px;
  background: var(--accent-soft);
}

.dropzone-icon img {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(94%) sepia(67%) saturate(716%) hue-rotate(27deg) brightness(105%) contrast(104%);
}

.dropzone strong {
  font-size: 14px;
}

.dropzone p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.dropzone p span {
  color: var(--accent);
  font-weight: 700;
}

.dropzone small {
  margin-top: 15px;
  color: #9299a3;
  font-size: 10px;
  letter-spacing: .04em;
}

.upload-queue {
  display: grid;
  max-height: 390px;
  gap: 8px;
  margin-top: 13px;
  overflow-y: auto;
}

.queue-item {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}

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

.file-type-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 8px;
  font-weight: 850;
}

.queue-copy {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.queue-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.queue-action {
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.queue-action:hover {
  color: var(--text);
}

.progress-track {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  appearance: none;
}

.progress-track::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}

.progress-track::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent);
  transition: width 150ms ease;
}

.progress-track::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

.queue-item.is-error .progress-track::-webkit-progress-value,
.queue-item.is-error .progress-track::-moz-progress-bar {
  background: var(--danger);
}

.queue-error {
  margin-top: 7px;
  color: var(--danger);
  font-size: 9px;
  overflow-wrap: anywhere;
}

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

.upload-guide {
  align-self: start;
}

.upload-guide h3 {
  margin-top: 6px;
}

.process-steps {
  display: grid;
  gap: 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.process-steps li {
  position: relative;
  display: flex;
  gap: 12px;
}

.process-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: -19px;
  left: 13px;
  width: 1px;
  background: var(--line);
}

.process-steps li > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(199,255,104,.2);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.process-steps strong {
  font-size: 11px;
}

.process-steps p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.upload-history-panel {
  margin-top: 14px;
}

.history-progress {
  width: 70px;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(300px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
}

.team-invite {
  align-self: start;
}

.team-invite form {
  display: grid;
  gap: 16px;
}

.team-role-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.role-badge.role-manager {
  border-color: rgba(199,255,104,.2);
  background: var(--accent-soft);
  color: var(--accent);
}

.role-badge.role-affiliate {
  border-color: rgba(121,173,255,.2);
  background: var(--info-soft);
  color: var(--info);
}

.role-badge::before,
.kind-badge::before {
  display: none;
}

.empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.panel .empty-state {
  min-height: 210px;
  border: 0;
  border-radius: 0;
}

.empty-state-inner {
  max-width: 330px;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 13px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.empty-icon img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
  opacity: .65;
}

.empty-state h3 {
  font-size: 14px;
}

.empty-state p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.empty-state .button {
  margin-top: 16px;
}

.modal {
  width: min(92vw, 590px);
  max-height: min(88vh, 820px);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--text);
}

.modal::backdrop {
  background: rgba(1, 2, 3, 0.76);
  backdrop-filter: blur(5px);
  animation: fade-in 160ms ease both;
}

.modal[open] .modal-card {
  animation: modal-in 220ms var(--ease) both;
}

.modal-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #111318;
  box-shadow: 0 30px 110px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255,255,255,.055);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin-top: 4px;
  font-size: 21px;
  font-weight: 680;
}

.modal-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.modal-body {
  display: grid;
  max-height: calc(88vh - 160px);
  gap: 16px;
  padding: 22px 24px;
  overflow-y: auto;
}

.modal-body .field input,
.modal-body .field textarea,
.modal-body .field select {
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.028);
}

.modal-body .field textarea {
  min-height: 95px;
  resize: vertical;
}

.modal-body .field select {
  appearance: auto;
}

.field-hint {
  margin-top: -3px;
  color: #9299a3;
  font-size: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cover-picker {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.cover-preview {
  position: relative;
  aspect-ratio: 1.5/1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #1a1d22;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-picker-copy {
  display: grid;
  gap: 7px;
}

.file-button {
  display: inline-flex;
  width: fit-content;
  min-height: 35px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 10px;
}

.check-field input {
  width: 15px !important;
  height: 15px;
  accent-color: var(--accent);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.12);
}

.modal-small {
  width: min(92vw, 450px);
}

.danger-head {
  align-items: center;
  border-bottom: 0;
  padding-bottom: 0;
}

.confirm-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(255,113,111,.2);
  border-radius: 12px;
  background: var(--danger-soft);
}

.confirm-icon img {
  width: 19px;
  height: 19px;
  filter: brightness(0) saturate(100%) invert(65%) sepia(33%) saturate(1673%) hue-rotate(313deg) brightness(105%) contrast(100%);
}

.confirm-body {
  min-height: auto;
  padding-top: 15px;
}

.confirm-body h2 {
  font-size: 20px;
}

.confirm-body p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.preview-modal {
  width: min(94vw, 940px);
}

.preview-stage {
  display: grid;
  min-height: 400px;
  place-items: center;
  background: #050607;
}

.preview-stage video {
  display: block;
  width: 100%;
  max-height: min(74vh, 650px);
  background: #000;
}

.preview-loading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.12);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(360px, calc(100vw - 40px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(22, 25, 30, .97);
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
  animation: toast-in 240ms var(--ease) both;
  pointer-events: auto;
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

.toast-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--info);
}

.toast-success .toast-dot { background: var(--success); }
.toast-error .toast-dot { background: var(--danger); }
.toast-warning .toast-dot { background: var(--warning); }

.toast-copy {
  display: grid;
  min-width: 0;
  margin-right: auto;
}

.toast-copy strong {
  font-size: 11px;
}

.toast-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.toast-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
}

.skeleton-card,
.card-skeleton,
.list-skeleton,
.table-skeleton {
  position: relative;
  overflow: hidden;
  background: #121419;
}

.skeleton-card::before,
.card-skeleton::before,
.list-skeleton::before,
.table-skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.055) 45%, transparent 65%);
  transform: translateX(-100%);
  animation: shimmer 1.35s ease-in-out infinite;
}

.card-skeleton {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.list-skeleton {
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.table-skeleton {
  height: 170px;
}

.media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #555c65;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(10px); } }

@media (max-width: 1180px) {
  .clip-grid,
  .collection-grid,
  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: minmax(200px, 1fr) 150px 160px;
  }

  .toolbar-collections {
    grid-template-columns: minmax(200px, 1fr) 190px 190px;
  }

  .toolbar-collections > :last-child {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar: 73px;
  }

  .sidebar {
    width: min(285px, 86vw);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 220ms var(--ease), visibility 0s linear 220ms;
  }

  .sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 25px 0 80px rgba(0,0,0,.55);
    transition-delay: 0s;
  }

  .sidebar-close,
  .menu-button {
    display: inline-grid;
  }

  .mobile-backdrop {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    background: rgba(0,0,0,.58);
    backdrop-filter: blur(3px);
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    padding-inline: 20px;
  }

  .topbar-actions .sync-status {
    display: none;
  }

  .topbar-actions #refreshButton {
    display: inline-flex;
    width: 42px;
    padding: 0;
  }

  .topbar-actions #refreshButton span {
    display: none;
  }

  .upload-layout,
  .team-layout {
    grid-template-columns: 1fr;
  }

  .upload-guide {
    order: -1;
  }

  .clips-publisher .upload-guide {
    order: 0;
  }

  .process-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
  }

  .process-steps li:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 680px) {
  .login-view {
    padding: 18px;
  }

  .login-card {
    padding: 27px 22px 24px;
    border-radius: 20px;
  }

  .login-logo {
    width: 92px;
    height: 92px;
    border-radius: 0;
  }

  .topbar-title .eyebrow {
    display: none;
  }

  .topbar-title h1 {
    font-size: 17px;
  }

  .topbar-actions .button-primary span {
    display: none;
  }

  .topbar-actions .button-primary {
    width: 42px;
    padding: 0;
  }

  .main-content {
    padding-inline: 15px;
  }

  .hero-row,
  .page-heading,
  .folders-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .folders-section {
    padding: 15px;
  }

  .folder-search {
    width: 100%;
  }

  .hero-row .button,
  .page-heading .button {
    width: 100%;
  }

  .publisher-head,
  .clips-created-head,
  .publisher-ready,
  .composer-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .publisher-head,
  .publisher-flow,
  .publisher-ready,
  .upload-composer-body {
    padding-right: 17px;
    padding-left: 17px;
  }

  .publisher-flow {
    grid-template-columns: 1fr;
  }

  .publisher-state {
    grid-column: 1;
  }

  .publisher-prompt {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .publisher-prompt .button,
  .publisher-ready .button {
    width: 100%;
  }

  .created-count {
    align-self: flex-start;
  }

  .stats-grid,
  .clip-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .folder-card-body {
    padding: 12px 9px 13px;
  }

  .folder-card-body strong {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .folder-card-body small {
    font-size: 8px;
  }

  .selected-folder-bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .selected-folder-bar .text-button {
    width: 100%;
    justify-content: flex-start;
    padding-left: 48px;
  }

  .stat-card {
    min-height: 120px;
  }

  .toolbar,
  .toolbar-collections {
    grid-template-columns: 1fr;
  }

  .toolbar > *,
  .toolbar > :last-child,
  .toolbar-collections > :last-child {
    grid-column: 1;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .upload-composer,
  .upload-guide,
  .team-invite,
  .team-list-panel {
    padding: 17px;
  }

  .dropzone {
    min-height: 190px;
  }

  .mini-clip-row,
  .activity-row,
  .history-row,
  .team-row {
    padding-inline: 16px;
  }

  .team-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  .team-row .avatar {
    grid-row: 1 / span 2;
  }

  .team-row .team-copy {
    grid-column: 2 / 4;
  }

  .team-row .role-badge {
    grid-column: 2;
  }

  .team-row .status-badge {
    grid-column: 3;
    justify-self: end;
  }

  .team-row .queue-action {
    grid-column: 2 / 4;
    justify-self: start;
  }

  .row-meta {
    display: none;
  }

  .form-grid,
  .cover-picker {
    grid-template-columns: 1fr;
  }

  .cover-preview {
    width: 130px;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 17px;
    padding-right: 17px;
  }

  .preview-stage {
    min-height: 230px;
  }

  .pagination {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
