:root {
  --sky-50: #eefbff;
  --sky-100: #d9f4ff;
  --sky-200: #bde8ff;
  --sky-300: #8cd7ff;
  --sky-400: #5cc9ff;
  --sky-500: #2bb4ff;
  --ink-900: #0a1b2b;
  --ink-700: #1d3445;
  --ink-500: #415a6b;
  --glass: rgba(255, 255, 255, 0.62);
  --shadow: 0 20px 60px rgba(9, 36, 56, 0.2);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

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

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink-900);
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(92, 201, 255, 0.35), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(43, 180, 255, 0.3), transparent 70%),
    linear-gradient(160deg, #f7fdff 0%, #e9f4ff 50%, #f4fbff 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.6;
}

body::before {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at 30% 30%, var(--sky-300), transparent 70%);
  top: 12%;
  left: 6%;
  animation: drift 18s ease-in-out infinite;
}

body::after {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 70% 30%, var(--sky-200), transparent 70%);
  bottom: 8%;
  right: 10%;
  animation: drift 22s ease-in-out infinite reverse;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 28px 36px 40px;
  animation: fadeIn 0.9s ease;
}

.brand {
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--ink-900);
}

.sidebar {
  background: var(--glass);
  backdrop-filter: blur(24px);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 80vh;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-link {
  text-decoration: none;
  color: var(--ink-700);
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 14px;
  transition: all 0.25s ease;
  background: transparent;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(92, 201, 255, 0.2);
  color: var(--ink-900);
  transform: translateY(-1px);
}

.user-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: inset 0 0 0 1px rgba(92, 201, 255, 0.25);
}

.main-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title h1 {
  font-size: 28px;
  margin: 0;
}

.panel {
  background: var(--glass);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
  animation: liftIn 0.6s ease;
}

.panel.soft {
  background: rgba(255, 255, 255, 0.8);
}

.button {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--sky-400), var(--sky-500));
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px rgba(43, 180, 255, 0.35);
}

.button.ghost {
  background: transparent;
  color: var(--ink-700);
  border: 1px solid rgba(92, 201, 255, 0.4);
  box-shadow: none;
}

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

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

.grid {
  display: grid;
  gap: 18px;
}

.grid.library {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.grid.sentinel {
  margin-top: 16px;
}

.skeleton.line {
  height: 12px;
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(13, 41, 64, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(13, 41, 64, 0.18);
}

.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #def5ff, #f4fbff);
}

.card-body {
  padding: 12px 14px 16px;
  font-size: 13px;
  color: var(--ink-500);
}

.form {
  display: grid;
  gap: 14px;
}

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

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(32, 71, 94, 0.15);
  font-size: 14px;
  outline: none;
  background: white;
}

.pill-input {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(32, 71, 94, 0.15);
  background: white;
}

.pill-input input {
  border: none;
  outline: none;
  font-size: 13px;
  flex: 1;
  min-width: 120px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(92, 201, 255, 0.18);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
}

.chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink-500);
}

.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 6px;
}

.filter-bar select {
  min-width: 160px;
}

.filter-bar input[type="date"] {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(32, 71, 94, 0.15);
  font-size: 13px;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.92);
  padding: 28px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.8s ease;
}

.muted {
  color: var(--ink-500);
  font-size: 13px;
}

.upload-drop {
  border: 2px dashed rgba(43, 180, 255, 0.4);
  border-radius: 18px;
  padding: 26px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(233, 248, 255, 0.8));
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.upload-drop.active {
  border-color: var(--sky-400);
  transform: scale(1.01);
}

.upload-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(13, 41, 64, 0.08);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(43, 180, 255, 0.25);
  border-top-color: var(--sky-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.muted.is-busy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 25, 38, 0.55);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 24px;
  width: min(420px, 100%);
  box-shadow: var(--shadow);
}

.modal h3 {
  margin-top: 0;
}

.progress {
  height: 6px;
  background: rgba(13, 41, 64, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sky-300), var(--sky-500));
  transition: width 0.3s ease;
}

.detail-hero {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(200px, 1fr) 280px;
}

.detail-hero img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(11, 34, 51, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(92, 201, 255, 0.16);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
}

.skeleton {
  height: 160px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(203, 236, 255, 0.7), rgba(255, 255, 255, 0.7));
  background-size: 200% 200%;
  animation: shimmer 1.6s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

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

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

@keyframes drift {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(18px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .sidebar {
    min-height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-title h1 {
    font-size: 22px;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 13px;
  }
}
