:root {
  color-scheme: dark;
  --bg: #080b10;
  --bg-soft: #0d131c;
  --surface: #101822;
  --surface-2: #111d29;
  --line: #203142;
  --line-bright: #2b9db8;
  --text: #edf7fb;
  --muted: #9db2bf;
  --cyan: #2de2ff;
  --cyan-soft: #7cecff;
  --green: #6ee7b7;
  --amber: #f9c74f;
  --red: #ff5c7a;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(45, 226, 255, 0.08), transparent 34rem),
    linear-gradient(90deg, rgba(45, 226, 255, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(110, 231, 183, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 3.25rem 3.25rem, 3.25rem 3.25rem, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.75rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid rgba(45, 226, 255, 0.18);
  background: rgba(8, 11, 16, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark,
.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(45, 226, 255, 0.55);
  border-radius: 0.45rem;
  background: linear-gradient(135deg, rgba(45, 226, 255, 0.18), rgba(110, 231, 183, 0.08));
  color: var(--cyan-soft);
  box-shadow: inset 0 0 18px rgba(45, 226, 255, 0.12);
  font-size: 0.82rem;
}

.brand-mark.large {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.1rem;
}

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

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  border-color: rgba(45, 226, 255, 0.35);
  background: rgba(45, 226, 255, 0.08);
  color: var(--text);
}

.logout-form {
  margin: 0;
}

.profile-menu {
  position: relative;
  justify-self: end;
}

.profile-menu summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  padding: 0.25rem 0.7rem 0.25rem 0.25rem;
  border: 1px solid rgba(45, 226, 255, 0.22);
  border-radius: 999px;
  background: rgba(13, 28, 45, 0.72);
  cursor: pointer;
  list-style: none;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu summary::marker {
  content: "";
}

.profile-menu[open] summary {
  border-color: rgba(45, 226, 255, 0.5);
  background: rgba(18, 38, 61, 0.95);
}

.profile-avatar {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(45, 226, 255, 0.6);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(45, 226, 255, 0.22), rgba(110, 231, 183, 0.12)),
    #0a1017;
  color: var(--cyan-soft);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(45, 226, 255, 0.16);
}

.image-avatar {
  display: block;
  object-fit: cover;
}

.large-avatar {
  width: 3rem;
  height: 3rem;
  font-size: 0.95rem;
}

.profile-trigger-text {
  display: block;
  min-width: 0;
}

.profile-name {
  max-width: 12rem;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-caret {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-0.12rem);
}

.profile-menu[open] .profile-caret {
  transform: rotate(225deg) translate(-0.1rem, -0.1rem);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 0.25rem;
  width: min(12rem, calc(100vw - 2rem));
  padding: 0.55rem;
  border: 1px solid rgba(45, 226, 255, 0.2);
  border-radius: 0.65rem;
  background: #0d1b2e;
  box-shadow: var(--shadow);
}

.profile-dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-bottom: 1px solid rgba(45, 226, 255, 0.13);
  margin-bottom: 0.25rem;
}

.profile-dropdown-head div {
  display: grid;
  min-width: 0;
  gap: 0.15rem;
}

.profile-dropdown-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-dropdown-head span:not(.profile-avatar) {
  color: var(--muted);
  font-size: 0.88rem;
}

.menu-item,
.menu-logout button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover,
.menu-item.active,
.menu-logout button:hover {
  border-color: rgba(45, 226, 255, 0.18);
  background: rgba(45, 226, 255, 0.1);
  color: var(--text);
}

.menu-logout {
  margin: 0;
}

.menu-logout button {
  color: #ffdbe2;
}

.changelog-list {
  display: grid;
  gap: 0.85rem;
}

.changelog-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.45rem;
  background: rgba(8, 11, 16, 0.45);
}

.changelog-entry h2,
.changelog-entry p {
  margin: 0;
}

.changelog-entry h2 {
  font-size: 1.05rem;
}

.changelog-entry p {
  margin-top: 0.35rem;
  color: var(--muted);
}

.profile-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.75fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.profile-preview h2,
.profile-preview p {
  margin: 0;
}

.profile-preview p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.profile-preview-avatar {
  display: inline-grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  flex: 0 0 auto;
  border: 1px solid rgba(45, 226, 255, 0.5);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(45, 226, 255, 0.22), rgba(110, 231, 183, 0.12)),
    #0a1017;
  color: var(--cyan-soft);
  font-size: 1.3rem;
  font-weight: 900;
  object-fit: cover;
}

.avatar-form {
  display: grid;
  gap: 0.85rem;
}

.avatar-editor {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(8rem, 0.55fr);
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(45, 226, 255, 0.16);
  border-radius: 0.5rem;
  background: rgba(8, 11, 16, 0.45);
}

.avatar-editor-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 92, 122, 0.35);
  border-radius: 0.4rem;
  background: rgba(255, 92, 122, 0.1);
  color: #ffdbe2;
}

.avatar-editor-message[hidden] {
  display: none;
}

.avatar-editor[hidden] {
  display: none;
}

.avatar-canvas-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(45, 226, 255, 0.28);
  border-radius: 0.5rem;
  background: #071019;
  aspect-ratio: 1;
}

.avatar-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.avatar-canvas:active {
  cursor: grabbing;
}

.avatar-editor-side {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.avatar-mini-preview {
  display: grid;
  place-items: center;
}

.avatar-preview-canvas {
  width: 6.5rem;
  height: 6.5rem;
  border: 1px solid rgba(45, 226, 255, 0.44);
  border-radius: 50%;
  background: #071019;
  object-fit: cover;
}

.range-field {
  display: grid;
  gap: 0.45rem;
}

.range-field input[type="range"] {
  min-height: 1.35rem;
  padding: 0;
  accent-color: var(--cyan);
}

.file-picker {
  display: grid;
  gap: 0.38rem;
}

.file-picker-control {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #0a1017;
  overflow: hidden;
}

.file-picker-control:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(45, 226, 255, 0.13);
}

.file-picker-control input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-picker-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 8.2rem;
  padding: 0 0.85rem;
  border-right: 1px solid rgba(45, 226, 255, 0.2);
  background: rgba(45, 226, 255, 0.1);
  color: var(--text);
  font-weight: 800;
}

.file-picker-text {
  overflow: hidden;
  padding: 0 0.85rem;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
  position: relative;
}

.auth-page-brand {
  position: fixed;
  top: clamp(1rem, 3vw, 1.6rem);
  left: clamp(1rem, 3vw, 2rem);
  z-index: 2;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
}

.auth-page-brand:hover {
  color: var(--cyan-soft);
}

.login-panel {
  width: min(100%, 27rem);
  padding: clamp(1.35rem, 5vw, 2rem);
  border: 1px solid rgba(45, 226, 255, 0.22);
  border-radius: 0.5rem;
  background: rgba(16, 24, 34, 0.88);
  box-shadow: var(--shadow);
}

.login-brand {
  display: grid;
  margin-bottom: 1.35rem;
}

.login-brand h1,
.page-heading h1,
.surface h2,
.error-panel h1 {
  margin: 0;
  line-height: 1.1;
}

.login-brand h1 {
  font-size: clamp(1.8rem, 5vw, 2.45rem);
}

.login-brand p,
.eyebrow,
.file-meta,
.user-main span,
.muted,
.empty-state p,
.error-panel p {
  color: var(--muted);
}

.page-shell {
  width: min(100% - 2rem, 74rem);
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem) 0 4rem;
}

.page-shell.narrow {
  width: min(100% - 2rem, 58rem);
}

.start-shell {
  width: min(100% - 2rem, 80rem);
}

.clip-page-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(2rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.clip-page-header h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(3rem, 10vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.clip-section {
  display: grid;
  gap: 1rem;
}

.clip-list {
  display: grid;
  gap: 2rem;
}

.clip-card {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 46rem);
  margin: 0 auto;
}

.clip-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.clip-card h2 {
  margin: 0;
  padding-left: 0.1rem;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.clip-video-frame {
  overflow: hidden;
  border: 1px solid rgba(45, 226, 255, 0.24);
  border-radius: 0.5rem;
  background: #05080c;
  box-shadow: var(--shadow);
}

.clip-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05080c;
}

.clip-admin-panel {
  margin-top: 1.25rem;
  padding: 0;
  overflow: clip;
}

.clip-admin-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  padding: 0 1rem;
  color: var(--cyan-soft);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.clip-admin-panel > summary::-webkit-details-marker {
  display: none;
}

.clip-admin-panel > summary::after {
  content: "";
  width: 0.56rem;
  height: 0.56rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-0.12rem);
}

.clip-admin-panel[open] > summary::after {
  transform: rotate(225deg) translate(-0.08rem, -0.08rem);
}

.clip-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem;
  padding: 0 1rem 1rem;
}

.clip-add-form {
  padding: 0 1rem 1rem;
}

.clip-admin-grid h2,
.clip-admin-list h2 {
  margin: 0;
}

.clip-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.clip-admin-list {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.clip-admin-item {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.45rem;
  background: rgba(8, 11, 16, 0.34);
}

.clip-trimmer {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(45, 226, 255, 0.16);
  border-radius: 0.5rem;
  background: rgba(4, 10, 16, 0.48);
}

.clip-trimmer-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.45rem;
  background: #03070b;
}

.clip-trimmer-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #03070b;
}

.clip-trimmer-empty {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  background: rgba(3, 7, 11, 0.92);
}

.clip-trimmer.is-empty .clip-trimmer-empty {
  display: grid;
}

.clip-trimmer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.small-button {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.86rem;
}

.small-button.is-live-cutting {
  border-color: rgba(255, 92, 122, 0.55);
  background: rgba(255, 92, 122, 0.18);
  color: #ffdbe2;
}

.clip-trimmer-duration {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.84rem;
}

.clip-trim-status {
  min-height: 1.1rem;
  margin: -0.25rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.clip-trim-status[data-type="success"] {
  color: var(--green);
}

.clip-trim-status[data-type="error"] {
  color: var(--red);
}

.clip-slider-stack {
  display: grid;
  gap: 0.65rem;
}

.clip-slider-field {
  display: grid;
  gap: 0.35rem;
}

.clip-slider-field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.clip-slider-field strong {
  color: var(--cyan-soft);
  font-size: 0.82rem;
}

.clip-slider-field input[type="range"] {
  width: 100%;
  min-height: 1.35rem;
  padding: 0;
  accent-color: var(--cyan);
}

.clip-cut-list {
  display: grid;
  gap: 0.45rem;
}

.clip-cut-empty {
  margin: 0;
  font-size: 0.84rem;
}

.clip-cut-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.4rem;
  background: rgba(7, 13, 20, 0.72);
}

.clip-cut-item.is-selected {
  border-color: rgba(45, 226, 255, 0.48);
  background: rgba(45, 226, 255, 0.1);
}

.clip-cut-jump {
  min-width: 0;
  min-height: 2.25rem;
  border: 0;
  border-radius: 0.35rem;
  background: rgba(45, 226, 255, 0.07);
  color: var(--text);
  padding: 0 0.7rem;
  overflow: hidden;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.clip-cut-jump:hover {
  background: rgba(45, 226, 255, 0.13);
}

.clip-edit-dialog {
  width: min(calc(100vw - 2rem), 48rem);
  max-height: min(90vh, 54rem);
  border: 1px solid rgba(45, 226, 255, 0.28);
  border-radius: 0.5rem;
  background:
    linear-gradient(180deg, rgba(17, 29, 42, 0.98), rgba(8, 12, 18, 0.98)),
    #0a1017;
  color: var(--text);
  padding: 0;
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.64);
}

.clip-edit-dialog::backdrop {
  background: rgba(0, 4, 8, 0.72);
  backdrop-filter: blur(0.25rem);
}

.clip-dialog-shell {
  display: grid;
  gap: 1rem;
  max-height: min(88vh, 52rem);
  overflow: auto;
  padding: 1rem;
}

.clip-dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.clip-dialog-header h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(45, 226, 255, 0.22);
  border-radius: 50%;
  background: rgba(45, 226, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.dialog-close-button {
  flex: 0 0 auto;
  font-size: 1.4rem;
  line-height: 1;
}

.clip-dialog-delete {
  display: flex;
  justify-content: end;
  padding-top: 1rem;
  border-top: 1px solid rgba(32, 49, 66, 0.86);
}

.start-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.25rem;
  min-height: clamp(15rem, 32vh, 22rem);
  margin-bottom: 1rem;
  padding: clamp(1.3rem, 4vw, 2rem);
  border: 1px solid rgba(45, 226, 255, 0.18);
  border-radius: 0.5rem;
  background:
    linear-gradient(135deg, rgba(45, 226, 255, 0.16), rgba(110, 231, 183, 0.05) 45%, rgba(16, 24, 34, 0.9)),
    rgba(16, 24, 34, 0.88);
  box-shadow: var(--shadow);
}

.start-hero-copy {
  display: grid;
  gap: 0.65rem;
  max-width: 45rem;
}

.start-hero h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 4.8rem);
  line-height: 0.98;
}

.start-hero p {
  margin: 0;
}

.start-hero-copy > p:not(.eyebrow) {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.6;
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.65rem;
}

.start-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.start-stat {
  display: grid;
  gap: 0.28rem;
  min-height: 7rem;
  padding: 1rem;
  border: 1px solid rgba(45, 226, 255, 0.14);
  border-radius: 0.5rem;
  background: rgba(16, 24, 34, 0.72);
}

.start-stat span,
.start-stat small {
  color: var(--muted);
}

.start-stat span {
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.start-stat strong {
  color: var(--cyan-soft);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.start-stat.urgent strong {
  color: var(--amber);
}

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

.start-panel {
  display: grid;
  align-content: space-between;
  gap: 1rem;
  min-height: 15rem;
}

.start-panel-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

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

.start-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.start-panel-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border: 1px solid rgba(45, 226, 255, 0.34);
  border-radius: 0.65rem;
  background: rgba(45, 226, 255, 0.08);
  color: var(--cyan-soft);
}

.start-panel-icon::before {
  content: "";
  width: 1.45rem;
  height: 1.45rem;
  background: currentColor;
  mask: var(--start-icon) center / contain no-repeat;
  -webkit-mask: var(--start-icon) center / contain no-repeat;
}

.downloads-icon {
  --start-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}

.community-icon {
  --start-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a4 4 0 0 1-4 4H8l-5 3V7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4z'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h5'/%3E%3C/svg%3E");
}

.admin-icon {
  --start-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.profile-icon {
  --start-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21a7 7 0 0 0-14 0'/%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3C/svg%3E");
}

.panel-link,
.panel-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.panel-link {
  align-items: center;
  width: fit-content;
  min-height: 2.45rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(45, 226, 255, 0.24);
  border-radius: 0.4rem;
  background: rgba(45, 226, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.panel-link:hover {
  border-color: rgba(45, 226, 255, 0.48);
  background: rgba(45, 226, 255, 0.14);
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-heading h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(110, 231, 183, 0.34);
  border-radius: 999px;
  color: var(--green);
  background: rgba(110, 231, 183, 0.08);
  white-space: nowrap;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.5rem;
}

.servers-shell {
  width: min(100% - 2rem, 58rem);
}

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

.game-server-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-color: rgba(45, 226, 255, 0.18);
  background: rgba(16, 24, 34, 0.9);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.game-server-card:hover {
  border-color: rgba(45, 226, 255, 0.34);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), 0 0 26px rgba(45, 226, 255, 0.06);
}

.server-card-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 6.7rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  background:
    linear-gradient(135deg, rgba(45, 226, 255, 0.055), transparent 58%),
    rgba(8, 11, 16, 0.18);
  cursor: pointer;
  list-style: none;
}

.server-card-summary::-webkit-details-marker {
  display: none;
}

.server-card-summary::marker {
  content: "";
}

.server-card-summary:hover {
  background:
    linear-gradient(135deg, rgba(45, 226, 255, 0.095), transparent 58%),
    rgba(8, 11, 16, 0.28);
}

.game-server-card[open] .server-card-summary {
  border-bottom: 1px solid rgba(45, 226, 255, 0.13);
}

.server-card-title {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.server-card-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.server-card-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-description {
  margin: 0;
}

.server-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  overflow: hidden;
  border: 1px solid rgba(45, 226, 255, 0.2);
  border-radius: 0.55rem;
  background: rgba(3, 8, 13, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.server-logo-image {
  display: block;
  width: 86%;
  height: 86%;
  object-fit: contain;
}

.server-card-caret {
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-0.14rem);
  transition: transform 140ms ease;
}

.game-server-card[open] .server-card-caret {
  transform: rotate(225deg) translate(-0.08rem, -0.08rem);
}

.server-card-details {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  background: rgba(8, 11, 16, 0.2);
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(255, 92, 122, 0.36);
  border-radius: 999px;
  background: rgba(255, 92, 122, 0.08);
  color: #ffdbe2;
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.server-status span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 16px rgba(255, 92, 122, 0.45);
}

.server-status.online {
  border-color: rgba(110, 231, 183, 0.38);
  background: rgba(110, 231, 183, 0.1);
  color: var(--green);
}

.server-status.online span {
  background: var(--green);
  box-shadow: 0 0 16px rgba(110, 231, 183, 0.45);
}

.server-description {
  color: var(--muted);
  line-height: 1.55;
}

.server-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.server-meta-grid div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.45rem;
  background: rgba(8, 11, 16, 0.45);
}

.server-meta-grid dt {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.server-meta-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
}

.server-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.copy-button.copied {
  border-color: rgba(110, 231, 183, 0.42);
  background: rgba(110, 231, 183, 0.12);
  color: var(--green);
}

.surface {
  border: 1px solid rgba(45, 226, 255, 0.16);
  border-radius: 0.5rem;
  background: rgba(16, 24, 34, 0.88);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 1.35rem);
}

.surface + .surface,
.admin-create + .surface {
  margin-top: 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-title h2 {
  margin: 0;
}

.upload-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.upload-action-card {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.upload-action-card h2 {
  margin: 0;
}

.upload-progress {
  display: grid;
  gap: 0.55rem;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(45, 226, 255, 0.22);
  border-radius: 0.45rem;
  background: rgba(45, 226, 255, 0.06);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.upload-progress-head strong {
  color: var(--text);
}

.upload-progress-bar {
  height: 0.58rem;
  overflow: hidden;
  border: 1px solid rgba(45, 226, 255, 0.2);
  border-radius: 999px;
  background: rgba(3, 10, 16, 0.72);
}

.upload-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0bb6d1, #27d6a6);
  transition: width 140ms linear;
}

.upload-progress[data-state="done"] .upload-progress-bar span {
  background: linear-gradient(90deg, #27d6a6, #6ef2c0);
}

.upload-progress[data-state="error"] {
  border-color: rgba(255, 92, 122, 0.4);
  background: rgba(255, 92, 122, 0.08);
}

.upload-progress[data-state="error"] .upload-progress-bar span {
  background: #ff5c7a;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-stack,
.admin-form,
.mini-form {
  display: grid;
  gap: 0.85rem;
}

.admin-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 0.38rem;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: #0a1017;
  color: var(--text);
  padding: 0 0.8rem;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(45, 226, 255, 0.13);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.check-line input {
  width: 1rem;
  height: 1rem;
  min-height: 1rem;
  accent-color: var(--cyan);
}

.primary-button,
.ghost-button,
.download-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.4rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  background: linear-gradient(135deg, #0bb6d1, #1fc7a2);
  color: #031017;
  font-weight: 800;
}

.primary-button:disabled,
.ghost-button:disabled,
.download-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ghost-button,
.download-button {
  border-color: rgba(45, 226, 255, 0.28);
  background: rgba(45, 226, 255, 0.08);
}

.danger-button {
  border-color: rgba(255, 92, 122, 0.36);
  background: rgba(255, 92, 122, 0.1);
  color: #ffdbe2;
}

.link-button {
  width: fit-content;
}

.flash {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(45, 226, 255, 0.22);
  background: rgba(45, 226, 255, 0.08);
}

.flash.error {
  border-color: rgba(255, 92, 122, 0.4);
  background: rgba(255, 92, 122, 0.12);
}

.flash.success {
  border-color: rgba(110, 231, 183, 0.4);
  background: rgba(110, 231, 183, 0.1);
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
  color: var(--muted);
}

.auth-switch a {
  color: var(--cyan-soft);
  font-weight: 800;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.pending-message {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(45, 226, 255, 0.24);
  border-radius: 0.45rem;
  background: rgba(45, 226, 255, 0.08);
}

.pending-message h2,
.pending-message p {
  margin: 0;
}

.pending-message h2 {
  font-size: 1.1rem;
}

.pending-message p {
  color: var(--muted);
}

.tree-level {
  display: grid;
  gap: 0.45rem;
}

.folder {
  border: 1px solid rgba(32, 49, 66, 0.9);
  border-radius: 0.45rem;
  background: rgba(13, 19, 28, 0.7);
}

.folder summary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  min-height: 3rem;
  padding: 0 0.9rem;
  cursor: pointer;
  list-style: none;
}

.folder summary::-webkit-details-marker {
  display: none;
}

.folder summary::before {
  content: "";
  width: 0.52rem;
  height: 0.52rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 140ms ease, border-color 140ms ease;
}

.folder[open] > summary::before {
  border-color: var(--cyan-soft);
  transform: rotate(45deg) translateY(-0.12rem);
}

.folder-symbol {
  width: 1rem;
  height: 0.75rem;
  border: 1px solid rgba(45, 226, 255, 0.55);
  border-top-width: 0.35rem;
  border-radius: 0.18rem;
  background: rgba(45, 226, 255, 0.12);
}

.folder-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.file-count {
  color: var(--muted);
  font-size: 0.85rem;
}

.owner-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0 0.55rem;
  border: 1px solid rgba(45, 226, 255, 0.2);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
}

.folder > .tree-level {
  position: relative;
  margin: 0 0.9rem 0.85rem 1.45rem;
  padding: 0.45rem 0 0 1rem;
  border-left: 1px solid rgba(45, 226, 255, 0.18);
}

.folder > .tree-level::before {
  content: "";
  position: absolute;
  top: 0;
  left: -1px;
  width: 1px;
  height: 0.85rem;
  background: rgba(45, 226, 255, 0.34);
}

.folder .folder {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.folder .folder summary {
  min-height: 2.85rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(32, 49, 66, 0.78);
  border-radius: 0.42rem;
  background: rgba(8, 11, 16, 0.32);
}

.folder .folder[open] > summary {
  border-color: rgba(45, 226, 255, 0.24);
  background: rgba(45, 226, 255, 0.045);
}

.file-row {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 4rem;
  padding: 0.75rem;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.45rem;
  background: rgba(8, 11, 16, 0.45);
}

.upload-folder summary {
  grid-template-columns: auto auto minmax(0, 1fr) auto auto auto;
}

.upload-file-row {
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.45rem;
}

.inline-delete-form {
  margin: 0;
}

.small-button {
  min-height: 2.4rem;
  padding: 0 0.75rem;
}

.file-type {
  display: inline-grid;
  place-items: center;
  min-height: 2rem;
  border: 1px solid rgba(249, 199, 79, 0.32);
  border-radius: 0.35rem;
  background: rgba(249, 199, 79, 0.08);
  color: #ffe29a;
  font-size: 0.75rem;
  font-weight: 900;
}

.file-main {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.file-name {
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.file-name:hover {
  color: var(--cyan-soft);
}

.empty-state,
.error-panel {
  display: grid;
  gap: 0.75rem;
}

.empty-state.compact {
  padding: 0.35rem 0;
}

.empty-state h2 {
  margin: 0;
}

.user-list {
  display: grid;
  gap: 0.75rem;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(13rem, 1fr) minmax(8rem, 10rem) minmax(11rem, 13rem) minmax(18rem, 1.35fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.45rem;
  background: rgba(8, 11, 16, 0.45);
}

.approval-row {
  grid-template-columns: minmax(13rem, 1fr) minmax(11rem, auto) auto auto;
}

.user-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.user-main h3 {
  margin: 0 0 0.15rem;
  overflow-wrap: anywhere;
}

.mini-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.mini-form input {
  min-width: 0;
}

.mini-form[action$="/password"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.action-stack {
  display: flex;
  justify-content: end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.action-stack form {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(45, 226, 255, 0.28);
  border-radius: 999px;
  background: rgba(45, 226, 255, 0.08);
  color: var(--cyan-soft);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.approved {
  border-color: rgba(110, 231, 183, 0.38);
  background: rgba(110, 231, 183, 0.1);
  color: var(--green);
}

.badge.pending {
  border-color: rgba(249, 199, 79, 0.38);
  background: rgba(249, 199, 79, 0.1);
  color: #ffe29a;
}

.badge.rejected {
  border-color: rgba(255, 92, 122, 0.38);
  background: rgba(255, 92, 122, 0.1);
  color: #ffdbe2;
}

.admin-shell {
  width: min(100% - 2rem, 82rem);
}

.admin-tabs {
  display: grid;
  gap: 1rem;
}

.admin-tab-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-tab-list {
  display: inline-flex;
  width: fit-content;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid rgba(45, 226, 255, 0.18);
  border-radius: 0.55rem;
  background: rgba(8, 11, 16, 0.52);
}

.admin-tab-list label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  min-width: 8rem;
  border: 1px solid transparent;
  border-radius: 0.4rem;
  padding: 0 1rem;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.admin-tab-list label:hover {
  color: var(--text);
  background: rgba(45, 226, 255, 0.07);
}

.admin-tab-panel {
  display: none;
}

#adminTabAccounts:checked ~ .admin-tab-list label[for="adminTabAccounts"],
#adminTabChannels:checked ~ .admin-tab-list label[for="adminTabChannels"] {
  border-color: rgba(45, 226, 255, 0.32);
  background: rgba(45, 226, 255, 0.12);
  color: var(--cyan-soft);
}

#adminTabAccounts:checked ~ .accounts-tab-panel,
#adminTabChannels:checked ~ .channels-tab-panel {
  display: block;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.stat-card {
  display: grid;
  gap: 0.25rem;
  min-height: 7.2rem;
  padding: 1rem;
  border: 1px solid rgba(45, 226, 255, 0.16);
  border-radius: 0.5rem;
  background: rgba(16, 24, 34, 0.82);
  box-shadow: var(--shadow);
}

.stat-card span,
.stat-card small {
  color: var(--muted);
}

.stat-card span {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--text);
  font-size: 2.3rem;
  line-height: 1;
}

.stat-card.urgent {
  border-color: rgba(249, 199, 79, 0.38);
  background: rgba(249, 199, 79, 0.08);
}

.stat-card.urgent strong {
  color: #ffe29a;
}

.stat-card.danger {
  border-color: rgba(255, 92, 122, 0.28);
  background: rgba(255, 92, 122, 0.07);
}

.stat-card.danger strong {
  color: #ffdbe2;
}

.admin-section {
  margin-bottom: 1rem;
}

.admin-dropdown {
  padding: 0;
  overflow: clip;
}

.admin-dropdown-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.8rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  cursor: pointer;
  list-style: none;
}

.admin-dropdown-summary::-webkit-details-marker {
  display: none;
}

.admin-dropdown-summary::after {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-0.15rem);
  transition: transform 140ms ease;
}

.admin-dropdown[open] > .admin-dropdown-summary::after {
  transform: rotate(225deg) translate(-0.08rem, -0.08rem);
}

.admin-dropdown-summary h2 {
  margin: 0;
}

.admin-dropdown-body {
  padding: 0 clamp(1rem, 3vw, 1.35rem) clamp(1rem, 3vw, 1.35rem);
}

.admin-dropdown-body > :first-child {
  margin-top: 0;
}

.priority-section {
  border-color: rgba(249, 199, 79, 0.24);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: 1rem;
}

.admin-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.admin-create-form .primary-button {
  align-self: end;
}

.status-breakdown {
  display: grid;
  gap: 0.75rem;
}

.status-breakdown div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(32, 49, 66, 0.86);
  border-radius: 0.45rem;
  background: rgba(8, 11, 16, 0.45);
}

.status-breakdown span {
  color: var(--muted);
}

.status-breakdown strong {
  color: var(--text);
  font-size: 1.35rem;
}

.permission-list {
  display: grid;
  gap: 0.8rem;
}

.permission-card {
  display: grid;
  grid-template-columns: minmax(12rem, 0.58fr) minmax(0, 1.42fr);
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(32, 49, 66, 0.9);
  border-radius: 0.5rem;
  background: rgba(8, 11, 16, 0.48);
}

.permission-channel {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.permission-channel h3 {
  margin: 0 0 0.2rem;
}

.permission-channel span:not(.badge) {
  color: var(--muted);
}

.permission-roles {
  display: grid;
  gap: 0.65rem;
}

.permission-form {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) repeat(4, minmax(6rem, auto)) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.65rem;
  border: 1px solid rgba(45, 226, 255, 0.14);
  border-radius: 0.45rem;
  background: rgba(13, 19, 28, 0.6);
}

.permission-form strong {
  color: var(--text);
}

.approval-list,
.account-list {
  display: grid;
  gap: 0.8rem;
}

.approval-card,
.account-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(32, 49, 66, 0.9);
  border-radius: 0.5rem;
  background: rgba(8, 11, 16, 0.48);
}

.approval-card {
  grid-template-columns: minmax(14rem, 1fr) minmax(13rem, auto) auto;
  align-items: center;
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.account-identity h3 {
  margin: 0 0 0.2rem;
  overflow-wrap: anywhere;
}

.account-identity span:not(.user-avatar) {
  color: var(--muted);
  font-size: 0.9rem;
}

.account-meta,
.badge-row,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.badge-row {
  justify-content: end;
}

.admin-actions {
  justify-content: start;
}

.admin-actions.end {
  justify-content: end;
}

.admin-actions form {
  margin: 0;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(45, 226, 255, 0.22);
  border-radius: 0.35rem;
  background: rgba(45, 226, 255, 0.06);
  color: var(--muted);
  white-space: nowrap;
}

.meta-chip.warning {
  border-color: rgba(249, 199, 79, 0.28);
  background: rgba(249, 199, 79, 0.08);
  color: #ffe29a;
}

.account-controls {
  display: grid;
  grid-template-columns: minmax(15rem, 0.9fr) minmax(20rem, 1.35fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.85rem;
}

.compact-list {
  gap: 0.6rem;
}

.compact-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.account-actions-dropdown {
  border: 1px solid rgba(45, 226, 255, 0.16);
  border-radius: 0.45rem;
  background: rgba(13, 19, 28, 0.6);
}

.account-actions-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  color: var(--cyan-soft);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.account-actions-dropdown summary::-webkit-details-marker {
  display: none;
}

.account-actions-dropdown summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-0.12rem);
}

.account-actions-dropdown[open] summary::after {
  transform: rotate(225deg) translate(-0.08rem, -0.08rem);
}

.account-actions-dropdown .account-controls {
  padding: 0 0.85rem 0.85rem;
}

@media (max-width: 980px) {
  .start-hero,
  .start-grid {
    grid-template-columns: 1fr;
  }

  .start-actions {
    justify-content: start;
  }

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

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

  .approval-card,
  .permission-card,
  .permission-form,
  .account-controls,
  .password-form,
  .compact-card {
    grid-template-columns: 1fr;
  }

  .admin-actions.end,
  .badge-row {
    justify-content: start;
  }

  .admin-form,
  .user-row {
    grid-template-columns: 1fr;
  }

  .mini-form,
  .mini-form[action$="/password"] {
    grid-template-columns: 1fr;
  }

  .approval-row {
    grid-template-columns: 1fr;
  }

  .action-stack {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .profile-name {
    display: none;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .page-heading,
  .section-title,
  .clip-page-header,
  .clip-card-header,
  .profile-settings,
  .split-grid,
  .upload-actions-grid,
  .clip-admin-grid,
  .clip-time-grid,
  .server-meta-grid,
  .start-hero,
  .start-stats,
  .start-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .server-status {
    width: fit-content;
  }

  .server-card-summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .server-card-summary .server-status {
    grid-column: 2;
  }

  .server-card-caret {
    grid-column: 3;
    grid-row: 1;
  }

  .start-hero {
    min-height: auto;
  }

  .status-cluster {
    justify-content: start;
  }

  .admin-stats,
  .admin-grid,
  .admin-create-form,
  .avatar-editor {
    grid-template-columns: 1fr;
  }

  .admin-tab-list {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-tab-list label {
    min-width: 0;
  }

  .account-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-dropdown-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-dropdown-summary::after {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-dropdown-summary .badge {
    grid-column: 1 / -1;
    width: fit-content;
  }

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

  .folder summary,
  .upload-folder summary {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .folder summary .file-count,
  .upload-folder summary .file-count,
  .upload-folder summary .owner-chip,
  .upload-folder summary .inline-delete-form {
    grid-column: 3;
    width: fit-content;
  }

  .file-actions,
  .download-button {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .folder > .tree-level {
    margin-right: 0.35rem;
    margin-left: 1.05rem;
    padding-left: 0.75rem;
  }
}
