/* ==========================================================================
   WORKSHOP AUFGABEN PLATTFORM - CORPORATE DESIGN STYLE
   Branding nach Vorgabe:
   - Petrol: #00a0aa (RGB 0, 160, 170)
   - Blau:   #28197d (RGB 40, 25, 121)
   - Gelb:   #fffa46 (RGB 255, 250, 70)
   - Rot:    #eb0005 (RGB 235, 0, 5)
   - Grün:   #afd764 (RGB 175, 215, 100)
   ========================================================================== */

:root {
  --color-petrol: #00a0aa;
  --color-petrol-dark: #007a82;
  --color-petrol-light: #e0f6f7;
  --color-petrol-alpha: rgba(0, 160, 170, 0.15);

  --color-blue: #28197d;
  --color-blue-dark: #190f52;
  --color-blue-light: #eceafd;
  --color-blue-alpha: rgba(40, 25, 121, 0.15);

  --color-yellow: #fffa46;
  --color-yellow-dark: #d4cf00;
  --color-yellow-light: #fffde0;
  --color-yellow-alpha: rgba(255, 250, 70, 0.25);

  --color-red: #eb0005;
  --color-red-dark: #b80004;
  --color-red-light: #ffe5e6;
  --color-red-alpha: rgba(235, 0, 5, 0.15);

  --color-green: #afd764;
  --color-green-dark: #7da534;
  --color-green-light: #f3fae8;
  --color-green-alpha: rgba(175, 215, 100, 0.25);

  --bg-main: #f5f7fa;
  --bg-card: #ffffff;
  --bg-dark-card: #1f145e;
  --text-dark: #1e2229;
  --text-muted: #5e6879;
  --text-light: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 6px rgba(40, 25, 121, 0.06);
  --shadow-md: 0 6px 18px rgba(40, 25, 121, 0.1);
  --shadow-lg: 0 14px 35px rgba(40, 25, 121, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================
   AUTHENTICATION SCREEN
   ========================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at top left, #28197d 0%, #150b44 40%, #0c0629 100%);
  padding: 24px;
  overflow: hidden;
}

.auth-ambient-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.ambient-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.ambient-circle.petrol {
  width: 500px;
  height: 500px;
  background: var(--color-petrol);
  top: -100px;
  right: -100px;
}

.ambient-circle.yellow {
  width: 320px;
  height: 320px;
  background: var(--color-yellow);
  bottom: 50px;
  right: 15%;
  animation-duration: 9s;
}

.ambient-circle.red {
  width: 280px;
  height: 280px;
  background: var(--color-red);
  bottom: -60px;
  left: 10%;
  animation-duration: 14s;
}

.ambient-circle.green {
  width: 220px;
  height: 220px;
  background: var(--color-green);
  top: 25%;
  left: 5%;
  animation-duration: 11s;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-30px) scale(1.08); }
}

.auth-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 36px 40px;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-blue);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-petrol);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.form-control {
  width: 100%;
  height: 46px;
  padding: 10px 14px 10px 44px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--color-petrol);
  box-shadow: 0 0 0 4px var(--color-petrol-alpha);
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.password-toggle-btn:hover {
  color: var(--color-blue);
}

/* Quick Org Selection Chips */
.org-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.org-chip {
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--color-blue);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.org-chip:hover, .org-chip.active {
  background: var(--color-petrol-light);
  border-color: var(--color-petrol);
  color: var(--color-petrol-dark);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 20px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
}

.remember-me input[type="checkbox"] {
  accent-color: var(--color-petrol);
  width: 16px;
  height: 16px;
}

/* Primary Submit Button */
.btn-primary {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--color-petrol) 0%, var(--color-blue) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(40, 25, 121, 0.25);
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(40, 25, 121, 0.35);
}

/* 3-Tier Demo Logins */
.demo-divider {
  display: flex;
  align-items: center;
  margin: 22px 0 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-divider::before,
.demo-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.demo-divider span {
  padding: 0 12px;
}

.demo-accounts-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-demo-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.btn-demo-role:hover {
  background: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-demo-role.admin:hover { border-color: var(--color-blue); }
.btn-demo-role.leitung:hover { border-color: var(--color-petrol); }
.btn-demo-role.teilnehmer:hover { border-color: var(--color-green); }

.role-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-icon-box.admin { background: #efeefe; color: var(--color-blue); }
.role-icon-box.leitung { background: var(--color-petrol-light); color: var(--color-petrol-dark); }
.role-icon-box.teilnehmer { background: var(--color-green-light); color: var(--color-green-dark); }

.role-titles {
  display: flex;
  flex-direction: column;
}

.role-title-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.role-desc-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================
   APP HEADER & NAVIGATION
   ========================================== */
.app-header {
  background: linear-gradient(135deg, var(--color-blue-dark) 0%, var(--color-blue) 60%, var(--color-petrol-dark) 100%);
  color: white;
  padding: 14px 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-wrap {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-org-select-wrap {
  margin-top: 3px;
}

.org-selector-select {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.org-selector-select option {
  color: var(--text-dark);
  background: white;
}

/* Sprint Timer Widget in Header */
.sprint-timer-widget {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-yellow);
}

.timer-digits {
  font-family: monospace;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
  color: white;
}

.timer-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.timer-btn:hover {
  background: var(--color-yellow);
  color: var(--color-blue);
}

/* User & Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-help-raise {
  background: var(--color-red);
  color: white;
  border: none;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(235, 0, 5, 0.35);
  transition: var(--transition);
}

.btn-help-raise:hover {
  background: var(--color-red-dark);
}

.btn-help-raise.active {
  animation: pulseRed 1.4s infinite;
}

@keyframes pulseRed {
  0% { box-shadow: 0 0 0 0 rgba(235, 0, 5, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(235, 0, 5, 0); }
  100% { box-shadow: 0 0 0 0 rgba(235, 0, 5, 0); }
}

.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-petrol);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  border: 2px solid white;
}

.user-avatar.admin {
  background: #ffb703;
  color: var(--color-blue-dark);
}

.user-avatar.leitung {
  background: var(--color-yellow);
  color: var(--color-blue-dark);
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-meta .name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.user-meta .role-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.role-tag.admin { color: #ffe066; }
.role-tag.leitung { color: #fffa46; }
.role-tag.teilnehmer { color: #afd764; }

.btn-logout {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-logout:hover {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   ROLE-SPECIFIC MANAGEMENT TOOLBAR (ADMIN / LEITUNG)
   ========================================== */
.role-admin-bar {
  background: #ffffff;
  border-bottom: 2px solid var(--border-color);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.role-bar-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.role-bar-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.role-pill-badge.admin {
  background: #efeefe;
  color: var(--color-blue);
  border: 1px solid var(--color-blue);
}

.role-pill-badge.leitung {
  background: var(--color-petrol-light);
  color: var(--color-petrol-dark);
  border: 1px solid var(--color-petrol);
}

.role-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-role-action {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid var(--border-color);
  background: #f8fafc;
  color: var(--color-blue);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-role-action:hover {
  background: white;
  border-color: var(--color-petrol);
  color: var(--color-petrol-dark);
}

.btn-role-action.primary {
  background: var(--color-petrol);
  color: white;
  border-color: var(--color-petrol);
}

.btn-role-action.primary:hover {
  background: var(--color-petrol-dark);
}

/* ==========================================
   WORKSHOP HERO & PROGRESS BANNER
   ========================================== */
.workshop-hero {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 22px 0;
  margin-bottom: 24px;
}

.hero-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.hero-main h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-blue);
  margin-bottom: 6px;
}

.hero-details-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-detail-item svg {
  color: var(--color-petrol);
}

/* Progress & Stats Card */
.hero-stats-card {
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

.stat-metric {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-blue);
  line-height: 1;
}

.stat-value.xp {
  color: var(--color-petrol);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.progress-box {
  width: 170px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-petrol) 0%, var(--color-green) 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ==========================================
   MAIN DASHBOARD CONTENT
   ========================================== */
.main-layout {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* Toolbar & Filters */
.tasks-toolbar {
  background: white;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-tab {
  padding: 7px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover {
  background: #edf2f7;
  color: var(--color-blue);
}

.filter-tab.active {
  background: var(--color-blue);
  color: white;
  border-color: var(--color-blue);
}

.filter-tab .badge {
  display: inline-block;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  font-size: 11px;
  margin-left: 6px;
}

.filter-tab:not(.active) .badge {
  background: #e2e8f0;
  color: var(--text-dark);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-select {
  padding: 7px 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-dark);
  background: white;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.category-select:focus {
  border-color: var(--color-petrol);
}

.btn-add-task {
  padding: 8px 16px;
  background: var(--color-petrol);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 160, 170, 0.25);
  transition: var(--transition);
}

.btn-add-task:hover {
  background: var(--color-petrol-dark);
  transform: translateY(-1px);
}

/* ==========================================
   TASKS GRID & CARDS
   ========================================== */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  gap: 22px;
}

.task-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.task-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.task-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--color-petrol);
}

.task-card[data-urgency="high"]::before { background: var(--color-red); }
.task-card[data-urgency="medium"]::before { background: var(--color-yellow); }
.task-card[data-urgency="low"]::before { background: var(--color-green); }

.task-card.is-draft {
  background: #fbfbfd;
  border-style: dashed;
  border-color: #cbd5e1;
}

.task-card.is-completed {
  border-color: var(--color-green);
  background: #fbfdf9;
}

.task-card.is-completed::before {
  background: var(--color-green);
}

/* Freigabestatus Banner in Task Card */
.task-publish-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
}

.task-publish-bar.published {
  background: var(--color-green-light);
  color: var(--color-green-dark);
  border: 1px solid rgba(175, 215, 100, 0.4);
}

.task-publish-bar.draft {
  background: var(--color-yellow-light);
  color: #7a6e00;
  border: 1px solid rgba(255, 250, 70, 0.5);
}

.btn-toggle-publish {
  background: white;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle-publish:hover {
  background: currentColor;
  color: white;
}

/* Card Header */
.task-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.task-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pill.category {
  background: var(--color-petrol-light);
  color: var(--color-petrol-dark);
}

.pill.urgency-high {
  background: var(--color-red-light);
  color: var(--color-red-dark);
}

.pill.urgency-medium {
  background: var(--color-yellow-light);
  color: #7a6e00;
}

.pill.urgency-low {
  background: var(--color-green-light);
  color: var(--color-green-dark);
}

.task-time-pts {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.task-points-badge {
  background: var(--color-yellow);
  color: var(--color-blue-dark);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

.task-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-blue);
  line-height: 1.35;
  margin-bottom: 8px;
}

.task-description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Checklist in Card */
.task-checklist {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 14px;
}

.checklist-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
}

.checklist-item input[type="checkbox"] {
  accent-color: var(--color-petrol);
  margin-top: 3px;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.checklist-item.done span {
  text-decoration: line-through;
  color: #94a3b8;
}

/* Submission preview box if submitted */
.submission-preview {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
}

.submission-preview strong {
  display: block;
  color: #166534;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* Card Actions Footer */
.task-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-badge.open {
  background: #f1f5f9;
  color: var(--text-muted);
}

.status-badge.in-progress {
  background: var(--color-yellow-light);
  color: #7a6e00;
}

.status-badge.completed {
  background: var(--color-green-light);
  color: var(--color-green-dark);
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-badge.open .dot { background: #94a3b8; }
.status-badge.in-progress .dot { background: #eab308; }
.status-badge.completed .dot { background: #22c55e; }

.task-actions {
  display: flex;
  gap: 6px;
}

.btn-card-action {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-card-action.submit {
  background: var(--color-petrol);
  color: white;
}

.btn-card-action.submit:hover {
  background: var(--color-petrol-dark);
}

.btn-card-action.delete {
  background: #fee2e2;
  color: var(--color-red);
}

.btn-card-action.delete:hover {
  background: var(--color-red);
  color: white;
}

/* ==========================================
   MODAL WINDOWS & BACKDROP
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: white;
  width: 100%;
  max-width: 620px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transform: scale(0.95) translateY(10px);
  transition: var(--transition);
}

.modal-overlay.active .modal-window {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.btn-secondary {
  padding: 9px 16px;
  background: #e2e8f0;
  color: var(--text-dark);
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-modal-primary {
  padding: 9px 18px;
  background: var(--color-petrol);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-modal-primary:hover {
  background: var(--color-petrol-dark);
}

/* Data Table in Modals (Users & Orgs) */
.modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}

.modal-table th {
  text-align: left;
  padding: 8px 12px;
  background: #f1f5f9;
  color: var(--color-blue);
  font-weight: 700;
  border-bottom: 1.5px solid var(--border-color);
}

.modal-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-table tr:hover {
  background: #f8fafc;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.toast {
  background: white;
  color: var(--text-dark);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--color-petrol);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  animation: slideInRight 0.3s ease;
  min-width: 280px;
  max-width: 420px;
}

.toast.success { border-left-color: var(--color-green); }
.toast.info { border-left-color: var(--color-petrol); }
.toast.warning { border-left-color: var(--color-yellow-dark); }
.toast.danger { border-left-color: var(--color-red); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   INTERACTIVE SCRATCHPAD / TEAM PINNWAND
   ========================================== */
.scratchpad-bar {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 30px;
  box-shadow: var(--shadow-sm);
}

.scratchpad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.scratchpad-header h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.scratchpad-textarea {
  width: 100%;
  min-height: 70px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: vertical;
  background: #fafbfc;
  transition: var(--transition);
}

.scratchpad-textarea:focus {
  background: white;
  border-color: var(--color-petrol);
}

/* ==========================================
   RESPONSIVE QUERIES
   ========================================== */
@media (max-width: 860px) {
  .hero-container { grid-template-columns: 1fr; }
  .hero-stats-card { justify-content: space-around; }
  .tasks-grid { grid-template-columns: 1fr; }
  .header-container { flex-wrap: wrap; }
  .sprint-timer-widget { order: 3; width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .auth-card { padding: 24px; }
}


/* ==========================================================================
   WORKHUB BRANDING & TIMED ACCESS STYLES
   ========================================================================== */
.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: white;
  display: inline-block;
}

.brand-name span {
  color: var(--color-yellow);
}

.access-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.access-pill.permanent {
  background: rgba(175, 215, 100, 0.2);
  color: #1b5e20;
  border: 1px solid rgba(175, 215, 100, 0.5);
}

.access-pill.timed {
  background: rgba(255, 250, 70, 0.25);
  color: #856404;
  border: 1px solid rgba(255, 250, 70, 0.6);
}

.access-pill.expired {
  background: rgba(235, 0, 5, 0.15);
  color: #b71c1c;
  border: 1px solid rgba(235, 0, 5, 0.4);
}

.access-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.access-type-card {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  background: #f8fafc;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.access-type-card:hover {
  background: white;
  border-color: var(--color-petrol);
}

.access-type-card.active {
  background: var(--color-petrol-light);
  border-color: var(--color-petrol);
}

.access-type-card input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--color-petrol);
}

.access-card-text strong {
  display: block;
  font-size: 13px;
  color: var(--color-blue);
}

.access-card-text span {
  font-size: 11px;
  color: var(--text-muted);
}


/* Logo Color Theme Switcher */
.logo-theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  margin-top: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.logo-theme-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.theme-dot:hover {
  transform: scale(1.25);
}

.theme-dot.active {
  box-shadow: 0 0 0 2px var(--color-blue);
  transform: scale(1.15);
}

.theme-dot.cyber { background: linear-gradient(135deg, #7928ca 0%, #00dfd8 100%); }
.theme-dot.ocean { background: linear-gradient(135deg, #1d4ed8 0%, #06b6d4 100%); }
.theme-dot.sunset { background: linear-gradient(135deg, #ff0080 0%, #f59e0b 100%); }
.theme-dot.emerald { background: linear-gradient(135deg, #059669 0%, #34d399 100%); }
.theme-dot.corporate { background: linear-gradient(135deg, #00a0aa 0%, #eb0005 50%, #fffa46 100%); }


/* ==========================================================================
   DATEIUPLOAD & FILE PREVIEW STYLES
   ========================================================================== */
.upload-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  border-color: var(--color-petrol);
  background: var(--color-petrol-light);
}

.upload-dropzone i {
  color: var(--color-petrol);
  margin-bottom: 6px;
}

.upload-dropzone strong {
  display: block;
  font-size: 13px;
  color: var(--color-blue);
  margin-bottom: 2px;
}

.upload-dropzone span {
  font-size: 11px;
  color: var(--text-muted);
}

.uploaded-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.file-preview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  transition: var(--transition);
}

.file-preview-item:hover {
  background: white;
  border-color: #94a3b8;
}

.file-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info-left i {
  color: var(--color-petrol);
  flex-shrink: 0;
}

.file-name-text {
  font-weight: 700;
  color: var(--text-dark);
}

.file-size-tag {
  font-size: 10px;
  color: var(--text-muted);
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
}

.file-remove-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.file-remove-btn:hover {
  color: var(--color-red);
  background: #fee2e2;
}

.attachment-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-blue);
  background: #edf2f7;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.attachment-badge-link:hover {
  background: var(--color-petrol-light);
  border-color: var(--color-petrol);
  color: var(--color-petrol-dark);
}


/* ==========================================================================
   NEUE NÜTZLICHE FUNKTIONEN:
   1. Live Broadcast Ankündigungen Banner
   2. Hilferufe-Zentrale & Notifications
   3. Teilnehmer-Cockpit & Live-Fortschritt
   4. Zertifikats-Generator & Print View
   5. Such- und Sortierleiste
   ========================================================================== */

/* 1. Broadcast Ankündigung */
.broadcast-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #28197d 60%, #00a0aa 100%);
  color: white;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--color-yellow);
  box-shadow: 0 4px 12px rgba(40, 25, 121, 0.2);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.broadcast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.broadcast-tag {
  background: var(--color-yellow);
  color: var(--color-blue-dark);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.broadcast-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.broadcast-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 2. Notification Badge in Header */
.btn-notification {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-notification:hover {
  background: rgba(255, 255, 255, 0.25);
}

.notification-count {
  background: var(--color-red);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

/* 3. Search & Sort in Toolbar */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
}

.search-input-wrap i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-control {
  width: 100%;
  height: 38px;
  padding: 6px 12px 6px 36px;
  font-size: 13px;
  font-family: inherit;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  background: white;
  transition: var(--transition);
}

.search-control:focus {
  border-color: var(--color-petrol);
  box-shadow: 0 0 0 3px var(--color-petrol-alpha);
}

.sort-select {
  height: 38px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}

.sort-select:focus {
  border-color: var(--color-petrol);
}

/* 4. Feedback Display on Task Card */
.feedback-box {
  background: #fdfbf0;
  border: 1px solid #fef08a;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
}

.feedback-box strong {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #854d0e;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* 5. Certificate Styles */
.certificate-container {
  background: white;
  border: 12px solid var(--color-blue);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.certificate-inner-border {
  border: 2px dashed var(--color-petrol);
  padding: 30px;
  border-radius: 6px;
}

.certificate-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.certificate-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.certificate-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-petrol-dark);
  border-bottom: 2px solid var(--color-yellow);
  display: inline-block;
  padding: 0 20px 4px;
  margin-bottom: 16px;
}

.certificate-details {
  font-size: 14px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto 28px;
  color: var(--text-dark);
}

.certificate-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.certificate-sign {
  font-size: 13px;
  color: var(--text-muted);
}

.certificate-sign strong {
  display: block;
  font-size: 15px;
  color: var(--color-blue);
  margin-top: 6px;
}

/* ==========================================================================
   USER LOGINS (LOGIN-KARTEN) & PRINT VIEW
   ========================================================================== */
.login-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.login-card-item {
  background: white;
  border: 1.5px dashed var(--color-petrol);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  page-break-inside: avoid;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.login-card-org {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-blue);
  text-transform: uppercase;
}

.login-card-role {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.login-card-body {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-card-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-card-field .label {
  color: var(--text-muted);
  font-size: 11px;
}

.login-card-field .val {
  font-weight: 700;
  color: var(--text-dark);
  font-family: monospace;
  font-size: 13px;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
}

.login-card-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
}


/* ==========================================================================
   LIVE SYNC INDICATOR & BROADCAST LIVE EFFECTS
   ========================================================================== */
.live-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(175, 215, 100, 0.2);
  border: 1px solid rgba(175, 215, 100, 0.5);
  color: #afd764;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  user-select: none;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background: #afd764;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(175, 215, 100, 0.7);
  animation: pulseLiveGreen 1.8s infinite;
}

@keyframes pulseLiveGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(175, 215, 100, 0.8); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(175, 215, 100, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(175, 215, 100, 0); }
}

.broadcast-banner.new-incoming {
  animation: broadcastPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes broadcastPop {
  0% { transform: translateY(-100%); opacity: 0; }
  60% { transform: translateY(6px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

@media print {
  body * {
    visibility: hidden;
  }
  #certificateModal.active, #certificateModal.active *,
  #orgLoginsPdfModal.active, #orgLoginsPdfModal.active * {
    visibility: visible;
  }
  #certificateModal.active, #orgLoginsPdfModal.active {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    min-height: 100%;
    background: white;
    padding: 0;
    z-index: 99999;
  }
  .modal-window {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .modal-header, .modal-footer, .no-print {
    display: none !important;
  }
  .login-card-item {
    border: 1px dashed #64748b !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}
