/* OCA Team Dashboard v2: Layout CSS
   Covers: TopBar, NavRail, ThreadsColumn
*/

/* ── TopBar ──────────────────────────────────────────────────────────────── */

.topbar {
  height: 54px;
  background: var(--surface-0);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  flex-shrink: 0;
  z-index: 5;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 8px;
}

.topbar__coin {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background-color: var(--teal);
  background-image: linear-gradient(
    180deg,
    rgba(255,255,255,.18) 0%,
    rgba(255,255,255,0) 55%,
    rgba(0,0,0,.08) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 1px 2px rgba(15,19,24,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Francois One', sans-serif;
  font-size: 12px;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.topbar__title {
  font-family: 'Francois One', sans-serif;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--ink-1);
  white-space: nowrap;
}

.topbar__title-sep {
  color: var(--red);
}

.topbar__spacer {
  flex: 1;
}

.topbar__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  height: 32px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .12s, border-color .12s;
}

.topbar__pill:hover {
  background: var(--hover);
}

.topbar__pill--badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .05em;
}

.topbar__pill--name {
  font-size: 13px;
  color: var(--ink-1);
  font-weight: 500;
}

.topbar__status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-family: 'Manrope', sans-serif;
  height: 32px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
}

.topbar__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
  flex-shrink: 0;
}

.topbar__status-text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar__icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}

.topbar__icon-btn:hover {
  background: var(--hover-strong);
  color: var(--ink-1);
}


/* ── NavRail ──────────────────────────────────────────────────────────────── */

.navrail {
  width: 76px;
  background: var(--surface-0);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 16px;
  flex-shrink: 0;
}

.navrail__items {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  align-items: center;
  margin-top: 14px;
}

.navrail__item {
  position: relative;
  width: 60px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  transition: background .12s, color .12s;
}

.navrail__item:hover {
  background: var(--hover);
  color: var(--ink-1);
}

.navrail__item.is-active {
  background: var(--hover-strong);
  color: var(--ink-1);
}

.navrail__item-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
}

.navrail__bar {
  position: absolute;
  left: -2px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--teal);
  border-radius: 2px;
}


/* ── ThreadsColumn ────────────────────────────────────────────────────────── */

.threads-col {
  width: 280px;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
}

.threads-col__search-wrap {
  padding: 14px 14px 8px;
}

.threads-col__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--surface-0);
  border: 1px solid var(--border);
  color: var(--ink-3);
}

.threads-col__search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: var(--ink-1);
  min-width: 0;
}

.threads-col__search-input::placeholder {
  color: var(--ink-3);
}

.threads-col__search-kbd {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--hover-strong);
  color: var(--ink-3);
}

.threads-col__new-wrap {
  padding: 0 14px 10px;
}

.threads-col__new-btn {
  width: 100%;
  height: 36px;
  border-radius: 9px;
  border: none;
  background-color: var(--coral);
  background-image: linear-gradient(
    180deg,
    rgba(255,255,255,.20) 0%,
    rgba(255,255,255,0) 55%,
    rgba(0,0,0,.06) 100%
  );
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 1px 2px rgba(15,19,24,.10),
    0 2px 6px rgba(239,123,69,.22);
  transition: transform .08s, box-shadow .12s;
}

.threads-col__new-btn:active,
.threads-col__new-btn.is-pressed {
  transform: translateY(1px);
}

.threads-col__list {
  flex: 1;
  overflow: auto;
  padding: 0 8px 16px;
}

.threads-col__group-label {
  padding: 12px 12px 4px;
  font-family: 'Francois One', sans-serif;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.thread-item {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border: none;
  border-bottom: 1px solid var(--separator);
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  align-items: center;
  position: relative;
  transition: background .12s;
}

.thread-item:hover {
  background: var(--hover);
}

/* last item in a group: no separator */
.thread-item.is-last {
  border-bottom: 1px solid transparent;
}

/* active item: no separator (overrides last rule), card look */
.thread-item.is-active {
  background: var(--surface-0);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  border-bottom: 1px solid transparent;
  margin-bottom: 3px;
  margin-top: 3px;
}

.thread-item__bar {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--teal);
  border-radius: 2px;
}

.thread-item__body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.thread-item__title {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-1);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.thread-item__title.is-unread {
  font-weight: 700;
}

.thread-item__time {
  font-size: 11px;
  color: var(--ink-3);
  flex-shrink: 0;
}

.thread-item__unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--red);
  flex-shrink: 0;
}
