:root {
  color-scheme: dark;
  --bg: #0a0e14;
  --panel: #12181f;
  --panel2: #0d1117;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --text: rgba(255,255,255,0.95);
  --muted: rgba(255,255,255,0.55);
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 16, 22, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

.brand { 
  font-weight: 700; 
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--text);
}

.topbar .right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wrap { padding: 18px; max-width: 1200px; margin: 0 auto; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.hidden { display: none !important; }

h1, h2, h3 { margin: 0 0 10px; }
.muted { color: var(--muted); }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; margin: 10px 0 6px; color: var(--muted); font-size: 13px; }
input, textarea, select {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  outline: none;
}

.row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.space { justify-content: space-between; align-items: flex-end; }

.btn {
  padding: 2px 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.btn:hover { 
  background: rgba(255,255,255,0.1); 
  border-color: var(--border-hover);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.subtle { 
  background: transparent; 
  border-color: transparent;
  color: var(--muted);
}
.btn.subtle:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.select { min-width: 220px; }

.msg { margin-top: 10px; color: var(--muted); font-size: 13px; min-height: 18px; }

/* Google Sign-In styles */
.authCard {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  max-width: 400px;
  margin: 60px auto;
  text-align: center;
}

.authCard h1 {
  margin-bottom: 8px;
}

.authLogo {
  font-size: 48px;
  margin-bottom: 16px;
}

.authFooter {
  margin-top: 24px;
  font-size: 12px;
}

/* Login Form styles */
.authForm {
  margin: 24px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.authForm .input {
  padding: 12px 14px;
  font-size: 14px;
  text-align: left;
}

.authForm .btn.primary.full {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
}

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-top: 20px;
}

.column {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-height: 400px;
}

.columnHeader {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.columnTitle { 
  font-weight: 600; 
  font-size: 14px;
  color: var(--text);
}

.columnHeader .cardMeta {
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.dropzone {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cardItem {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: grab;
  transition: all 0.15s ease;
}

.cardItem:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}

.cardItem:active { cursor: grabbing; }

.cardItem.dragging {
  opacity: 0.5;
  transform: scale(0.95);
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.cardTitle { font-weight: 500; font-size: 14px; margin-bottom: 6px; }
.cardMeta { color: var(--muted); font-size: 11px; }

.presence {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.pill {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: grid;
  place-items: center;
  padding: 18px;
}
.modalCard {
  width: min(700px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.modalCard.cardModalCard {
  height: min(82vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#cardModalView,
#cardModalEdit {
  overflow: auto;
  min-height: 0;
  padding-right: 6px;
}

.cardViewDesc {
  margin-top: 12px;
}
.modalCard.small {
  width: min(400px, 100%);
}

/* Navigation tabs */
.mainNav {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
  border-radius: 10px;
}
.navTab {
  padding: 7px 16px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s;
}
.navTab:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.navTab.active {
  background: rgba(255,255,255,0.1);
  color: var(--text);
}

.navBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 600;
  background: #ef4444;
  color: white;
  border-radius: 9px;
  margin-left: 6px;
}

/* Wiki layout */
.wikiLayout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  min-height: calc(100vh - 140px);
}
@media (max-width: 800px) {
  .wikiLayout {
    grid-template-columns: 1fr;
  }
  .wikiSidebar {
    max-height: 300px;
    overflow-y: auto;
  }
}

.wikiSidebar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}
.sidebarHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebarHeader h3 {
  margin: 0;
  font-size: 14px;
}

.btn.small {
  padding: 6px 8px;
  font-size: 12px;
}

/* Folder tree */
.folderTree {
  font-size: 14px;
}
.folderItem, .docItem {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}
.folderItem:hover, .docItem:hover {
  background: rgba(255,255,255,0.06);
}
.docItem.active {
  background: rgba(255,255,255,0.1);
}
.folderItem {
  font-weight: 600;
}
.folderItem .folderName {
  flex: 1;
}
.folderItem .addDocToFolder {
  opacity: 0;
  padding: 2px 8px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.folderItem:hover .addDocToFolder {
  opacity: 1;
}
.folderItem .addDocToFolder:hover {
  background: rgba(255,255,255,0.15);
}
.folderItem .folderIcon {
  transition: transform 0.15s;
}
.folderItem.open .folderIcon {
  transform: rotate(90deg);
}
.folderChildren {
  margin-left: 16px;
  display: none;
}
.folderItem.open + .folderChildren {
  display: block;
}
.rootDocs {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Wiki main area */
.wikiMain {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  min-height: 400px;
}

.wikiEmpty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  text-align: center;
}
.emptyIcon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* Doc viewer */
.docHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.docHeader h2 {
  margin: 0 0 4px;
}
.docMeta {
  font-size: 13px;
}

.docContent {
  line-height: 1.7;
  min-height: 200px;
  padding: 0 24px;
}

.btn.danger {
  color: #f87171;
}
.btn.danger:hover {
  background: rgba(248, 113, 113, 0.15);
}

/* Markdown rendered content */
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  font-weight: 600;
}
.markdown-body h1 { font-size: 1.8em; }
.markdown-body h2 { font-size: 1.5em; }
.markdown-body h3 { font-size: 1.25em; }
.markdown-body p { margin: 0.8em 0; }
.markdown-body ul, .markdown-body ol {
  margin: 0.8em 0;
  padding-left: 1.5em;
}
.markdown-body li { margin: 0.3em 0; }
.markdown-body code {
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
}
.markdown-body pre {
  background: rgba(0,0,0,0.3);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1em 0;
}
.markdown-body pre code {
  background: none;
  padding: 0;
}
.markdown-body blockquote {
  border-left: 3px solid var(--border);
  margin: 1em 0;
  padding-left: 16px;
  color: var(--muted);
}
.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5em 0;
}
.markdown-body a {
  color: #60a5fa;
}
.markdown-body strong { font-weight: 600; }
.markdown-body em { font-style: italic; }

/* Comments */
.commentsSection {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.commentsSection h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.commentsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.commentItem {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.commentHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.commentAuthor {
  font-weight: 600;
  font-size: 13px;
}
.commentDate {
  font-size: 12px;
  color: var(--muted);
}
.commentBody {
  font-size: 14px;
  line-height: 1.5;
}
.commentDelete {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  margin-left: 8px;
}
.commentDelete:hover {
  color: #f87171;
}

.addComment {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.addComment textarea {
  flex: 1;
  resize: vertical;
}

/* Doc editor */
.editorHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.docTitleInput {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  padding: 10px 12px;
}
.folderBadge {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.select.small {
  min-width: 140px;
}

.editorTabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.editorTab {
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.editorTab.active {
  background: var(--panel2);
  color: var(--text);
}

.markdownToolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  align-items: center;
}
.mdBtn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.mdBtn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--border);
}
.mdBtn:active {
  background: rgba(255,255,255,0.15);
}
.toolbarDivider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.editorTextarea {
  width: 100%;
  min-height: 400px;
  padding: 14px;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  border-radius: 0 0 8px 8px;
}

.editorPreview {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  padding: 14px;
  min-height: 400px;
}

/* ============ TEAM VIEW ============ */
.teamHeader {
  margin-bottom: 20px;
}

.teamHeader h2 {
  margin-bottom: 4px;
}

.teamGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.teamMemberCard {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.memberActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.teamMemberCard:hover {
  background: var(--panel2);
  border-color: rgba(255,255,255,0.15);
}

.memberAvatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.memberAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memberInfo {
  flex: 1;
  min-width: 0;
}

.memberName {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memberEmail {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memberTitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.memberRoles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.memberRoleBadge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  white-space: nowrap;
}

/* Role Section Divider */
.roleSectionDivider {
  grid-column: 1 / -1;
  margin: 16px 0;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  color: var(--accent);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roleSectionDivider .roleDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ============ CHAT VIEW ============ */
.chatLayout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  min-height: calc(100vh - 140px);
}

@media (max-width: 900px) {
  .chatLayout {
    grid-template-columns: 1fr;
  }
}

.chatSidebar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chatSidebar .sidebarHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.chatSidebar .sidebarHeader h3 {
  margin: 0;
  font-size: 15px;
}

.chatThreadList {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  min-height: 0;
}

.chatThreadItem {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.chatThreadItem:hover {
  background: rgba(255,255,255,0.05);
}

.chatThreadItem.active {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.chatThreadText {
  flex: 1;
  min-width: 0;
}

.chatThreadName {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatThreadPreview {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatUnseenDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.chatMain {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chatEmpty {
  padding: 18px;
  text-align: center;
}

.chatThread {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chatHeader {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chatMessages {
  background: var(--bg);
  border: none;
  border-radius: 0;
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.chatMessageGroup {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 4px;
  justify-content: flex-start;
}

.chatMessageGroup.mine {
  justify-content: flex-end;
}

.chatAvatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  order: 0;
}

.chatMessageGroup.mine .chatAvatar {
  order: 2;
}

.chatBubble {
  max-width: 60%;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  order: 1;
}

.chatMessageGroup.mine .chatBubble {
  background: var(--accent);
}

.chatMessageGroup.mine .chatBody {
  color: #fff;
}

.chatMessageGroup.mine .chatTimestamp {
  color: rgba(255,255,255,0.85);
}

.chatContent {
  flex: 1;
  min-width: 0;
}

.chatAuthor {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
  display: none;
}

.chatMessageGroup.mine .chatAuthor {
  display: none;
}

.chatTimestamp {
  font-size: 12px;
  color: var(--muted);
}

.chatBody {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}

.chatComposer {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}


/* ============ PROFILE / PORTFOLIO VIEW ============ */
.portfolioContainer {
  max-width: 1100px;
  margin: 0 auto;
}

/* Hero Section */
.portfolioHero {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: visible;
  margin-bottom: 20px;
}

.heroBanner {
  height: 180px;
  background: linear-gradient(135deg, #1a1f2e 0%, #0d1117 50%, #1e293b 100%);
  background-size: cover;
  background-position: center;
}

.heroContent {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 0 24px 24px;
  margin-top: -50px;
  position: relative;
}

.portfolioHero .profileAvatarLarge {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--panel);
  border: 4px solid var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.portfolioHero .profileAvatarLarge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heroInfo {
  flex: 1;
  padding-bottom: 8px;
}

.heroInfo h1 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 700;
}

.heroInfo .profileTitle {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 500;
}

.heroInfo .profileEmail {
  font-size: 14px;
}

.profileActions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.profileMenuWrapper {
  position: relative;
  z-index: 150;
}

/* Stats Bar */
.portfolioStats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.statItem {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.15s;
}

.statItem:hover {
  border-color: var(--border-hover);
}

.statNumber {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.statLabel {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Portfolio Grid */
.portfolioGrid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

@media (max-width: 900px) {
  .portfolioGrid {
    grid-template-columns: 1fr;
  }
  .portfolioStats {
    grid-template-columns: repeat(2, 1fr);
  }
  .heroContent {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -60px;
  }
  .portfolioHero #editProfileBtn {
    margin-top: 12px;
  }
}

.portfolioMain {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.portfolioSidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Portfolio Cards */
.portfolioCard {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.portfolioCard .cardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.portfolioCard .cardHeader h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

/* Bio Text */
.bioText {
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text);
}

/* Skills Grid */
.skillsGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skillTag {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.skillTag.muted {
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  border-color: var(--border);
}

/* Activity List */
.activityList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activityItem {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.activityIcon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.activityIcon.doc { background: rgba(34, 197, 94, 0.15); }
.activityIcon.card { background: rgba(168, 85, 247, 0.15); }
.activityIcon.comment { background: rgba(251, 191, 36, 0.15); }

.activityContent {
  flex: 1;
  min-width: 0;
}

.activityTitle {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activityMeta {
  font-size: 12px;
  color: var(--muted);
}

/* Links List */
.linksList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.linkItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}

.linkItem:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-hover);
}

.linkIcon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.linkText {
  font-size: 14px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Projects List */
.projectsList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.projectItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.projectIcon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
}

.projectName {
  font-size: 14px;
  font-weight: 500;
}

.projectRole {
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

/* Current Time Info */
.currentTimeInfo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.timeDisplay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.timeValue {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

.timeZone {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Empty State */
.emptyState {
  text-align: center;
  padding: 16px;
  font-size: 13px;
}

/* Profile Modal Enhancements */
.profileModalCard {
  max-width: 500px;
  width: 100%;
}

.modalTabs {
  display: flex;
  gap: 4px;
  margin: 16px 0;
  padding: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}

.modalTab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}

.modalTab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.modalTab.active {
  background: var(--accent);
  color: white;
}

.modalTabContent {
  min-height: 200px;
}

.modalTabContent.hidden {
  display: none;
}

/* Header Avatar (keep existing) */
.headerAvatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s;
}

.headerAvatar:hover {
  border-color: rgba(255,255,255,0.3);
}

.headerAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headerAvatar .avatarPlaceholder {
  font-size: 18px;
}

#editProfileBtn {
  margin-left: auto;
}

/* ============ ROLES MANAGEMENT ============ */

.rolesLayout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: calc(100vh - 200px);
}

@media (max-width: 900px) {
  .rolesLayout {
    grid-template-columns: 1fr;
  }
}

.rolesSidebar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  height: fit-content;
}

.rolesSidebar .sidebarHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.rolesSidebar .sidebarHeader h3 {
  margin: 0;
  font-size: 15px;
}

.rolesList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roleItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.roleItem:hover {
  background: rgba(255,255,255,0.05);
}

.roleItem.active {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.roleItemContent {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}

.roleBadge {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.roleItemName {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.roleItemCount {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 10px;
}

.roleItemButtons {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.roleItem:hover .roleItemButtons {
  opacity: 1;
}

.roleBtn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 28px;
}

.roleBtn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgb(59, 130, 246);
  color: rgb(59, 130, 246);
}

.roleBtn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.rolesMain {
  min-height: 400px;
}

.rolesEmpty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  height: 100%;
}

.rolesEmpty .emptyIcon {
  font-size: 48px;
  margin-bottom: 16px;
}

.rolesEmpty h3 {
  margin: 0 0 8px;
}

.roleDetails {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.roleHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.roleHeaderInfo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.roleHeaderInfo .roleBadge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.roleHeaderInfo h2 {
  margin: 0;
  font-size: 20px;
}

.roleHeaderInfo .muted {
  margin: 0;
  font-size: 13px;
}

.roleSection {
  margin-bottom: 28px;
}

.roleSection:last-child {
  margin-bottom: 0;
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sectionHeader h3 {
  margin: 0;
  font-size: 15px;
}

.roleMembersList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roleMember {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
}

.roleMember .memberAvatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}

.roleMember .memberAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.roleMember .memberName {
  font-size: 13px;
  font-weight: 500;
}

.roleMember .removeMember {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.roleMember .removeMember:hover {
  opacity: 1;
}

.folderPermList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.folderPermItem {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 10px;
}

.folderPermItem .folderIcon {
  font-size: 18px;
}

.folderPermItem .folderName {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.folderPermItem .permBadges {
  display: flex;
  gap: 6px;
}

.permBadge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.permBadge.view {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.permBadge.edit {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.folderPermItem .removePerm {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.folderPermItem .removePerm:hover {
  opacity: 1;
}

/* Color Picker */
.colorPicker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.colorPicker input[type="color"] {
  width: 50px;
  height: 38px;
  padding: 2px;
  border-radius: 8px;
  cursor: pointer;
}

.colorPreview {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

/* Permission Options */
.permOptions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
}

.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Admin Only Nav Tab */
.navTab.adminOnly {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.navTab.adminOnly.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Empty members/permissions state */
.roleMembersList:empty::after,
.folderPermList:empty::after {
  content: "None yet";
  color: var(--muted);
  font-size: 13px;
  padding: 16px;
  display: block;
}

.small {
  font-size: 12px;
}

/* Profile Roles */
.profileRoles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.profileRoleBadge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
}

.profileRoleBadge .roleDot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Role Options in Modal */
.roleOptions {
  margin: 16px 0;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.roleOptions .checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.checkboxHint {
  width: 100%;
  font-size: 11px;
  color: var(--muted);
  margin-left: 28px;
  margin-top: 2px;
}

/* View All Badge */
.viewAllBadge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-weight: 600;
  margin-left: 6px;
}

/* ============ USERS MANAGEMENT ============ */
.usersHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.usersHeader h2 {
  margin-bottom: 4px;
}

.usersTableContainer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.usersTable {
  width: 100%;
  border-collapse: collapse;
}

.usersTable th,
.usersTable td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.usersTable th {
  background: rgba(255,255,255,0.03);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.usersTable tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.usersTable tbody tr:last-child td {
  border-bottom: none;
}

.userCell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.userCellAvatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}

.userCellAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.userCellName {
  font-weight: 500;
}

.userActions {
  display: flex;
  gap: 8px;
}

.userActions .btn {
  padding: 6px 12px;
  font-size: 12px;
}

.adminBadge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  font-weight: 600;
  margin-left: 8px;
}

.usersEmpty {
  padding: 60px 20px;
  text-align: center;
}

.usersEmpty .emptyIcon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* ============ PROJECT SELECTOR ============ */
.projectSelector {
  position: relative;
}

.projectSelectorBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
  font-weight: 500;
}

.projectSelectorBtn:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-hover);
}

.projectSelectorBtn .dropdownArrow {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.projectSelector.open .projectSelectorBtn .dropdownArrow {
  transform: rotate(180deg);
}

.projectDropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  min-width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 200;
  overflow: hidden;
}

.projectList {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.projectItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.projectItem:hover {
  background: rgba(255,255,255,0.06);
}

.projectItem.active {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.projectItem .projectIcon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel2);
  border-radius: 8px;
}

.projectItem .projectInfo {
  flex: 1;
  min-width: 0;
}

.projectItem .projectName {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projectItem .projectDesc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projectItem .studioBadge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  font-weight: 600;
}

.projectDropdownFooter {
  padding: 8px;
  border-top: 1px solid var(--border);
}

/* ============ PROJECT MANAGEMENT MODAL ============ */
.projectManageLayout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  min-height: 400px;
  margin-top: 16px;
}

#projectModal .modalCard {
  max-width: 800px;
  width: 90%;
}

.projectManageList {
  border-right: 1px solid var(--border);
  padding-right: 20px;
}

.projectManageHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.projectManageHeader h4 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.projectManageItems {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.projectManageItem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.projectManageItem:hover {
  background: rgba(255,255,255,0.04);
}

.projectManageItem.selected {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.projectManageItem .projectIcon {
  font-size: 18px;
}

.projectManageItem .projectName {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

.projectManageDetails {
  padding-left: 20px;
}

.projectManageDetails .emptyState {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
}

.projectDetailHeader {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.projectDetailIcon {
  font-size: 40px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel2);
  border-radius: 12px;
}

.projectDetailInfo {
  flex: 1;
}

.projectDetailInfo h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.projectDetailInfo .projectDesc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.projectDetailActions {
  display: flex;
  gap: 8px;
}

.projectSection {
  margin-bottom: 24px;
}

.projectSection h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.projectMemberList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.projectMemberItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--panel2);
  border-radius: 8px;
}

.projectMemberItem .memberAvatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}

.projectMemberItem .memberAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projectMemberItem .memberInfo {
  flex: 1;
}

.projectMemberItem .memberName {
  font-weight: 500;
  font-size: 14px;
}

.projectMemberItem .memberEmail {
  font-size: 12px;
  color: var(--muted);
}

.projectMemberItem .memberRole {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  text-transform: capitalize;
}

.projectMemberItem .removeBtn {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.projectMemberItem:hover .removeBtn {
  opacity: 1;
}

.projectBoardList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.projectBoardItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--panel2);
  border-radius: 8px;
}

.projectBoardItem .boardName {
  font-weight: 500;
  font-size: 14px;
}

/* Icon Picker */
.iconPicker {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.iconInput {
  width: 60px !important;
  text-align: center;
  font-size: 24px;
  padding: 8px !important;
}

.iconSuggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.iconOption {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--panel2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.iconOption:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.1);
}
/* ============ NOTIFICATIONS ============ */

.notificationContainer {
  position: relative;
}

.headerBtn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}

.headerBtn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--border-hover);
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  background: #ef4444;
  color: white;
  border-radius: 10px;
  border: 2px solid var(--bg);
}

.notificationDropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 380px;
  max-width: 500px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  z-index: 300;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 500px;
}

.notificationHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.notificationHeader h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

#markAllReadBtn {
  padding: 4px 8px;
  font-size: 12px;
}

.notificationList {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.notificationItem {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  align-items: flex-start;
}

.notificationItem:hover {
  background: rgba(255,255,255,0.04);
}

.notificationItem.unread {
  background: rgba(59, 130, 246, 0.08);
}

.notificationItem:last-child {
  border-bottom: none;
}

.notificationAvatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.notificationContent {
  flex: 1;
  min-width: 0;
}

.notificationSender {
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
}

.notificationMessage {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.notificationTime {
  font-size: 11px;
  color: var(--muted);
}

.notificationEmpty {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* Profile Menu Dropdown */
.profileMenuWrapper {
  position: relative;
}

.profileMenu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 999;
  overflow: hidden;
  padding: 6px;
}

.profileMenuItem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  transition: background 0.15s ease;
}

.profileMenuItem:hover {
  background: var(--hover);
}

.profileMenuDivider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}