@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Fraunces:wght@500;700&display=swap");

:root {
  --bg: #151718;
  --bg-soft: #1c1f21;
  --bg-card: #23272a;
  --accent: #f5b84b;
  --accent-strong: #ff8a3d;
  --ink: #f7f4f0;
  --muted: #9aa1a6;
  --chip: #2d3236;
  --chip-active: #f5b84b;
  --success: #3ad29f;
  --danger: #ff5b6a;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(245, 184, 75, 0.25), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, rgba(255, 138, 61, 0.25), transparent 65%),
    linear-gradient(180deg, #111314 0%, #141719 100%);
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #151718 0%, #1a1d1f 100%);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f5b84b, #ff8a3d);
  font-weight: 700;
  color: #1b1e20;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-text strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
}

.dept-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dept-actions,
.chip-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.ghost-btn:hover {
  color: var(--ink);
  border-color: rgba(245, 184, 75, 0.5);
  background: rgba(245, 184, 75, 0.08);
}

.dept-item {
  border: none;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dept-item:hover {
  background: rgba(245, 184, 75, 0.08);
  color: var(--ink);
}

.dept-item.is-active {
  background: rgba(245, 184, 75, 0.18);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(245, 184, 75, 0.5);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-pill {
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(58, 210, 159, 0.15);
  color: var(--success);
  font-weight: 600;
}

.main {
  padding: 28px 34px 40px;
  display: grid;
  gap: 24px;
}

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

.title-block h1 {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  margin: 0 0 6px;
}

.title-block p {
  margin: 0;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--ink);
  min-width: 240px;
}

.search::placeholder {
  color: var(--muted);
}

.cta {
  background: linear-gradient(135deg, #f5b84b, #ff8a3d);
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  color: #191c1f;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip.is-active {
  background: var(--chip-active);
  color: #1c1e20;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(245, 184, 75, 0.25);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.lane {
  background: rgba(21, 23, 24, 0.6);
  border-radius: 22px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

.lane::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px 200px at 10% -10%, rgba(245, 184, 75, 0.1), transparent 60%);
  pointer-events: none;
}

.lane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lane-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.count {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: rise 0.5s ease both;
}

.card h3 {
  margin: 0;
  font-size: 1rem;
}

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

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 184, 75, 0.18);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.tag.is-alert {
  background: rgba(255, 91, 106, 0.15);
  color: var(--danger);
}

.tag.is-success {
  background: rgba(58, 210, 159, 0.15);
  color: var(--success);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 16, 0.72);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 20px;
  width: min(92vw, 420px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 16px;
  animation: rise 0.35s ease both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

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

.field input,
.field select {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
}

.modal-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

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

  .sidebar {
    flex-direction: row;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
  }

  .dept-list {
    flex-direction: row;
    gap: 6px;
  }

  .dept-item {
    white-space: nowrap;
  }

  .sidebar-footer {
    display: none;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 20px;
  }

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

  .search {
    min-width: 200px;
  }
}
