/* ==========================================================================
   styles.css - Design System & Modern Responsive UI for TaskFlow
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Color Palette - Light Mode */
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-inverse: #ffffff;
  
  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-strong: #cbd5e1;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #0284c7;
  --info-light: #f0f9ff;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --sidebar-width: 270px;
  --header-height: 64px;
}

/* Dark Mode Overrides */
html.dark {
  --bg-app: #090d16;
  --bg-sidebar: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-subtle: #182234;
  --bg-surface-hover: #334155;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #0f172a;
  
  --border-light: #334155;
  --border-subtle: #1e293b;
  --border-strong: #475569;
  
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-border: #4338ca;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Layout Frame */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  flex-shrink: 0;
}

.sidebar-brand-box {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.brand-badge {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.sidebar-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 8px;
}

.sidebar-section-title span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-project-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.sidebar-project-item:hover {
  background-color: var(--bg-surface-subtle);
}

.sidebar-project-item.is-active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.project-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.project-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.project-item-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-item-count {
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-surface-subtle);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.sidebar-empty-hint {
  font-size: 12px;
  color: var(--text-subtle);
  padding: 8px 10px;
  line-height: 1.4;
  font-style: italic;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top App Header */
.app-header {
  height: var(--header-height);
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.search-input-wrap {
  position: relative;
  width: 280px;
}

.search-input-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.search-input-wrap input:focus {
  background-color: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.header-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-select {
  height: 36px;
  padding: 0 10px;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Navigation View Switcher (Kanban, Gantt, Lista, Calendário, Relatórios) */
.view-tabs-bar {
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.view-tabs-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-view-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-view-btn:hover {
  color: var(--text-main);
}

.nav-view-btn.is-active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* Active Project Banner */
.active-project-banner {
  padding: 18px 24px;
  background: linear-gradient(180deg, var(--bg-sidebar) 0%, var(--bg-app) 100%);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

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

.banner-indicator {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.banner-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.banner-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Main View Body */
.main-view-container {
  flex: 1;
  padding: 24px;
  overflow-x: auto;
}

/* ==========================================================================
   Buttons & UI Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-xs {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
}

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

.btn-outline {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background-color: var(--bg-surface-subtle);
}

.btn-dashed {
  background-color: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}

.btn-dashed:hover {
  background-color: var(--bg-surface);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 500;
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-main);
}

.btn-icon.btn-xs {
  width: 24px;
  height: 24px;
}

.btn-group {
  display: inline-flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

.btn-group .btn {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--border-strong);
}

.btn-group .btn:last-child {
  border-right: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.badge-subtle {
  background-color: var(--bg-surface-subtle);
  color: var(--text-muted);
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.badge-danger {
  background-color: var(--danger-light);
  color: var(--danger);
}

/* Priority Pills */
.card-priority-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-priority-urgent {
  background-color: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.badge-priority-high {
  background-color: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.badge-priority-medium {
  background-color: rgba(234, 179, 8, 0.14);
  color: #ca8a04;
}

.badge-priority-low {
  background-color: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

/* ==========================================================================
   Kanban Board Styles
   ========================================================================== */
.kanban-board {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  min-height: calc(100vh - 210px);
  padding-bottom: 24px;
}

.kanban-column {
  width: 320px;
  flex-shrink: 0;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
  box-shadow: var(--shadow-xs);
}

.kanban-column-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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

.column-color-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

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

.column-badge {
  font-size: 11px;
  font-weight: 700;
  background-color: var(--bg-surface-subtle);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.column-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kanban-tasks-list {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
  transition: background-color 0.15s ease;
}

.kanban-tasks-list.drag-over {
  background-color: var(--primary-light);
  outline: 2px dashed var(--primary);
  outline-offset: -4px;
}

.kanban-empty-column {
  padding: 30px 10px;
  text-align: center;
  color: var(--text-subtle);
  font-size: 12px;
  font-style: italic;
}

.kanban-column-footer-btn {
  padding: 10px 16px;
  background-color: transparent;
  border: none;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transition: all 0.15s ease;
}

.kanban-column-footer-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-main);
}

.kanban-add-column-card {
  width: 280px;
  flex-shrink: 0;
}

.btn-add-col {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
}

/* Kanban Cards */
.kanban-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.kanban-card.task-completed {
  opacity: 0.75;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-project-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 3px solid #6366f1;
  padding-left: 6px;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-code {
  font-size: 10px;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-subtle);
  background-color: var(--bg-surface-subtle);
  padding: 1px 4px;
  border-radius: 4px;
}

.card-actions-quick {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.3;
  transition: opacity 0.15s ease;
}

.kanban-card:hover .card-actions-quick {
  opacity: 1;
}

.btn-card-action {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
}

.btn-card-action:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-main);
}

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

.card-description {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.task-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.card-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-surface-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  max-width: 100%;
}

.location-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Checklist Progress Meter */
.card-checklist-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.meter-bar {
  flex: 1;
  height: 5px;
  background-color: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background-color: var(--success);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.meter-text {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
}

/* Card Footer */
.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: 2px;
}

.card-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.card-date-badge.date-overdue {
  color: var(--danger);
  font-weight: 600;
}

.overdue-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  background-color: var(--danger-light);
  color: var(--danger);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 3px;
}

.card-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-reminder-badge {
  color: var(--primary);
  display: flex;
  align-items: center;
}

/* ==========================================================================
   Gantt Timeline Chart Styles
   ========================================================================== */
.gantt-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.gantt-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.gantt-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gantt-period-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.gantt-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gantt-chart-container {
  display: flex;
  overflow-x: auto;
  min-height: 480px;
}

.gantt-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
  background-color: var(--bg-surface-subtle);
}

.gantt-sidebar-header {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
}

.gantt-sidebar-row {
  height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-surface);
}

.sidebar-task-info {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  cursor: pointer;
  flex: 1;
}

.gantt-task-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-task-text {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-task-code {
  font-size: 10px;
  font-family: monospace;
  color: var(--text-subtle);
  font-weight: 600;
}

.sidebar-task-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-task-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.gantt-timeline {
  flex: 1;
  min-width: 600px;
  display: flex;
  flex-direction: column;
}

.gantt-timeline-header {
  height: 52px;
  display: grid;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-surface-subtle);
}

.gantt-header-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-light);
  position: relative;
}

.gantt-header-day.is-today {
  background-color: var(--primary-light);
}

.gantt-header-day.is-weekend {
  background-color: rgba(0, 0, 0, 0.02);
}

.day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.day-label {
  font-size: 10px;
  color: var(--text-muted);
}

.month-label {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.gantt-timeline-row {
  height: 52px;
  display: grid;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.gantt-cell {
  border-right: 1px solid var(--border-light);
  height: 100%;
}

.gantt-cell.is-today {
  background-color: rgba(99, 102, 241, 0.05);
}

.gantt-cell.is-weekend {
  background-color: rgba(0, 0, 0, 0.015);
}

.gantt-task-bar {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 2px;
  right: 2px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 5;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gantt-task-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gantt-bar-progress {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.gantt-bar-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 2;
}

.gantt-bar-pct {
  font-size: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 6px;
  position: relative;
  z-index: 2;
}

.gantt-empty-state {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  width: 100%;
}

/* ==========================================================================
   List / Table View Styles
   ========================================================================== */
.list-view-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.list-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.list-count-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.table-responsive {
  overflow-x: auto;
}

.tasks-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tasks-table th {
  background-color: var(--bg-surface-subtle);
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.tasks-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.tasks-table th.sortable:hover {
  color: var(--text-main);
}

.tasks-table td {
  padding: 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.table-task-row:hover td {
  background-color: var(--bg-surface-subtle);
}

.table-task-row.task-row-completed td {
  opacity: 0.65;
}

.task-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.table-task-title-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-code-badge {
  font-size: 10px;
  font-family: monospace;
  font-weight: 700;
  background-color: var(--bg-surface-subtle);
  color: var(--text-muted);
  padding: 2px 5px;
  border-radius: 4px;
}

.task-title-link {
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

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

.table-checklist-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.table-project-tag {
  font-size: 12px;
  font-weight: 600;
  border-left: 3px solid #6366f1;
  padding-left: 6px;
}

.table-column-select {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.table-dates-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.table-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  max-width: 150px;
}

.loc-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.table-action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-empty-row {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   Calendar View Styles
   ========================================================================== */
.calendar-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.calendar-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.calendar-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-month-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.calendar-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-grid {
  display: flex;
  flex-direction: column;
}

.calendar-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-light);
}

.calendar-weekday-cell {
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day-cell {
  min-height: 110px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.calendar-day-cell:nth-child(7n) {
  border-right: none;
}

.calendar-day-cell:hover {
  background-color: var(--bg-surface-subtle);
}

.calendar-day-cell.is-other-month {
  background-color: rgba(0, 0, 0, 0.02);
  opacity: 0.5;
}

.calendar-day-cell.is-today {
  background-color: var(--primary-light);
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.day-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.is-today .day-number {
  background-color: var(--primary);
  color: #fff;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-add-on-date {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.calendar-day-cell:hover .btn-add-on-date {
  opacity: 1;
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.calendar-task-pill {
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-left-width: 3px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.calendar-task-pill:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-task-pill.is-completed {
  text-decoration: line-through;
  opacity: 0.6;
}

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

.pill-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-more-pill {
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
  padding: 1px 4px;
}

/* ==========================================================================
   Market-Standard Reports Dashboard Styles
   ========================================================================== */
.reports-dashboard-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.reports-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reports-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.reports-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.reports-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* KPI Cards */
.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card.kpi-alert {
  border-color: rgba(239, 68, 68, 0.4);
}

.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.kpi-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.kpi-caption {
  font-size: 11px;
  color: var(--text-subtle);
}

/* Charts Grid */
.reports-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 18px;
}

@media (max-width: 1200px) {
  .reports-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.chart-card-tag {
  font-size: 11px;
  color: var(--text-muted);
  background-color: var(--bg-surface-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.chart-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.canvas-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

/* Priority Meter Bars */
.priority-bars-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 0;
}

.priority-meter-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meter-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.meter-name {
  font-weight: 600;
  color: var(--text-main);
}

.meter-count {
  color: var(--text-muted);
}

.meter-track {
  width: 100%;
  height: 7px;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

/* Reports Detailed Table */
.reports-table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.reports-table-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.reports-analytics-table th,
.reports-analytics-table td {
  padding: 12px 16px;
}

/* ==========================================================================
   Modals & Forms
   ========================================================================== */
.modal-container {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-container.modal-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  position: relative;
  z-index: 101;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  margin: 20px;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog.modal-sm {
  max-width: 480px;
}

.modal-content {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-badge-code {
  font-size: 10px;
  font-family: monospace;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.modal-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-form {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}

.form-label.required::after {
  content: "*";
  color: var(--danger);
  margin-left: 2px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.form-input-sm, .form-select-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-inside-input {
  position: absolute;
  right: 6px;
  height: 24px;
  padding: 0 8px;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
}

.btn-inside-input.is-virtual {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Form Section Box (Reminders) */
.form-section-box {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.section-box-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reminder-options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-light);
}

/* Tags Picker */
.tags-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tags-selector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-selector-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tag-selector-chip.is-selected {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

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

/* Checklist Builder */
.checklist-builder {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-builder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-surface);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.checklist-builder-item.is-done .checklist-item-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.checklist-item-text {
  flex: 1;
  font-size: 12px;
}

.checklist-add-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Color Dot Palette Picker */
.color-palette-picker {
  display: flex;
  gap: 10px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.color-dot:hover {
  transform: scale(1.15);
}

.color-dot.is-active {
  border-color: #fff;
  outline: 2px solid var(--primary);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--bg-surface);
}

/* ==========================================================================
   Dropdowns & Notifications Panel
   ========================================================================== */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  width: 170px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  display: none;
  flex-direction: column;
  z-index: 50;
}

.dropdown:focus-within .dropdown-menu,
.dropdown:hover .dropdown-menu {
  display: flex;
}

.dropdown-item {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-main);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.dropdown-item:hover {
  background-color: var(--bg-surface-subtle);
}

.dropdown-item.text-danger {
  color: var(--danger);
}

/* Notifications Bell & Dropdown */
.notifications-wrapper {
  position: relative;
}

.notifications-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notifications-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  max-height: 400px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: none;
  flex-direction: column;
  z-index: 60;
  overflow: hidden;
}

.notifications-panel.is-open {
  display: flex;
  animation: slideUp 0.15s ease;
}

.notifications-panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
}

.notifications-items-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.notification-item:hover {
  background-color: var(--bg-surface-subtle);
}

.notification-item.is-unread {
  background-color: var(--primary-light);
}

.notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-top: 5px;
  flex-shrink: 0;
}

.notif-text {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.4;
}

.notif-time {
  font-size: 10px;
  color: var(--text-subtle);
  margin-top: 3px;
  display: block;
}

.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  min-width: 280px;
  max-width: 400px;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--primary);
}

.toast-message {
  flex: 1;
}

.toast-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
}

.toast-fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

/* Utilities & Animations */
.animate-slide-in {
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   Authentication & Multi-User Profile Styles
   ========================================================================== */
.modal-auth-dialog {
  max-width: 440px !important;
}

.auth-modal-content {
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-modal-header {
  padding: 28px 24px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.auth-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
}

.auth-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.auth-brand-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.auth-heading {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.auth-subheading {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.4;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-block {
  width: 100%;
}

.btn-auth-submit {
  height: 42px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

.auth-switch-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.backdrop-unclosable {
  background-color: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
}

.forgot-feedback-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.feedback-success {
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
}

html.dark .feedback-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.dev-preview-link {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(16, 185, 129, 0.4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dev-preview-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* User Profile in Header */
.user-auth-wrapper {
  display: flex;
  align-items: center;
}

.btn-user-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-user-avatar:hover {
  background-color: var(--bg-surface-hover);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #ec4899);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.user-avatar-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-menu {
  width: 210px !important;
  right: 0 !important;
}

.user-menu-header {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.user-menu-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.user-menu-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 4px 0;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 180px;
  z-index: 100;
  display: none;
  flex-direction: column;
}

.dropdown:hover .dropdown-menu,
.dropdown.is-active .dropdown-menu {
  display: flex;
  animation: slideUp 0.15s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-surface-subtle);
}

.dropdown-item.text-danger {
  color: var(--danger);
}

.dropdown-item.text-danger:hover {
  background-color: rgba(239, 68, 68, 0.12);
}

