.case-admin-main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.admin-hero h1 {
  max-width: 820px;
  margin: 0.35rem 0 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
}
.admin-hero p {
  max-width: 620px;
  margin: 0.9rem 0 0;
  color: var(--mj-dash-muted);
}
.admin-hero-card,
.admin-panel {
  border: 1px solid var(--mj-dash-line);
  border-radius: var(--mj-dash-r);
  background: rgba(15, 23, 42, 0.66);
}
.admin-hero-card {
  display: grid;
  align-content: center;
  gap: 0.25rem;
  padding: 1rem;
}
.admin-hero-card strong {
  font-size: 3rem;
  line-height: 1;
  color: var(--mj-dash-green);
}
.admin-hero-card span {
  color: var(--mj-dash-muted);
}
.admin-hero-card a {
  margin-top: 0.8rem;
  color: #cffafe;
  text-decoration: none;
  font-weight: 800;
}
.admin-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 1rem;
}
.admin-sync-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--mj-dash-r);
  border: 1px solid rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.07);
}
.admin-sync-bar strong {
  display: block;
  color: #ecfeff;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.admin-sync-bar p {
  margin: 0;
  color: var(--mj-dash-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  max-width: 56rem;
}
.admin-sync-bar code {
  font-size: 0.8rem;
  color: #a5f3fc;
  word-break: break-all;
}
.admin-sync-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}
.admin-sync-actions .mj-btn-primary {
  white-space: nowrap;
}
.admin-case-load-warn {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(120, 53, 15, 0.35);
  color: #fef3c7;
  font-size: 0.82rem;
  line-height: 1.55;
}
.admin-panel {
  padding: 1rem;
}
.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-panel-head span {
  color: var(--mj-dash-green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.admin-panel-head h2 {
  margin: 0.2rem 0 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.2rem;
}
.admin-panel-head button,
.form-actions button:not(.mj-btn-primary),
.saved-actions button {
  min-height: 2.35rem;
  border-radius: 10px;
  border: 1px solid var(--mj-dash-line);
  background: rgba(3, 7, 18, 0.44);
  color: var(--mj-dash-ink);
  font: inherit;
  font-weight: 800;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.upload-zone {
  position: relative;
  display: flex;
  gap: 0.85rem;
  align-items: center;
  min-height: 5rem;
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.06);
  padding: 1rem;
  margin: 0.5rem 0 1rem;
}
.upload-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-zone strong,
.upload-zone span {
  display: block;
}
.upload-zone span {
  color: var(--mj-dash-muted);
  font-size: 0.86rem;
}
.admin-sort-hint {
  margin: 0.4rem 0 0;
  max-width: 36rem;
  color: var(--mj-dash-muted);
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 550;
}
.admin-shot-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.55rem;
  margin: -0.4rem 0 1rem;
}
.admin-shot-tile {
  position: relative;
  min-height: 76px;
  max-height: 140px;
  border: 1px solid var(--mj-dash-line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.admin-shot-tile:active {
  cursor: grabbing;
}
.admin-shot-tile img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  display: block;
}
.admin-shot-tile__idx {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  display: grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: rgba(3, 7, 18, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}
.admin-shot-tile__remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  z-index: 2;
  width: 1.45rem;
  height: 1.45rem;
  border: none;
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.88);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.admin-shot-tile__remove:hover {
  background: rgba(185, 28, 28, 0.95);
}
.admin-shot-tile.is-dragging {
  opacity: 0.45;
}
.admin-shot-tile.admin-shot-tile--over {
  outline: 2px dashed rgba(34, 211, 238, 0.75);
  outline-offset: 2px;
}
.admin-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 400;
  transform: translate3d(-50%, 10px, 0);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.94);
  color: #e2e8f0;
  font-size: 0.86rem;
  font-weight: 750;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.admin-toast.admin-toast--show {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}
.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}
.case-preview-card {
  overflow: hidden;
  border: 1px solid var(--mj-dash-line);
  border-radius: 16px;
  background: rgba(3, 7, 18, 0.38);
}
.preview-shot {
  min-height: 280px;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.18), transparent 40%),
    linear-gradient(235deg, rgba(134, 239, 172, 0.14), transparent 38%),
    #08111f;
  color: var(--mj-dash-muted);
  overflow: hidden;
}
.preview-shot img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}
.preview-shot > span {
  text-align: center;
  padding: 0 0.75rem;
}
.preview-copy {
  padding: 1rem;
}
.preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}
.preview-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.preview-badge--sales {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}
.preview-badge--industry {
  background: rgba(45, 212, 191, 0.15);
  color: #5eead4;
}
.preview-copy > span {
  color: #fef08a;
  font-size: 0.8rem;
  font-weight: 900;
}
.preview-copy h3 {
  margin: 0.35rem 0;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.6rem;
  line-height: 1.05;
}
.preview-copy p,
.preview-copy dd {
  color: var(--mj-dash-muted);
  line-height: 1.6;
}
.preview-copy dl {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 0;
}
.preview-copy dt {
  color: var(--mj-dash-green);
  font-size: 0.74rem;
  font-weight: 900;
}
.preview-copy dd {
  margin: 0.1rem 0 0;
}
.saved-cases {
  margin-top: 1rem;
}
.saved-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}
.saved-case {
  display: grid;
  grid-template-columns: 30px 76px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.55rem 0.65rem;
  align-items: start;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.3);
  padding: 0.75rem;
}
.saved-case__handle {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  width: 28px;
  min-height: 76px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(3, 7, 18, 0.35);
  display: grid;
  place-items: center;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.saved-case__handle:active {
  cursor: grabbing;
}
.saved-case__handle-icon {
  width: 10px;
  height: 18px;
  border-radius: 2px;
  opacity: 0.75;
  background: repeating-linear-gradient(
    to bottom,
    #94a3b8 0 2px,
    transparent 2px 5px
  );
}
.saved-case.is-dragging {
  opacity: 0.42;
}
.saved-case.saved-case--over {
  outline: 2px dashed rgba(52, 211, 153, 0.65);
  outline-offset: 2px;
}
.saved-thumb {
  grid-column: 2;
  grid-row: 1;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #cffafe;
  font-size: 0.72rem;
  font-weight: 900;
}
.saved-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.saved-case__body {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}
.saved-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  gap: 0.5rem;
}
.saved-case strong {
  display: block;
  color: var(--mj-dash-ink);
  line-height: 1.25;
}
.saved-case p {
  margin: 0.3rem 0 0;
  color: var(--mj-dash-muted);
  font-size: 0.82rem;
}
.saved-case-pill {
  display: inline-block;
  margin-right: 0.35rem;
  margin-bottom: 0.15rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.25);
  color: #e0e7ff;
  font-size: 0.65rem;
  font-weight: 900;
  vertical-align: middle;
}
.saved-actions button {
  flex: 1;
}
@media (max-width: 960px) {
  .admin-hero,
  .admin-workbench,
  .admin-sync-bar,
  .field-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }
}
