:root {
  --bg: #f5efe8;
  --panel: #fff6ee;
  --panel-strong: #ffffff;
  --ink: #1d1b16;
  --muted: #6a6055;
  --accent: #ef6a3b;
  --accent-2: #1e8e96;
  --stroke: #f0d7c4;
  --shadow: 0 18px 40px rgba(39, 24, 16, 0.12);
  --radius: 20px;
}

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

body {
  margin: 0;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(239, 106, 59, 0.18), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(30, 142, 150, 0.2), transparent 50%),
    linear-gradient(140deg, #f6efe9 0%, #f2e7dc 100%);
  min-height: 100vh;
  overflow: hidden;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.kicker {
  color: var(--muted);
  font-size: 20px;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(28px, 3vw, 42px);
}

.badge {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow);
}

.layout {
  display: grid;
  grid-template-columns: minmax(240px, 30%) minmax(0, 70%);
  gap: 24px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  margin-bottom: 20px;

}

.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  animation: rise 0.7s ease both;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.panel-title {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 20px;
  margin: 0 0 6px;
}

.panel-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.chip {
  border: none;
  border-radius: 12px;
  padding: 12px 10px;
  background: var(--panel-strong);
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

.user-list-wrap {
  flex: 1;
  overflow-y: auto;
  max-height:500px;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 106, 59, 0.5) transparent;
}

.user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-list-wrap::-webkit-scrollbar {
  width: 6px;
}

.user-list-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.user-list-wrap::-webkit-scrollbar-thumb {
  background: rgba(239, 106, 59, 0.45);
  border-radius: 999px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-strong);
  border: 1px solid transparent;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
  animation: fadeIn 0.5s ease both;
}

.user-card:nth-child(1) { animation-delay: 0.05s; }
.user-card:nth-child(2) { animation-delay: 0.1s; }
.user-card:nth-child(3) { animation-delay: 0.15s; }
.user-card:nth-child(4) { animation-delay: 0.2s; }
.user-card:nth-child(5) { animation-delay: 0.25s; }

.user-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.user-card.selected {
  border-color: var(--accent-2);
  box-shadow: 0 10px 24px rgba(30, 142, 150, 0.15);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ffb684);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.user-name {
  margin: 0;
  font-weight: 600;
}

.user-role {
  display: none;
}

.selected-user {
  font-size: 13px;
  color: var(--muted);
}

.selected-user span {
  color: var(--ink);
  font-weight: 600;
}

.upload-area {
  border: 2px dashed rgba(239, 106, 59, 0.4);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 32px;
  text-align: center;
  position: relative;
  transition: border 0.2s ease, background 0.2s ease;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area.dragover {
  border-color: var(--accent);
  background: rgba(239, 106, 59, 0.08);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-title {
  margin: 0 0 6px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 18px;
}

.upload-caption {
  margin: 0 0 16px;
  color: var(--muted);
}

.file-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 12px;
  margin: 20px 0 14px;
}

button {
  font-family: "Work Sans", "Segoe UI", sans-serif;
  font-size: 14px;
}

.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(239, 106, 59, 0.25);
}

.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ghost {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
}

.ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel {
    min-height: unset;
  }

  body {
    overflow: auto;
  }
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 16px 24px;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: #10b981;
}

.toast-error {
  background: #ef4444;
}