/* SnapStats Pulse — Design System */
:root {
  --bg: #0a0f1a;
  --surface: #141b2d;
  --surface-2: #1a2942;
  --border: #253754;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --accent: #BFFF00;
  --accent-dark: #99CC00;
  --accent-muted: rgba(191, 255, 0, 0.15);
  --success: #22C55E;
  --warning: #F59E0B;
  --alert: #EF4444;
  --blue: #60A5FA;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --transition: 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ---- PIN Screen ---- */
.pin-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}
.pin-container {
  text-align: center;
  padding: 3rem 2rem;
}
.pin-logo {
  font-size: 4rem;
  margin-bottom: 1rem;
}
.pin-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.pin-title .accent { color: var(--accent); }
.pin-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.pin-input-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.pin-input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  width: 200px;
  text-align: center;
  letter-spacing: 0.3em;
  outline: none;
  transition: border-color var(--transition);
}
.pin-input:focus { border-color: var(--accent); }
.pin-error {
  color: var(--alert);
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0a0f1a;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-danger {
  background: var(--alert);
  color: white;
}

/* ---- Top Bar ---- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-icon { font-size: 1.5rem; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.last-refresh {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ---- Stats Bar ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg);
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.stat-icon { font-size: 1.5rem; }
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Tab Navigation ---- */
.tab-nav {
  display: flex;
  gap: 0;
  padding: 0 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---- Tab Content ---- */
.tab-content {
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
}

/* ---- Loading ---- */
.loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* ---- Overview Tab ---- */
.overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
.activity-feed {
  max-height: 500px;
  overflow-y: auto;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.activity-item:hover { background: var(--surface-2); }
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.activity-text {
  flex: 1;
  font-size: 0.875rem;
}
.activity-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}
.activity-club {
  color: var(--blue);
  font-weight: 500;
}

/* Alerts */
.alerts-list {
  max-height: 300px;
  overflow-y: auto;
}
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.alert-item:last-child { border-bottom: none; }
.alert-icon { flex-shrink: 0; }
.alert-warning .alert-icon { color: var(--warning); }
.alert-danger .alert-icon { color: var(--alert); }
.alert-info .alert-icon { color: var(--blue); }

.quick-actions {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.quick-actions h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.quick-actions .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }

/* ---- Users Tab ---- */
.search-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  outline: none;
  width: 280px;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--accent); }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  background: var(--bg);
  position: sticky;
  top: 0;
}
tr:hover td { background: var(--surface-2); }
tr { cursor: pointer; }
.user-name { font-weight: 500; }
.user-email { color: var(--text-muted); }

/* ---- Clubs Tab ---- */
.clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}
.club-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
}
.club-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.club-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.club-name {
  font-size: 1rem;
  font-weight: 600;
}
.club-sport {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-active { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-trial { background: rgba(96,165,250,0.15); color: var(--blue); }
.badge-past-due { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-cancelled { background: rgba(239,68,68,0.15); color: var(--alert); }
.badge-trialing { background: rgba(96,165,250,0.15); color: var(--blue); }

.club-stats {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.club-stat {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.club-stat strong {
  color: var(--text);
  font-weight: 600;
}
.club-admin {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.club-trial-days {
  font-size: 0.75rem;
  color: var(--warning);
  margin-top: 0.25rem;
}

/* ---- Metrics Tab ---- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
}
.metrics-grid .card-wide {
  grid-column: 1 / -1;
}
.adoption-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
}
.funnel-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}
.funnel-bar-fill {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, #BFFF00, #8bc34a);
  transition: width 0.5s ease;
  min-width: 4px;
}
.funnel-bar-label {
  font-size: 0.8rem;
  color: #94a3b8;
  white-space: nowrap;
  min-width: 140px;
}
.funnel-bar-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
}
.funnel-pct {
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 4px;
}
.metrics-list {
  padding: 0.5rem 0;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.metric-row:last-child { border-bottom: none; }
.metric-label { color: var(--text-muted); }
.metric-value {
  font-weight: 600;
  color: var(--text);
}
.metric-value.up { color: var(--success); }
.metric-value.down { color: var(--alert); }
.trend-arrow { font-size: 0.8rem; margin-right: 0.25rem; }

/* ---- Messenger Tab ---- */
.messenger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.form-group {
  margin-bottom: 1rem;
  padding: 0 1.25rem;
}
.form-group:first-child { padding-top: 1rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 120px; }
.compose-actions {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  gap: 0.75rem;
}
.msg-status {
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
}
.msg-status.success { color: var(--success); }
.msg-status.error { color: var(--alert); }

.messages-list {
  max-height: 500px;
  overflow-y: auto;
}
.message-item {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.message-item:hover { background: var(--surface-2); }
.message-item:last-child { border-bottom: none; }
.message-to {
  font-weight: 500;
  font-size: 0.875rem;
}
.message-subject {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ---- Chat Tab ---- */
.chat-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 240px);
  min-height: 400px;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}
.chat-msg {
  margin-bottom: 1rem;
  display: flex;
}
.chat-msg.user { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; }
.chat-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg.user .chat-bubble {
  background: var(--accent);
  color: #0a0f1a;
  border-bottom-right-radius: 4px;
}
.chat-msg.assistant .chat-bubble {
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-bubble code {
  background: rgba(0,0,0,0.2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
}
.chat-bubble pre {
  background: rgba(0,0,0,0.3);
  padding: 0.75rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0.5rem 0;
}
.chat-bubble pre code {
  background: none;
  padding: 0;
}
.quick-prompts {
  padding: 0.5rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.chat-input-wrap {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
}
.chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--accent); }

/* ---- Modals ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.modal-lg { max-width: 720px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.modal-header h2 { font-size: 1.1rem; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem 1.5rem; }

/* Modal detail sections */
.detail-section {
  margin-bottom: 1.25rem;
}
.detail-section h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.875rem;
}
.detail-row .label { color: var(--text-muted); }
.detail-list {
  list-style: none;
}
.detail-list li {
  padding: 0.35rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.detail-list li:last-child { border-bottom: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Empty State ---- */
.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .overview-grid { grid-template-columns: 1fr; }
  .messenger-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .tab-nav { padding: 0 0.75rem; }
  .tab-btn { padding: 0.6rem 0.75rem; font-size: 0.8rem; }
  .tab-content { padding: 1rem; }
  .search-input { width: 180px; }
  .clubs-grid { grid-template-columns: 1fr; }
  .chat-bubble { max-width: 90%; }
  .top-bar { padding: 0.5rem 1rem; }
}
/* Health Tab */
.health-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.health-status-badge { padding: 0.5rem 1.25rem; border-radius: 2rem; font-weight: 600; font-size: 0.95rem; }
.badge-ok { background: rgba(34, 197, 94, 0.15); color: #22C55E; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-warn { background: rgba(239, 68, 68, 0.15); color: #EF4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.health-checked { color: var(--text-muted); font-size: 0.85rem; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1rem; }
.health-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.health-row:last-child { border-bottom: none; }
.health-indicator { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ind-ok { background: #22C55E; box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
.ind-warn { background: #F59E0B; box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); }
.ind-err { background: #EF4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
.health-name { font-weight: 500; min-width: 140px; }
.health-detail { color: var(--text-muted); font-size: 0.85rem; margin-left: auto; text-align: right; }

/* ---- Tasks Tab ---- */
.tasks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.tasks-list-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
}
.task-filters {
  display: flex;
  gap: 0;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.task-filter {
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.task-filter:hover { color: var(--text); }
.task-filter.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.task-list {
  flex: 1;
  overflow-y: auto;
}
.task-card {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background var(--transition);
}
.task-card:hover { background: var(--surface-2); }
.task-card:last-child { border-bottom: none; }
.task-card-selected { background: var(--surface-2); }
.task-priority-urgent { border-left-color: var(--alert); }
.task-priority-high { border-left-color: var(--warning); }
.task-priority-normal { border-left-color: transparent; }
.task-priority-low { border-left-color: var(--text-muted); }
.task-card-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.task-card-title {
  font-weight: 500;
  font-size: 0.875rem;
  flex: 1;
}
.approval-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
.task-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.task-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.task-badge-pending { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.task-badge-in-progress { background: rgba(96, 165, 250, 0.15); color: var(--blue); }
.task-badge-approval { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.task-badge-approved { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.task-badge-denied { background: rgba(239, 68, 68, 0.15); color: var(--alert); }
.task-badge-completed { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.task-badge-cancelled { background: rgba(100, 116, 139, 0.2); color: #94a3b8; text-decoration: line-through; }
.task-type-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.type-task { background: rgba(96, 165, 250, 0.1); color: var(--blue); }
.type-approval { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.type-note { background: rgba(191, 255, 0, 0.1); color: var(--accent); }
.type-command { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.task-card-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}
/* Task detail */
.task-detail-body {
  padding: 1.25rem;
}
.task-description, .task-result {
  white-space: pre-wrap;
  font-size: 0.875rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  margin-top: 0.5rem;
  line-height: 1.6;
}
.task-result { border-left: 3px solid var(--success); }
.task-actions {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}
/* Form row for side-by-side dropdowns */
.form-row {
  display: flex;
  gap: 1rem;
}
.form-col { flex: 1; }
.form-col label { display: block; }
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

@media (max-width: 1024px) {
  .tasks-grid { grid-template-columns: 1fr; }
  .tasks-list-card { max-height: 400px; }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .card-header { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .search-input { width: 100%; }
  .compose-actions { flex-direction: column; }
}

/* Google Places autocomplete dropdown */
.pac-container {
  background: #141b2d !important;
  border: 1px solid #253754 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
  font-family: inherit;
  margin-top: 4px;
}
.pac-item {
  padding: 10px 14px !important;
  cursor: pointer;
  font-size: 14px !important;
  color: #e2e8f0 !important;
  border-top: 1px solid #253754 !important;
  background: transparent !important;
  line-height: 1.4 !important;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover, .pac-item-selected { background: #1a2942 !important; }
.pac-item-query { color: #ffffff !important; font-weight: 500; }
.pac-matched { color: #BFFF00 !important; font-weight: 600; }
.pac-icon, .hdpi .pac-icon { display: none; }
.pac-item span { color: #94a3b8; }
