/* === DESIGN TOKENS === */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-sidebar: #0f172a;
  --color-sidebar-hover: rgba(255, 255, 255, 0.06);
  --color-sidebar-text: #94a3b8;
  --color-sidebar-active: #3b82f6;
  --color-topbar: #ffffff;
  --color-border: #e2e8f0;
  --color-primary: #3b82f6;
  --color-primary-light: #eff6ff;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #94a3b8;
  --sidebar-width: 248px;
  --topbar-height: 56px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --transition: 150ms ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* === DESKTOP LAYOUT === */
.desktop-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

.desktop-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.desktop-content {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
  background: var(--color-bg);
}

/* === SIDEBAR === */
.sidebar {
  background: var(--color-sidebar);
  color: var(--color-sidebar-text);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-brand svg { color: var(--color-primary); }

.sidebar-section-label {
  padding: 20px 20px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-link:hover {
  background: var(--color-sidebar-hover);
  color: #e2e8f0;
}

.sidebar-link.active {
  color: #fff;
  background: rgba(59, 130, 246, 0.15);
  border-left-color: var(--color-sidebar-active);
}

.sidebar-link.active svg { color: var(--color-sidebar-active); }

.sidebar-spacer { flex: 1; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; }

.sidebar-user-name {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.role-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* === TOPBAR === */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-topbar);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.topbar-left svg { width: 18px; height: 18px; color: var(--color-text-muted); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 240px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.topbar-search svg { width: 16px; height: 16px; color: var(--color-text-muted); flex-shrink: 0; }

.topbar-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  color: var(--color-text);
  width: 100%;
}

.topbar-search input::placeholder { color: var(--color-text-muted); }

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition);
  position: relative;
}

.topbar-icon-btn:hover { background: var(--color-bg); color: var(--color-text); }
.topbar-icon-btn svg { width: 20px; height: 20px; }

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--color-topbar);
}

.lang-toggle {
  display: flex;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
}

.lang-toggle button {
  padding: 4px 10px;
  border: none;
  background: none;
  color: var(--color-text-muted);
  transition: all var(--transition);
  font-size: 12px;
  font-weight: 600;
}

.lang-toggle button.active {
  background: var(--color-primary);
  color: #fff;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* === DASHBOARD === */
.dashboard-header {
  margin-bottom: 24px;
}

.dashboard-header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.dashboard-header p {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); }

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

.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.yellow { background: #fefce8; color: #eab308; }
.stat-icon.green { background: #f0fdf4; color: #22c55e; }
.stat-icon.purple { background: #faf5ff; color: #a855f7; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

/* === CARD / PANEL === */
.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

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

.panel-title {
  font-size: 15px;
  font-weight: 600;
}

.panel-body { padding: 0; }

/* === TABLE === */
.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.task-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

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

.task-table tr:last-child td { border-bottom: none; }

.task-table tbody tr {
  transition: background var(--transition);
}

.task-table tbody tr:hover { background: var(--color-bg); }

.task-title {
  font-weight: 500;
  color: var(--color-text);
}

/* === STATUS BADGES === */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-backlog { background: #f1f5f9; color: #64748b; }
.status-selected { background: #eff6ff; color: #3b82f6; }
.status-in_progress { background: #fefce8; color: #ca8a04; }
.status-blocked { background: #fef2f2; color: #dc2626; }
.status-done { background: #f0fdf4; color: #16a34a; }

/* === PRIORITY === */
.priority-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

.priority-indicator svg { width: 14px; height: 14px; }
.priority-low { color: #94a3b8; }
.priority-medium { color: #3b82f6; }
.priority-high { color: #f97316; }
.priority-critical { color: #dc2626; }

/* === ACTIVITY === */
.activity-list { padding: 12px 20px; }

.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.activity-item + .activity-item { border-top: 1px solid var(--color-border); }

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-text {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.activity-text strong { color: var(--color-text); font-weight: 600; }

.activity-time {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* === TASK LIST PAGE === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover { background: #2563eb; }
.btn-primary svg { width: 16px; height: 16px; }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-bar .topbar-search { width: 220px; }

.filter-select {
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 13px;
  color: var(--color-text-secondary);
  outline: none;
  transition: border-color var(--transition);
}

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

.time-cell {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

.time-bar {
  width: 60px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.time-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.time-bar-fill.over { background: #ef4444; }

/* === UTILITIES === */
.loading { opacity: 0.5; pointer-events: none; }
.hidden { display: none; }
.text-muted { color: var(--color-text-muted); }

/* === KANBAN BOARD === */
.board-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
}

.kanban-column {
  flex: 1;
  min-width: 250px;
  background: #f1f5f9;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.kanban-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--color-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 12px;
  flex: 1;
}

.kanban-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid #94a3b8;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.kanban-card:hover { box-shadow: var(--shadow-md); }

.kanban-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-text-muted);
}

.kanban-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.kanban-card-info {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.kanban-card-info svg { width: 12px; height: 12px; }

.kanban-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
  padding: 20px 0;
}

/* === BACKLOG SECTION === */
.backlog-section {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 4px 16px 16px;
  margin-bottom: 24px;
}

.backlog-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.backlog-toggle svg { width: 16px; height: 16px; }

.backlog-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.backlog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.backlog-item-title {
  flex: 1;
  font-weight: 500;
  color: var(--color-text);
}

/* === SECTION DIVIDER === */
.section-divider {
  height: 1px;
  background: var(--color-border);
  margin: 32px 0;
}

/* === ALL TASKS SECTION === */
.all-tasks-section {
  margin-bottom: 32px;
}

.all-tasks-section .filter-bar {
  margin-bottom: 16px;
}

/* === KANBAN DRAG & DROP === */
.kanban-card[draggable="true"] {
  cursor: grab;
}

.kanban-card[draggable="true"]:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.kanban-column.drag-over {
  background: #e0ecff;
  border: 2px dashed var(--color-primary);
}

/* === KANBAN COLUMN COLORED HEADERS === */
.kanban-column-selected .kanban-column-header { border-top: 3px solid #3b82f6; }
.kanban-column-in_progress .kanban-column-header { border-top: 3px solid #f59e0b; }
.kanban-column-blocked .kanban-column-header { border-top: 3px solid #dc2626; }
.kanban-column-done .kanban-column-header { border-top: 3px solid #22c55e; }

.kanban-column-selected .kanban-column-header,
.kanban-column-in_progress .kanban-column-header,
.kanban-column-blocked .kanban-column-header,
.kanban-column-done .kanban-column-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* === KANBAN CARD TIME BAR === */
.kanban-card-time {
  margin-top: 8px;
  font-size: 11px;
  color: var(--color-text-secondary);
}

.kanban-card-time-text {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.kanban-card-time .time-bar {
  width: 100%;
}

/* === KANBAN CARD POLISH === */
.kanban-card {
  padding: 14px 16px;
}

/* === PHONE LAYOUT === */
.phone-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-topbar);
  flex-shrink: 0;
}

.phone-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

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

.phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.phone-content {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Bottom Nav --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--color-topbar);
  border-top: 1px solid var(--color-border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
}

.bottom-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  font-size: 10px;
  color: var(--color-text-muted);
  min-height: 60px;
  gap: 3px;
  border: none;
  background: none;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-tab svg { width: 22px; height: 22px; }

.bottom-nav-tab.active {
  color: var(--color-primary);
  font-weight: 600;
}

.bottom-nav-tab.active svg {
  stroke-width: 2.5;
}

/* --- Phone Dashboard --- */
.ph-greeting {
  background: linear-gradient(135deg, var(--color-primary), #2563eb);
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

.ph-greeting h1 {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ph-greeting h1 svg { width: 20px; height: 20px; }

/* --- Phone Stat Pills --- */
.ph-stat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.ph-stat-pills::-webkit-scrollbar { display: none; }

.ph-stat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  white-space: nowrap;
}

.ph-stat-pill svg { width: 14px; height: 14px; }
.ph-stat-pill.blue svg { color: #3b82f6; }
.ph-stat-pill.yellow svg { color: #eab308; }
.ph-stat-pill.green svg { color: #22c55e; }
.ph-stat-pill.purple svg { color: #a855f7; }

.ph-stat-pill-value {
  font-weight: 700;
  color: var(--color-text);
}

.ph-stat-pill-label {
  color: var(--color-text-muted);
  font-size: 12px;
}

.ph-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* --- Phone Stage Sections (Vertical Kanban) --- */
.ph-stage-section {
  margin-bottom: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.ph-stage-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  background: #f8fafc;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  -webkit-tap-highlight-color: transparent;
}

.ph-stage-header svg { width: 16px; height: 16px; margin-left: auto; flex-shrink: 0; }

.ph-stage-name { flex-shrink: 0; }

.ph-stage-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--color-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.ph-stage-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 12px;
}

/* --- Phone Task Cards (shared by Dashboard + TaskList) --- */
.ph-task-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ph-task-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
  min-height: 48px;
  text-decoration: none;
  color: inherit;
}

.ph-task-card:active { box-shadow: var(--shadow-md); }

.ph-task-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.ph-task-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ph-task-card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--color-text-muted);
}

.ph-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ph-priority-dot.priority-low { background: #94a3b8; }
.ph-priority-dot.priority-medium { background: #3b82f6; }
.ph-priority-dot.priority-high { background: #f97316; }
.ph-priority-dot.priority-critical { background: #dc2626; }

.ph-task-due,
.ph-task-assignee {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.ph-task-due svg,
.ph-task-assignee svg {
  width: 13px;
  height: 13px;
}

/* --- Phone TaskList --- */
.ph-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  margin-bottom: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ph-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ph-search svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.ph-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--color-text);
  width: 100%;
}

.ph-search input::placeholder { color: var(--color-text-muted); }

.ph-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.ph-filter-chips::-webkit-scrollbar { display: none; }

.ph-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.ph-chip.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.ph-fab {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  z-index: 90;
  transition: transform var(--transition), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.ph-fab:active {
  transform: scale(0.92);
}

.ph-fab svg { width: 24px; height: 24px; }

.ph-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 32px 0;
  font-size: 14px;
}

/* --- Phone: Stage Move & Bottom Sheet --- */
.ph-stage-move-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-muted);
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition), border-color var(--transition);
}

.ph-stage-move-btn:active {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.ph-stage-move-btn svg { width: 16px; height: 16px; }

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

.ph-bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  animation: ph-fade-in 150ms ease;
}

.ph-bottom-sheet {
  width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: ph-slide-up 200ms ease;
}

.ph-bottom-sheet h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--color-text);
}

.ph-bottom-sheet-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ph-bottom-sheet-option {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.ph-bottom-sheet-option:active:not(.current) {
  background: var(--color-primary-light);
}

.ph-bottom-sheet-option.current {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  cursor: default;
  opacity: 0.6;
}

/* --- Phone: Card Time Progress --- */
.ph-card-time {
  margin: 6px 0;
}

.ph-card-time-text {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}

.ph-card-time .time-bar {
  width: 100%;
}

/* --- Phone: Bottom Sheet Animations --- */
@keyframes ph-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes ph-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
