/* ============================================================
   EKAKSHAR GROUP CRM - Premium White & Green Theme
   ============================================================ */

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

:root {
  /* Brand Colors */
  --green-900: #0d3b1e;
  --green-800: #145a2e;
  --green-700: #1a7a40;
  --green-600: #1e9150;
  --green-500: #22a85f;
  --green-400: #38c975;
  --green-300: #6ed89a;
  --green-200: #a8ecbf;
  --green-100: #d4f5e2;
  --green-50:  #edfbf3;

  /* Neutrals */
  --white:      #ffffff;
  --grey-50:    #f8faf9;
  --grey-100:   #f0f4f2;
  --grey-200:   #e2e8e5;
  --grey-300:   #c8d4cf;
  --grey-400:   #9aada5;
  --grey-500:   #6b7f77;
  --grey-600:   #4a5c54;
  --grey-700:   #344039;
  --grey-800:   #1e2622;
  --grey-900:   #0f1511;

  /* Semantic */
  --primary:        var(--green-600);
  --primary-dark:   var(--green-700);
  --primary-light:  var(--green-100);
  --primary-hover:  var(--green-500);

  --success:   #16a34a;
  --warning:   #d97706;
  --danger:    #dc2626;
  --info:      #2563eb;

  /* Surface */
  --bg:        var(--grey-50);
  --surface:   var(--white);
  --surface-2: var(--grey-100);
  --border:    var(--grey-200);
  --border-md: var(--grey-300);

  /* Text */
  --text-primary:   var(--grey-900);
  --text-secondary: var(--grey-600);
  --text-muted:     var(--grey-400);
  --text-inverse:   var(--white);

  /* Sidebar */
  --sidebar-bg:      var(--green-900);
  --sidebar-hover:   rgba(255,255,255,0.08);
  --sidebar-active:  var(--green-600);
  --sidebar-text:    rgba(255,255,255,0.8);
  --sidebar-muted:   rgba(255,255,255,0.45);

  /* Spacing & Shape */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);

  /* Topbar */
  --topbar-height: 64px;
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;

  /* Transitions */
  --transition: 0.2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; }

ul, ol { list-style: none; }

button { cursor: pointer; font-family: inherit; }

input, select, textarea { font-family: inherit; }

/* ============================================================
   LAYOUT - SIDEBAR + CONTENT
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

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

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

.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: var(--green-500);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: white;
  flex-shrink: 0;
  letter-spacing: -1px;
}

.sidebar-logo-text { overflow: hidden; }
.sidebar-logo-text .brand { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; color: white; white-space: nowrap; }
.sidebar-logo-text .tagline { font-size: 10px; color: var(--sidebar-muted); white-space: nowrap; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
}

.nav-item:hover { background: var(--sidebar-hover); color: white; }
.nav-item.active { background: var(--sidebar-active); color: white; }
.nav-item.active .nav-icon { color: white; }

.nav-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--sidebar-muted);
  transition: color var(--transition);
}
.nav-item:hover .nav-icon, .nav-item.active .nav-icon { color: white; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
}

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

.sidebar-user-info { overflow: hidden; flex: 1; }
.sidebar-user-info .user-name { font-size: 12.5px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info .user-role { font-size: 10.5px; color: var(--sidebar-muted); text-transform: capitalize; }

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

/* TOPBAR */
.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.topbar-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}
.topbar-btn:hover { background: var(--grey-100); color: var(--primary); border-color: var(--green-200); }

.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}
.topbar-user:hover { background: var(--grey-100); }
.topbar-user .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--green-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white;
}
.topbar-user .user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.topbar-user .user-role { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }

/* PAGE CONTENT */
.page-content {
  padding: 28px 28px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header-left .page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.page-header-left .page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body { padding: 24px; }
.card-body-sm { padding: 16px 24px; }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

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

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

.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-card.green::before  { background: var(--green-500); }
.stat-card.blue::before   { background: var(--info); }
.stat-card.amber::before  { background: var(--warning); }
.stat-card.red::before    { background: var(--danger); }
.stat-card.teal::before   { background: #0d9488; }
.stat-card.purple::before { background: #7c3aed; }

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

.stat-icon.green  { background: var(--green-100);  color: var(--green-700); }
.stat-icon.blue   { background: #dbeafe;            color: #1d4ed8; }
.stat-icon.amber  { background: #fef3c7;            color: #b45309; }
.stat-icon.red    { background: #fee2e2;            color: #b91c1c; }
.stat-icon.teal   { background: #ccfbf1;            color: #0f766e; }
.stat-icon.purple { background: #ede9fe;            color: #6d28d9; }

.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-trend {
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  background: var(--grey-50);
  padding: 12px 14px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--green-50); }

.table-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.table-empty .empty-icon { font-size: 40px; margin-bottom: 12px; }
.table-empty .empty-text { font-size: 14px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width { grid-column: 1 / -1; }
.form-group.half { grid-column: span 2; }

label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.required::after { content: ' *'; color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  transition: all var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px var(--green-100);
}

input::placeholder,
textarea::placeholder { color: var(--grey-400); }

textarea { min-height: 90px; resize: vertical; }

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7f77' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

.form-error { font-size: 11.5px; color: var(--danger); margin-top: 2px; }
.form-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* FILTER BAR */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  flex: 1;
  min-width: 160px;
  max-width: 220px;
  padding: 8px 12px;
  font-size: 13px;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.search-input-wrap input {
  padding-left: 38px;
  max-width: none;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-400);
  font-size: 15px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

.btn-primary   { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }

.btn-success   { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { background: #15803d; color: white; }

.btn-danger    { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; color: white; }

.btn-warning   { background: var(--warning); color: white; border-color: var(--warning); }
.btn-warning:hover { background: #b45309; color: white; }

.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.btn-ghost     { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { background: var(--grey-100); color: var(--text-primary); }

.btn-white     { background: white; color: var(--text-primary); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-white:hover { background: var(--grey-50); }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

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

.badge-new          { background: #dbeafe; color: #1e40af; }
.badge-contacted    { background: #e0e7ff; color: #4338ca; }
.badge-interested   { background: var(--green-100); color: var(--green-800); }
.badge-followup     { background: #fef3c7; color: #92400e; }
.badge-sv           { background: #ccfbf1; color: #0f766e; }
.badge-svdone       { background: #d1fae5; color: #065f46; }
.badge-negotiation  { background: #ede9fe; color: #5b21b6; }
.badge-booking-amt  { background: #fce7f3; color: #9d174d; }
.badge-booked       { background: #dcfce7; color: #166534; }
.badge-future       { background: var(--grey-100); color: var(--grey-600); }
.badge-ni           { background: #fee2e2; color: #991b1b; }
.badge-invalid      { background: #f3f4f6; color: #4b5563; }

/* Source badges */
.source-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--grey-100);
  color: var(--grey-600);
}

/* Priority */
.priority-high   { color: var(--danger); }
.priority-medium { color: var(--warning); }
.priority-low    { color: var(--text-muted); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--grey-100);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.modal-close:hover { background: var(--grey-200); color: var(--text-primary); }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   ALERTS & TOASTS
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-danger  { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  min-width: 300px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

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

.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-title { font-weight: 600; font-size: 13.5px; color: var(--text-primary); }
.toast-msg   { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; }

.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 38px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child::before { display: none; }

.timeline-dot {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 2px solid var(--green-200);
  z-index: 1;
}

.timeline-content {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.timeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.timeline-action { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.timeline-time   { font-size: 11.5px; color: var(--text-muted); }
.timeline-detail { font-size: 12.5px; color: var(--text-secondary); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--grey-100);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover { background: var(--green-50); border-color: var(--green-300); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 50%, var(--green-800) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--green-600), var(--green-400));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; color: white;
}

.login-logo-text .brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--green-900);
  line-height: 1;
}

.login-logo-text .brand-tag {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.login-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.login-subtitle { font-size: 13.5px; color: var(--text-muted); margin-bottom: 28px; }

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}
.login-btn:hover { background: linear-gradient(135deg, var(--green-700), var(--green-600)); box-shadow: 0 4px 15px rgba(30,145,80,0.4); transform: translateY(-1px); }

.login-footer { margin-top: 24px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* ============================================================
   ATTENDANCE CALENDAR
   ============================================================ */
.attendance-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-header {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  flex-direction: column;
  gap: 2px;
}

.cal-day:hover { border-color: var(--green-300); background: var(--green-50); }
.cal-day.empty { cursor: default; }
.cal-day.today { border-color: var(--green-500); font-weight: 700; }
.cal-day.present { background: var(--green-100); color: var(--green-800); }
.cal-day.absent  { background: #fee2e2; color: #991b1b; }
.cal-day.late    { background: #fef3c7; color: #92400e; }
.cal-day.leave   { background: #e0e7ff; color: #3730a3; }
.cal-day.holiday { background: var(--grey-100); color: var(--grey-400); }

.cal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ============================================================
   PLOT GRID
   ============================================================ */
.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.plot-cell {
  aspect-ratio: 1;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  gap: 2px;
  padding: 4px;
  text-align: center;
}

.plot-cell.available  { background: var(--green-100); border-color: var(--green-300); color: var(--green-800); }
.plot-cell.available:hover  { background: var(--green-200); transform: scale(1.03); }
.plot-cell.reserved   { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.plot-cell.booked     { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.plot-cell.sold       { background: var(--grey-100); border-color: var(--grey-300); color: var(--grey-400); cursor: default; }

/* ============================================================
   MISC
   ============================================================ */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

.text-muted   { color: var(--text-muted); }
.text-primary-color { color: var(--primary); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-sm      { font-size: 12.5px; }
.text-xs      { font-size: 11.5px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-auto { margin-top: auto; }

.avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-200);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--green-800);
  flex-shrink: 0;
}

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: var(--grey-100);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}
.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu { display: block; }

.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--grey-100); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); }

/* Scroll custom */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--grey-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-400); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar { width: 0; transform: translateX(-100%); }
  .sidebar.mobile-open { width: var(--sidebar-width); transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar input, .filter-bar select { max-width: none; }
}

/* Print */
@media print {
  .sidebar, .topbar, .filter-bar, .btn-group { display: none !important; }
  .main-content { margin-left: 0; }
}
.mobile-menu-btn{
    display:none;
}

@media(max-width:1024px){

.mobile-menu-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    width:45px;
    height:45px;
    border:none;
    background:#fff;
    border-radius:10px;
}

.sidebar{
    position:fixed;
    left:-280px;
    width:280px;
    transition:.3s;
}

.sidebar.mobile-open{
    left:0;
}
}
@media(max-width:768px){

table,
thead,
tbody,
tr,
th,
td{
display:block;
width:100%;
}

thead{
display:none;
}

tr{
background:#fff;
margin-bottom:15px;
border-radius:12px;
padding:12px;
box-shadow:0 2px 10px rgba(0,0,0,.08);
}

td{
display:flex;
justify-content:space-between;
padding:8px 0;
border:none;
}

}
@media(max-width:768px){

.stats-grid{
grid-template-columns:1fr;
gap:15px;
}

.stat-card{
padding:18px;
}

}
@media(max-width:768px){

.form-grid{
grid-template-columns:1fr;
}

input,
select,
textarea{
font-size:16px;
padding:14px;
}

.btn{
width:100%;
justify-content:center;
}

}
@media(max-width:768px){

.topbar{
padding:10px 15px;
height:60px;
}

.topbar-title{
font-size:16px;
}

.topbar-user .user-name,
.topbar-user .user-role{
display:none;
}

}
@media(max-width:768px){

.page-content{
padding:15px;
}

.card-body{
padding:15px;
}

}
.fab{
position:fixed;
bottom:20px;
right:20px;
width:60px;
height:60px;
border-radius:50%;
background:var(--primary);
color:#fff;
display:flex;
align-items:center;
justify-content:center;
box-shadow:0 10px 25px rgba(0,0,0,.2);
z-index:999;
}
.bottom-nav{
display:none;
}

@media(max-width:768px){

.bottom-nav{
display:flex;
position:fixed;
bottom:0;
left:0;
right:0;
height:65px;
background:#fff;
border-top:1px solid #ddd;
justify-content:space-around;
align-items:center;
z-index:999;
}

.page-content{
padding-bottom:90px;
}

}
@media(max-width:768px){

.plot-grid{
grid-template-columns:repeat(3,1fr);
}

}
@media(max-width:768px){

.login-card{
width:100%;
padding:30px 20px;
border-radius:20px;
}

}
html,
body{
overflow-x:hidden;
width:100%;
}