/* RBG Time Tracker - Fresh Green Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Green palette - light to dark */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  /* Backgrounds - light pastels */
  --bg-primary: #fafcfb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f0fdf4;
  --bg-elevated: #ffffff;

  /* Primary accent - rich greens */
  --accent-primary: #16a34a;
  --accent-primary-hover: #15803d;
  --accent-secondary: #22c55e;
  --accent-light: #86efac;

  /* Status colors */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;

  /* Text */
  --text-primary: #14532d;
  --text-secondary: #166534;
  --text-muted: #6b7280;

  /* Borders */
  --border-color: #d1fae5;
  --border-strong: #86efac;
  --border-focus: var(--accent-primary);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20, 83, 45, 0.05);
  --shadow-md: 0 4px 6px rgba(20, 83, 45, 0.07), 0 2px 4px rgba(20, 83, 45, 0.05);
  --shadow-lg: 0 10px 15px rgba(20, 83, 45, 0.1), 0 4px 6px rgba(20, 83, 45, 0.05);
  --shadow-glow: 0 0 20px rgba(22, 163, 74, 0.2);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Fonts */
  --font-display: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-display);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle pattern overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--green-100) 0%, transparent 25%),
              radial-gradient(circle at 0% 100%, var(--green-50) 0%, transparent 25%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   LAYOUT
   ============================================ */

.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* Header */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.875rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: white;
  box-shadow: var(--shadow-md);
}

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--text-muted);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: white;
}

.gps-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gps-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}

.gps-dot.active {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-glow 2s infinite;
}

.gps-dot.searching {
  background: var(--warning);
  animation: blink 1s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px var(--success); }
  50% { box-shadow: 0 0 16px var(--success); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--green-400);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.lg {
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
}

.btn-block {
  width: 100%;
}

/* ============================================
   FORMS
   ============================================ */

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

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

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

/* Number input with stepper */
.number-input {
  display: flex;
  align-items: stretch;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.number-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  min-width: 0;
}

.number-input input:focus {
  outline: none;
}

.number-input button {
  width: 48px;
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
}

.number-input button:hover {
  background: var(--green-400);
  color: white;
}

.number-input button:active {
  transform: scale(0.95);
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

/* ============================================
   TASK CARDS
   ============================================ */

.task-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

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

.task-card.priority-high {
  border-left: 3px solid var(--danger);
}

.task-card.priority-medium {
  border-left: 3px solid var(--warning);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.task-title {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  flex: 1;
  margin-right: 0.5rem;
  color: var(--text-primary);
}

.task-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.task-progress {
  margin-bottom: 0.75rem;
}

.progress-bar-bg {
  height: 6px;
  background: var(--green-100);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-400), var(--green-500));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-bar-fill.complete {
  background: var(--green-600);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.task-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.task-action-btn {
  flex: 1;
  padding: 0.625rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.task-action-btn:hover {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}

.task-action-btn.primary {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}

.task-action-btn.primary:hover {
  background: var(--green-600);
  border-color: var(--green-600);
}

/* ============================================
   KANBAN BOARD
   ============================================ */

.kanban-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.kanban-column {
  flex: 0 0 320px;
  min-width: 320px;
  scroll-snap-align: start;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  position: sticky;
  top: 0;
}

.column-title {
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.column-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.kanban-column-body {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 0.75rem;
  min-height: 200px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

/* ============================================
   STATS CARDS
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-color, var(--green-500));
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}

.stat-change {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* ============================================
   QUICK LOG PANEL (Mobile)
   ============================================ */

.quick-log-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 -4px 12px rgba(20, 83, 45, 0.08);
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.dock-btn:hover,
.dock-btn:active {
  background: var(--green-500);
  border-color: var(--green-500);
  color: white;
}

.dock-btn-icon {
  font-size: 1.375rem;
}

.dock-btn.primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  border-color: var(--green-500);
  color: white;
}

/* Slide-up panel */
.slide-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 0.3s, opacity 0.3s;
}

.slide-panel.active {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.3s;
}

.slide-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 83, 45, 0.4);
  backdrop-filter: blur(4px);
}

.slide-panel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.slide-panel.active .slide-panel-content {
  transform: translateY(0);
}

.slide-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
}

.slide-panel-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.slide-panel-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
}

.slide-panel-body {
  padding: 1.25rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
}

/* ============================================
   ACTIVITY FEED
   ============================================ */

.activity-feed {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-avatar {
  width: 32px;
  height: 32px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-text {
  font-size: 0.875rem;
  line-height: 1.4;
}

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

.activity-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: flex;
  gap: 0.5rem;
}

.activity-badge {
  padding: 0.125rem 0.375rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

/* ============================================
   EMPLOYEE LIST
   ============================================ */

.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.employee-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.employee-card:hover {
  border-color: var(--green-400);
  box-shadow: var(--shadow-sm);
}

.employee-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: white;
}

.employee-info {
  flex: 1;
  min-width: 0;
}

.employee-name {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-dot.active {
  background: var(--success);
}

.status-dot.inactive {
  background: var(--danger);
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 83, 45, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.2s;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--danger);
  color: white;
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

/* ============================================
   TAGS & BADGES
   ============================================ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.tag-green {
  background: var(--green-100);
  color: var(--green-700);
}

.tag-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.tag-success {
  background: var(--green-100);
  color: var(--green-700);
}

.tag-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

/* ============================================
   JOB SITE BADGE
   ============================================ */

.jobsite-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
}

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

/* ============================================
   PHOTO UPLOAD
   ============================================ */

.photo-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-tertiary);
}

.photo-upload-zone:hover {
  border-color: var(--green-500);
  background: var(--green-50);
}

.photo-upload-zone input {
  display: none;
}

.photo-upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.photo-upload-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.photo-preview {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.photo-preview-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: var(--danger);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   NOTES
   ============================================ */

.note-card {
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.note-card.pinned {
  border-left: 3px solid var(--green-500);
  background: var(--green-50);
}

.note-content {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.875rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.success {
  border-color: var(--success);
  background: var(--green-50);
  color: var(--green-800);
}

.toast.error {
  border-color: var(--danger);
  background: rgba(220, 38, 38, 0.05);
  color: var(--danger);
}

@keyframes toast-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(ellipse at top right, var(--green-100), transparent 50%),
    radial-gradient(ellipse at bottom left, var(--green-50), transparent 50%),
    var(--bg-primary);
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-md);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.login-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.login-status {
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--green-100);
  border-top-color: var(--green-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-green { color: var(--green-600); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex-1 { flex: 1; }

.w-full { width: 100%; }
.min-w-0 { min-width: 0; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kanban-column {
    flex: 0 0 280px;
    min-width: 280px;
  }

  .modal {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }

  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .show-mobile-only {
    display: none !important;
  }

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

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .site-header {
    padding: 1rem 2rem;
  }
}

/* Safe area padding for mobile */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .quick-log-dock {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  background: var(--green-200);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-300);
}
