/* ========================================
   Nav Page Modern — TDesign-inspired
   ======================================== */

/* --- CSS Variables (Light Theme) --- */
:root {
  /* TDesign Brand */
  --td-brand-color: #0052d9;
  --td-brand-light: #ecf2fe;
  --td-brand-focus: #366ef4;
  --td-brand-hover: #0034b5;

  /* Functional */
  --td-success: #00a870;
  --td-warning: #ed7b2f;
  --td-error: #e34d59;

  /* Text */
  --td-text-primary: #1a2029;
  --td-text-secondary: #4b5b76;
  --td-text-placeholder: #8e9bb3;
  --td-text-disabled: #c5cede;

  /* Background */
  --td-bg-page: #f3f4f9;
  --td-bg-container: #ffffff;
  --td-bg-component: #f3f4f9;
  --td-bg-hover: #ecf0f5;

  /* Border */
  --td-border: #dee3eb;
  --td-border-light: #e7ebf1;

  /* Shadow */
  --td-shadow-1: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --td-shadow-2: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
  --td-shadow-3: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);

  /* Layout */
  --header-h: 56px;
  --sidebar-w: 180px;
  --radius: 10px;
  --radius-sm: 6px;

  /* Scroll progress */
  --scroll-progress: 0%;

  /* Transitions */
  --ease: cubic-bezier(0.38, 0, 0.24, 1);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --td-brand-color: #4787f0;
  --td-brand-light: #1b2a4a;
  --td-brand-focus: #699ef5;
  --td-brand-hover: #5c9bff;

  --td-text-primary: #d4dae4;
  --td-text-secondary: #8b97ad;
  --td-text-placeholder: #5c6b82;
  --td-text-disabled: #3c485c;

  --td-bg-page: #0f1217;
  --td-bg-container: #1a1f2b;
  --td-bg-component: #242a37;
  --td-bg-hover: #2a3142;

  --td-border: #2c3546;
  --td-border-light: #252d3e;

  --td-shadow-1: 0 1px 3px rgba(0,0,0,0.2);
  --td-shadow-2: 0 4px 8px rgba(0,0,0,0.25);
  --td-shadow-3: 0 10px 20px rgba(0,0,0,0.3);
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--td-text-primary);
  background: var(--td-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

a {
  color: var(--td-brand-color);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--td-brand-hover);
}

img { max-width: 100%; height: auto; }

/* ======== HEADER ======== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--td-bg-container);
  border-bottom: 1px solid var(--td-border-light);
  backdrop-filter: saturate(180%) blur(16px);
  background-color: rgba(255,255,255,0.88);
  transition: background-color 0.3s, border-color 0.3s;
}

[data-theme="dark"] header {
  background-color: rgba(26,31,43,0.92);
}

header.scrolled {
  box-shadow: var(--td-shadow-2);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img {
  height: 28px;
  width: auto;
}
.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--td-text-primary);
  white-space: nowrap;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  color: var(--td-text-secondary);
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}
.nav-links a:hover {
  color: var(--td-brand-color);
  background: var(--td-brand-light);
}
.nav-links a.active {
  color: var(--td-brand-color);
  background: var(--td-brand-light);
  font-weight: 500;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  border-radius: 18px;
  background: var(--td-bg-component);
  border: 1px solid var(--td-border);
  transition: all 0.25s var(--ease);
  cursor: text;
  min-width: 200px;
}
.search-box:focus-within {
  border-color: var(--td-brand-color);
  background: var(--td-bg-container);
  box-shadow: 0 0 0 3px rgba(0,82,217,0.1);
  min-width: 260px;
}
.search-box i {
  font-size: 16px;
  color: var(--td-text-placeholder);
  flex-shrink: 0;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--td-text-primary);
  width: 100%;
  font-family: inherit;
}
.search-box input::placeholder {
  color: var(--td-text-placeholder);
}
.search-box kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--td-bg-hover);
  color: var(--td-text-placeholder);
  border: 1px solid var(--td-border);
  flex-shrink: 0;
  line-height: 1.4;
}

/* Header icon buttons — shared base */
.theme-toggle,
.mobile-search-btn,
.mobile-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--td-border);
  background: var(--td-bg-component);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--td-text-secondary);
  transition: all 0.2s;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover,
.mobile-search-btn:active,
.mobile-menu-btn:active {
  background: var(--td-brand-light);
  color: var(--td-brand-color);
  border-color: var(--td-brand-color);
}

/* Hidden on desktop, shown on mobile */
.mobile-search-btn,
.mobile-menu-btn {
  display: none;
}

/* ======== MOBILE SIDEBAR ======== */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-overlay.show {
  display: block;
  opacity: 1;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--td-bg-container);
  z-index: 1200;
  transition: right 0.3s var(--ease);
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.mobile-sidebar.show {
  right: 0;
}
.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--td-border);
  font-weight: 600;
  font-size: 15px;
}
.mobile-sidebar-header button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--td-text-secondary);
  padding: 4px;
}

/* Sidebar footer — theme toggle */
.mobile-sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--td-border);
}
.sidebar-theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--td-border);
  background: var(--td-bg-component);
  color: var(--td-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-theme-toggle i {
  font-size: 18px;
}
.sidebar-theme-toggle:active {
  background: var(--td-brand-light);
  color: var(--td-brand-color);
  border-color: var(--td-brand-color);
}

/* Mobile Fullscreen Search Page */
.mobile-search-page {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--td-bg-page);
  flex-direction: column;
}
.mobile-search-page.show {
  display: flex;
}
.msp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--td-bg-container);
  border-bottom: 1px solid var(--td-border-light);
  flex-shrink: 0;
}
.msp-back {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 20px;
  color: var(--td-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}
.msp-back:active {
  background: var(--td-bg-hover);
}
.msp-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--td-bg-component);
  border-radius: 20px;
}
.msp-input-wrap i {
  font-size: 16px;
  color: var(--td-text-placeholder);
  flex-shrink: 0;
}
.msp-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--td-text-primary);
}
.msp-input-wrap input::placeholder {
  color: var(--td-text-placeholder);
}
.msp-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.msp-results .msr-header {
  position: sticky;
  top: 0;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--td-text-placeholder);
  background: var(--td-bg-page);
  border-bottom: 1px solid var(--td-border-light);
  z-index: 1;
}
.msp-results .msr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--td-border-light);
  background: var(--td-bg-container);
}
.msp-results .msr-item:active {
  background: var(--td-bg-hover);
}
.msp-results .msr-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--td-bg-component);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.msp-results .msr-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.msp-results .msr-icon i {
  font-size: 16px;
  color: var(--td-brand-color);
}
.msp-results .msr-info {
  flex: 1;
  min-width: 0;
}
.msp-results .msr-info h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--td-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.msp-results .msr-info p {
  font-size: 12px;
  color: var(--td-text-placeholder);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.msp-results .msr-page {
  font-size: 11px;
  color: var(--td-text-placeholder);
  background: var(--td-bg-component);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.msp-results .msr-empty {
  text-align: center;
  padding: 60px 16px;
  color: var(--td-text-placeholder);
  font-size: 14px;
}
.msp-results .msr-empty i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  color: var(--td-text-disabled);
}
.msp-results .msr-hint {
  text-align: center;
  padding: 80px 16px;
  color: var(--td-text-placeholder);
  font-size: 14px;
}
.msp-results .msr-hint i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  color: var(--td-text-disabled);
}

/* Sidebar sections */
.mobile-sidebar-section {
  margin-bottom: 8px;
}
.mobile-sidebar-section:last-child {
  margin-bottom: 0;
}
.mobile-sidebar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--td-text-placeholder);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mobile-sidebar-label i {
  font-size: 13px;
}

.mobile-sidebar-nav,
.mobile-sidebar-pages {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-sidebar-pages {
  padding-top: 0;
  border-top: none;
}
.mobile-nav-item,
.mobile-sidebar-pages a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--td-text-secondary);
  font-size: 14px;
  transition: all 0.15s;
}
.mobile-nav-item:hover,
.mobile-sidebar-pages a:hover,
.mobile-sidebar-pages a.active {
  background: var(--td-brand-light);
  color: var(--td-brand-color);
}

/* ======== LAYOUT ======== */
.layout {
  display: flex;
  max-width: 1360px;
  margin: calc(var(--header-h) + 16px) auto 0;
  padding: 0 24px;
  gap: 20px;
  min-height: calc(100vh - var(--header-h) - 100px);
}

/* ======== SIDEBAR ======== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  height: fit-content;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-inner {
  background: var(--td-bg-container);
  border-radius: var(--radius);
  border: 1px solid var(--td-border-light);
  padding: 8px;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--td-text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav li i {
  font-size: 15px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.sidebar-nav li:hover {
  background: var(--td-bg-hover);
  color: var(--td-text-primary);
}
.sidebar-nav li:hover i {
  opacity: 1;
}
.sidebar-nav li.current {
  background: var(--td-brand-light);
  color: var(--td-brand-color);
  font-weight: 500;
}
.sidebar-nav li.current i {
  opacity: 1;
  color: var(--td-brand-color);
}

/* ======== MAIN CONTENT ======== */
.main-content {
  flex: 1;
  min-width: 0;
  padding-bottom: 40px;
}

/* Card Group */
.card-group {
  margin-bottom: 20px;
  animation: fadeInUp 0.4s var(--ease) both;
}

.card-group:nth-child(1) { animation-delay: 0s; }
.card-group:nth-child(2) { animation-delay: 0.06s; }
.card-group:nth-child(3) { animation-delay: 0.12s; }
.card-group:nth-child(4) { animation-delay: 0.18s; }
.card-group:nth-child(5) { animation-delay: 0.24s; }
.card-group:nth-child(6) { animation-delay: 0.3s; }

.card-group.hidden-group {
  display: none;
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.group-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--td-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.group-header h2 i {
  font-size: 17px;
  color: var(--td-brand-color);
}
.group-count {
  font-size: 12px;
  color: var(--td-text-placeholder);
  background: var(--td-bg-component);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

/* Nav Card */
.nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--td-bg-container);
  border: 1px solid var(--td-border-light);
  border-radius: var(--radius);
  transition: all 0.25s var(--ease);
  text-decoration: none;
  cursor: pointer;
}
.nav-card:hover {
  border-color: var(--td-brand-color);
  box-shadow: var(--td-shadow-2);
  transform: translateY(-2px);
}
.nav-card:hover .card-icon {
  background: var(--td-brand-light);
}
.nav-card:hover h3 {
  color: var(--td-brand-color);
}

.nav-card.hidden-card {
  display: none;
}

/* Nav Card Tooltip */
.nav-card[data-tooltip] {
  position: relative;
}
.nav-card[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  max-width: 280px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--td-text-primary);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
  box-shadow: var(--td-shadow-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  pointer-events: none;
  z-index: 100;
}
.nav-card[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 靠近左边缘时向右偏移 */
.card-grid .nav-card[data-tooltip]:first-child::after,
.card-grid .nav-card[data-tooltip]:nth-child(4n+1)::after {
  left: 0;
  transform: translateX(0) translateY(4px);
}
.card-grid .nav-card[data-tooltip]:first-child:hover::after,
.card-grid .nav-card[data-tooltip]:nth-child(4n+1):hover::after {
  transform: translateX(0) translateY(0);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--td-bg-component);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: background 0.25s;
}
.card-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.card-icon i {
  font-size: 20px;
  color: var(--td-brand-color);
}

.card-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.card-info h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--td-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
  line-height: 1.4;
}
.card-info p {
  font-size: 12px;
  color: var(--td-text-placeholder);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  margin-top: 2px;
}

/* No results */
.no-results {
  text-align: center;
  padding: 80px 20px;
}
.no-results i {
  font-size: 48px;
  color: var(--td-text-disabled);
  margin-bottom: 16px;
  display: block;
}
.no-results p {
  font-size: 16px;
  font-weight: 500;
  color: var(--td-text-secondary);
  margin-bottom: 6px;
}
.no-results span {
  font-size: 13px;
  color: var(--td-text-placeholder);
}

/* ======== PAGE MODE (is_page) ======== */
.page-container {
  display: flex;
  max-width: 1100px;
  margin: calc(var(--header-h) + 24px) auto 0;
  padding: 0 24px;
  gap: 24px;
}
.article-content {
  flex: 1;
  background: var(--td-bg-container);
  border: 1px solid var(--td-border-light);
  border-radius: var(--radius);
  padding: 32px;
  line-height: 1.8;
}
.article-content h1 { font-size: 24px; margin-bottom: 24px; }
.article-content h2,
.article-content h3,
.article-content h4,
.article-content p { margin-bottom: 16px; }
.article-content ul,
.article-content ol { margin: 0 0 16px 20px; }
.article-content li { margin-bottom: 8px; }

.page-sidebar {
  width: 260px;
  flex-shrink: 0;
}
.page-sidebar .widget {
  background: var(--td-bg-container);
  border: 1px solid var(--td-border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

/* ======== FOOTER ======== */
footer {
  margin-top: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--td-border-light);
  background: var(--td-bg-container);
}
.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.footer-info p {
  font-size: 12px;
  color: var(--td-text-placeholder);
  margin-bottom: 4px;
}
.footer-info a {
  color: var(--td-text-placeholder);
}
.footer-info a:hover {
  color: var(--td-brand-color);
}

/* ======== GO TOP ======== */
.gotop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 900;
  font-size: 20px;
  color: var(--td-brand-color);
  background: radial-gradient(closest-side, var(--td-bg-container) 85%, transparent 86% 100%),
              conic-gradient(var(--td-brand-color) var(--scroll-progress), var(--td-border) 0);
  border: none;
  box-shadow: var(--td-shadow-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.gotop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.gotop:hover {
  box-shadow: var(--td-shadow-3);
  color: var(--td-brand-hover);
}

/* ======== ANIMATIONS ======== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======== COMING SOON (Empty Page) ======== */
.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 100px);
  margin-top: var(--header-h);
  padding: 40px 24px;
}
.coming-soon-inner {
  text-align: center;
  animation: fadeInUp 0.6s var(--ease) both;
}
.coming-soon-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--td-brand-light), rgba(0,82,217,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  animation: pulse-icon 2.5s ease-in-out infinite;
}
.coming-soon-icon i {
  font-size: 42px;
  color: var(--td-brand-color);
}
.coming-soon h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--td-text-primary);
  margin-bottom: 12px;
}
.coming-soon-desc {
  font-size: 16px;
  color: var(--td-text-secondary);
  margin-bottom: 28px;
}
.coming-soon-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}
.coming-soon-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--td-brand-color);
  opacity: 0.3;
  animation: dot-bounce 1.4s ease-in-out infinite;
}
.coming-soon-dots span:nth-child(2) { animation-delay: 0.2s; }
.coming-soon-dots span:nth-child(3) { animation-delay: 0.4s; }
.coming-soon-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 20px;
  background: var(--td-brand-color);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s var(--ease);
  text-decoration: none;
}
.coming-soon-back:hover {
  background: var(--td-brand-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--td-shadow-2);
}
@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes dot-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.3); }
}

/* ======== GLOBAL SEARCH DROPDOWN ======== */
.search-wrapper {
  position: relative;
}
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--td-bg-container);
  border: 1px solid var(--td-border);
  border-radius: var(--radius);
  box-shadow: var(--td-shadow-3);
  z-index: 2000;
  scrollbar-width: thin;
}
.search-dropdown.show {
  display: block;
  animation: fadeInUp 0.2s var(--ease) both;
}
.search-dropdown-header {
  position: sticky;
  top: 0;
  background: var(--td-bg-container);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--td-text-placeholder);
  border-bottom: 1px solid var(--td-border-light);
  z-index: 1;
}
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  transition: background 0.15s;
  border-bottom: 1px solid var(--td-border-light);
}
.search-dropdown-item:last-child {
  border-bottom: none;
}
.search-dropdown-item:hover,
.search-dropdown-item.active {
  background: var(--td-bg-hover);
}
.search-dropdown-item .sdi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--td-bg-component);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.search-dropdown-item .sdi-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.search-dropdown-item .sdi-icon i {
  font-size: 16px;
  color: var(--td-brand-color);
}
.search-dropdown-item .sdi-info {
  flex: 1;
  min-width: 0;
}
.search-dropdown-item .sdi-info h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--td-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.search-dropdown-item .sdi-info p {
  font-size: 11px;
  color: var(--td-text-placeholder);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.search-dropdown-item .sdi-page {
  font-size: 11px;
  color: var(--td-text-placeholder);
  background: var(--td-bg-component);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.search-dropdown-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--td-text-placeholder);
  font-size: 13px;
}
.search-dropdown-empty i {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
  color: var(--td-text-disabled);
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1100px) {
  .sidebar { display: none; }
  .layout { padding: 0 16px; }
}

@media (max-width: 768px) {
  .header-inner { padding: 0 12px; }
  .nav-links { display: none; }
  .search-wrapper { display: none !important; }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .mobile-search-btn { display: flex !important; }
  .mobile-menu-btn { display: flex !important; }
  .theme-toggle { display: none !important; }

  .layout {
    padding: 0 12px;
    margin-top: calc(var(--header-h) + 12px);
  }
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
  }
  .nav-card {
    padding: 12px;
    gap: 10px;
  }
  .card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .card-icon img { width: 20px; height: 20px; }
  .card-info h3 { font-size: 13px; }
  .card-info p { display: none; }
  .group-header h2 { font-size: 14px; }

  .page-container {
    flex-direction: column;
    padding: 0 12px;
  }
  .page-sidebar { width: 100%; }

  .coming-soon h1 { font-size: 22px; }
  .coming-soon-icon { width: 72px; height: 72px; }
  .coming-soon-icon i { font-size: 32px; }

  footer { margin-top: 16px; padding: 16px 0; }
  .gotop { bottom: 20px; right: 20px; width: 38px; height: 38px; font-size: 18px; }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .nav-card { padding: 10px; }
  .card-icon { width: 30px; height: 30px; }
}
