/* ============================================================
   AGROJADWAL PREMIUM — DESIGN SYSTEM
   ============================================================ */

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

/* ── Variables ── */
:root {
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;

  --sidebar-bg:      #1a2e1a;
  --sidebar-hover:   #2d4a2d;
  --sidebar-active:  #22c55e;
  --sidebar-text:    #d1fae5;
  --sidebar-muted:   #6b7280;
  --sidebar-width:   256px;

  --topbar-h: 72px;

  --bg-main:    #f8fafc;
  --bg-card:    #ffffff;
  --bg-card-alt:#f0fdf4;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --border:     #e2e8f0;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;

  --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.05);

  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

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

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(34,197,94,.35);
}
.sidebar-logo-text h2 {
  font-size: 15px; font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.sidebar-logo-text p {
  font-size: 11px;
  color: var(--sidebar-muted);
  margin-top: 1px;
}

/* Nav sections */
.sidebar-section-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 18px 20px 6px;
}

.sidebar-nav {
  padding: 8px 12px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.sidebar-nav a .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  opacity: .85;
}
.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-nav a.active {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(34,197,94,.25);
}
.sidebar-nav a.active .nav-icon { opacity: 1; }

/* User profile at bottom */
.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--green-500), var(--green-800));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info .user-name {
  font-size: 12.5px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-info .user-email {
  font-size: 11px; color: var(--sidebar-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-logout-btn {
  color: #f87171 !important;
  font-size: 12px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  transition: var(--transition);
  background: transparent !important;
}
.sidebar-logout-btn:hover {
  background: rgba(248,113,113,.12) !important;
  color: #fca5a5 !important;
}

/* Mobile toggle */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 99;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-xs);
}
.topbar-left { }
.topbar-greeting {
  font-size: 19px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.topbar-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.topbar-btn:hover {
  border-color: var(--green-500);
  color: var(--green-600);
  background: var(--green-50);
}
.topbar-btn-primary {
  background: var(--green-600);
  color: #fff;
  border-color: var(--green-600);
}
.topbar-btn-primary:hover {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #fff;
}

/* Hamburger */
.sidebar-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 20px;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-main); }

/* ============================================================
   PAGE BODY
   ============================================================ */
.page-body {
  padding: 24px 28px;
  flex: 1;
}

/* ============================================================
   STAT CARDS GRID
   ============================================================ */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-lahan::before   { background: linear-gradient(90deg,#22c55e,#4ade80); }
.stat-card-jadwal::before  { background: linear-gradient(90deg,#f59e0b,#fcd34d); }
.stat-card-terlambat::before { background: linear-gradient(90deg,#ef4444,#f87171); }
.stat-card-selesai::before { background: linear-gradient(90deg,#3b82f6,#60a5fa); }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon-green   { background: #dcfce7; }
.stat-icon-yellow  { background: #fef3c7; }
.stat-icon-red     { background: #fee2e2; }
.stat-icon-blue    { background: #dbeafe; }

.stat-info { flex: 1; min-width: 0; }
.stat-number {
  font-size: 28px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   TWO-COLUMN LAYOUT
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px; font-weight: 700;
  color: var(--text-primary);
}
.panel-title .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.panel-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.panel-link {
  font-size: 12.5px; font-weight: 500;
  color: var(--green-600);
  padding: 5px 10px;
  border: 1px solid var(--green-200);
  border-radius: 6px;
  transition: var(--transition);
}
.panel-link:hover {
  background: var(--green-50);
  border-color: var(--green-400);
}
.panel-body { padding: 0; }

/* ── Jadwal row ── */
.jadwal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.jadwal-item:last-child { border-bottom: none; }
.jadwal-item:hover { background: var(--bg-main); }

.jadwal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.jadwal-info { flex: 1; min-width: 0; }
.jadwal-name {
  font-size: 13.5px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jadwal-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
.jadwal-meta span { display: flex; align-items: center; gap: 3px; }

.btn-tandai {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  background: var(--green-600);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.btn-tandai:hover {
  background: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34,197,94,.3);
  color: #fff;
}

.panel-footer {
  padding: 12px 20px;
  background: var(--bg-main);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}

/* ── Terlambat item ── */
.terlambat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid #fee2e2;
  transition: var(--transition);
}
.terlambat-item:hover { background: #fff5f5; }
.terlambat-item:last-of-type { border-bottom: none; }

.terlambat-info { flex: 1; min-width: 0; }
.terlambat-name {
  font-size: 13.5px; font-weight: 600;
  color: #b91c1c;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.terlambat-meta {
  font-size: 11.5px;
  color: #ef4444;
  margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
.badge-late {
  font-size: 11px; font-weight: 600;
  color: #ef4444;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  border: 1px solid #fca5a5;
}
.terlambat-warning {
  margin: 12px 20px;
  padding: 10px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #c2410c;
  display: flex; align-items: center; gap: 8px;
}

/* ── Empty state ── */
.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 36px; margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ============================================================
   AKSI CEPAT
   ============================================================ */
.aksi-cepat-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.aksi-cepat-title {
  font-size: 14.5px; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 14px;
}
.aksi-cepat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-outline {
  border-color: var(--border);
  background: transparent;
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--green-500);
  color: var(--green-600);
  background: var(--green-50);
}
.btn-green {
  background: var(--green-600);
  color: #fff;
}
.btn-green:hover {
  background: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34,197,94,.3);
  color: #fff;
}
.btn-light {
  background: var(--green-50);
  color: var(--green-700);
  border-color: var(--green-200);
}
.btn-light:hover {
  background: var(--green-100);
  border-color: var(--green-400);
  color: var(--green-800);
}

/* ============================================================
   RINGKASAN LAHAN
   ============================================================ */
.lahan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
}
.lahan-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}
.lahan-card:hover {
  border-color: var(--green-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.lahan-card-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.lahan-card-icon {
  width: 28px; height: 28px;
  background: var(--green-100);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.lahan-card-name {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-primary);
}
.lahan-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.lahan-plant {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px;
  color: var(--green-700);
  font-weight: 500;
  margin-bottom: 10px;
}
.lahan-progress-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 6px;
}
.lahan-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--green-400));
  border-radius: 20px;
  transition: width .6s ease;
}
.lahan-stats {
  font-size: 11px;
  color: var(--text-muted);
  display: flex; justify-content: space-between;
}

/* ============================================================
   TABLES
   ============================================================ */
.data-table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table thead tr {
  background: var(--bg-main);
  border-bottom: 2px solid var(--border);
}
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--bg-main); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
}
.badge-success { background:#dcfce7; color:#15803d; }
.badge-warning { background:#fef3c7; color:#92400e; }
.badge-danger  { background:#fee2e2; color:#b91c1c; }
.badge-info    { background:#dbeafe; color:#1d4ed8; }

/* ── Action links in table ── */
.action-links { display: flex; align-items: center; gap: 8px; }
.action-link {
  font-size: 12px; font-weight: 500;
  color: var(--green-600);
  padding: 4px 10px;
  border: 1px solid var(--green-200);
  border-radius: 6px;
  transition: var(--transition);
}
.action-link:hover {
  background: var(--green-50);
  border-color: var(--green-400);
}
.action-link-danger { color: #ef4444; border-color: #fca5a5; }
.action-link-danger:hover { background: #fff5f5; border-color: #f87171; }

/* ============================================================
   FORMS
   ============================================================ */
.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 24px;
}
.form-title {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary);
}
.form-control {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,197,94,.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.form-error {
  padding: 10px 14px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  color: #b91c1c;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ============================================================
   PAGE HEADING
   ============================================================ */
.page-heading {
  margin-bottom: 22px;
}
.page-heading h2 {
  font-size: 22px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}
.page-heading p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.filter-tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.filter-tab:hover {
  background: var(--green-50);
  color: var(--green-700);
  border-color: var(--green-200);
}
.filter-tab.active {
  background: var(--green-600);
  color: #fff;
}
.filter-select {
  padding: 6px 30px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-select:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(34,197,94,.12);
}
.filter-submit {
  padding: 7px 14px;
  background: var(--green-600);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.filter-submit:hover { background: var(--green-700); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.auth-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(34,197,94,.35);
}
.auth-logo h1 { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.auth-logo p { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.auth-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.auth-footer { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 20px; }
.auth-footer a { color: var(--green-600); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 0;
}
.detail-row {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.detail-row:nth-child(even) { background: var(--bg-main); }
.detail-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.detail-value {
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
}

/* ============================================================
   PROGRESS BAR (global)
   ============================================================ */
.progress-bar-wrap {
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
  height: 10px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), var(--green-400));
  border-radius: 20px;
  transition: width .6s ease;
}

/* ============================================================
   BREADCRUMB & BACK LINK
   ============================================================ */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  margin-bottom: 16px;
  transition: var(--transition);
}
.back-link:hover { color: var(--green-600); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .lahan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    width: 256px;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    width: 256px;
  }
  .sidebar-overlay.show { display: block; }
  .sidebar-toggle { display: flex; }

  .main-content { margin-left: 0; }

  .topbar { padding: 0 16px; }
  .page-body { padding: 16px; }

  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lahan-grid { grid-template-columns: 1fr; }

  .aksi-cepat-buttons { gap: 8px; }
  .btn { padding: 8px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .stat-number { font-size: 22px; }
  .auth-card { padding: 28px 20px; }
  .topbar-greeting { font-size: 16px; }
  .topbar-right .topbar-btn span { display: none; }
}

/* ============================================================
   POLISH EXTRAS
   ============================================================ */

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* Subtle entrance animation for panels and stat cards */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card,
.panel,
.form-card,
.aksi-cepat-section {
  animation: fadeSlideUp .35s ease both;
}
.stat-card:nth-child(1) { animation-delay: .04s; }
.stat-card:nth-child(2) { animation-delay: .08s; }
.stat-card:nth-child(3) { animation-delay: .12s; }
.stat-card:nth-child(4) { animation-delay: .16s; }

/* Active nav indicator */
.sidebar-nav a.active::after {
  content: '';
  display: block;
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  margin-left: auto;
  opacity: .7;
}

/* Focus ring for accessibility */
:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

/* Smooth page-body fade in */
.page-body { animation: fadeSlideUp .25s ease both; }

/* Detail grid responsive */
@media (max-width: 768px) {
  .detail-two-col {
    grid-template-columns: 1fr !important;
  }
}

/* Table responsive scroll indicator */
.data-table-wrap { position: relative; }
.data-table-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 20px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.8));
  pointer-events: none;
  display: none;
}
@media (max-width: 768px) {
  .data-table-wrap::after { display: block; }
}

/* Stat card subtle glow on hover */
.stat-card-lahan:hover   { box-shadow: 0 8px 24px rgba(34,197,94,.15); }
.stat-card-jadwal:hover  { box-shadow: 0 8px 24px rgba(245,158,11,.15); }
.stat-card-terlambat:hover { box-shadow: 0 8px 24px rgba(239,68,68,.15); }
.stat-card-selesai:hover { box-shadow: 0 8px 24px rgba(59,130,246,.15); }

/* Form control focus glow */
.form-control:focus { background: var(--green-50); }

/* Button press effect */
.btn:active,
.btn-tandai:active,
.filter-submit:active {
  transform: scale(.97);
}

/* Lahan card hover border glow */
.lahan-card:hover { border-color: var(--green-400); }

/* Auth card subtle top accent */
.auth-card {
  border-top: 4px solid var(--green-500);
}

/* Topbar notification badge (optional) */
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  margin-left: -4px;
  margin-top: -8px;
  vertical-align: top;
}

/* ============================================================
   MODAL — Tambah Lahan
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.is-open {
  display: flex;
  animation: modalOverlayIn .18s ease both;
}
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-dialog {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.28);
  width: 100%;
  max-width: 520px;
  position: relative;
  overflow: hidden;
  animation: modalDialogIn .25s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes modalDialogIn {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  width: 30px; height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  line-height: 1;
  font-family: inherit;
}
.modal-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

.modal-body {
  padding: 20px 22px 22px;
}

.modal-error {
  padding: 10px 14px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  color: #b91c1c;
  font-size: 13px;
  margin-bottom: 16px;
}

@media (max-width: 540px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-dialog  {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-width: 100%;
    animation: modalSheetIn .25s ease both;
  }
  @keyframes modalSheetIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ============================================================
   JADWAL TABLE — Show More
   ============================================================ */

.jadwal-row-hidden {
  display: none;
}

.jadwal-row-counter {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 8px 16px 2px;
}
.jadwal-row-counter strong { color: var(--text-secondary); }

.show-more-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
}

.btn-show-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.btn-show-more:hover {
  border-color: var(--green-400);
  color: var(--green-700);
  background: var(--green-50);
}
.btn-show-more:active { transform: scale(.97); }
