/* ================= CSS VARIABLES ================= */
:root {
  --bg-start: #1a1d27;
  --bg-end: #0f1117;
  --card-bg: #232832;
  --text: #ffffff;
  --text-secondary: #b0b3b8;
  --border: #3b3f4a;
  --hover: #2f3542;
  --gradient: linear-gradient(135deg, #2f3542, #232832);
}

.light-theme {
  --bg-start: #f8fafc;
  --bg-end: #eef2f7;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --hover: #f1f5f9;
  --gradient: linear-gradient(135deg, #ffffff, #f8fafc);
}

/* ================= BASE STYLES ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;

  color: var(--text);
  min-height: 100vh;
  transition: all 0.3s ease;
}

.commercial-container { display: flex; height: 100vh; overflow: hidden;   background: var(--gradient); padding-top: 60px;}

/* ================= THEME TOGGLE ================= */
.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 25px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
   color: var(--text);
}
.theme-toggle:hover { background: var(--hover); }


#pageInfo{
   color: var(--text);
   margin: 10px;
}
/* ================= SIDEBAR ================= */
.commercial-sidebar {
  width: 280px;
  background: var(--card-bg);
  border-right: 1px solid var(--border);
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.commercial-sidebar h3 { font-size: 18px; color: var(--text);   font-family: 'Inter', sans-serif; }
h3{
   font-size: 18px; color: var(--text)
}
.district-btn {
  width: 100%;
  background: var(--hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}
.site-list { display: none; list-style: none; margin-top: 10px; padding-left: 15px; }
.site-list.open { display: block; }

.site-list li {
  padding: 10px 15px;
  background: var(--hover);
  margin-bottom: 6px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  display: flex; 
  align-items: center; 
  gap: 8px;
}
.site-list li:hover { background: var(--border); transform: translateX(4px); }

/* ================= MAIN CONTENT ================= */
.commercial-content { flex: 1; padding: 30px; overflow-y: auto; }
/* ================= TABLE HEADER ================= */
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

/* RIGHT GROUP */
.table-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* SEARCH INPUT */
#global-search {
  width: 200px;
  padding: 6px 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}

/* COUNT */
.table-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

#global-search::placeholder {
  color: var(--text-secondary);
}

#dashboard-title{
    font-family: 'Inter', sans-serif;
    font-size: 25px;
}
/* ================= CHARTS ================= */
.charts-container { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 30px; }
.chart-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  height: 400px;
  position: relative;
}

/* ================= TABLE ================= */
.table-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 25px;
  margin-top: 20px;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { padding: 16px 12px; color: var(--text); border-bottom: 2px solid var(--border); text-align: left; }
td { padding: 14px 12px; color: var(--text); border-bottom: 1px solid var(--border); }

.purpose-badge {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; color: white;
}

.map-view-btn {
  background: linear-gradient(135deg, #4f6bed, #3b55d9);
  border: none; color: white; padding: 8px 16px; border-radius: 8px; cursor: pointer;
}

.pagination { display: flex; justify-content: end; gap: 15px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--border); }
.pagination button { background: var(--hover); border: 1px solid var(--border); color: var(--text); padding: 8px 16px; border-radius: 8px; cursor: pointer; }

/* ================= MODAL ================= */
.commercial-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 1000; }
.commercial-modal-content { background: var(--card-bg); width: 90%; max-width: 1000px; margin: 5% auto; border-radius: 20px; height: 600px; position: relative; }
.close { position: absolute; top: 20px; right: 25px; font-size: 28px; color: var(--text); cursor: pointer; z-index: 1001; }
#modal-map { width: 100%; height: 100%; border-radius: 20px; }

/* Responsive */
@media (max-width: 1100px) { .charts-container { grid-template-columns: 1fr; } }

/* ================= TABLE COLUMN SIZING ================= */

/* 1. Plot No - Make it compact */
#plot-table tr > td:first-child,
table thead th:first-child {
    width: 50px;       /* Fixed width sufficient for "3-22" */
    max-width: 50px;
    white-space: nowrap; /* Prevents wrapping */
}

/* 2. Type - Give this column the flexible space */
#plot-table tr > td:nth-child(2),
table thead th:nth-child(2) {
    width: 50px;        /* Takes up remaining space */
}

/* 3. Purpose, Price, Area, Actions - Fixed or Percentage widths */
#plot-table tr > td:nth-child(3), table thead th:nth-child(3), /* Purpose */
#plot-table tr > td:nth-child(4), table thead th:nth-child(4), /* Price */
#plot-table tr > td:nth-child(5), table thead th:nth-child(5), /* Area */
#plot-table tr > td:nth-child(6), table thead th:nth-child(6)  /* Actions */
{
    width: 12%;         /* Even distribution for the rest */
    text-align: center; /* Center these values for better look */
}

/* Optional: Align the header text for 3-6 to center as well */
table thead th:nth-child(n+3) {
    text-align: center;
}