/* ==========================================================================
   GESTIONALE FONTANILI - KANBAN LIGHT & DARK BROWN STYLING
   ========================================================================== */

/* Toolbar Bar */
.toolbar-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.workspace-section {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.workspace-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.workspace-tab:hover {
  background: #eae1d1;
  color: var(--text-main);
}

.workspace-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.workspace-tab.active .column-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Filter & Search Bar */
.filter-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 7px 12px 7px 34px;
  color: var(--text-main);
  font-size: 0.85rem;
  width: 200px;
  transition: width var(--transition-fast), border-color var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  width: 260px;
  border-color: var(--primary);
  background: var(--bg-surface);
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Read-Only Banner Notice */
.readonly-banner {
  background: var(--primary-light);
  border-bottom: 1px solid rgba(74, 44, 27, 0.2);
  color: var(--primary);
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Main Kanban Board Layout */
.kanban-board {
  flex: 1;
  display: flex;
  gap: 22px;
  padding: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: flex-start;
}

/* Column Style */
.kanban-column {
  width: 320px;
  min-width: 320px;
  max-height: 100%;
  background: #ede3d3;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.kanban-column.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Column Header */
.column-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.column-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.column-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.column-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.column-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(74, 44, 27, 0.12);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Cards Drop Area */
.column-cards {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

/* Kanban Card */
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: grab;
  transition: all var(--transition-fast);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kanban-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.readonly-mode .kanban-card {
  cursor: pointer;
}

/* Card Header Tags & Priority */
.card-header-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.priority-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.priority-high {
  background: rgba(200, 109, 75, 0.12);
  color: var(--accent-terracotta);
  border: 1px solid rgba(200, 109, 75, 0.3);
}

.priority-medium {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid rgba(194, 153, 56, 0.3);
}

.priority-low {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(74, 44, 27, 0.3);
}

/* Card Title */
.card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  line-height: 1.35;
}

/* Card Metadata Elements */
.card-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Cloud Folder Link Badges */
.cloud-link-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gold-light);
  border: 1px solid rgba(194, 153, 56, 0.3);
  color: var(--accent-gold);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.cloud-link-badge:hover {
  background: var(--accent-gold);
  color: #ffffff;
}

/* Checklist Progress */
.card-progress {
  margin-top: 10px;
}

.progress-bar-bg {
  height: 5px;
  background: #e4dac7;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}

/* Add Card Button */
.add-card-btn {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed var(--border-color-hover);
  border-radius: var(--radius-md);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  transition: all var(--transition-fast);
}

.add-card-btn:hover {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Excel-Like Table View Styles */
.excel-table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.excel-table th {
  background: #ede3d3;
  color: var(--primary);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.excel-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.excel-table tbody tr {
  transition: background var(--transition-fast);
  cursor: pointer;
}

.excel-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.active-view-btn {
  background: var(--primary) !important;
  color: #ffffff !important;
}
