/* Modal close button fix */
.modal-close, .modal-content .close, .modal-content button[onclick*="closeAssignedPlotsModal"], .modal-content button[onclick*="closeAssignPlotModal"] {
  z-index: 100002 !important;
  color: var(--gold-solid) !important;
  background: none !important;
  border: none !important;
  font-size: 2rem !important;
  position: absolute !important;
  top: 12px !important;
  right: 18px !important;
  cursor: pointer;
  box-shadow: none !important;
}
/* =====================
   DASHBOARD FORMS & BUTTONS
===================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}
.form-label {
  color: var(--gold-solid);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 2px;
  letter-spacing: 0.2px;
}
.form-input, .form-select {
  background: #181818;
  color: var(--text-light);
  border: 1.5px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus {
  border-color: var(--gold-solid);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}
.btn, button {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 18px;
  border: none;
  padding: 10px 22px;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.btn-primary, .btn-gold, button[type="submit"] {
  background: var(--gold-gradient);
  color: #222;
  box-shadow: 0 2px 12px rgba(212,175,55,0.10);
}
.btn-primary:hover, .btn-gold:hover, button[type="submit"]:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 18px rgba(212,175,55,0.18);
}
.btn-secondary {
  background: #232323;
  color: var(--gold-solid);
  border: 1.5px solid var(--gold-solid);
}
.btn-secondary:hover {
  background: var(--gold-solid);
  color: #232323;
}
.btn-light {
  background: #fff;
  color: #222;
  border: 1.5px solid var(--glass-border);
}
.btn-light:hover {
  background: var(--gold-solid);
  color: #232323;
}
.btn-info {
  background: #1e90ff;
  color: #fff;
}
.btn-success {
  background: #16a34a;
  color: #fff;
}
.btn[disabled], button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 10px;
}
.card-title {
  color: var(--gold-solid);
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 18px;
}
/* =====================
   DASHBOARD TABLES
===================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  background: transparent;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  font-size: 1rem;
}
th {
  color: var(--text-light);
  font-weight: 800;
  font-size: 1.1rem;
  background: none;
  border-bottom: 2px solid var(--glass-border);
  letter-spacing: 0.5px;
}
td {
  color: var(--text-light);
  border-bottom: 1px solid var(--glass-border);
  font-weight: 500;
}
tr:last-child td {
  border-bottom: none;
}
.card table {
  background: transparent;
}
.card th, .card td {
  background: transparent;
}
.card {
  overflow-x: auto;
}
.loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 30px 0;
}
/* =====================
   PREMIUM ROOT & THEME
===================== */
:root {
  --gold-gradient: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
  --gold-solid: #d4af37;
  --premium-black: #050505;
  --glass-white: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --ios-blur: blur(25px) saturate(180%);
  --text-light: #f4f4f4;
  --text-muted: #d0d0d0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--premium-black); 
    /* Fixed Background for transparency effect */
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.85)), url("../images/bg.jpg");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    color: var(--text-light); 
    overflow-x: hidden; 
}

/* =====================
   RESPONSIVE TYPOGRAPHY (Fixes Big Screen Issues)
===================== */
h1 { font-size: clamp(3rem, 6vw, 7rem); line-height: 1.1; font-family: 'Playfair Display', serif; }
h2 { font-size: clamp(2.5rem, 4vw, 4rem); font-family: 'Playfair Display', serif; }
h3 { font-size: clamp(1.5rem, 2vw, 2.5rem); }
p { font-size: clamp(1rem, 1.2vw, 1.4rem); line-height: 1.6; }

.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =====================
   NAVBAR (Consistent)
===================== */
nav {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1600px; /* Increased for Big Screens */
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.nav-logo img { height: 50px; }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: 0.3s;
  position: relative;
}

.nav-links a:hover, .nav-links a.active { color: var(--gold-solid); }

.login-btn {
    background: var(--gold-gradient);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
}
.login-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }

/* =====================
   SECTIONS & GRIDS
===================== */
section { padding: 120px 8%; min-height: 100vh; }
.section-title { text-align: center; margin-bottom: 60px; }

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Responsive Grid */
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Glass Card Style */
.glass-card {
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    overflow: hidden;
    transition: 0.4s ease;
}
.glass-card:hover { transform: translateY(-10px); border-color: var(--gold-solid); }

/* =====================
   LOGIN MODAL
===================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(15px);
    z-index: 20000; display: none; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.4s;
}
.modal-active { display: flex; opacity: 1; }
.login-box {
    background: #111; border: 1px solid var(--gold-solid); padding: 50px;
    border-radius: 20px; text-align: center; width: 400px;
}
.role-btn { padding: 10px 20px; background: transparent; border: 1px solid #555; color: #fff; cursor: pointer; margin: 5px; }
.role-btn.active { background: var(--gold-solid); color: #000; }
.login-input { width: 100%; padding: 15px; margin: 20px 0; background: #222; border: none; color: white; text-align: center; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .nav-links { display: none; }
    h1 { font-size: 3.5rem; }
    section { padding: 80px 5%; }
}

/* =====================
   ADMIN DASHBOARD UI
===================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(20, 20, 20, 0.95);
  padding: 18px 36px;
  border-bottom: 2px solid var(--gold-solid);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-left { display: flex; align-items: center; gap: 18px; }
.logo { font-size: 1.6rem; font-weight: 900; color: var(--gold-solid); display: flex; align-items: center; gap: 10px; }
.hamburger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 3px; background: var(--gold-solid); border-radius: 2px; }
.header-right { display: flex; align-items: center; gap: 24px; }
.admin-info { text-align: right; }
.admin-name { font-weight: 700; font-size: 1.1rem; color: var(--gold-solid); }
.admin-role { font-size: 0.95rem; color: var(--text-muted); }
.logout-btn {
  background: var(--gold-gradient);
  color: #222;
  border: none;
  padding: 8px 22px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logout-btn:hover { filter: brightness(1.1); box-shadow: 0 2px 12px rgba(212,175,55,0.18); }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 230px;
  background: rgba(20, 20, 20, 0.98);
  border-right: 2px solid var(--gold-solid);
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  padding: 32px 0 24px 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sidebar-title {
  color: var(--gold-solid);
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 0 8px 32px;
  letter-spacing: 1px;
}
.sidebar-item {
  color: var(--text-light);
  padding: 10px 32px;
  font-size: 1.08rem;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-item.active, .sidebar-item:hover {
  background: rgba(255, 215, 0, 0.07);
  color: var(--gold-solid);
  border-left: 4px solid var(--gold-solid);
}

.main-content {
  margin-left: 230px;
  padding: 36px 36px 36px 36px;
  min-height: 100vh;
  background: none;
}
.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-solid);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.card {
  background: rgba(30, 30, 30, 0.98);
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  padding: 32px 28px;
  margin-bottom: 32px;
  border: 1.5px solid var(--glass-border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
  margin-bottom: 32px;
}
.stat-card {
  background: rgba(40, 40, 40, 0.98);
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08);
  border: 1.5px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.stat-label {
  color: var(--text-muted);
  font-size: 1.01rem;
  font-weight: 600;
}
.stat-value {
  color: var(--gold-solid);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 1px;
  word-break: break-all;
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
}
.btn {
  padding: 10px 22px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--gold-gradient);
  color: #222;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary {
  background: #232323;
  color: var(--gold-solid);
  border: 1.5px solid var(--gold-solid);
}
.btn-secondary:hover { background: var(--gold-solid); color: #232323; }

/* Responsive for dashboard */
@media (max-width: 1100px) {
  .main-content { padding: 24px 6vw; }
  .sidebar { width: 180px; }
  .main-content { margin-left: 180px; }
}
@media (max-width: 800px) {
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; padding: 0; border-right: none; border-bottom: 2px solid var(--gold-solid); }
  .main-content { margin-left: 0; padding: 18px 2vw; }
}
@media (max-width: 600px) {
  .header, .main-content { padding: 10px 2vw; }
  .card { padding: 16px 6px; }
  .stats-grid { gap: 10px; }
}