/* ============================================
   BLITZVERSE TEAM PANEL v5
   Dark Theme - CSS Stylesheet
   ============================================ */

/* CSS Custom Properties */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0d0d14;
  --bg-card: #111118;
  --bg-input: #0f0f18;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border-color: rgba(63, 63, 70, 0.4);
  --border-hover: rgba(99, 102, 241, 0.2);
  --violet-400: #8b5cf6;
  --violet-500: #7c3aed;
  --violet-600: #6d28d9;
  --violet-glow: rgba(124, 58, 237, 0.3);
  --amber-400: #f59e0b;
  --emerald-400: #34d399;
  --red-400: #f87171;
  --cyan-400: #22d3ee;
  --pink-400: #f472b6;
  --radius: 0.75rem;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   PARTICLES & BACKGROUND
   ============================================ */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

#particles .particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.4);
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.1; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.3; }
}

.gradient-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
  z-index: 1;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
}

/* Logo */
.logo-section {
  text-align: center;
  margin-bottom: 1.75rem;
}

.hexagon-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}

.logo-title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  background: linear-gradient(135deg, #c084fc 0%, #e879f9 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
}

/* Login Panel */
.login-panel {
  width: 100%;
  padding: 1.75rem 2rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(30, 25, 45, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
  border: 1px solid rgba(139, 92, 246, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
}

/* Corner Accents */
.corner-accent {
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: rgba(139, 92, 246, 0.25);
  border-style: solid;
  border-width: 0;
}
.corner-accent.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 1rem; }
.corner-accent.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 1rem; }
.corner-accent.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 1rem; }
.corner-accent.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 1rem; }

/* User Badge */
.user-badge {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.badge-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.rank-owner  { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.25); }
.rank-admin  { background: rgba(239, 68, 68, 0.12); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); }
.rank-dev    { background: rgba(6, 182, 212, 0.12); color: #06b6d4; border: 1px solid rgba(6, 182, 212, 0.25); }
.rank-mod    { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.25); }
.rank-sup    { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.25); }
.rank-user   { background: rgba(107, 114, 128, 0.12); color: #6b7280; border: 1px solid rgba(107, 114, 128, 0.25); }

.panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.panel-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Form */
#loginForm {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid rgba(63, 63, 70, 0.5);
  color: white;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: #52525b;
}

.form-input:focus {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

.password-wrapper {
  position: relative;
}

.password-wrapper .form-input {
  padding-right: 4.5rem;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0.25rem;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--text-secondary);
}

.login-error {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.login-success {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-login {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
}

.btn-login:active {
  transform: scale(0.98);
}

.btn-login:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Features Grid */
.features-section {
  margin-top: 1.25rem;
}

.features-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.features-divider div {
  flex: 1;
  height: 1px;
  background: rgba(63, 63, 70, 0.4);
}

.features-divider span {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  white-space: nowrap;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(15, 15, 24, 0.8);
  border: 1px solid rgba(63, 63, 70, 0.3);
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}

.feature-item:hover {
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--text-secondary);
}

.feature-item span {
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(63, 63, 70, 0.2);
}

.status-bar > span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online { background: var(--emerald-400); box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
.status-dot.auth { background: var(--violet-400); }

.login-footer {
  margin-top: 1.25rem;
  font-size: 0.6rem;
  color: #3f3f46;
  letter-spacing: 0.1em;
}

/* ============================================
   SIDEBAR (Dashboard)
   ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 0.3s;
}

.sidebar.collapsed {
  width: 64px;
}

.sidebar-toggle {
  position: absolute;
  right: -12px;
  top: 20px;
  width: 24px;
  height: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  z-index: 101;
}

/* Sidebar Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  line-height: 1.2;
}

.sidebar-logo .logo-text h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #c084fc 0%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo .logo-text span {
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

/* User Info */
.sidebar-user {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  color: white;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  margin: 0 0.5rem;
  border-radius: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  font-family: inherit;
  width: calc(100% - 1rem);
  text-align: left;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--text-secondary);
  background: rgba(63, 63, 70, 0.2);
}

.nav-item.active {
  color: var(--violet-400);
  background: rgba(139, 92, 246, 0.08);
  border-right: 2px solid var(--violet-500);
}

.nav-item .icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  width: 100%;
  border-radius: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-logout:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  padding: 2rem;
  transition: margin-left 0.3s;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header h1 .icon {
  font-size: 1.25rem;
}

.page-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ============================================
   STATS & CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Content Card */
.content-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  margin-bottom: 1rem;
}

.content-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================
   ACTIVITY LIST
   ============================================ */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid rgba(63, 63, 70, 0.2);
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 0.8rem;
  color: white;
  font-weight: 500;
}

.activity-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6rem;
  color: #52525b;
  flex-shrink: 0;
}

/* ============================================
   QUICK ACCESS
   ============================================ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid rgba(63, 63, 70, 0.2);
  cursor: pointer;
  transition: all 0.2s;
  color: inherit;
  text-decoration: none;
}

.quick-item:hover {
  border-color: var(--border-hover);
}

.quick-item .icon {
  font-size: 1.25rem;
}

.quick-item span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================
   ANNOUNCEMENTS
   ============================================ */
.announcement {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.announcement:hover {
  border-color: var(--border-hover);
}

.announcement.pinned {
  border-color: rgba(245, 158, 11, 0.15);
}

.announcement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.announcement-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.announcement-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.announcement-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.65rem;
  color: #52525b;
}

/* ============================================
   TASKS
   ============================================ */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.filter-tab:hover {
  border-color: var(--border-hover);
}

.filter-tab.active {
  background: rgba(139, 92, 246, 0.1);
  color: var(--violet-400);
  border-color: rgba(139, 92, 246, 0.25);
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.task-item:hover {
  border-color: var(--border-hover);
}

.task-status {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
  margin-bottom: 0.25rem;
}

.priority-badge {
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  font-weight: 600;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  color: #52525b;
}

/* ============================================
   TEAM OVERVIEW
   ============================================ */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rank-card {
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  text-align: center;
}

.rank-icon {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-size: 1.1rem;
}

.rank-count {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

.rank-name {
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* Members Table */
.members-table {
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 2fr 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 2fr 1fr;
  gap: 1rem;
  padding: 0.75rem 1rem;
  align-items: center;
  border-bottom: 1px solid rgba(63, 63, 70, 0.15);
  transition: background 0.15s;
}

.table-row:hover {
  background: var(--bg-primary);
}

.table-row:last-child {
  border-bottom: none;
}

/* ============================================
   POLLS
   ============================================ */
.poll-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  margin-bottom: 0.75rem;
}

.poll-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.poll-question h3 {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.poll-question span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.poll-option {
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.15s;
  cursor: pointer;
}

.poll-option:hover {
  background: rgba(139, 92, 246, 0.05);
}

.poll-option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.poll-option-label span:first-child {
  font-size: 0.8rem;
  color: #d4d4d8;
}

.poll-option-label span:last-child {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.poll-bar {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 9999px;
  overflow: hidden;
}

.poll-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  transition: width 0.5s;
}

/* ============================================
   MEETINGS
   ============================================ */
.meeting-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  margin-bottom: 0.5rem;
}

.meeting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.meeting-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.meeting-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================
   TEAM CHAT
   ============================================ */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.5rem;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.message-author-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.message-time {
  font-size: 0.6rem;
  color: #52525b;
}

.message-text {
  font-size: 0.8rem;
  color: #d4d4d8;
  line-height: 1.4;
}

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  margin-top: 0.75rem;
}

.chat-input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.chat-input-bar input::placeholder {
  color: #52525b;
}

.chat-btn {
  padding: 0.4rem;
  border-radius: 0.375rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s, background 0.2s;
}

.chat-btn:hover {
  color: var(--violet-400);
  background: rgba(139, 92, 246, 0.08);
}

.del-btn {
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 0.7rem;
  padding: 0.2rem;
}

.chat-message:hover .del-btn {
  opacity: 1;
}

/* ============================================
   NOTES
   ============================================ */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.note-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: border-color 0.2s;
  position: relative;
}

.note-card:hover {
  border-color: var(--border-hover);
}

.note-color {
  height: 4px;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.note-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.note-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
}

.note-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.note-card:hover .note-actions {
  opacity: 1;
}

.note-body {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-line;
  margin-bottom: 0.5rem;
}

.note-date {
  font-size: 0.6rem;
  color: #52525b;
}

/* ============================================
   QUICK LINKS
   ============================================ */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.link-card {
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.link-card:hover {
  border-color: var(--border-hover);
}

.link-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.link-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.link-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.link-card:hover .link-actions {
  opacity: 1;
}

.link-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.link-url {
  font-size: 0.7rem;
  color: #52525b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.create-form {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: var(--bg-card);
  margin-bottom: 1.5rem;
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.05);
}

.create-form h2 {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-grid .form-group {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-danger {
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

.btn-secondary {
  color: var(--text-muted);
  background: transparent;
}

.btn-secondary:hover {
  color: white;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.7rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Admin Table */
.admin-table .table-header,
.admin-table .table-row {
  grid-template-columns: 2fr 1.5fr 1fr 2fr 1.5fr;
}

.edit-form {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.15);
  background: var(--bg-primary);
  margin: 0 1rem 1rem;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastSlideIn 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 200px;
}

.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }
.toast.info { background: #3b82f6; }
.toast.warning { background: #f59e0b; }

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
  animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastFadeOut {
  to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
  display: none !important;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.text-right { text-align: right; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(63, 63, 70, 0.4);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(63, 63, 70, 0.6);
}

/* ============================================
   ACTIVITY FEED (Letzte Aktivitaeten)
   ============================================ */
.activity-section {
  margin-top: 2rem;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.activity-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activity-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.activity-list {
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  overflow: hidden;
}

.activity-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(63, 63, 70, 0.15);
  transition: background 0.15s;
  animation: fadeInUp 0.3s ease-out;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: var(--bg-primary);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 0.8rem;
  color: #a1a1aa;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.activity-title strong {
  color: white;
  font-weight: 600;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
}

.activity-user {
  font-weight: 500;
}

.activity-time {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.activity-del-btn {
  opacity: 0;
  transition: all 0.2s ease;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 0.375rem;
  flex-shrink: 0;
  margin-left: 0.25rem;
}

.activity-item:hover .activity-del-btn {
  opacity: 1;
}

.activity-del-btn:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.btn-clear-all {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-size: 0.7rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-all:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    width: 64px;
  }
  .main-content {
    margin-left: 64px;
    padding: 1rem;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
