/* ============================================================
   TRT Tracker – Desktop Sidebar Component
   ============================================================ */

/* Hidden on mobile (no .desktop-mode on body) */
.desktop-sidebar {
  display: none;
}

/* ── Sidebar Container ───────────────────────────────────── */

.desktop-mode .desktop-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--surface2);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  flex-shrink: 0;
}

/* ── Brand / Logo ────────────────────────────────────────── */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 24px 24px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), #1565c0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.25);
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.sidebar-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

/* ── Navigation Links ────────────────────────────────────── */

.sidebar-nav {
  flex: 1;
  padding: 4px 12px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
  padding: 16px 16px 8px;
  opacity: 0.6;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  margin-bottom: 2px;
  position: relative;
  user-select: none;
}

.sidebar-link i {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.15s;
}

.sidebar-link span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-link:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(25, 118, 210, 0.12);
  color: var(--primary-light);
  font-weight: 600;
}

.sidebar-link.active i {
  color: var(--primary-light);
}

/* Accent injection link */
.sidebar-link.sidebar-link-accent {
  color: var(--accent);
}

.sidebar-link.sidebar-link-accent:hover {
  background: rgba(255, 152, 0, 0.1);
}

.sidebar-link.sidebar-link-accent.active {
  background: rgba(255, 152, 0, 0.12);
  color: var(--accent);
}

/* ── Divider ─────────────────────────────────────────────── */

.sidebar-divider {
  height: 1px;
  background: var(--surface2);
  margin: 8px 20px;
}

/* ── Footer ──────────────────────────────────────────────── */

.sidebar-footer {
  padding: 12px 16px 20px;
  border-top: 1px solid var(--surface2);
  flex-shrink: 0;
}

/* Sync trigger */
.sidebar-sync {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 10px;
}

.sidebar-sync:hover {
  background: var(--surface2);
}

.sidebar-sync .sync-indicator {
  width: 8px;
  height: 8px;
}

.sidebar-sync-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* User area */
.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 0;
}

.sidebar-username {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  background: none;
  border: 1px solid var(--surface2);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(244, 67, 54, 0.06);
}
