/**
 * Friday Design System
 * Bootstrap 5.3 Light/Dark Mode
 */

/* ============================================
   Typography
   ============================================ */

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

.dm-mono {
    font-family: 'DM Mono', 'Courier New', monospace;
}

/* ============================================
   Zenico Brand Colors
   ============================================ */

:root {
    /* ── Zenico Brand Colors ── */
    --z-teal:         #2E9A9A;
    --z-gold:         #C9A84C;
    --z-dark:         #1A1F2E;
    --z-teal-light:   #3DB8B8;
    --z-teal-dark:    #1F7A7A;
    --z-teal-subtle:  #E8F5F5;
    --z-gold-light:   #D4B76A;
    --z-gold-subtle:  #FAF3E0;
    --z-dark-lighter: #252B3B;
    --z-dark-border:  #2E3548;
}

/* ============================================
   Color Tokens - Light Mode
   ============================================ */

:root,
[data-bs-theme="light"] {
    --friday-bg: #f5f4f0;
    --friday-surface: #ffffff;
    --friday-surface-alt: #f0efe9;
    --friday-border: #e2e0d8;
    --friday-text: #1a1917;
    --friday-text-muted: #6b6960;
    --friday-accent: var(--z-teal);
    --friday-accent-hover: var(--z-teal-light);
    --friday-accent-dark: var(--z-teal-dark);
    --friday-accent-light: var(--z-teal-subtle);
    --sidebar-bg: var(--z-dark);
    --friday-success: #10b981;
    --friday-success-light: rgba(16, 185, 129, 0.15);
    --friday-warning: var(--z-gold);
    --friday-warning-light: var(--z-gold-subtle);
    --friday-danger: #dc3545;
}

/* ============================================
   Color Tokens - Dark Mode
   ============================================ */

[data-bs-theme="dark"] {
    --friday-bg: #141412;
    --friday-surface: #1e1d1a;
    --friday-surface-alt: #252420;
    --friday-border: #2e2d28;
    --friday-text: #eae8e0;
    --friday-text-muted: #7a7870;
    --friday-accent: var(--z-teal);
    --friday-accent-hover: var(--z-teal-light);
    --friday-accent-dark: var(--z-teal-dark);
    --friday-accent-light: #1b3a2d;
    --sidebar-bg: var(--z-dark);
    --friday-success: #10b981;
    --friday-success-light: rgba(16, 185, 129, 0.15);
    --friday-warning: var(--z-gold);
    --friday-warning-light: var(--z-gold-subtle);
    --friday-danger: #dc3545;
}

/* ============================================
   Base Styles
   ============================================ */

body {
    background-color: var(--friday-bg);
    color: var(--friday-text);
    margin: 0;
    padding: 0;
}

/* ============================================
   Layout Structure
   ============================================ */

:root {
  --sidebar-width-expanded:  240px;
  --sidebar-width-collapsed: 64px;
  --sidebar-transition:      width 0.22s ease, transform 0.22s ease;
  --sidebar-text: #d0cfc8;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.friday-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar Collapsible ─────────────────────────────────────── */

/* ── Desktop: expanded (default) ── */
.friday-sidebar {
  width: var(--sidebar-width-expanded);
  min-width: var(--sidebar-width-expanded);
  transition: var(--sidebar-transition);
  position: relative;
  flex-shrink: 0;
  background-color: var(--sidebar-bg);
  color: #eae8e0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100vh;
  z-index: 100;
}

/* Desktop: collapsed state */
.friday-sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
  min-width: var(--sidebar-width-collapsed);
}

/* Logo / Header */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 2px solid var(--z-gold);
}

.sidebar-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--friday-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-logo-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.sidebar-logo-tagline {
  font-size: 0.625rem;
  color: var(--friday-text-muted);
  line-height: 1;
  margin-top: 2px;
}

/* Logo text — ausblenden wenn collapsed */
.friday-sidebar.collapsed .sidebar-logo-text-wrap,
.friday-sidebar.collapsed .sidebar-link-text,
.friday-sidebar.collapsed .sidebar-section-label,
.friday-sidebar.collapsed .sidebar-badge {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.15s ease, width 0.22s ease;
}

.friday-sidebar:not(.collapsed) .sidebar-logo-text-wrap,
.friday-sidebar:not(.collapsed) .sidebar-link-text,
.friday-sidebar:not(.collapsed) .sidebar-section-label,
.friday-sidebar:not(.collapsed) .sidebar-badge {
  opacity: 1;
  width: auto;
  transition: opacity 0.2s ease 0.05s, width 0.22s ease;
}

/* Icons zentrieren wenn collapsed */
.friday-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 8px;
}

.friday-sidebar.collapsed .sidebar-link .bi {
  margin: 0;
  font-size: 18px;  /* etwas größer im collapsed State */
}

.friday-sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 16px 8px;
}

.friday-sidebar.collapsed .sidebar-logo img {
  height: 28px;
}

.friday-sidebar.collapsed .sidebar-logo-mark {
  margin: 0;
}

/* Toggle Button (integrated in nav as last item) */
.sidebar-toggle-btn {
  background: none;
  border: none;
  width: auto;
  height: auto;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-top: auto;
  border-top: 1px solid var(--z-dark-border);
  padding-top: 8px;
}

.sidebar-toggle-btn:hover {
  background-color: var(--sidebar-hover);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-section-label {
  font-family: 'Syne', var(--font-heading, sans-serif);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.35);
  padding: 20px 20px 6px;
  border: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 4px;
  position: relative;
}

.sidebar-link:hover {
  background-color: var(--z-dark-lighter);
  color: var(--sidebar-text-active);
}

.sidebar-link.active {
  background-color: var(--z-teal);
  color: var(--sidebar-text-active);
}

.sidebar-link i {
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link-text {
  flex: 1;
  white-space: nowrap;
}

.sidebar-badge {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
}

/* Tooltip removed - using Bootstrap tooltips instead */

/* ── Tablet (768–992px) ── */
@media (max-width: 992px) {
  .friday-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 200;
    width: var(--sidebar-width-collapsed) !important;
    min-width: var(--sidebar-width-collapsed) !important;
  }

  .friday-sidebar.mobile-open {
    width: var(--sidebar-width-expanded) !important;
    min-width: var(--sidebar-width-expanded) !important;
    box-shadow: var(--shadow-lg);
  }

  .friday-main {
    margin-left: var(--sidebar-width-collapsed);
    flex: 1;
  }

  .sidebar-toggle-btn {
    display: none;
  }
}

/* ── Mobile (< 768px) ── */
@media (max-width: 768px) {
  .friday-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 200;
    width: var(--sidebar-width-expanded) !important;
    min-width: var(--sidebar-width-expanded) !important;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .friday-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .friday-main {
    margin-left: 0;
    flex: 1;
  }

  .hamburger-btn {
    display: flex !important;
  }
}

/* ── Backdrop (Mobile + Tablet Overlay) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.active {
  display: block;
}

/* ── Hamburger Button ── */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--friday-border);
  color: var(--friday-text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
  margin-right: 12px;
}

.hamburger-btn:hover {
  background: var(--friday-surface-alt);
}

/* Main Content Area */
.friday-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: none;  /* Sidebar handles transition */
}

/* ── Topbar ────────────────────────────────────────────────── */

.friday-topbar {
  display:         flex;
  align-items:     center;
  gap:             16px;
  height:          64px;        /* einheitlich auf allen Seiten */
  min-height:      64px;
  max-height:      64px;
  padding:         0 24px;
  background:      #fff;
  border-bottom:   1px solid var(--friday-border);
  position:        sticky;
  top:             0;
  z-index:         100;
  flex-shrink:     0;
}

/* ── Links ── */
.topbar-left {
  display:     flex;
  align-items: center;
  gap:         12px;
  flex-shrink: 0;
  min-width:   0;
}

.page-title {
  font-family:   var(--font-heading, 'Syne', sans-serif);
  font-size:     17px;
  font-weight:   700;
  color:         var(--friday-text);
  margin:        0;
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
  max-width:     220px;
}

/* ── Mitte: Suche ── */
.topbar-search {
  flex:        1;
  max-width:   480px;
  margin:      0 auto;
}

.topbar-search-wrap {
  position:    relative;
  width:       100%;
}

.topbar-search-icon {
  position:    absolute;
  left:        12px;
  top:         50%;
  transform:   translateY(-50%);
  color:       var(--friday-text-muted);
  font-size:   14px;
  pointer-events: none;
}

.topbar-search-input {
  width:           100%;
  height:          38px;
  padding:         0 16px 0 36px;
  background:      var(--friday-bg-subtle, #f8f8f6);
  border:          1px solid var(--friday-border);
  border-radius:   8px;
  font-family:     var(--font-body, 'Outfit', sans-serif);
  font-size:       13px;
  color:           var(--friday-text);
  outline:         none;
  transition:      border-color .15s, box-shadow .15s, background .15s;
}

.topbar-search-input:focus {
  border-color: var(--z-teal);
  background:   #fff;
  box-shadow:   0 0 0 3px rgba(46, 154, 154, .1);
}

.topbar-search-input::placeholder {
  color: var(--friday-text-muted);
}

/* ── Suchergebnisse Dropdown ── */
.topbar-search-results {
  position:      absolute;
  top:           calc(100% + 6px);
  left:          0;
  right:         0;
  background:    #fff;
  border:        1px solid var(--friday-border);
  border-radius: 10px;
  box-shadow:    0 8px 24px rgba(0,0,0,.08);
  z-index:       200;
  max-height:    480px;
  overflow-y:    auto;
}

/* Ergebnisse via JS einblenden wenn Inhalt vorhanden */
.topbar-search-results:not(:empty) {
  display: block !important;
}

/* ── Rechts ── */
.topbar-right {
  display:     flex;
  align-items: center;
  gap:         8px;
  flex-shrink: 0;
}

.topbar-action-btn {
  display:       flex;
  align-items:   center;
  gap:           6px;
  height:        36px;
  padding:       0 14px;
  background:    transparent;
  border:        1px solid var(--friday-border);
  border-radius: 7px;
  font-family:   var(--font-body, 'Outfit', sans-serif);
  font-size:     13px;
  font-weight:   500;
  color:         var(--friday-text);
  cursor:        pointer;
  transition:    border-color .15s, background .15s;
  white-space:   nowrap;
}

.topbar-action-btn:hover {
  border-color: var(--z-teal);
  background:   var(--z-teal-subtle, #E8F5F5);
  color:        var(--z-teal);
}

.topbar-user-btn {
  display:     flex;
  align-items: center;
  gap:         8px;
  background:  none;
  border:      none;
  padding:     4px 6px;
  border-radius: 8px;
  cursor:      pointer;
  transition:  background .15s;
}

.topbar-user-btn:hover {
  background: var(--friday-bg-subtle, #f8f8f6);
}

.topbar-avatar {
  width:           32px;
  height:          32px;
  border-radius:   50%;
  background:      var(--z-teal);
  color:           #fff;
  font-family:     var(--font-heading, 'Syne', sans-serif);
  font-size:       11px;
  font-weight:     700;
  display:         flex;
  align-items:     center;
  justify-content: center;
  flex-shrink:     0;
}

.topbar-username {
  font-size:   13px;
  font-weight: 500;
  color:       var(--friday-text);
}

.topbar-chevron {
  font-size: 10px;
  color:     var(--friday-text-muted);
}

/* User Dropdown in Topbar */
.friday-topbar .dropdown-item {
    padding: 8px 16px;
    color: var(--friday-text);
    font-size: 13px;
}

.friday-topbar .dropdown-item:hover {
    background: var(--friday-surface-alt);
}

.friday-topbar .dropdown-item form {
    margin: 0;
}

.friday-topbar .dropdown-item button {
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
}

/* ── Suchergebnisse ── */
.search-results-header {
  padding:       10px 16px 6px;
  border-bottom: 1px solid var(--friday-border);
}

.search-results-count {
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size:   11px;
  font-weight: 600;
  color:       var(--friday-text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.search-result-item {
  display:         flex;
  align-items:     center;
  gap:             12px;
  padding:         10px 16px;
  text-decoration: none;
  color:           inherit;
  transition:      background .1s;
  border-bottom:   1px solid var(--friday-border);
}

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

.search-result-item:hover {
  background: var(--friday-bg-subtle, #f8f8f6);
}

.search-result-icon {
  width:           32px;
  height:          32px;
  border-radius:   8px;
  background:      var(--z-teal-subtle, #E8F5F5);
  color:           var(--z-teal);
  display:         flex;
  align-items:     center;
  justify-content: center;
  font-size:       14px;
  flex-shrink:     0;
}

.search-result-body {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-family:   var(--font-body, 'Outfit', sans-serif);
  font-size:     13px;
  font-weight:   600;
  color:         var(--friday-text);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size:   11px;
  color:       var(--friday-text-muted);
  margin-top:  2px;
  white-space: nowrap;
  overflow:    hidden;
  text-overflow: ellipsis;
}

.search-result-score {
  font-family: var(--font-mono, monospace);
  font-size:   10px;
  color:       var(--friday-text-muted);
  flex-shrink: 0;
}

.search-results-empty {
  padding:     24px 16px;
  text-align:  center;
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size:   13px;
  color:       var(--friday-text-muted);
  display:     flex;
  flex-direction: column;
  align-items: center;
  gap:         8px;
}

.search-results-empty i {
  font-size: 24px;
  opacity:   .4;
}

/* Mobile — Suche ausblenden auf sehr kleinen Screens */
@media (max-width: 480px) {
  .topbar-search {
    display: none;
  }
}


/* Content Area */
.friday-content {
    flex: 1;
    padding: 24px;
}

/* ============================================
   Messages
   ============================================ */

.friday-messages {
    margin: 16px 24px 0;
}

.friday-messages .alert {
    border-radius: 8px;
}

/* ============================================
   Auth Layout
   ============================================ */

.friday-auth-layout {
    min-height: 100vh;
    background-color: var(--friday-bg);
}

.friday-auth-layout .card {
    border: 1px solid var(--friday-border);
    background-color: var(--friday-surface);
}

/* ============================================
   Theme Toggle
   ============================================ */

.theme-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

#theme-toggle {
    border-color: var(--friday-border);
    color: var(--friday-text);
}

#theme-toggle:hover {
    background-color: var(--friday-surface-alt);
}

/* ============================================
   Error Pages
   ============================================ */

.error-page {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 6rem;
    line-height: 1;
}

/* ============================================
   Bootstrap Overrides
   ============================================ */

.card {
    background-color: var(--friday-surface);
    border-color: var(--friday-border);
}

.btn-primary {
    background-color: var(--friday-accent);
    border-color: var(--friday-accent);
}

.btn-primary:hover {
    background-color: var(--friday-accent);
    border-color: var(--friday-accent);
    opacity: 0.9;
}

.form-control,
.form-select {
    background-color: var(--friday-surface);
    border-color: var(--friday-border);
    color: var(--friday-text);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--friday-surface);
    border-color: var(--friday-accent);
    color: var(--friday-text);
}

/* Dark mode specific overrides */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--friday-surface-alt);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--friday-surface-alt);
}

/* ============================================
   Avatar Circle
   ============================================ */

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ============================================
   Kanban Board
   ============================================ */

/* Filter Tabs — einheitlich */
.kanban-filter-tabs {
    display:     flex;
    align-items: center;
    gap:         4px;
    flex-wrap:   wrap;
}

.kanban-filter-tab {
    display:       inline-flex;
    align-items:   center;
    height:        32px;
    padding:       0 14px;
    border-radius: 6px;
    font-family:   var(--font-body, 'Outfit', sans-serif);
    font-size:     13px;
    font-weight:   500;
    color:         var(--friday-text-muted);
    background:    transparent;
    border:        1px solid transparent;
    cursor:        pointer;
    text-decoration: none;
    transition:    background .15s, color .15s, border-color .15s;
    white-space:   nowrap;
}

.kanban-filter-tab:hover {
    background: var(--friday-bg-subtle, #f3f4f6);
    color:      var(--friday-text);
}

.kanban-filter-tab.active {
    background:   var(--z-teal);
    color:        #fff;
    border-color: var(--z-teal);
}

/* Toggle Button (Nur meine) — leicht abgesetzt */
.kanban-filter-sep {
    width:      1px;
    height:     20px;
    background: var(--friday-border);
    margin:     0 4px;
}

.kanban-filter-toggle {
    border-color: var(--friday-border);
}

.kanban-filter-toggle.active {
    background:   var(--z-teal-subtle, #E8F5F5);
    color:        var(--z-teal);
    border-color: var(--z-teal);
}

/* Board Hintergrund etwas dunkler als Karten */
.kanban-board {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: calc(100vh - 200px);
    background: #f3f4f6;
}

/* Kanban Spalte — flex statt fixer Breite */
.kanban-column {
    flex: 1;                    /* gleichmäßig wachsen */
    min-width: 200px;           /* Minimum für Lesbarkeit */
    max-width: 400px;           /* Maximum damit es nicht zu breit wird */
    display: flex;
    flex-direction: column;
    background: var(--friday-surface);
    border-radius: 10px;
    border: 1px solid var(--friday-border);
    overflow: hidden;
    padding: 12px;
}

/* Auf sehr großen Screens (> 1800px) etwas einschränken */
@media (min-width: 1800px) {
    .kanban-column {
        max-width: 480px;
    }
}

/* Auf kleinen Screens horizontal scrollen */
@media (min-width: 768px) and (max-width: 992px) {
    .kanban-column {
        min-width: 240px;
    }
}

@media (max-width: 768px) {
    .kanban-column {
        min-width: 280px;
        flex: 0 0 280px;
    }
}

/* Spalten-Titel einheitlich */
.kanban-column-header {
    font-family:    var(--font-heading, 'Syne', sans-serif);
    font-size:      11px;
    font-weight:    700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color:          var(--friday-text-muted);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--friday-border);
}

.kanban-cards {
    min-height: 100px;
}

/* Karten: reines Weiß mit subtilerem Shadow */
.task-card {
    background:    #fff;
    border:        1px solid var(--friday-border);
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow:    0 1px 2px rgba(0,0,0,.04);
    transition:    box-shadow .15s, transform .15s;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform:  translateY(-1px);
}

.kanban-card-ghost {
    opacity: 0.4;
    background: var(--friday-accent-light);
}

.kanban-quick-add button {
    border-style: dashed;
}

/* Slide-over styles */
.slide-over-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.slide-over-backdrop.active {
    display: block;
}

.slide-over {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 600px;
    max-width: 100%;
    background: var(--friday-surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.slide-over.active {
    transform: translateX(0);
}

/* ============================================
   Dashboard Widgets - KPI Cards
   ============================================ */

.kpi-card {
    background: var(--friday-surface);
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--friday-border);
    transition: all 0.2s ease;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.kpi-card-overdue {
    border-color: #fca5a5 !important;
    background: #fff5f5 !important;
}

.kpi-label {
    font-family: 'Syne', var(--font-heading, sans-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--friday-text-muted);
    margin-bottom: 8px;
}

.kpi-value {
    font-family: 'Syne', var(--font-heading, sans-serif);
    font-size: 36px;
    font-weight: 800;
    color: var(--friday-text);
    line-height: 1;
    margin-bottom: 12px;
}

.kpi-card-overdue .kpi-value {
    color: var(--friday-danger, #dc2626);
}

.kpi-link {
    font-family: 'Outfit', var(--font-body, sans-serif);
    font-size: 12px;
    font-weight: 600;
    color: var(--z-teal);
    text-decoration: none;
    display: inline-block;
}

.kpi-link:hover {
    text-decoration: underline;
}

.kpi-skeleton,
.widget-skeleton {
    height: 80px;
    background: linear-gradient(90deg,
        var(--friday-surface-alt) 25%,
        var(--friday-border) 50%,
        var(--friday-surface-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Dashboard Widgets - Content Widgets
   ============================================ */

.dashboard-card {
    background: var(--friday-surface);
    border-radius: 12px;
    border: 1px solid var(--friday-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 20px 24px;
}

.dashboard-widget {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    padding: 0;
}

.widget-header {
    padding: 0;
    margin-bottom: 16px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget-title {
    font-family: 'Syne', var(--font-heading, sans-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--friday-text-muted);
    margin: 0;
}

.widget-body {
    padding: 0;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
}

/* Team Load specific styles */
.team-load-row {
    position: relative;
}

.team-name {
    font-weight: 500;
    color: var(--friday-text);
}

.team-count {
    font-size: 11px;
}

.team-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Due Soon specific styles */
.task-title-col {
    width: 60%;
}

.assignee-col {
    width: 20%;
}

.due-date-col {
    width: 20%;
}

.project-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-link {
    color: var(--friday-text);
    text-decoration: none;
    font-weight: 500;
}

.task-link:hover {
    color: var(--friday-accent);
    text-decoration: underline;
}

/* Project Status specific styles */
.project-status-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--friday-border);
}

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

.project-status-badge {
    font-family: 'Syne', var(--font-heading, sans-serif);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
}

.project-status-badge.aktiv {
    background: var(--z-teal-subtle, #E8F5F5);
    color: var(--z-teal);
}

.project-status-badge.abgeschlossen {
    background: #f3f4f6;
    color: #6b7280;
}

.project-item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--friday-border);
}

.project-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-name {
    color: var(--friday-text);
    text-decoration: none;
    font-weight: 500;
}

.project-name:hover {
    color: var(--friday-accent);
}

/* Dashboard Projekt Status Balken — immer Teal */
#widget-project-status .progress-bar {
    background: var(--z-teal) !important;
    border-radius: 3px;
}

/* Projekt Detail Fortschrittsbalken Segmente */
.progress-segment-backlog {
    background: #e5e7eb;
}

.progress-segment-todo {
    background: var(--z-teal);
}

.progress-segment-in_progress {
    background: #3b82f6;
}

.progress-segment-waiting {
    background: #f59e0b;
}

.progress-segment-review {
    background: #8b5cf6;
}

.progress-segment-done {
    background: #22c55e;
}

/* Activity Feed specific styles */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--friday-border);
    transition: background-color 0.2s ease;
}

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

.notification-item:hover {
    background-color: var(--friday-surface-alt);
}

.notification-unread {
    border-left: 3px solid var(--friday-accent);
    background-color: var(--friday-accent-light);
}

.notification-content {
    font-size: 14px;
}

/* Activity Timeline - New Design */
.activity-timeline {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 12px;
    min-height: 48px;
}

/* Icon + vertikale Linie */
.activity-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 28px;
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    z-index: 1;
}

.activity-icon-primary {
    background: rgba(59,130,246,.15);
    color: #3b82f6;
}

.activity-icon-success {
    background: rgba(16,185,129,.15);
    color: #10b981;
}

.activity-icon-warning {
    background: rgba(245,158,11,.15);
    color: #f59e0b;
}

.activity-icon-info {
    background: rgba(99,102,241,.15);
    color: #6366f1;
}

.activity-icon-muted {
    background: var(--friday-surface-alt);
    color: var(--friday-text-muted);
}

/* Vertikale Verbindungslinie */
.activity-line {
    flex: 1;
    width: 1px;
    background: var(--friday-border);
    margin: 4px 0;
    min-height: 16px;
}

/* Content */
.activity-content {
    flex: 1;
    padding-bottom: 16px;
    min-width: 0;
}

.activity-text {
    font-size: 12px;
    color: var(--friday-text);
    line-height: 1.4;
    margin-bottom: 3px;
}

.activity-task-link {
    display: block;
    font-size: 11px;
    color: var(--friday-accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.activity-task-link:hover {
    text-decoration: underline !important;
}

.activity-time {
    font-size: 10px;
    color: var(--friday-text-muted);
}

/* Activity Feed sticky + scrollbar */
.activity-feed-sticky {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--friday-border) transparent;
}

.activity-feed-sticky::-webkit-scrollbar {
    width: 4px;
}

.activity-feed-sticky::-webkit-scrollbar-thumb {
    background: var(--friday-border);
    border-radius: 4px;
}

.notification-text {
    margin-bottom: 4px;
}

/* Avatar styles */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--friday-accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* Shadow utility */
:root {
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --font-mono: 'DM Mono', 'Courier New', monospace;
}

/* ── Project List ── */
.project-row {
  background: var(--friday-surface);
  border-radius: 8px;
  border: 1px solid var(--friday-border);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  color: var(--friday-text);
}

.project-row:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--friday-accent);
  color: var(--friday-text);
}

.project-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--friday-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar in dark mode needs explicit track color */
.progress {
  background-color: var(--friday-border) !important;
}

/* User avatar — small variant */
.user-avatar-sm {
  width:         28px;
  height:        28px;
  font-size:     10px;
  font-weight:   600;
  border-radius: 50%;          /* ← fehlt! */
  display:       flex;
  align-items:   center;
  justify-content: center;
  flex-shrink:   0;
  color:         #fff;
}
  

/* ============================================
   EasyMDE Dark Mode
   ============================================ */

[data-bs-theme="dark"] .EasyMDEContainer .CodeMirror {
  background: var(--friday-surface);
  color: var(--friday-text);
  border-color: var(--friday-border);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar {
  background: var(--friday-surface-alt);
  border-color: var(--friday-border);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar button {
  color: var(--friday-text-muted);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar button:hover,
[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar button.active {
  background: var(--friday-surface);
  color: var(--friday-text);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-preview {
  background: var(--friday-surface-alt);
  color: var(--friday-text);
}

[data-bs-theme="dark"] .EasyMDEContainer .CodeMirror-cursor {
  border-left-color: var(--friday-text);
}

/* ============================================
   Markdown Rendered Output
   ============================================ */

.md-render h1, .md-render h2, .md-render h3,
.md-content h1, .md-content h2, .md-content h3 {
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: var(--friday-text);
}
.md-render h2, .md-content h2 {
  font-size: 16px;
  border-bottom: 1px solid var(--friday-border);
  padding-bottom: 4px;
}
.md-render h3, .md-content h3 { font-size: 14px; }
.md-render p, .md-content p { margin-bottom: 0.75em; line-height: 1.6; }
.md-render ul, .md-render ol,
.md-content ul, .md-content ol {
  padding-left: 1.5em;
  margin-bottom: 0.75em;
}
.md-render li, .md-content li { margin-bottom: 0.25em; }
.md-render code, .md-content code {
  background: var(--friday-surface-alt);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.md-render pre, .md-content pre {
  background: var(--friday-surface-alt);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
}
.md-render pre code, .md-content pre code {
  background: none;
  padding: 0;
}
.md-render blockquote, .md-content blockquote {
  border-left: 3px solid var(--friday-accent);
  padding-left: 12px;
  color: var(--friday-text-muted);
  margin: 0.75em 0;
}
.md-render hr, .md-content hr {
  border: none;
  border-top: 1px solid var(--friday-border);
  margin: 1em 0;
}
.md-render strong, .md-content strong { font-weight: 600; }
.md-render a, .md-content a {
  color: var(--friday-accent);
  text-decoration: none;
}
.md-render a:hover, .md-content a:hover { text-decoration: underline; }
.md-render table, .md-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 0.75em;
}
.md-render th, .md-render td,
.md-content th, .md-content td {
  border: 1px solid var(--friday-border);
  padding: 6px 10px;
}
.md-render th, .md-content th {
  background: var(--friday-surface-alt);
  font-weight: 600;
}


/* ============================================
   Portal Template Cards
   ============================================ */

.portal-template-card {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  height: 100%;
  cursor: pointer;
}
.portal-template-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--friday-accent);
}
.portal-template-icon {
  font-size: 32px;
  color: var(--friday-accent);
  margin-bottom: 12px;
  opacity: .8;
}
.portal-template-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--friday-text);
  margin-bottom: 8px;
}
.portal-template-desc {
  font-size: 12px;
  color: var(--friday-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.portal-template-fields {
  font-size: 11px;
  color: var(--friday-accent);
  font-weight: 500;
}

/* Portal layout */
.portal-layout {
  background: var(--friday-bg);
  min-height: 100vh;
}

/* Avatar circle for comments */
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--friday-accent-light);
  color: var(--friday-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

/* ── @Mentions Styling ────────────────────────────────────── */

/* Mention highlighting in comment text */
.mention {
  color: var(--friday-accent);
  font-weight: 600;
  background: var(--friday-accent-light);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.95em;
}

/* Tribute.js Dropdown Styling */
.tribute-container {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 9999;
}

.tribute-container ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.tribute-container li {
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.tribute-container li.highlight,
.tribute-container li:hover {
  background: var(--friday-surface-alt);
}

/* ── Task Accordion Styling (ISSUE-66) ──────────────────────────── */

/* Accordion without standard Bootstrap styling */
.task-accordion .accordion-button::after,
#taskAccordion .accordion-button::after,
#taskAccordionSlideOver .accordion-button::after {
  margin-left: auto;
}

.task-accordion .accordion-button:not(.collapsed),
#taskAccordion .accordion-button:not(.collapsed),
#taskAccordionSlideOver .accordion-button:not(.collapsed) {
  box-shadow: none;
  color: var(--friday-text);
  background-color: transparent;
}

.task-accordion .accordion-button:focus,
#taskAccordion .accordion-button:focus,
#taskAccordionSlideOver .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}

.task-accordion .accordion-button,
#taskAccordion .accordion-button,
#taskAccordionSlideOver .accordion-button {
  box-shadow: none;
}

/* ── Task Full-View Spacing & Visual Separation (ISSUE-69) ────── */

/* General Task Section Card Wrapper */
.task-section {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.task-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--friday-text-muted);
  margin-bottom: 16px;
}

/* Accordion Items with more spacing and borders */
.task-accordion .accordion-item,
#taskAccordion .accordion-item {
  border: 1px solid var(--friday-border) !important;
  border-radius: 10px !important;
  margin-bottom: 12px;
  overflow: hidden;
}

.task-accordion .accordion-button,
#taskAccordion .accordion-button {
  padding: 16px 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.task-accordion .accordion-body,
#taskAccordion .accordion-body {
  padding: 0 20px 20px;
}

/* Activity Section */
.activity-section {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.activity-section .activity-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--friday-border);
}

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

/* Tabs Section with Card Wrapper */
.task-tabs-section {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 10px;
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.task-tabs-section .nav-tabs {
  padding: 0 20px;
  background: var(--friday-surface-alt);
  border-bottom: 1px solid var(--friday-border);
}

.task-tabs-section .tab-content {
  padding: 20px;
}

/* Two-Column Layout for Full View */
.task-full-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 992px) {
  .task-full-layout {
    grid-template-columns: 1fr;
  }
}

/* Sticky Sidebar */
.task-full-sidebar {
  position: sticky;
  top: 16px;
}

/* Meta Section Styling */
.task-meta-section {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 10px;
  padding: 20px;
}

.task-meta-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--friday-border);
}

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

.task-meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--friday-text-muted);
  margin-bottom: 6px;
}

/* ── Document Upload → Task (ISSUE-85) ────────────────────── */

.document-drop-zone {
  border: 2px dashed var(--friday-border);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.document-drop-zone:hover,
.document-drop-zone.drag-over {
  border-color: var(--z-teal);
  background: var(--z-teal-subtle);
}
