/* ============================================
   FarmTrack Design System — Azea Style
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #6c5ffc;
  --primary-light: #8b80fd;
  --primary-dark: #5548d9;
  --success: #05c46b;
  --success-light: #e6f9f0;
  --info: #17a2b8;
  --info-light: #e3f6f9;
  --warning: #f39c12;
  --warning-light: #fef5e3;
  --danger: #e74c3c;
  --danger-light: #fde8e6;
  --orange: #fd7e14;
  --teal: #20c997;

  --bg-body: #f0f3f7;
  --bg-card: #ffffff;
  --bg-sidebar: #1a1a2e;
  --bg-sidebar-active: rgba(108,95,252,0.15);
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-sidebar: #a8b3c5;
  --border-color: #e2e8f0;

  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  overflow-y: auto;
  z-index: 1000;
  transition: var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--success), var(--teal));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.sidebar-logo .logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-section {
  padding: 12px 16px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #5a6377;
  font-weight: 600;
}

.sidebar-menu { list-style: none; padding: 0 8px; }
.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-sidebar);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 13.5px;
  font-weight: 400;
}
.sidebar-menu li a:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.sidebar-menu li a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(108,95,252,0.35);
}
.sidebar-menu li a .icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 999;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-body);
  padding: 8px 16px;
  border-radius: 8px;
  width: 300px;
}
.header-search input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  width: 100%;
  font-family: inherit;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-actions .btn-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-body);
  border: none;
  cursor: pointer;
  font-size: 16px;
  position: relative;
  transition: var(--transition);
}
.header-actions .btn-icon:hover { background: #e2e8f0; }
.header-actions .btn-icon .badge-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}
.header-user {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.header-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px;
}
.header-user .user-info { font-size: 13px; }
.header-user .user-info .name { font-weight: 600; color: var(--text-dark); }
.header-user .user-info .role { color: var(--text-muted); font-size: 11px; }

/* ============ MAIN CONTENT ============ */
.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--header-height);
  min-height: 100vh;
}
.page-content { padding: 24px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ============ CARDS ============ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-header h3 {
  font-size: 15px;
  font-weight: 600;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: #fafbfc;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Summary Cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.summary-card {
  padding: 16px 20px;
  border-radius: var(--radius);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: 
    "icon value"
    "icon label";
  align-items: center;
  column-gap: 16px;
  row-gap: 2px;
}
.summary-card::after {
  content: '';
  position: absolute;
  right: -10px; top: -10px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}
.summary-card .sc-icon {
  grid-area: icon;
  font-size: 36px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.summary-card .sc-value {
  grid-area: value;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  align-self: end;
}
.summary-card .sc-label {
  grid-area: label;
  font-size: 13px;
  opacity: 0.9;
  align-self: start;
}
.summary-card .sc-change {
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.8;
}
.bg-gradient-green { background: linear-gradient(135deg, #05c46b, #20c997); }
.bg-gradient-blue { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.bg-gradient-orange { background: linear-gradient(135deg, #f39c12, #fd7e14); }
.bg-gradient-purple { background: linear-gradient(135deg, #6c5ffc, #a78bfa); }
.bg-gradient-teal { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.bg-gradient-red { background: linear-gradient(135deg, #ef4444, #f97316); }

/* ============ REPORT HUB ============ */
.report-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.report-hub-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
  border-left: 4px solid var(--accent, var(--primary));
}
.report-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--accent, var(--primary));
}
.rhc-icon { font-size: 40px; flex-shrink: 0; }
.rhc-body { flex: 1; }
.rhc-body h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.rhc-body p { font-size: 12px; color: var(--text-muted); margin: 0 0 8px; }
.rhc-stat { font-size: 22px; font-weight: 700; color: var(--accent, var(--primary)); }
.rhc-stat small { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.rhc-arrow { font-size: 24px; color: var(--text-muted); transition: var(--transition); }
.report-hub-card:hover .rhc-arrow { color: var(--accent, var(--primary)); transform: translateX(4px); }

@media (max-width: 768px) {
  .report-hub-grid { grid-template-columns: 1fr; }
}

/* ============ GRID ============ */
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.col-12 { width: 100%; padding: 0 12px; }
.col-8 { width: 66.666%; padding: 0 12px; }
.col-6 { width: 50%; padding: 0 12px; }
.col-4 { width: 33.333%; padding: 0 12px; }
.col-3 { width: 25%; padding: 0 12px; }

/* ============ TABLE ============ */
.table-responsive { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
table thead th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}
table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13.5px;
  vertical-align: middle;
}
table tbody tr:hover { background: #f8fafc; }
table tbody tr:last-child td { border-bottom: none; }

/* Uniform Table Action Buttons */
td .d-flex form { margin: 0; }
td .d-flex .btn, td .d-flex .btn-sm {
  min-width: 75px;
  justify-content: center;
}
td .d-flex form .btn, td .d-flex form .btn-sm {
  width: 100%;
}

/* ============ BADGES ============ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #b7791f; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-primary { background: #eef2ff; color: var(--primary); }
.badge-secondary { background: #f1f5f9; color: var(--text-muted); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}
.btn-outline:hover { background: var(--bg-body); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  background: #fff;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,95,252,0.12);
}
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }

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

/* ============ CHART PLACEHOLDER ============ */
.chart-placeholder {
  background: linear-gradient(180deg, #f0f4ff 0%, #fff 100%);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 250px;
}
.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 20px;
  transition: var(--transition);
}
.chart-bar:hover { opacity: 0.8; }
.chart-bar .bar-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.chart-bar .bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dark);
}
.chart-bar.green { background: linear-gradient(180deg, var(--success), var(--teal)); }

/* ============ TIMELINE ============ */
.timeline { list-style: none; padding: 0; }
.timeline li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.timeline li:last-child { border-bottom: none; }
.timeline .tl-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.timeline .tl-content { flex: 1; }
.timeline .tl-content .tl-title { font-size: 13px; font-weight: 500; }
.timeline .tl-content .tl-time { font-size: 11px; color: var(--text-muted); }

/* ============ PROGRESS ============ */
.progress-bar-wrap { margin-bottom: 12px; }
.progress-bar-wrap .pb-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.progress-bar-wrap .pb-label span:first-child { font-weight: 500; }
.progress-bar-wrap .pb-label span:last-child { color: var(--text-muted); }
.progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ============ STATS ============ */
.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}
.stat-item:last-child { border-bottom: none; }
.stat-item .stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-item .stat-info .stat-value { font-size: 18px; font-weight: 700; }
.stat-item .stat-info .stat-label { font-size: 12px; color: var(--text-muted); }

/* ============ PHOTO GRID ============ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.photo-grid .photo-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.photo-grid .photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-grid .photo-item .photo-date {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  text-align: center;
}

/* ============ INFO LIST ============ */
.info-list { list-style: none; padding: 0; }
.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}
.info-list li:last-child { border-bottom: none; }
.info-list li .label { color: var(--text-muted); }
.info-list li .value { font-weight: 500; text-align: right; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .es-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state .es-text { font-size: 15px; }

/* ============ MODAL OVERLAY (preview) ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 500px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin-bottom: 16px; font-size: 18px; }

/* ============ PHOTO LIGHTBOX ============ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox-overlay.show {
  display: flex;
  opacity: 1;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  user-select: none;
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1;
  line-height: 1;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 48px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.2s;
  line-height: 1;
}
.lightbox-nav:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-caption {
  color: #ccc;
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}
.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.photo-trigger {
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
}
.photo-trigger:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 32px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ============ AVATAR ============ */
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; }
.avatar-md { width: 44px; height: 44px; border-radius: 50%; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; }
.avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: #fff;
}

/* ============ UTILITIES ============ */
.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-warning { color: #b7791f; }
.text-primary { color: var(--primary); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: 12px; }
.fs-lg { font-size: 18px; }
.fs-xl { font-size: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ============ LOGIN PAGE ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
}
.login-page::before {
  content: '';
  position: absolute;
  top: 20%; left: 10%;
  width: 300px; height: 300px;
  background: rgba(108, 95, 252, 0.15);
  border-radius: 50%;
  filter: blur(80px);
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: 10%; right: 15%;
  width: 250px; height: 250px;
  background: rgba(5, 196, 107, 0.1);
  border-radius: 50%;
  filter: blur(80px);
}
.login-box {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
}
.login-box .login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-box .login-logo .icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--success), var(--teal));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 12px;
}
.login-box .login-logo h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}
.login-box .login-logo p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}
.login-box .form-control {
  padding: 12px 16px;
  font-size: 14px;
}
.login-box .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }

/* ============ MOBILE WORKER ============ */
.mobile-page {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
}
.mobile-header {
  background: linear-gradient(135deg, #05c46b, #20c997);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-header h1 { font-size: 18px; font-weight: 700; }
.mobile-content { padding: 16px; }
.mobile-checkin {
  background: var(--success);
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5,196,107,0.3);
}
.mobile-task-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 10px;
}
.mobile-task-card.done { opacity: 0.6; text-decoration: line-through; }
.mobile-task-card .task-status { font-size: 20px; }
.mobile-task-card .task-info { flex: 1; }
.mobile-task-card .task-info .task-name { font-weight: 600; font-size: 14px; }
.mobile-task-card .task-info .task-time { font-size: 12px; color: var(--text-muted); }
.mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.mobile-action-btn {
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.mobile-action-btn .action-icon { font-size: 28px; margin-bottom: 6px; }
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
}
.mobile-bottom-nav a {
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
}
.mobile-bottom-nav a .nav-icon { font-size: 20px; display: block; margin-bottom: 2px; }
.mobile-bottom-nav a.active { color: var(--success); }
.mobile-log { margin-top: 20px; }
.mobile-log .log-item {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}
.mobile-log .log-item .log-time { color: var(--text-muted); font-weight: 500; min-width: 50px; }

/* ============ HAMBURGER BUTTON ============ */
.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: none;
  background: var(--bg-body);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-hamburger:hover { background: #e2e8f0; }
.btn-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============ SIDEBAR BACKDROP ============ */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .btn-hamburger { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    z-index: 1001;
  }
  .sidebar.open { transform: translateX(0); }
  .header { left: 0; padding: 0 12px; }
  .header-search { width: 180px; }
  .main-content { margin-left: 0; }
  .page-content { padding: 16px; }
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .col-6, .col-4, .col-3, .col-8 { width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-header h1 { font-size: 18px; }
  .header-user .user-info { display: none; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .summary-cards { grid-template-columns: 1fr; }
  .header-search { width: 140px; }
  .header-actions { gap: 8px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ PRINT BUTTON ============ */
.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #fff;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn-print:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============ PRINT STYLES ============ */
@media print {
  @page {
    size: A4;
    margin: 15mm 12mm;
  }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  body {
    background: #fff !important;
    font-size: 11pt !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Hide non-print elements */
  .sidebar,
  .sidebar-toggle,
  .header,
  .mb-24,
  .btn-print,
  .mobile-overlay,
  .breadcrumb,
  .lightbox-overlay {
    display: none !important;
  }

  /* Full-width main content */
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  .content-area {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Page header */
  .page-header {
    padding: 0 0 10px !important;
    margin-bottom: 10px !important;
    border-bottom: 2px solid #333 !important;
  }
  .page-header h1 {
    font-size: 18pt !important;
    color: #000 !important;
  }

  /* Print header with farm name and date */
  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
  }
  .print-header .print-farm { font-size: 14pt; font-weight: 700; }
  .print-header .print-date { font-size: 9pt; color: #666; margin-top: 2px; }

  /* Cards */
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    margin-bottom: 12px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .card-header {
    background: #f5f5f5 !important;
    border-bottom: 1px solid #ccc !important;
    padding: 8px 12px !important;
  }
  .card-header h3 { font-size: 12pt !important; color: #000 !important; }
  .card-body { padding: 12px !important; }

  /* Summary cards */
  .summary-cards {
    gap: 8px !important;
  }
  .summary-card {
    padding: 10px 14px !important;
    border-radius: 4px !important;
  }
  .sc-value { font-size: 18pt !important; }
  .sc-label { font-size: 8pt !important; }

  /* Tables */
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 9pt !important;
  }
  th, td {
    padding: 5px 8px !important;
    border: 1px solid #ccc !important;
  }
  th {
    background: #f0f0f0 !important;
    font-weight: 600 !important;
  }

  /* Charts */
  .chart-placeholder {
    height: 150px !important;
    border: 1px solid #ddd !important;
    background: #fafafa !important;
    page-break-inside: avoid;
  }
  .bar-value { font-size: 7pt !important; color: #000 !important; }
  .bar-label { font-size: 7pt !important; color: #333 !important; }

  /* Progress bars */
  .progress-bar-wrap { margin-bottom: 6px !important; }
  .progress-track { height: 8px !important; }
  .pb-label span { font-size: 9pt !important; }

  /* Badges */
  .badge {
    border: 1px solid #999 !important;
    font-size: 8pt !important;
  }

  /* Row layout for print */
  .row { flex-wrap: nowrap !important; }
  .col-6 { width: 50% !important; }

  /* Links */
  a { color: #000 !important; text-decoration: none !important; }

  /* Hub cards hide — not printed from hub */
  .report-hub-grid { display: none !important; }
}
