/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  /* overflow: hidden;
  height: 100vh;
  display: flex; */
  flex-direction: column;
  color: rgba(0,0,0,0.82);
}

/* ===== TOP NAVIGATION ===== */
.top-nav {
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}

/* Logo + App Menu */
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-grid {
  width: 24px; height: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.app-grid span {
  border: 2px solid #2970ff;
  border-radius: 2px;
  display: block;
}
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #1a56ff 0%, #6eb5ff 100%);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; font-weight: 700;
}
.logo-text {
  font-size: 15px;
  font-weight: 600;
  color: rgba(0,0,0,0.82);
  white-space: nowrap;
}
.logo-text span { color: #276ff5; }

/* Center Tab Switcher */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}
.tab-btn {
  padding: 3px 20px;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(0,0,0,0.5);
  user-select: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn.active {
  background: #fff;
  color: #333;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Right icons */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-icon {
  width: 20px; height: 20px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.nav-icon:hover { opacity: 1; }
.nav-icon svg { width: 20px; height: 20px; }

/* Global search in top nav */
.nav-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(0,0,0,0.04);
  border: 1px solid transparent;
  border-radius: 20px;
  transition: all 0.2s;
  width: 220px;
}
.nav-search-wrap:focus-within {
  background: #fff;
  border-color: #d0d8e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nav-search-icon {
  flex-shrink: 0;
  color: rgba(0,0,0,0.35);
}
.nav-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: rgba(0,0,0,0.82);
  font-family: inherit;
  line-height: 1.4;
}
.nav-search-input::placeholder {
  color: rgba(0,0,0,0.3);
}

/* Global Add Button Popup */
.nav-add-popup {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  border: 1px solid #eee; min-width: 200px; z-index: 9999; padding: 6px 0;
}
.nav-add-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; cursor: pointer; font-size: 14px; color: rgba(0,0,0,0.75);
  transition: background 0.12s;
}
.nav-add-item:hover { background: #f5f6f8; }
.nav-add-item svg { flex-shrink: 0; color: rgba(0,0,0,0.5); }
.nav-add-divider { height: 1px; background: #f0f0f0; margin: 4px 12px; }

.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.nav-avatar-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 1;
}

/* Notification badge */
.notif-badge {
  position: absolute;
  top: -6px; right: -8px;
  min-width: 16px; height: 16px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 1.5px solid #fff;
}

/* ===== NOTIFICATION PANEL ===== */
.notif-panel {
  position: fixed;
  top: 48px; left: 0; right: 0; bottom: 0;
  background: #f8f9fb;
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: notifSlideIn 0.25s ease;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px 0; flex-shrink: 0;
}
.notif-header-left { display: flex; align-items: center; gap: 12px; }
.notif-title { font-size: 20px; font-weight: 700; color: #1a1a1a; margin: 0; }
.notif-unread-count {
  font-size: 12px; color: #276ff5; background: #eef2ff;
  padding: 3px 10px; border-radius: 12px; font-weight: 500;
}
.notif-header-right { display: flex; align-items: center; gap: 10px; }
.notif-mark-all {
  padding: 6px 14px; font-size: 13px; color: #276ff5; background: transparent;
  border: 1px solid #276ff5; border-radius: 8px; cursor: pointer; transition: all 0.15s;
}
.notif-mark-all:hover { background: #eef2ff; }
.notif-close-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.notif-close-btn:hover { background: rgba(0,0,0,0.06); }
.notif-close-btn svg { width: 15px; height: 15px; color: rgba(0,0,0,0.5); }
.notif-tabs {
  display: flex; gap: 4px; padding: 16px 28px 0; flex-shrink: 0;
}
.notif-tab {
  padding: 7px 18px; font-size: 13px; border-radius: 20px;
  cursor: pointer; color: rgba(0,0,0,0.5); transition: all 0.15s; font-weight: 500;
}
.notif-tab:hover { background: #f0f0f0; }
.notif-tab.active { background: #1a1a1a; color: #fff; }
.notif-list {
  flex: 1; overflow-y: auto; padding: 16px 28px 28px;
  display: flex; flex-direction: column; gap: 8px;
}
.notif-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; background: #fff; border: 1px solid #eee;
  border-radius: 14px; cursor: pointer; transition: all 0.15s; position: relative;
}
.notif-item:hover { border-color: #d0d5e0; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.notif-item-read { opacity: 0.55; }
.notif-item-read .notif-item-title { font-weight: 500; }
.notif-dot {
  position: absolute; top: 20px; left: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: #276ff5;
}
.notif-item-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 14px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; }
.notif-item-text { font-size: 13px; color: rgba(0,0,0,0.55); line-height: 1.6; margin-bottom: 8px; }
.notif-item-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notif-item-time { font-size: 12px; color: rgba(0,0,0,0.3); }
.notif-action-btn {
  padding: 4px 12px; font-size: 12px; color: #276ff5; background: #eef2ff;
  border: 1px solid #c7d2fe; border-radius: 6px; cursor: pointer; transition: all 0.15s; font-weight: 500;
}
.notif-action-btn:hover { background: #dbeafe; }
.notif-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 0; flex: 1;
}
.notif-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.notif-empty-text { font-size: 15px; color: rgba(0,0,0,0.3); }

/* ===== SEARCH MODAL ===== */
.srch-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  animation: srchFadeIn 0.15s ease;
}
@keyframes srchFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.srch-modal {
  width: 680px; max-height: 75vh;
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: srchSlideIn 0.2s ease;
}
@keyframes srchSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Input */
.srch-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid #f0f0f0;
}
.srch-input-icon { width: 20px; height: 20px; color: rgba(0,0,0,0.3); flex-shrink: 0; }
.srch-input {
  flex: 1; border: none; outline: none; font-size: 16px;
  color: #1a1a1a; background: transparent; font-family: inherit;
}
.srch-input::placeholder { color: rgba(0,0,0,0.3); }

/* Tabs */
.srch-tabs {
  display: flex; gap: 0; padding: 0 24px;
  border-bottom: 1px solid #f0f0f0; overflow-x: auto;
}
.srch-tab {
  padding: 12px 16px; font-size: 14px; color: rgba(0,0,0,0.5);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; transition: all 0.15s; font-weight: 500;
}
.srch-tab:hover { color: rgba(0,0,0,0.8); }
.srch-tab.active { color: #276ff5; border-bottom-color: #276ff5; }

/* Body */
.srch-body { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* Section */
.srch-section { margin-bottom: 24px; }
.srch-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.srch-section-title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.srch-section-clear {
  font-size: 14px; cursor: pointer; opacity: 0.3; transition: opacity 0.15s;
}
.srch-section-clear:hover { opacity: 0.7; }

/* Recent chips */
.srch-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.srch-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; background: #f8f9fa;
  border: 1px solid #eee; border-radius: 20px;
  cursor: pointer; transition: all 0.15s; font-size: 13px; color: rgba(0,0,0,0.7);
  max-width: 220px;
}
.srch-chip:hover { border-color: #c7d2fe; background: #eef2ff; }
.srch-chip-icon {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.srch-chip-text {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* AI suggestions */
.srch-ai-list { display: flex; flex-direction: column; gap: 2px; }
.srch-ai-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  cursor: pointer; transition: all 0.15s;
  font-size: 14px; color: rgba(0,0,0,0.7);
}
.srch-ai-item:hover { background: #f5f5f5; }
.srch-ai-item svg { color: rgba(0,0,0,0.3); flex-shrink: 0; }

/* Results */
.srch-results { display: flex; flex-direction: column; gap: 4px; }
.srch-result-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 10px;
  cursor: pointer; transition: all 0.15s;
}
.srch-result-item:hover { background: #f5f8ff; }
.srch-result-icon {
  width: 38px; height: 38px; border-radius: 10px; background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.srch-result-info { flex: 1; min-width: 0; }
.srch-result-title { font-size: 14px; font-weight: 600; color: #1a1a1a; margin-bottom: 2px; }
.srch-result-sub { font-size: 12px; color: rgba(0,0,0,0.4); }
.srch-no-result {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 0; color: rgba(0,0,0,0.3); font-size: 14px; gap: 8px;
}
.srch-no-icon { font-size: 32px; opacity: 0.4; }

/* ===== TAB PANELS ===== */
.tab-panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.tab-panel {
  display: none;
  height: 100%;
}
.tab-panel.active { display: flex; }


/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }


/* Toast animation */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
