:root {
  --page: #f6f7fb;
  --panel: #ffffff;
  --panel-soft: #f0f2f7;
  --line: #dfe3ec;
  --text: #1f2430;
  --muted: #707b91;
  --blue: #4262ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--page);
}

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

.left-rail {
  border-right: 1px solid var(--line);
  background: #f3f5fa;
  padding: 10px;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 10px;
}

.team-badge {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #99d4e6;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.team-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.team-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
}

.search-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  height: 34px;
  padding: 0 12px;
  background: #e9edf5;
  color: #3b4357;
  font-size: 14px;
  outline: none;
}

.search-input::placeholder {
  color: #7a849b;
}

.main-nav {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #353c4f;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  padding: 8px 10px;
}

.nav-item.active {
  background: #e6eaf3;
  font-weight: 700;
}

.spaces-head {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #2f374b;
  font-size: 24px;
  font-weight: 500;
}

.spaces-plus {
  width: 28px;
  height: 28px;
  border: 1px solid #d5dbe8;
  border-radius: 6px;
  background: #f9faff;
  color: #464f65;
  font-size: 20px;
  line-height: 1;
}

.main-area {
  display: grid;
  grid-template-rows: 56px auto;
}

.home-top {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.home-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-brand {
  font-family: "Zaha Hadid Sans", "Inter", sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.2px;
}

.tag {
  font-size: 12px;
  color: #5e687f;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8f9fd;
  padding: 2px 6px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn,
.primary-btn {
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 0 12px;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: #f7f8fc;
  color: #2d3447;
}

.primary-btn {
  border: 1px solid #3552ff;
  background: linear-gradient(180deg, #5a76ff, #4262ff);
  color: #fff;
  box-shadow: 0 4px 10px rgba(66, 98, 255, 0.24);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #8dd2dd;
  color: #21424a;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.hero {
  padding: 20px 18px 6px;
}

.hero h2 {
  margin: 0;
  text-align: center;
  font-size: 40px;
  font-weight: 600;
  color: #202739;
}

.hero-search {
  display: block;
  width: min(780px, calc(100% - 40px));
  margin: 20px auto 0;
  height: 92px;
  border-radius: 16px;
  border: 1px solid #d7ddeb;
  background: #fff;
  padding: 0 18px;
  font-size: 22px;
  color: #2a334a;
}

.templates-strip {
  margin: 8px 18px 0;
  background: var(--panel-soft);
  border: 1px solid #e2e6ef;
  border-radius: 10px;
  padding: 12px;
}

.strip-head {
  font-size: 30px;
  font-weight: 600;
  color: #2c3347;
  margin-bottom: 10px;
}

.templates-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.template-card {
  height: 74px;
  border-radius: 10px;
  border: 1px solid #d8deea;
  background: #fff;
  color: #2d3448;
  font-size: 13px;
  text-align: left;
  padding: 10px;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.template-card:hover {
  transform: translateY(-1px);
  border-color: #c8d2e4;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.boards-section {
  padding: 20px 18px 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 700;
}

.head-actions {
  display: flex;
  gap: 8px;
}

.filters {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.filters select {
  border: 1px solid #d6dcea;
  border-radius: 8px;
  background: #fff;
  color: #273046;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.boards-table-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

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

.boards-table th,
.boards-table td {
  text-align: left;
  border-bottom: 1px solid #edf1f7;
  padding: 12px 14px;
}

.boards-table thead th {
  color: #5f6982;
  font-size: 13px;
  font-weight: 600;
}

.boards-table tbody td {
  color: #222b3f;
  font-size: 14px;
}

.boards-table tbody tr:hover td {
  background: #f8faff;
}

.board-link {
  color: #1d2540;
  text-decoration: none;
  font-weight: 700;
}

.board-link:hover {
  text-decoration: underline;
}

.board-sub {
  color: #6e7890;
  font-size: 12px;
  margin-top: 2px;
}

.actions-col {
  width: 56px;
}

.board-actions-cell {
  text-align: right;
}

.board-actions-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #48526b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.board-actions-btn:hover {
  background: #eff3fb;
  border-color: #dbe3f0;
}

.board-menu {
  position: fixed;
  z-index: 1000;
  width: 220px;
  border: 1px solid #dce2ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  padding: 6px;
}

.board-menu.hidden {
  display: none;
}

.board-menu-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #2b3348;
  text-align: left;
  font-size: 14px;
  padding: 9px 10px;
  cursor: pointer;
}

.board-menu-item:hover {
  background: #f3f6fc;
}

.board-menu-item.danger {
  color: #b42318;
}

.board-menu-sep {
  margin: 6px 4px;
  border: 0;
  border-top: 1px solid #e8edf5;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7ddeb;
  border-radius: 999px;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  color: #35415c;
  background: #f9faff;
}

.empty-row td {
  color: #6d7890;
  font-style: italic;
}

@media (max-width: 1160px) {
  .templates-row {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .section-head {
    flex-wrap: wrap;
  }
}

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

  .team-meta,
  .search-input,
  .spaces-head span {
    display: none;
  }

  .spaces-head {
    justify-content: center;
  }

  .templates-row {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}
