:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #1d2733;
  --muted: #657386;
  --line: #dce3ea;
  --accent: #126a6f;
  --accent-2: #d8762d;
  --good: #23835f;
  --warn: #bd7a19;
  --danger: #b84a4a;
  --shadow: 0 12px 30px rgba(23, 38, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 280px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #17212d;
  color: #fff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent-2);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: #b7c4d1;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #d6dee7;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #cdd7e2;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.06);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: #55c895;
}

.shell {
  min-height: 100vh;
  margin-left: 280px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 248, 0.94);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.topbar-actions,
.row,
.filters,
.tabs {
  display: flex;
  gap: 10px;
  align-items: center;
}

.primary-btn,
.secondary-btn,
.icon-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.primary-btn {
  min-height: 40px;
  padding: 0 15px;
  color: #fff;
  background: var(--accent);
}

.secondary-btn {
  min-height: 38px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.icon-btn {
  width: 40px;
  height: 40px;
  color: var(--text);
  background: #fff;
  border-color: var(--line);
  font-weight: 700;
}

.content {
  padding: 28px 32px 48px;
}

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

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card,
.metric,
.kanban-col {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
  max-width: 100%;
  overflow-x: auto;
}

.card,
.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--accent);
  background: #e4f2f1;
  font-size: 12px;
  font-weight: 700;
}

.tag.orange {
  color: #8b4a0d;
  background: #faead9;
}

.tag.gray {
  color: #576477;
  background: #edf1f5;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.table th,
.table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.filters {
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.input,
.select {
  min-height: 40px;
  min-width: 170px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tabs {
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.tabs button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-main {
  min-height: 300px;
  padding: 28px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(23, 33, 45, 0.9), rgba(23, 33, 45, 0.56)),
    url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1400&q=80") center/cover;
}

.hero-main h2 {
  max-width: 780px;
  margin-bottom: 12px;
  font-size: 34px;
  line-height: 1.14;
}

.hero-main p {
  max-width: 720px;
  color: #dbe5ee;
  line-height: 1.55;
}

.role-list {
  display: grid;
  gap: 10px;
}

.role-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-col {
  min-width: 220px;
  padding: 14px;
}

.kanban-card {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.chat-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
}

.message {
  max-width: 70%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eef4f6;
}

.message.out {
  margin-left: auto;
  color: #fff;
  background: var(--accent);
}

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

.timeline-item {
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .shell {
    margin-left: 0;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .chat-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .content,
  .topbar,
  .hero-main {
    padding: 20px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .primary-btn {
    flex: 1 1 180px;
  }

  h1 {
    font-size: 25px;
  }

  .hero-main h2 {
    font-size: 27px;
  }

  .table {
    min-width: 560px;
  }
}
