/* ============================================
   FIX-URI UI COMPLETE - 3DArtDesk
   Versiune: 3.0
   ============================================ */

/* === MESAJ LOGOUT INACTIVITATE === */
.logout-message {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 16px;
  animation: slideDown 0.5s ease, pulseGlow 2s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.logout-message .message-icon {
  font-size: 28px;
  animation: shake 0.5s ease-in-out;
}

.logout-message .message-text {
  font-size: 14px;
  color: #92400e;
  line-height: 1.4;
}

.logout-message .message-text strong {
  color: #78350f;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(245, 158, 11, 0.5); }
}

[data-theme="dark"] .logout-message {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.15) 100%);
  border-color: #f59e0b;
}

[data-theme="dark"] .logout-message .message-text {
  color: #fcd34d;
}

[data-theme="dark"] .logout-message .message-text strong {
  color: #fef3c7;
}

/* === TICKER BAR - SLIDER VERTICAL === */
.ticker-bar {
  background: linear-gradient(90deg, var(--brand, #0e5a64) 0%, #4f46e5 50%, var(--brand, #0e5a64) 100%);
  background-size: 200% 100%;
  animation: tickerGradient 8s ease infinite;
  color: #fff;
  padding: 0;
  overflow: hidden;
  position: relative;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  height: 40px;
  cursor: pointer;
}

@keyframes tickerGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.ticker-slider {
  position: relative;
  height: 100%;
  width: 100%;
}

.ticker-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 120px 0 20px;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.4s ease;
}

.ticker-slide.active {
  opacity: 1;
  transform: translateY(0);
}

.ticker-slide.prev {
  opacity: 0;
  transform: translateY(100%);
}

.ticker-slide.urgent {
  background: rgba(239, 68, 68, 0.2);
}

.ticker-slide.warning {
  background: rgba(251, 191, 36, 0.2);
}

/* Text cu icon inline */
.ticker-text {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

/* Counter și Nav în dreapta */
.ticker-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

.ticker-counter {
  font-size: 11px;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.ticker-nav {
  display: flex;
  gap: 4px;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: all 0.2s;
}

.ticker-dot.active {
  background: #fff;
  width: 14px;
  border-radius: 3px;
}

[data-theme="dark"] .ticker-bar {
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #4f46e5 100%);
  background-size: 200% 100%;
}

/* === FIX TABEL TASK-URI - FORȚAT === */

/* Reset complet pe tabel */
#page-tasks table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

#page-tasks table thead,
#page-tasks table tbody,
#page-tasks table tr {
  display: table-row-group !important;
}

#page-tasks table thead {
  display: table-header-group !important;
}

#page-tasks table tr {
  display: table-row !important;
}

#page-tasks table th,
#page-tasks table td {
  display: table-cell !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding: 12px 14px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* PRIMA COLOANĂ - TASK - forțează lățime minimă */
#page-tasks table th:nth-child(1),
#page-tasks table td:nth-child(1) {
  min-width: 200px !important;
  width: 20% !important;
}

/* A DOUA COLOANĂ - PROIECT */
#page-tasks table th:nth-child(2),
#page-tasks table td:nth-child(2) {
  min-width: 150px !important;
  width: 15% !important;
}

/* A TREIA COLOANĂ - STATUS */
#page-tasks table th:nth-child(3),
#page-tasks table td:nth-child(3) {
  min-width: 120px !important;
  width: 12% !important;
  text-align: center !important;
}

/* A PATRA COLOANĂ - PRIORITATE */
#page-tasks table th:nth-child(4),
#page-tasks table td:nth-child(4) {
  min-width: 100px !important;
  width: 10% !important;
  text-align: center !important;
}

/* A CINCEA COLOANĂ - ASIGNAT */
#page-tasks table th:nth-child(5),
#page-tasks table td:nth-child(5) {
  min-width: 100px !important;
  width: 10% !important;
}

/* A ȘASEA COLOANĂ - DEADLINE */
#page-tasks table th:nth-child(6),
#page-tasks table td:nth-child(6) {
  min-width: 140px !important;
  width: 14% !important;
}

/* A ȘAPTEA COLOANĂ - CALE */
#page-tasks table th:nth-child(7),
#page-tasks table td:nth-child(7) {
  min-width: 50px !important;
  width: 5% !important;
  text-align: center !important;
}

/* A OPTA COLOANĂ - ACȚIUNI */
#page-tasks table th:nth-child(8),
#page-tasks table td:nth-child(8) {
  min-width: 100px !important;
  width: 10% !important;
  text-align: center !important;
}

/* Header styling */
#page-tasks table th {
  background: #f8f9fa !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #6b7280 !important;
  white-space: nowrap !important;
  border-bottom: 2px solid #e5e7eb !important;
}

/* Text overflow în celule */
.task-title-text,
.task-project {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* ASCUNDE COMPLET rândul cu butoane mobile */
tr.task-row-actions {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Hover pe rânduri */
#page-tasks table tbody tr:hover {
  background: #f3f4f6 !important;
}

/* Sticky header */
#page-tasks table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
}

#page-tasks .table-wrap {
  overflow-x: auto;
  margin: 0;
  padding: 0;
}

/* Task actions buttons */
#page-tasks .task-actions {
  display: flex !important;
  justify-content: center !important;
  gap: 4px !important;
}

[data-theme="dark"] #page-tasks table th {
  background: var(--bg-alt, #1e2530);
  color: var(--text-secondary, #9ca3af);
}

[data-theme="dark"] #page-tasks table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* === PROJECT CARDS - DEADLINE BADGE === */
.project-card,
.pc {
  position: relative;
}

.project-deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 8px 0 4px 0;
}

.project-deadline-badge.overdue {
  background: #dc2626;
  color: #fff;
  animation: pulseRed 2s ease-in-out infinite;
}

.project-deadline-badge.urgent {
  background: #ea580c;
  color: #fff;
  animation: pulseOrange 2s ease-in-out infinite;
}

.project-deadline-badge.soon {
  background: #ca8a04;
  color: #fff;
}

.project-deadline-badge.ok {
  background: #16a34a;
  color: #fff;
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

@keyframes pulseOrange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(234, 88, 12, 0); }
}

/* === SIDEBAR - FEEDBACK ȘI LOGOUT FIXATE JOS === */
.sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 10px;
}

.sidebar-bottom {
  flex-shrink: 0;
  border-top: 1px solid var(--border-light, #e5e7eb);
  padding: 8px;
  background: var(--bg-card, #fff);
  margin-top: auto;
}

.sidebar .feedback-item {
  color: var(--brand, #0e5a64) !important;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 4px;
}

.sidebar .feedback-item:hover {
  background: rgba(14, 90, 100, 0.1) !important;
}

.sidebar .logout-item {
  color: #dc2626 !important;
  font-weight: 600;
  background: rgba(220, 38, 38, 0.08);
  border-radius: 8px;
}

.sidebar .logout-item:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

[data-theme="dark"] .sidebar-bottom {
  border-color: var(--border, #374151);
  background: var(--bg-card, #1f2937);
}

[data-theme="dark"] .sidebar .feedback-item:hover {
  background: rgba(14, 90, 100, 0.2) !important;
}

[data-theme="dark"] .sidebar .logout-item {
  background: rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] .sidebar .logout-item:hover {
  background: rgba(220, 38, 38, 0.25) !important;
  color: #f87171 !important;
}

/* === FEEDBACK BUTTON === */
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.feedback-btn .feedback-badge,
.bell-btn .bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* FAB Feedback - doar pe mobil */
.fab-feedback {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand, #0e5a64);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.fab-feedback:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .fab-feedback { display: flex; }
  .feedback-btn { display: none !important; }
}

/* === HEADER LAYOUT === */
.header {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg, #fff);
}

[data-theme="dark"] .header {
  background: var(--bg, #111827);
}

/* === BUTON TASK-URILE MELE ACTIV === */
#btnMyTasks.active {
  background: var(--brand, #0e5a64) !important;
  color: #fff !important;
  border-color: var(--brand, #0e5a64) !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .ticker-bar {
    font-size: 12px;
    height: 36px;
  }
  
  .ticker-slide {
    padding: 0 100px 0 12px;
  }
  
  .ticker-text {
    font-size: 12px;
  }
  
  #page-tasks table {
    table-layout: auto;
  }
  
  #page-tasks table th,
  #page-tasks table td {
    padding: 8px 6px;
    font-size: 13px;
  }
  
  .logout-message {
    flex-direction: column;
    text-align: center;
    padding: 12px;
  }
  
  .sidebar-bottom {
    padding: 6px;
  }
}

/* === LOGIN PAGE FLEX FIX === */
#loginPage.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

/* ============================================
   FIX DECALARE TABEL TASK-URI
   Problema: ::before pe <tr> creează celulă fantomă
   Soluția: Mutăm bara colorată pe prima celulă <td>
   ============================================ */

/* DEZACTIVEAZĂ bara pe TR (cauza problemei) */
#page-tasks tbody tr::before {
  display: none !important;
  content: none !important;
}

/* ACTIVEAZĂ bara pe prima celulă TD */
#page-tasks tbody tr > td:first-child {
  position: relative !important;
  padding-left: 20px !important; /* Spațiu pentru bară */
}

#page-tasks tbody tr > td:first-child::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 4px !important;
  border-radius: 0 4px 4px 0 !important;
  background: #9ca3af !important; /* Default gri */
}

/* Culori pentru fiecare prioritate */
#page-tasks tbody tr.priority-low > td:first-child::before {
  background: #34a853 !important; /* Verde */
}

#page-tasks tbody tr.priority-medium > td:first-child::before {
  background: #fbbc04 !important; /* Galben */
}

#page-tasks tbody tr.priority-high > td:first-child::before {
  background: #ea4335 !important; /* Roșu */
}

#page-tasks tbody tr.priority-critical > td:first-child::before {
  background: #9334e6 !important; /* Mov */
}

/* Fix pentru header - aliniere cu padding-ul nou */
#page-tasks table th:first-child {
  padding-left: 20px !important;
}

/* Task-uri Done - bară verde deschis */
#page-tasks tbody tr.done > td:first-child::before {
  background: #86efac !important;
}

/* Task-uri Overdue - bară roșie intensă */
#page-tasks tbody tr.overdue > td:first-child::before {
  background: #dc2626 !important;
}
/* ============================================
   PROJECT CARDS - ÎNĂLȚIME UNIFORMĂ
   ============================================ */

/* Grid cu rânduri de înălțime egală */
#projectsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  grid-auto-rows: 1fr; /* Forțează aceeași înălțime pe rând */
  gap: 24px;
  align-items: stretch;
}

/* Card - stretch complet */
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px; /* Înălțime minimă */
}

/* Body - crește pentru a umple spațiul */
.project-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  min-height: 0;
  overflow: hidden;
}

/* Descriere - max 3 linii, cu fade */
.project-desc {
  color: #5f6368;
  font-size: 13px;
  line-height: 1.5;
  max-height: 60px; /* ~3 linii */
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.project-desc:not(:empty)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, #fff);
}

/* Meta info (cale, deadline) */
.project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
  flex-shrink: 0;
}

.project-meta code {
  font-size: 11px;
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Secțiunea Task-uri - SE EXTINDE să umple spațiul rămas */
.project-tasks-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 12px;
  margin-top: auto;
}

.project-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.tasks-label {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.btn-add-task {
  font-size: 12px;
  color: var(--brand, #0e5a64);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-add-task:hover {
  text-decoration: underline;
}

/* Lista de task-uri în card - crește */
.project-tasks {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Task item în card */
.pt-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid #e5e7eb;
}

.pt-item:hover {
  background: #f0f7ff;
  border-color: var(--brand, #0e5a64);
}

.pt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pt-dot.low { background: #34a853; }
.pt-dot.medium { background: #fbbc04; }
.pt-dot.high { background: #ea4335; }
.pt-dot.critical { background: #9334e6; }

.pt-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.pt-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #888;
  flex-shrink: 0;
}

/* Mesaj "Nu există task-uri" centrat */
.loading-tasks {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: #999;
  font-size: 13px;
  font-style: italic;
}

/* Buton "+X task-uri" */
.project-tasks .pv-more {
  margin-top: auto;
  align-self: stretch;
  justify-content: center;
}

/* Footer card - fixat jos */
.project-card-footer {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fafafa;
  flex-shrink: 0;
}

.project-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.btn-action-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* ============================================
   MODAL PROJECT VIEW - LAYOUT FIX
   ============================================ */

#modalProjectView .box {
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#pvTitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1a1a1a;
}

#pvDesc {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  max-height: 120px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

#pvMeta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

#pvMeta > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

#pvMeta strong {
  color: #666;
  min-width: 100px;
}

#pvMeta code {
  background: #f1f3f4;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#pvMeta a {
  color: var(--brand, #0e5a64);
}

/* Lista task-uri în modal */
#pvTasks {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  background: #fafafa;
}

#pvTasks .pt-item {
  margin-bottom: 6px;
}

#pvTasks .pt-item:last-child {
  margin-bottom: 0;
}

#pvFooter {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #eee;
}

/* Dark mode pentru cards */
[data-theme="dark"] .project-tasks-section {
  background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .pt-item {
  background: var(--bg-card, #1f2937);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .pt-item:hover {
  background: rgba(79, 70, 229, 0.1);
}

[data-theme="dark"] .project-desc::after {
  background: linear-gradient(transparent, var(--bg-card, #1f2937));
}

[data-theme="dark"] #pvDesc {
  background: var(--bg-alt, #1e2530);
}

[data-theme="dark"] #pvTasks {
  background: var(--bg-alt, #1e2530);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .project-card-footer {
  background: var(--bg-alt, #1e2530);
  border-color: var(--border, #374151);
}

/* === ASCUNDE BUTON FEEDBACK DIN HEADER === */
#btnFeedback {
  display: none !important;
}
/* ============================================
   TASK PANEL - SIDEBAR STYLING
   Versiune: 4.0 - Adăugat pe baza live fixes.css
   ============================================ */

/* Panel Container */
.task-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.task-panel.open {
  display: flex;
}

.panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.panel-container {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  background: var(--bg-card, #fff);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.task-panel.open .panel-container {
  transform: translateX(0);
}

/* Panel Header */
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card, #fff);
  flex-shrink: 0;
}

.panel-title-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.panel-task-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text, #1f2a2e);
  line-height: 1.3;
  word-wrap: break-word;
}

.panel-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: #667eea;
  align-self: flex-start;
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: var(--bg, #f8f9fa);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text, #333);
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--bg-card, #fff);
  border-color: var(--brand, #0e5a64);
  color: var(--brand, #0e5a64);
}

/* Panel Tabs */
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding: 0 16px;
  background: var(--bg-card, #fff);
  flex-shrink: 0;
  overflow-x: auto;
}

.panel-tab {
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #6b7280);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-tab:hover {
  color: var(--text, #1f2a2e);
}

.panel-tab.active {
  color: var(--brand, #0e5a64);
  border-bottom-color: var(--brand, #0e5a64);
}

.panel-tab-badge {
  background: var(--brand, #0e5a64);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Panel Content */
.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  background: var(--bg, #f8f9fa);
}

.panel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--muted, #6b7280);
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border, #e5e7eb);
  border-top-color: var(--brand, #0e5a64);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   PANEL DETAILS TAB
   ============================================ */

.panel-details {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 16px;
}

.detail-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.detail-item > span:last-child {
  font-size: 14px;
  color: var(--text, #1f2a2e);
  font-weight: 500;
}

/* Deadline */
.detail-deadline {
  font-size: 14px;
  color: var(--text, #1f2a2e);
  font-weight: 500;
}

.detail-deadline.overdue {
  color: #dc2626;
  font-weight: 700;
}

.deadline-warning {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
}

/* Description */
.detail-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text, #333);
  background: var(--bg, #f8f9fa);
  padding: 12px;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.detail-description:empty::before {
  content: 'Fără descriere';
  color: var(--muted, #9ca3af);
  font-style: italic;
}

/* Path */
.detail-path {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg, #f8f9fa);
  padding: 10px 12px;
  border-radius: 8px;
}

.detail-path code {
  flex: 1;
  font-size: 12px;
  color: var(--text, #333);
  word-break: break-all;
}

/* ============================================
   FILE VIEWER MODAL
   ============================================ */

.file-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.file-viewer-modal.open {
  opacity: 1;
  visibility: visible;
}

.fv-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.fv-container {
  position: relative;
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  max-height: 900px;
  background: var(--bg-card, #fff);
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.file-viewer-modal.open .fv-container {
  transform: scale(1);
}

/* File Viewer Header */
.fv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg, #f8f9fa);
  border-bottom: 1px solid var(--border, #e5e7eb);
  flex-shrink: 0;
  gap: 16px;
}

.fv-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.fv-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.fv-filename {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1f2a2e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fv-type-badge {
  padding: 3px 8px;
  background: var(--brand, #0e5a64);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.fv-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--bg-card, #fff);
  color: var(--text, #333);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.fv-btn:hover {
  background: var(--bg, #f3f4f6);
  border-color: var(--brand, #0e5a64);
  color: var(--brand, #0e5a64);
}

.fv-close {
  font-weight: bold;
  color: #6b7280;
}

.fv-close:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

.fv-separator {
  width: 1px;
  height: 24px;
  background: var(--border, #e5e7eb);
  margin: 0 4px;
}

.fv-nav-info,
.fv-page-info,
.fv-zoom-level {
  font-size: 12px;
  color: var(--muted, #6b7280);
  min-width: 50px;
  text-align: center;
  font-weight: 600;
}

/* File Viewer Body */
.fv-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #1a1a1a;
  position: relative;
}

.fv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
}

.fv-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Image Viewer */
.fv-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  overflow: auto;
}

.fv-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}

/* Video & Audio */
.fv-video-wrapper,
.fv-audio-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
}

.fv-video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #000;
}

.fv-audio {
  width: 100%;
  max-width: 500px;
}

/* PDF Viewer */
.fv-pdf-wrapper {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 20px;
  background: #525659;
}

.fv-pdf-page {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Text/Code Viewer */
.fv-code-wrapper {
  width: 100%;
  height: 100%;
  overflow: auto;
  background: #1e1e1e;
}

.fv-code-content {
  padding: 20px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #d4d4d4;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.fv-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #2d2d2d;
  border-bottom: 1px solid #3e3e3e;
}

.fv-code-lang {
  font-size: 12px;
  color: #9cdcfe;
  font-weight: 600;
}

/* Unsupported & Error */
.fv-unsupported-wrapper,
.fv-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  text-align: center;
  color: #fff;
}

.fv-unsupported-icon,
.fv-error-icon {
  font-size: 64px;
}

.fv-unsupported-name {
  font-size: 18px;
  font-weight: 600;
}

.fv-unsupported-info,
.fv-error-msg {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

.fv-btn-primary,
.fv-download-alt {
  padding: 10px 24px;
  background: var(--brand, #0e5a64);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 8px;
}

.fv-btn-primary:hover,
.fv-download-alt:hover {
  background: #0a4a52;
}

/* Office Preview */
.fv-office-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.fv-office-frame {
  flex: 1;
  border: none;
  background: #fff;
}

/* Dark Mode */
[data-theme="dark"] .panel-container,
[data-theme="dark"] .panel-header,
[data-theme="dark"] .panel-tabs {
  background: var(--bg-card, #1f2937);
}

[data-theme="dark"] .panel-content {
  background: var(--bg, #111827);
}

[data-theme="dark"] .detail-section {
  background: var(--bg-card, #1f2937);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .detail-description,
[data-theme="dark"] .detail-path {
  background: var(--bg, #111827);
}

[data-theme="dark"] .fv-container {
  background: var(--bg-card, #1f2937);
}

[data-theme="dark"] .fv-header {
  background: var(--bg, #111827);
  border-color: var(--border, #374151);
}

/* ============================================
   PANEL CHAT STYLES
   ============================================ */

.panel-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted, #9ca3af);
  font-size: 14px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 90%;
}

.chat-msg.own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand, #0e5a64);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-bubble {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 10px 14px;
  max-width: 100%;
}

.chat-msg.own .chat-bubble {
  background: var(--brand, #0e5a64);
  border-color: var(--brand, #0e5a64);
  color: #fff;
}

.chat-user {
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #1f2a2e);
}

.chat-msg.own .chat-user {
  color: rgba(255,255,255,0.9);
}

.chat-time {
  font-size: 10px;
  color: var(--muted, #9ca3af);
}

.chat-body {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-body img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

/* Chat Input */
.chat-input-area {
  padding: 12px 16px;
  background: var(--bg-card, #fff);
  border-top: 1px solid var(--border, #e5e7eb);
  flex-shrink: 0;
}

.chat-editor-wrap {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg, #f8f9fa);
}

.chat-editor {
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  font-size: 14px;
  line-height: 1.5;
  outline: none;
}

.chat-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted, #9ca3af);
}

.chat-send-btn {
  padding: 10px 20px;
  background: var(--brand, #0e5a64);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================
   PANEL FILES TAB
   ============================================ */

.panel-files {
  padding: 16px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.file-item:hover {
  border-color: var(--brand, #0e5a64);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.file-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2a2e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  font-size: 11px;
  color: var(--muted, #9ca3af);
  margin-top: 2px;
}

.files-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted, #9ca3af);
}

/* ============================================
   PANEL HISTORY TAB
   ============================================ */

.panel-history {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
}

.history-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.history-body {
  flex: 1;
  min-width: 0;
}

.history-user {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1f2a2e);
}

.history-change {
  margin-top: 6px;
  font-size: 12px;
  padding: 6px 10px;
  background: var(--bg, #f8f9fa);
  border-radius: 6px;
}

.history-change .old {
  color: #dc2626;
  text-decoration: line-through;
}

.history-change .new {
  color: #16a34a;
  font-weight: 600;
}

.history-time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted, #9ca3af);
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .panel-container {
    max-width: 100%;
  }
  
  .fv-container {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  
  .fv-header {
    flex-wrap: wrap;
  }
  
  .fv-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
}
/* ============================================
   TASK ROW COLORS SIMPLIFICAT
   Bara = prioritate, fundal neutru
   ============================================ */

/* Anulăm background-ul colorat pe rânduri */
#page-tasks tbody tr,
#page-tasks tbody tr.priority-low,
#page-tasks tbody tr.priority-medium,
#page-tasks tbody tr.priority-high,
#page-tasks tbody tr.priority-critical,
#page-tasks tbody tr.overdue {
  background: transparent !important;
}

#page-tasks tbody tr:hover {
  background: #f8f9fa !important;
}

[data-theme="dark"] #page-tasks tbody tr:hover {
  background: rgba(255,255,255,0.05) !important;
}

/* Done rămâne cu opacity redus */
#page-tasks tbody tr.done {
  opacity: 0.7;
}

/* ============================================
   BADGE ÎNTÂRZIAT
   ============================================ */

.overdue-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  animation: pulseBadge 2s ease-in-out infinite;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
  white-space: nowrap;
}

@keyframes pulseBadge {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
  }
  50% { 
    transform: scale(1.02);
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.6);
  }
}

/* Deadline cell layout */
.task-deadline-cell {
  white-space: nowrap;
}

.task-deadline.overdue {
  color: #dc2626 !important;
  font-weight: 600;
}

.task-deadline.soon {
  color: #d97706 !important;
  font-weight: 500;
}

/* ============================================
   STATUS DROPDOWN INLINE
   ============================================ */

.status-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.status-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 12px;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.status-badge-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.status-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 180px;
  max-height: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.status-dropdown.open {
  max-height: 400px;
  overflow-y: auto;
  opacity: 1;
  transform: translateY(0);
}

.status-loading,
.status-error {
  padding: 12px 16px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

.status-error {
  color: #dc2626;
}

.status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}

.status-option:hover {
  background: #f3f4f6;
  border-left-color: var(--status-color, #9CA3AF);
}

.status-option.current {
  background: #e0f2fe;
  font-weight: 600;
  border-left-color: var(--status-color, #9CA3AF);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Dark mode pentru dropdown */
[data-theme="dark"] .status-dropdown {
  background: #1f2937;
  border: 1px solid #374151;
}

[data-theme="dark"] .status-option {
  color: #e5e7eb;
}

[data-theme="dark"] .status-option:hover {
  background: #374151;
}

[data-theme="dark"] .status-option.current {
  background: rgba(14, 90, 100, 0.3);
}

[data-theme="dark"] .status-loading,
[data-theme="dark"] .status-error {
  color: #9ca3af;
}

/* ============================================
   INLINE DROPDOWN-URI - PRIORITATE & ASIGNAT
   ============================================ */

.inline-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.priority-badge-btn,
.assignee-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 12px;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.assignee-badge-btn {
  background: #6b7280;
}

.priority-badge-btn:hover,
.assignee-badge-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.inline-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 180px;
  max-height: 0;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.inline-dropdown.open {
  max-height: 350px;
  overflow-y: auto;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-loading,
.dropdown-error {
  padding: 12px 16px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

.dropdown-error {
  color: #dc2626;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}

.dropdown-option:hover {
  background: #f3f4f6;
  border-left-color: var(--option-color, #9CA3AF);
}

.dropdown-option.current {
  background: #e0f2fe;
  font-weight: 600;
  border-left-color: var(--option-color, #9CA3AF);
}

.option-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Assignee dropdown specific */
.assignee-dropdown {
  min-width: 220px;
}

.assignee-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 8px 0;
}

.assignee-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  transition: background 0.15s ease;
}

.assignee-option:hover {
  background: #f3f4f6;
}

.assignee-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--brand, #0e5a64);
}

.assignee-name {
  flex: 1;
}

.assignee-actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 10px 10px;
}

.assignee-actions .btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 12px;
}

/* ============================================
   INLINE PATH EDIT
   ============================================ */

.inline-edit-wrap {
  position: relative;
  display: inline-block;
}

.inline-edit-wrap .task-path-icon {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.inline-edit-wrap .task-path-icon:hover {
  background: #f3f4f6;
}

.inline-edit-input {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: flex;
  gap: 6px;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  margin-top: 4px;
  min-width: 300px;
}

.inline-edit-input input {
  flex: 1;
  min-width: 200px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
}

.inline-edit-input input:focus {
  outline: none;
  border-color: var(--brand, #0e5a64);
  box-shadow: 0 0 0 2px rgba(14, 90, 100, 0.1);
}

.inline-edit-input .btn-sm {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.inline-edit-input .btn-primary {
  background: var(--brand, #0e5a64);
  color: #fff;
}

.inline-edit-input .btn-sm:not(.btn-primary) {
  background: #e5e7eb;
  color: #374151;
}

/* Dark mode pentru toate dropdown-urile inline */
[data-theme="dark"] .inline-dropdown {
  background: #1f2937;
  border: 1px solid #374151;
}

[data-theme="dark"] .dropdown-option,
[data-theme="dark"] .assignee-option {
  color: #e5e7eb;
}

[data-theme="dark"] .dropdown-option:hover,
[data-theme="dark"] .assignee-option:hover {
  background: #374151;
}

[data-theme="dark"] .dropdown-option.current {
  background: rgba(14, 90, 100, 0.3);
}

[data-theme="dark"] .assignee-actions {
  background: #374151;
  border-color: #4b5563;
}

[data-theme="dark"] .inline-edit-input {
  background: #1f2937;
  border: 1px solid #374151;
}

[data-theme="dark"] .inline-edit-input input {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .inline-edit-input .btn-sm:not(.btn-primary) {
  background: #4b5563;
  color: #e5e7eb;
}

/* ============================================
   FILTRU TASK-URI - BUTON ÎN LINIE
   ============================================ */

.filters #btnMyTasks {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.filters #btnMyTasks.active {
  background: var(--brand, #0e5a64) !important;
  color: #fff !important;
  border-color: var(--brand, #0e5a64) !important;
  box-shadow: 0 2px 8px rgba(14, 90, 100, 0.3);
}

/* Hide assignee filter for non-admins (backup if JS fails) */
.filters #filterAssignee {
  min-width: 140px;
}

/* Responsive pentru filtre */
@media (max-width: 768px) {
  .filters {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .filters #btnMyTasks {
    order: -1;
    width: 100%;
    justify-content: center;
  }
  
  .filters select,
  .filters input {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}

/* ============================================
   MODAL TASK MODERN - FULLSCREEN STYLE
   ============================================ */

/* Override pentru modal task - mai lat și modern */
#modalTask .box {
  width: 95vw !important;
  max-width: 1400px !important;
  min-height: 85vh;
  max-height: 95vh;
  padding: 0 !important;
  border-radius: 16px !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#modalTask .box.split-grid {
  display: grid !important;
  grid-template-columns: 1fr 380px;
  gap: 0;
  padding: 0 !important;
}

/* Header modal cu gradient */
#modalTask .modal-main {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

#modalTask #taskTitleH {
  margin: 0;
  padding: 24px 30px 20px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 12px;
}

#modalTask #taskTitleH::before {
  content: '📝';
  font-size: 1.3rem;
}

/* Form styling */
#modalTask #taskForm {
  flex: 1;
  padding: 24px 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#modalTask .form-group {
  margin-bottom: 0;
}

#modalTask .form-group label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#modalTask input:not([type="hidden"]),
#modalTask select {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #f9fafb;
}

#modalTask input:focus,
#modalTask select:focus {
  outline: none;
  border-color: var(--brand, #0e5a64);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 90, 100, 0.1);
}

#modalTask input#t_title {
  font-size: 18px;
  font-weight: 600;
  padding: 14px 18px;
}

/* Rich text editor */
#modalTask #t_desc_editor {
  min-height: 200px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  transition: all 0.2s ease;
}

#modalTask #t_desc_editor:focus {
  outline: none;
  border-color: var(--brand, #0e5a64);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 90, 100, 0.1);
}

/* Row layout */
#modalTask .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0;
}

#modalTask .row .col {
  padding: 0;
}

/* Select multiple pentru asignați */
#modalTask select#t_assigned {
  min-height: 120px;
}

/* Buttons */
#modalTask .btn {
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
}

#modalTask .btn-primary {
  background: linear-gradient(135deg, var(--brand, #0e5a64) 0%, #0a4a52 100%);
  box-shadow: 0 4px 12px rgba(14, 90, 100, 0.3);
}

#modalTask .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 90, 100, 0.4);
}

/* Close button */
#modalTask .xbtn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e5e7eb;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modalTask .xbtn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Chat sidebar */
#modalTask .modal-chat {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#modalTask .modal-chat h4 {
  padding: 24px 20px 16px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

#modalTask .modal-chat .inline-chat {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* Path input special */
#modalTask input#t_path {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 13px;
  background: #1e293b;
  color: #34d399;
  border-color: #334155;
}

#modalTask input#t_path:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

#modalTask input#t_path::placeholder {
  color: #64748b;
}

/* Priority colors în select */
#modalTask select#t_priority option[value="low"] { background: #dcfce7; }
#modalTask select#t_priority option[value="medium"] { background: #fef9c3; }
#modalTask select#t_priority option[value="high"] { background: #fee2e2; }
#modalTask select#t_priority option[value="critical"] { background: #f3e8ff; }

/* Responsive */
@media (max-width: 1024px) {
  #modalTask .box.split-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  
  #modalTask .modal-chat {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  #modalTask .box {
    width: 100vw !important;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0 !important;
  }
  
  #modalTask .row {
    grid-template-columns: 1fr;
  }
  
  #modalTask #taskForm {
    padding: 16px;
  }
}

/* Dark mode */
[data-theme="dark"] #modalTask .modal-main {
  background: #1f2937;
}

[data-theme="dark"] #modalTask #taskTitleH {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #f3f4f6;
  border-color: #374151;
}

[data-theme="dark"] #modalTask .form-group label {
  color: #d1d5db;
}

[data-theme="dark"] #modalTask input,
[data-theme="dark"] #modalTask select,
[data-theme="dark"] #modalTask #t_desc_editor {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

[data-theme="dark"] #modalTask .modal-chat {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-color: #374151;
}

[data-theme="dark"] #modalTask .modal-chat h4 {
  background: #1f2937;
  color: #f3f4f6;
  border-color: #374151;
}

[data-theme="dark"] #modalTask .xbtn {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

[data-theme="dark"] #modalTask .xbtn:hover {
  background: #7f1d1d;
  border-color: #dc2626;
  color: #fca5a5;
}

/* ============================================
   CHAT RICH MEDIA + DELETE BUTTON
   ============================================ */

/* Delete button în mesaj */
.msg .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.msg-delete {
  background: none;
  border: none;
  padding: 2px 6px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.msg:hover .msg-delete {
  opacity: 0.6;
}

.msg-delete:hover {
  opacity: 1 !important;
  background: #fee2e2;
}

/* Animație delete */
.msg {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Files în mesaj */
.msg-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.msg-file-img {
  display: block;
  max-width: 200px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.msg-file-img:hover {
  transform: scale(1.02);
}

.msg-file-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
}

.msg-file-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
  min-width: 180px;
}

.msg-file-link:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border-color: #7dd3fc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.msg-file-link .file-icon {
  font-size: 24px;
}

.msg-file-link .file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.msg-file-link .file-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.msg-file-link .file-size {
  font-size: 11px;
  color: #6b7280;
}

/* Inline chat improvements */
.inline-chat .msg {
  margin: 8px 12px;
}

.inline-chat .msg .bubble {
  max-width: 100%;
}

.inline-chat .msg-files {
  max-width: 100%;
}

.inline-chat .msg-file-img {
  max-width: 150px;
}

.inline-chat .msg-file-img img {
  max-height: 120px;
}

/* Task panel chat files */
.panel-chat-messages .msg-files {
  max-width: 280px;
}

.panel-chat-messages .msg-file-link {
  min-width: 140px;
}

/* Dark mode */
[data-theme="dark"] .msg-delete:hover {
  background: #7f1d1d;
}

[data-theme="dark"] .msg-files {
  border-top-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .msg-file-link {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-color: #374151;
  color: #e5e7eb;
}

[data-theme="dark"] .msg-file-link:hover {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e3a5f 100%);
  border-color: #3b82f6;
}

[data-theme="dark"] .msg-file-link .file-size {
  color: #9ca3af;
}

/* Delete button în task panel messages */
.chat-message .msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-message .msg-delete-btn {
  background: none;
  border: none;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  border-radius: 4px;
  margin-left: auto;
}

.chat-message:hover .msg-delete-btn {
  opacity: 0.5;
}

.chat-message .msg-delete-btn:hover {
  opacity: 1 !important;
  background: #fee2e2;
}

[data-theme="dark"] .chat-message .msg-delete-btn:hover {
  background: #7f1d1d;
}