:root {
  --bg0: #0b1020;
  --bg1: #12183a;
  --accent: #6d8cff;
  --accent2: #b56dff;
  --text: #e8ecff;
  --muted: #9aa3d6;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(109, 140, 255, 0.25);
  --shadow: 0 20px 50px rgba(8, 10, 40, 0.55);
  --radius: 14px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, #2a1f55 0%, transparent 55%),
    radial-gradient(900px 600px at 100% 0%, #1c3a6e 0%, transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
}

.noise::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4.5rem;
}

header.hero {
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #9ab6ff, #d4b4ff 55%, #7ecbff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 52ch;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.45rem 1.55rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  content-visibility: auto;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #cfd6ff;
}

.dropzone {
  border: 1px dashed rgba(181, 109, 255, 0.45);
  border-radius: var(--radius);
  padding: 1.85rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.dropzone:hover,
.dropzone.drag {
  border-color: var(--accent);
  background: rgba(109, 140, 255, 0.08);
}

.dropzone input {
  display: none;
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

input.secret {
  flex: 1 1 200px;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 14, 35, 0.65);
  color: var(--text);
  font: inherit;
}

input.secret::placeholder {
  color: rgba(154, 163, 214, 0.65);
}

button,
.button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  color: #0b1020;
  font-weight: 600;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px rgba(109, 140, 255, 0.25);
  transition: transform 0.1s ease, filter 0.15s ease;
}

button:hover,
.button:hover,
a.ghost:hover {
  filter: brightness(1.06);
}

button:active,
.button:active,
a.ghost:active {
  transform: translateY(1px);
}

button.ghost,
a.ghost {
  background: rgba(109, 140, 255, 0.12);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.status {
  margin-top: 1rem;
  min-height: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.status.err {
  color: #ff9ec5;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* Main app: hero + upload + library */
.cloud-layout {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

@media (min-width: 900px) {
  .cloud-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.85rem 2rem;
    align-items: start;
  }

  .cloud-hero-full {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .cloud-panel-upload {
    grid-column: 1;
  }

  .cloud-panel-files {
    grid-column: 2;
  }
}

.cloud-hero-full {
  margin-bottom: 0;
}

.cloud-hero-desc {
  margin-top: 0.65rem;
  max-width: 62ch;
  line-height: 1.45;
}

.cloud-hero-full h1 {
  margin-bottom: 0.5rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #cfd6ff;
}

.btn-toolbar {
  padding: 0.48rem 0.92rem;
  font-size: 0.87rem;
  font-weight: 600;
}

a.ghost.btn-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-wide {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  box-sizing: border-box;
}

.row.tight {
  margin-top: 0.4rem;
  gap: 0.45rem;
}

.chk-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.55rem 0 0;
  cursor: pointer;
  font-size: 0.86rem;
  color: var(--muted);
}

.chk-row input {
  margin: 0.15rem 0 0;
  flex-shrink: 0;
}

.chk-row .hint {
  margin: 0;
}

.subhead {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #cfd6ff;
}

.admin-intro {
  margin: 0 0 0.85rem;
}

.adm-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  margin: 0.45rem 0 0.2rem;
}

.user-edit-card {
  padding: 1rem 1rem 0.9rem;
  margin-top: 0.85rem;
  border-radius: 12px;
  background: rgba(8, 12, 30, 0.45);
  border: 1px solid rgba(109, 140, 255, 0.12);
}

.user-edit-card:first-child {
  margin-top: 0.35rem;
}

/* Full-screen admin overlay */
.admin-shell-wrap {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1000px 700px at 10% -10%, #2a1f55 0%, transparent 52%),
    radial-gradient(800px 520px at 100% 0%, #1c3a6e 0%, transparent 48%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
  overflow: hidden;
}

.admin-shell-wrap[hidden] {
  display: none !important;
}

.admin-shell-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 30, 0.55);
  backdrop-filter: blur(12px);
}

.admin-shell-header h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  color: #cfd6ff;
}

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

.admin-shell-content {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.25rem 2.5rem;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

/* Library: one file per card */
.file-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  background: rgba(8, 12, 30, 0.45);
  border: 1px solid rgba(109, 140, 255, 0.12);
  animation: enter 0.35s ease both;
}

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

.file-card__main strong {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card__main span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.file-card__primary {
  width: 100%;
  box-sizing: border-box;
}

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

.file-card__grid .btn-danger-outline {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .file-card__grid {
    grid-template-columns: 1fr;
  }

  .file-card__grid .btn-danger-outline {
    grid-column: auto;
  }
}

button.btn-secondary,
a.btn-secondary {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.48rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(109, 140, 255, 0.28);
  box-shadow: none;
  transition: transform 0.1s ease, filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

a.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

button.btn-secondary:hover,
a.btn-secondary:hover {
  filter: brightness(1.06);
  border-color: rgba(109, 140, 255, 0.5);
}

button.btn-secondary:active,
a.btn-secondary:active {
  transform: translateY(1px);
}

.btn-secondary.btn-danger-outline {
  border-color: rgba(255, 120, 150, 0.42);
  color: #ffc8d8;
}

.btn-secondary.btn-danger-outline:hover {
  border-color: rgba(255, 140, 165, 0.65);
  background: rgba(255, 90, 130, 0.09);
}

.btn-secondary.is-disabled,
a.btn-secondary.is-disabled {
  opacity: 0.42;
  pointer-events: none;
  cursor: not-allowed;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(8, 12, 30, 0.45);
  border: 1px solid rgba(109, 140, 255, 0.12);
  animation: enter 0.35s ease both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

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

.file-meta strong {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta span {
  font-size: 0.8rem;
  color: var(--muted);
}

.cmd-box {
  margin-top: 1.25rem;
  padding: 0.95rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(181, 109, 255, 0.2);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.78rem;
  word-break: break-all;
  white-space: pre-wrap;
  color: #c8d2ff;
}

.cmd-label {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 1.1rem 0 0.4rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.files-toolbar {
  margin-bottom: 0.85rem;
}

.cloud-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.15rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--border);
}

.cloud-topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.cloud-logo {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: #cfd6ff;
}

.cloud-userline {
  font-size: 0.88rem;
  color: var(--muted);
}

.cloud-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: auto;
}

.cloud-subline {
  margin: 0.35rem 0 1.5rem;
  line-height: 1.45;
}

.upload-actions {
  margin-top: 0.95rem;
}

.btn-sm {
  padding: 0.42rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.file-item-actions {
  justify-content: flex-end;
  margin-top: 0 !important;
}

@media (max-width: 640px) {
  .file-item {
    flex-direction: column;
    align-items: stretch;
  }

  .file-item-actions {
    justify-content: flex-start;
  }

  .cloud-topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(6, 8, 24, 0.72);
  backdrop-filter: blur(10px);
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  max-width: 400px;
  width: 100%;
}

.login-actions .ghost {
  color: var(--text);
}

.toolbar span {
  font-size: 0.85rem;
  color: var(--muted);
}

.skel {
  height: 118px;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(109, 140, 255, 0.06),
    rgba(181, 109, 255, 0.12),
    rgba(109, 140, 255, 0.06)
  );
  background-size: 200% 100%;
  animation: sk 1.1s ease infinite;
}

@keyframes sk {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}

footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(154, 163, 214, 0.55);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(6, 8, 24, 0.72);
  backdrop-filter: blur(10px);
}

.login-overlay[hidden] {
  display: none !important;
}

.login-card {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  color-scheme: dark;
}

.login-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.login-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-card label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.login-card input.login-input,
.login-card input[type="text"],
.login-card input[type="password"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: rgba(10, 14, 35, 0.75);
  background-image: none;
  color: var(--text);
  font: inherit;
  line-height: 1.35;
  margin-bottom: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

/* Browsers love to restyle autofilled username fields; force match with password. */
.login-card input.login-input:-webkit-autofill,
.login-card input.login-input:-webkit-autofill:hover,
.login-card input.login-input:-webkit-autofill:focus,
.login-card input.login-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 0 0 1000px rgba(10, 14, 35, 0.92) inset;
  -webkit-box-shadow: 0 0 0 1000px rgba(10, 14, 35, 0.92) inset;
  transition: background-color 99999s ease-out 0s;
}

.login-card input.login-input:autofill,
.login-card input.login-input:autofill:hover {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px rgba(10, 14, 35, 0.92) inset;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.login-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.login-err {
  color: #ff9ec5;
  font-size: 0.88rem;
  margin-top: 0.65rem;
  min-height: 1.2rem;
}

#main[hidden] {
  display: none !important;
}

/* Centered login with mega title */
.login-center-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 440px;
}

.brand-mega {
  margin: 0 0 1.75rem;
  font-size: clamp(2.75rem, 9vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
  line-height: 1.05;
  background: linear-gradient(125deg, #9ab6ff, #d4b4ff 45%, #7ecbff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pwd-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(6, 8, 24, 0.85);
  backdrop-filter: blur(12px);
}

.pwd-overlay[hidden] {
  display: none !important;
}

.admin-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.admin-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #cfd6ff;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(109, 140, 255, 0.12);
  font-size: 0.9rem;
}

.user-row button {
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
}

/* File row: download + More */
.file-card__actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.file-card__actions .file-card__primary {
  flex: 1 1 auto;
  min-width: 0;
}

.file-card__more {
  flex: 0 0 auto;
  min-width: 7.75rem;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
  align-self: stretch;
}

.file-meta-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.file-share-hint--badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.45rem;
  margin-top: 0.55rem;
}

.share-panel-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.5rem;
  margin: 0 0 0.85rem;
}

.share-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(109, 140, 255, 0.32);
  background: rgba(8, 12, 30, 0.65);
}

.share-pill--sm {
  padding: 0.26rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.share-pill__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #e8ecff;
}

.share-pill__sep {
  opacity: 0.55;
  font-weight: 600;
}

.share-pill__lbl {
  font-weight: 500;
  opacity: 0.85;
  margin-left: 0.15rem;
  font-size: 0.78em;
}

.share-pill--ok {
  border-color: rgba(120, 220, 180, 0.45);
  background: rgba(40, 120, 90, 0.18);
  color: #b8f5dd;
}

.share-pill--bad {
  border-color: rgba(255, 140, 170, 0.5);
  background: rgba(120, 40, 65, 0.22);
  color: #ffc8d8;
}

.share-pill--count {
  border-color: rgba(157, 176, 255, 0.45);
  background: rgba(109, 140, 255, 0.12);
  color: #d6ddff;
}

.share-pill--muted {
  border-color: rgba(154, 163, 214, 0.25);
  color: var(--muted);
  font-weight: 500;
}

.center-popup-overlay.modal-overlay {
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  /* Above pwd overlay (60) so file popups always paint and receive input */
  z-index: 68;
}

.center-popup-card {
  width: 100%;
  max-width: 460px;
  max-height: min(90vh, 680px);
  overflow: auto;
  margin: 0;
  animation: popupIn 0.22s ease both;
  /* .panel sets content-visibility:auto which can break modal focus/hit-testing */
  content-visibility: visible;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
}

.center-popup-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #cfd6ff;
}

.popup-action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.popup-action-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.62rem 1rem;
  border-radius: 11px;
  border: 1px solid rgba(109, 140, 255, 0.35);
  background: rgba(109, 140, 255, 0.1);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  box-shadow: none;
}

.popup-action-btn:hover {
  background: rgba(109, 140, 255, 0.18);
  border-color: rgba(109, 140, 255, 0.5);
  filter: none;
}

.popup-action-btn:active {
  transform: translateY(1px);
}

.popup-action-btn--danger {
  border-color: rgba(255, 140, 170, 0.45);
  background: rgba(255, 90, 130, 0.1);
  color: #ffd0dc;
}

.popup-action-btn--danger:hover {
  background: rgba(255, 100, 140, 0.16);
}

.popup-action-cancel {
  width: 100%;
  margin-top: 0.25rem;
}

.cli-special-box {
  margin-top: 0.65rem;
  padding: 0.85rem 0.75rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(157, 109, 255, 0.35);
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.76rem;
  line-height: 1.45;
  word-break: break-all;
  white-space: pre-wrap;
  color: #d2dcff;
  min-height: 3.2rem;
}

.inline-code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(109, 140, 255, 0.25);
}

.os-toggle {
  display: flex;
  gap: 0;
  margin: 0.5rem 0 0.35rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.os-toggle__btn {
  flex: 1 1 50%;
  margin: 0;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: 0;
  cursor: pointer;
  background: rgba(10, 14, 35, 0.55);
  color: var(--muted);
  box-shadow: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.os-toggle__btn:hover {
  filter: none;
  background: rgba(109, 140, 255, 0.1);
  color: var(--text);
}

.os-toggle__btn.is-active {
  background: rgba(109, 140, 255, 0.22);
  color: #fff;
}

.popup-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.popup-footer-actions > button {
  flex: 1 1 auto;
  min-width: 8rem;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sheet-actions > button {
  flex: 1 1 auto;
  min-width: 8rem;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.select-input {
  width: 100%;
  margin: 0.35rem 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 14, 35, 0.75);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.select-input:focus {
  outline: 2px solid rgba(109, 140, 255, 0.4);
  outline-offset: 1px;
}

.cmd-box--sm {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  max-height: 6rem;
  overflow: auto;
}

.modal-card--md {
  max-width: 420px;
}

button.btn-fill-danger {
  background: linear-gradient(135deg, #e05578, #b84466);
  color: #fff;
  box-shadow: 0 8px 22px rgba(224, 85, 120, 0.28);
}
