/* Layout */

.sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

.sidebar-top {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.sidebar-actions { display: flex; gap: 4px; }
.sidebar-actions .icon-btn { width: 30px; height: 30px; }

.search {
  padding: 0 20px 14px;
}

.search input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid transparent;
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.search input::placeholder { color: var(--text-muted); }
.search input:focus { border-color: var(--border); }

.chats {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 16px;
}

.chat-body { flex: 1; min-width: 0; }

.chat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.chat-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.chat-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.chat-preview {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.chat {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  height: 100%;
  overflow: hidden;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header h2 {
  font-size: 14px;
  font-weight: 600;
}

.chat-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.mobile-back { display: none; }

.day {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 0;
}
