/* Shared layout/shell rules extracted safely from repeated selectors */
.rail-top, .rail-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rail-bottom {
  margin-top: auto;
  padding-top: 14px;
  width: calc(100% - 16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #98a1b3;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
  border: 1px solid transparent;
}

.rail-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-bubble-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
  stroke: none;
}

.chat-bubble-icon svg path, .chat-bubble-icon svg circle {
  fill: currentColor;
  stroke: none;
}

.rail-icon:hover {
  color: #ffffff;
  background: #171922;
  border-color: #242735;
  transform: translateY(-1px);
}

.rail-icon.active {
  color: #ffffff;
  background: linear-gradient(180deg, #1b57d0 0%, #144bb5 100%);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 20px rgba(21, 87, 214, 0.28);
}

.rail-icon.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: #63a7ff;
}

.rail-icon.flash:hover {
  color: #ffd257;
  background: rgba(245, 180, 0, 0.08);
  border-color: rgba(245, 180, 0, 0.24);
  box-shadow: 0 8px 18px rgba(245, 180, 0, 0.12);
}

.rail-indicator {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  position: absolute;
  right: 8px;
  bottom: 8px;
  border: 2px solid #0a0b10;
}

.rail-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #0a0b10;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28);
  z-index: 2;
}

.rail-unread-badge.hidden {
  display: none !important;
}

.left-rail {
  background: #0a0b10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
  border-right: 1px solid #12141b;
}

.app {
  height: calc(100vh - 16px);
  background: var(--bg);
  border: 1px solid #0f1015;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 64px 1fr;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top right, rgba(31, 103, 242, 0.08), transparent 28%), linear-gradient(180deg, #12141a 0%, #17181f 100%);
}

.topbar {
  height: 60px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.015);
}

.page-title-wrap h1 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.page-title-wrap p {
  font-size: 12px;
  color: var(--muted);
}
