/* ==========================================================================
   TEAMFLOW - MEDIA & CG PRODUCTION KANBAN & DASHBOARD STYLES
   ========================================================================== */

:root {
  /* Color Palette - Dark Mode Default */
  --bg-main: #0b0f19;
  --bg-card: rgba(21, 30, 49, 0.75);
  --bg-card-hover: rgba(30, 42, 68, 0.85);
  --bg-header: rgba(15, 23, 42, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Accent Colors */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);

  /* Status Colors */
  --color-todo: #818cf8;
  --color-in-progress: #f59e0b;
  --color-submit-exr: #06b6d4;
  --color-submit-mov: #ec4899;
  --color-done: #10b981;

  /* Priority Colors */
  --priority-high: #ef4444;
  --priority-medium: #f59e0b;
  --priority-low: #3b82f6;

  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);

  --font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-header: rgba(255, 255, 255, 0.9);
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(236, 72, 153, 0.06) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glassmorphism Card Style */
.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--color-submit-mov));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--color-submit-exr);
  font-weight: 500;
}

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

.role-switcher-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons & Selects */
.custom-select, .custom-select-sm {
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select:focus, .custom-select-sm:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary-sm {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 10px;
  font-size: 0.8rem;
}

.btn-secondary-sm:hover {
  background: rgba(99, 102, 241, 0.25);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
}

.btn-danger-ghost:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

/* App Container */
.app-container {
  flex: 1;
  padding: 1.5rem 2rem;
  max-width: 1700px;
  margin: 0 auto;
  width: 100%;
}

/* Toolbar Section */
.toolbar-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 40px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--primary);
}

.filters-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* View Tabs */
.view-tabs {
  display: flex;
  background: var(--bg-main);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.tab-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   MANAGER DASHBOARD STYLES
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 1.5rem;
}

.metric-card {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.border-blue::before { background: #3b82f6; }
.border-amber::before { background: var(--color-in-progress); }
.border-purple::before { background: var(--color-submit-mov); }
.border-green::before { background: var(--color-done); }
.border-emerald::before { background: #059669; }
.border-red::before { background: #ef4444; }

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.icon-blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.icon-purple { background: rgba(236, 72, 153, 0.15); color: #ec4899; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.icon-emerald { background: rgba(5, 150, 105, 0.15); color: #10b981; }
.icon-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
}

.progress-bar-sm {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill-emerald {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.5s ease;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 20px;
  margin-bottom: 1.5rem;
}

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

.chart-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.chart-header {
  margin-bottom: 1rem;
}

.chart-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chart-container {
  position: relative;
  flex: 1;
  min-height: 280px;
  max-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Team Member Progress Section */
.team-progress-section {
  padding: 1.5rem;
}

.section-header {
  margin-bottom: 1.25rem;
}

.section-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.member-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: var(--transition);
}

.member-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
}

.member-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.member-details {
  flex: 1;
}

.member-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.member-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.member-percent-badge {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-done);
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.member-progress-outer {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.member-progress-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--color-done));
  border-radius: 4px;
  transition: width 0.6s ease;
}

.member-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   KANBAN BOARD STYLES (5 Columns)
   ========================================================================== */
.kanban-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.kanban-columns-container {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 1rem;
}

@media (max-width: 1400px) {
  .kanban-columns-container {
    grid-template-columns: repeat(5, 280px);
  }
}

.kanban-column {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 230px);
  min-height: 500px;
}

.column-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.column-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Status Column Themes */
.status-todo { border-top: 3px solid var(--color-todo); }
.status-todo i { color: var(--color-todo); }

.status-in-progress { border-top: 3px solid var(--color-in-progress); }
.status-in-progress i { color: var(--color-in-progress); }

.status-submit-exr { border-top: 3px solid var(--color-submit-exr); }
.status-submit-exr i { color: var(--color-submit-exr); }

.status-submit-mov { border-top: 3px solid var(--color-submit-mov); }
.status-submit-mov i { color: var(--color-submit-mov); }

.status-done { border-top: 3px solid var(--color-done); }
.status-done i { color: var(--color-done); }

.kanban-cards-dropzone {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.2s ease;
}

.kanban-cards-dropzone.drag-over {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Task Cards */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: grab;
  transition: var(--transition);
  position: relative;
  user-select: none;
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-md);
}

.task-card:active {
  cursor: grabbing;
}

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.task-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.priority-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.priority-high { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.priority-low { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }

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

.subtask-progress-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 4px;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.task-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
}

.assignee-avatar-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.deadline-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
}

.deadline-badge.overdue {
  color: #ef4444;
  font-weight: 600;
}

.task-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  justify-content: flex-end;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
}

.btn-card-action:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.15);
}

/* Modal Window */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex !important;
}

.modal-box {
  width: 100%;
  max-width: 600px;
  padding: 1.5rem;
  background: var(--bg-header);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.btn-close:hover { color: #ef4444; }

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;

}

.required { color: #ef4444; }

.form-group input, .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--primary);
}

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

.subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 4px;
}

.subtask-item input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.subtask-item span {
  flex: 1;
  font-size: 0.85rem;
}

.subtask-item span.completed {
  text-decoration: line-through;
  color: var(--text-dim);
}

.subtask-add-row {
  display: flex;
  gap: 8px;
}

.subtask-add-row input {
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Team Management Modal Layout */
.team-management-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .team-management-layout {
    grid-template-columns: 1fr;
  }
}

.members-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  gap: 8px;
}

.member-manage-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-manage-actions {
  display: flex;
  gap: 6px;
}

.member-form-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.member-form-box h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Shot Code Badge & Filename Tag */
.shot-code-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.file-name-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  word-break: break-all;
  margin-bottom: 8px;
}

/* Shot Tracker Table */
.shot-table-wrapper {
  overflow-x: auto;
}

.shot-tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.shot-tracker-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.shot-tracker-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.shot-tracker-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* IMAGE 1 STYLES: Comp Workload & QC Summary Matrix */
.vfx-qc-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.vfx-qc-summary-table th {
  padding: 10px 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vfx-qc-summary-table td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  font-weight: 600;
}

.vfx-qc-summary-table .col-exr-green {
  background: rgba(21, 128, 61, 0.35);
  color: #4ade80;
}

.vfx-qc-summary-table .col-qc-red {
  background: rgba(185, 28, 28, 0.4);
  color: #fca5a5;
}

.vfx-qc-summary-table .col-approve-yellow {
  background: rgba(234, 179, 8, 0.25);
  color: #fef08a;
}

.vfx-qc-summary-table tfoot td {
  background: rgba(16, 185, 129, 0.2);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
}

/* IMAGE 2 STYLES: VFX Spreadsheet Table */
.vfx-spreadsheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.header-group-row th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.group-shot-info { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.group-vfx-info { background: rgba(168, 85, 247, 0.2); color: #e9d5ff; }
.group-status-info { background: rgba(245, 158, 11, 0.2); color: #fde68a; }
.group-output-info { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; }

.header-cols-row th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  padding: 10px 12px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.lot-divider-row td {
  background: linear-gradient(90deg, #334155, #1e293b);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.vfx-spreadsheet-table td {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  vertical-align: middle;
}

.vfx-spreadsheet-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

.vfx-inline-select {
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 0.8rem;
  width: 100%;
  cursor: pointer;
}

.vfx-inline-select:focus {
  border-color: var(--primary);
}

.vfx-badge-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-cu { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-ext { background: rgba(59, 130, 246, 0.2); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); }
/* ==========================================================================
   MOBILE-FIRST & SMARTPHONE RESPONSIVE STYLES (SMARTPHONES 375px - 430px+)
   ========================================================================== */

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

@media (max-width: 768px) {
  /* Tight Mobile Container & Padding Fit */
  .app-container {
    padding: 0 0.5rem 2rem 0.5rem !important;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .card-glass {
    border-radius: 14px;
  }

  body {
    font-size: 13.5px;
  }

  .app-header {
    padding: 0.6rem 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .logo-container {
    justify-content: center;
  }

  .header-controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }

  .role-switcher-box {
    width: 100%;
    justify-content: center;
    margin-bottom: 2px;
  }

  .role-switcher-box select {
    flex: 1;
    font-size: 0.82rem;
  }

  .header-controls .btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    font-size: 0.76rem;
    padding: 8px 6px;
    min-height: 44px; /* Touch target ergonomic standard */
  }

  /* Project Banner Mobile */
  .project-shared-banner {
    margin: 0.5rem 0.5rem 0 0.5rem !important;
    padding: 0.75rem 0.85rem !important;
    flex-direction: column;
    align-items: stretch;
    gap: 8px !important;
    border-radius: 14px;
    width: auto !important;
  }

  .project-shared-banner > div:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px !important;
  }

  .project-info-item {
    border-left: none !important;
    padding-left: 0 !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
  }

  /* Toolbar & Filter Section Mobile */
  .toolbar-section {
    padding: 0.75rem;
    margin: 0.75rem 0;
    gap: 10px;
  }

  .search-box {
    width: 100%;
  }

  .filters-group {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .filter-item {
    width: 100%;
    justify-content: space-between;
    font-size: 0.82rem;
  }

  .filter-item select {
    flex: 1;
  }

  .view-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px;
  }

  .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.78rem;
    padding: 8px 10px;
    min-height: 44px;
  }

  /* Metrics Grid & Charts Mobile */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 1rem;
  }

  .metric-card {
    padding: 0.75rem;
  }

  .metric-value {
    font-size: 1.15rem;
  }

  .charts-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .chart-container {
    height: 220px;
  }

  /* Native Mobile App Horizontal Swipe for Kanban Board */
  .kanban-columns-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;
    flex-wrap: nowrap;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    width: 100%;
  }

  .kanban-column {
    min-width: 86vw;
    max-width: 88vw;
    scroll-snap-align: center;
    flex-shrink: 0;
    margin-bottom: 0;
    height: auto;
    max-height: 72vh;
  }

  .kanban-cards-dropzone {
    max-height: calc(72vh - 50px);
  }

  /* Tables Mobile Touch & Horizontal Scroll */
  .shot-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    width: 100%;
  }

  .shot-tracker-table, .recent-shots-table, .vfx-spreadsheet-table, .vfx-qc-summary-table {
    min-width: 620px;
  }

  /* Modals Mobile Touch Responsive */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-box {
    width: 100%;
    max-width: 100vw;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    padding: 1rem;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.5);
  }

  .form-row {
    flex-direction: column;
    gap: 10px;
  }

  .custom-select, input[type="text"], input[type="number"], input[type="date"], textarea {
    min-height: 44px;
    font-size: 0.88rem;
  }

  .btn {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .metric-card {
    padding: 0.6rem;
  }

  .metric-label {
    font-size: 0.72rem;
  }

  .recent-shots-header-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
  }

  .shot-search-box {
    width: 100%;
  }

  .artist-chips-group {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}



/* QUICK CLAIM SHOT BUTTON STYLES */
.btn-claim-shot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: var(--transition);
}

.btn-claim-shot:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.unassigned-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}


/* RECENT SHOTS LIST STYLES (MATCHING USER SCREENSHOT 100%) */
.recent-shots-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  margin-bottom: 1.25rem;
  gap: 16px;
  flex-wrap: wrap;
}

.recent-shots-title-box h2 {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recent-shots-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.shot-search-box {
  position: relative;
  width: 220px;
}

.shot-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.shot-search-box input {
  width: 100%;
  padding: 6px 12px 6px 34px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

.artist-chips-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip-btn {
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.chip-btn.active, .chip-btn:hover {
  background: #0f172a;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

[data-theme="dark"] .chip-btn.active {
  background: #38bdf8;
  color: #0f172a;
  font-weight: 600;
}

/* Recent Shots Table */
.recent-shots-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 0.85rem;
  text-align: left;
}

.recent-shots-table th {
  padding: 12px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  border-bottom: 2px solid var(--border-color);
}

.recent-shots-table tbody tr {
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition);
}

.recent-shots-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.recent-shots-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.recent-shots-table td:first-child {
  border-left: 1px solid var(--border-color);
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}

.recent-shots-table td:last-child {
  border-right: 1px solid var(--border-color);
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.no-img-box {
  width: 54px;
  height: 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 700;
}

.cell-shot-code {
  font-weight: 700;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-main);
}

.cell-project {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Assignee Pill Dropdown */
.assignee-select-pill, .status-select-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-main);
  font-family: inherit;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.assignee-select-pill:focus, .status-select-pill:focus {
  border-color: var(--primary);
}

.status-pill-mov {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
  font-weight: 600;
}

.status-pill-todo {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

/* Progress bar inside cell */
.progress-cell-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-pct-text {
  font-size: 0.78rem;
  font-weight: 600;
  width: 32px;
  text-align: right;
  color: var(--text-muted);
}

.progress-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 3px;
}

/* Priority Pills */
.priority-pill-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}

.priority-pill-low {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
}

/* Comment Badge */
.client-comment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Quick Filter Pills Bar */
.pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.pill-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.pill-btn.pill-danger {
  color: #f87171;
}

.pill-btn.pill-danger.active {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.pill-btn.pill-warning {
  color: #fbbf24;
}

.pill-btn.pill-warning.active {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* Countdown Badges */
.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.countdown-badge.overdue {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.countdown-badge.due-today {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: pulse 1.5s infinite;
}

.countdown-badge.upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.fix-pulsing-icon {
  display: inline-block;
  color: #ef4444;
  animation: pulse 1.5s infinite ease-in-out;
}


