/*
  Liquid Kanban Styles
  - Apple-inspired Liquid Glass aesthetic: translucent surfaces, blur, soft gradients, and subtle depth.
  - Focus on accessibility and reduced motion support.
*/

/* CSS Reset (minimal) */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; color: var(--text-primary); background: var(--surface-2); }
:root {
  /* Modern Corporate Color Palette */
  --primary: #2563eb; /* Professional blue */
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #64748b; /* Slate gray */
  --success: #10b981; /* Emerald */
  --warning: #f59e0b; /* Amber */
  --danger: #ef4444; /* Red */
  --surface-1: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #e2e8f0;
  --surface-4: #cbd5e1;
  
  /* Enhanced Glass Effect */
  --bg-gradient: 
    linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(147, 197, 253, 0.05) 50%, rgba(255, 255, 255, 0.08) 100%),
    radial-gradient(1400px 900px at 20% 10%, rgba(37, 99, 235, 0.08), rgba(147, 197, 253, 0.05) 40%, rgba(255, 255, 255, 0.02) 70%);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-stroke: rgba(255, 255, 255, 0.9);
  --glass-shadow: 0 20px 60px rgba(15, 23, 42, 0.08), 0 8px 25px rgba(15, 23, 42, 0.04);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-stroke: rgba(226, 232, 240, 0.8);
  
  /* Typography */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  
  /* Borders & Surfaces */
  --border: rgba(226, 232, 240, 0.6);
  --border-strong: rgba(203, 213, 225, 0.8);
  --surface: rgba(248, 250, 252, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --drop-target: rgba(37, 99, 235, 0.08);
  --drag-shadow: 0 25px 80px rgba(15, 23, 42, 0.15);
  
  /* Modern Radius */
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  
  /* Enhanced Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 30px 80px rgba(15, 23, 42, 0.16);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Interactive card tilt defaults */
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 0%;
}

/* Modern Corporate Background */
.background {
  position: fixed; inset: 0;
  background: 
    linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%),
    var(--bg-gradient);
  z-index: -2;
}

/* Subtle Corporate Orbs */
.bg-orb { position: fixed; border-radius: 999px; filter: blur(80px); opacity: .08; z-index: -1; }
.orb-a { width: 800px; height: 800px; left: -200px; top: -100px; 
  background: radial-gradient(circle at 40% 40%, var(--primary), var(--primary-light), transparent 60%); 
  animation: float-a 25s ease-in-out infinite; }
.orb-b { width: 600px; height: 600px; right: -150px; bottom: -100px; 
  background: radial-gradient(circle at 60% 60%, var(--success), var(--primary), transparent 60%); 
  animation: float-b 30s ease-in-out infinite; }
.bg-noise { position: fixed; inset: 0; pointer-events: none; background-image: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22160%22 height=%22160%22 viewBox=%220 0 160 160%22><filter id=%22n%22 x=%220%22 y=%220%22 width=%22100%25%22 height=%22100%25%22><feTurbulence type=%22fractalNoise%22 baseFrequency=%220.7%22 numOctaves=%222%22 stitchTiles=%22stitch%22/></filter><rect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22 opacity=%220.035%22/></svg>'); opacity: .25; z-index: -1; }

@keyframes float-a { 0%, 100% { transform: translateY(0) translateX(0) scale(1)} 50% { transform: translateY(24px) translateX(12px) scale(1.04)} }
@keyframes float-b { 0%, 100% { transform: translateY(0) translateX(0) scale(1)} 50% { transform: translateY(-28px) translateX(-18px) scale(1.03)} }

/* Generic glass surface */
.glass-surface {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-xl);
}

/* Modern Header */
.app-header {
  position: sticky; top: 20px; margin: 20px auto; max-width: 1400px;
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--radius-xl);
}
.branding { display: flex; align-items: center; gap: 16px; }
.logo { 
  display: inline-grid; place-items: center; width: 40px; height: 40px; 
  border-radius: var(--radius-md); 
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); 
  color: white; 
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255,255,255,0.2);
  font-size: 20px;
}
.app-header h1 { 
  font-size: 24px; font-weight: 700; letter-spacing: -0.025em; margin: 0; 
  color: var(--text-primary); background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-size: 12px; color: var(--text-tertiary); font-weight: 500;
}
@media (min-width: 760px) { .app-header h1 { font-size: 28px; } }

.actions { display: flex; align-items: center; gap: 12px; }
.button {
  position: relative; appearance: none; border: 1px solid var(--border-strong);
  background: var(--surface-strong); border-radius: var(--radius-md); 
  padding: 12px 20px; font-weight: 600; color: var(--text-secondary);
  font-size: 14px; letter-spacing: -0.01em;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.button:hover { 
  transform: translateY(-2px); box-shadow: var(--shadow-md); 
  background: var(--surface-1); border-color: var(--primary);
}
.button:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.button.primary { 
  color: white; border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: var(--shadow-md);
}
.button.primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: var(--shadow-lg);
}
.button .button-glow {
  position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(200px 60px at 50% 0%, rgba(255,255,255,0.5), transparent 60%);
  mix-blend-mode: screen; opacity: .65;
}
.icon-btn { border: none; background: transparent; font-size: 18px; line-height: 1; padding: 8px; border-radius: 10px; }
.icon-btn:hover { background: rgba(0,0,0,0.05); }

/* Modern Board Layout */
.board {
  max-width: 1400px; margin: 20px auto 60px; padding: 0 20px;
  display: grid; grid-template-columns: repeat(3, minmax(320px, 1fr)); gap: 24px;
}

/* Modern Column */
.column {
  display: flex; flex-direction: column; gap: 16px; padding: 20px; 
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  border: 1px solid var(--card-stroke);
  backdrop-filter: blur(20px) saturate(110%);
  -webkit-backdrop-filter: blur(20px) saturate(110%);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
}
.column:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}
.column-header { 
  display: flex; align-items: center; justify-content: space-between; 
  padding: 0 4px 12px 4px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.column-title { 
  font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; 
  font-size: 16px; text-transform: uppercase; font-size: 14px;
}
.column-count { 
  background: var(--surface-3); color: var(--text-tertiary); 
  font-weight: 600; font-size: 12px; padding: 4px 8px; 
  border-radius: var(--radius-sm); min-width: 24px; text-align: center;
}

.column-dropzone {
  display: flex; flex-direction: column; gap: 10px; min-height: 120px; padding: 6px; border-radius: var(--radius-lg);
  transition: background var(--transition), outline var(--transition);
}
.column-dropzone.drop-active { background: var(--drop-target); outline: 1px dashed rgba(106,126,255,0.35); }

/* Modern Task Card */
.card {
  position: relative; padding: 16px; border-radius: var(--radius-lg);
  background: var(--surface-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  cursor: grab;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
}
.card::after { /* glossy sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 30%),
    radial-gradient(160px 80px at var(--mx) var(--my), rgba(255,255,255,0.55), transparent 70%);
  mix-blend-mode: screen; opacity: .55;
}
.card::before { /* subtle gradient border */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px; 
  background: linear-gradient(135deg, var(--primary-light), var(--surface-3), var(--primary));
  opacity: 0; transition: opacity var(--transition-fast);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:active { cursor: grabbing; }
.card:hover { 
  box-shadow: var(--shadow-xl); 
  border-color: var(--primary-light);
}
.card:hover::before { opacity: 0.4; }
.card.dragging { opacity: .9; transform: scale(1.03); box-shadow: var(--drag-shadow); }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { font-weight: 700; color: var(--text-primary); font-size: 15px; line-height: 1.4; }
.priority { 
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 6px 10px; 
  border-radius: var(--radius-sm); letter-spacing: 0.02em;
  text-transform: uppercase; white-space: nowrap;
}
.priority.low { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.priority.medium { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.priority.high { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }

.card-body { color: var(--text-secondary); font-size: 14px; line-height: 1.35; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--text-dim); font-size: 12px; }
/* Assignee chips */
.assignees { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.assignee { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.06); font-size: 12px; color: var(--text-secondary); }
.assignee.lead { background: rgba(106,126,255,0.18); color: #2f3ab0; font-weight: 700; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(255,255,255,0.6); border: 1px solid rgba(0,0,0,0.05); }

.card-actions { display: flex; gap: 6px; }
.icon-mini { border: none; background: transparent; font-size: 14px; padding: 6px; border-radius: 8px; }
.icon-mini:hover { background: rgba(0,0,0,0.06); }

/* Icon defaults (inline SVG) */
.icon { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.icon svg { width: 1em; height: 1em; display: block; fill: currentColor; }
.priority .icon { margin-right: 6px; }
.chip .icon { margin-right: 6px; opacity: .9; }
.assignee .icon { margin-right: 6px; opacity: .9; }

/* Modern Modal */
.modal { 
  width: min(600px, 95vw); padding: 0; border: none; border-radius: var(--radius-xl);
  background: var(--surface-1); box-shadow: var(--shadow-xl);
}
.modal::backdrop { background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(8px); }
.modal form { padding: 24px; }
.modal-header { 
  display: flex; align-items: center; justify-content: space-between; 
  padding: 0 0 20px 0; border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.modal-header h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--text-primary); }
.modal-body { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { 
  font-size: 13px; font-weight: 600; color: var(--text-secondary); 
  text-transform: uppercase; letter-spacing: 0.02em;
}
.form-field input, .form-field textarea, .form-field select {
  border: 1px solid var(--border); border-radius: var(--radius-md); 
  padding: 12px 16px; font-size: 14px; background: var(--surface-1);
  transition: all var(--transition-fast);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.modal-footer { 
  display: flex; justify-content: flex-end; gap: 12px; 
  padding: 20px 0 0 0; border-top: 1px solid var(--border); margin-top: 20px;
}

/* Board Management Specific Styles */
.boards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
  max-height: 200px; overflow-y: auto; padding: 8px 0;
}
.board-card {
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-2); cursor: pointer; transition: all var(--transition-fast);
}
.board-card:hover {
  border-color: var(--primary); box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.board-card h4 {
  margin: 0 0 8px 0; font-size: 15px; font-weight: 600; color: var(--text-primary);
}
.board-card p {
  margin: 0; font-size: 13px; color: var(--text-tertiary); line-height: 1.4;
}
.board-card-meta {
  margin-top: 12px; font-size: 11px; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}
.new-board-section h3, .board-list h3 {
  margin: 0 0 16px 0; font-size: 16px; font-weight: 600; color: var(--text-primary);
}

/* Footer */
.app-footer { text-align: center; color: var(--text-dim); padding: 24px 0 40px; font-size: 12px; }

/* Empty state */
.empty { color: var(--text-dim); font-size: 13px; text-align: center; padding: 12px 0; }

/* Drag placeholder */
.placeholder { height: 8px; border-radius: 6px; margin: 6px; background: rgba(0,0,0,0.08); border: 1px dashed rgba(0,0,0,0.1); }

/* Animations */
@keyframes pop-in { 0% { transform: scale(.98); opacity: 0 } 100% { transform: scale(1); opacity: 1 } }
@keyframes fade-slide-up { 0% { transform: translateY(6px); opacity: 0 } 100% { transform: translateY(0); opacity: 1 } }
.card { animation: pop-in var(--transition); }
.column { animation: fade-slide-up var(--transition); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* Responsive */
@media (max-width: 980px) { .board { grid-template-columns: repeat(2, minmax(260px, 1fr)); } }
@media (max-width: 640px) {
  .board { grid-template-columns: 1fr; }
  .app-header { top: 8px; margin: 8px; }
  .form-row { grid-template-columns: 1fr; }
}


