/* ==========================================================================
   layout — application shell (topbar + side rail)
   ========================================================================== */

.topbar {
  height: 76px;
  padding: 0 5.5%;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 48px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .95);
  z-index: 5;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, serif;
  font-style: italic;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 21px;
}

.topbar nav {
  display: flex;
  gap: 32px;
  height: 100%;
  align-items: center;
}

.topbar nav button {
  font-size: 13px;
  color: #777;
  position: relative;
  height: 100%;
}

.topbar nav .nav-active {
  color: var(--ink);
  font-weight: 600;
}

.nav-active::after {
  content: '';
  height: 2px;
  background: var(--accent);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  color: #777;
  padding: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dedbd2;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

/* side rail */
.side-rail {
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  background: #fff;
  border-right: 1px solid #ecebe8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 22px;
}

.rail-logo {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 21px;
  color: #d91f3d;
  font-weight: 700;
}

.side-rail button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 15px;
  color: #5d5d5a;
  display: grid;
  place-items: center;
  position: relative;
}

.side-rail button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  background: #222;
  color: #fff;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  box-shadow: 0 4px 12px #0002;
}

.side-rail button[data-tooltip]:hover::after {
  opacity: 1;
}

.side-rail .rail-active {
  background: #111;
  color: #fff;
}

.rail-bottom {
  margin-top: auto;
  color: #777;
  font-size: 17px;
}

/* profile dropdown */
.profile-wrap {
  position: relative;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 42px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  width: 170px;
  padding: 14px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.profile-menu b {
  font-size: 12px;
}

.profile-menu small {
  color: #999;
  font-size: 10px;
}

.profile-menu button {
  text-align: left;
  color: var(--accent);
  font-size: 11px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
