/**
 * KeptCarbon Custom Styles
 * Green & White Theme — vibrant, fresh, modern
 */

/* ============================================================
   Homepage (index.html) Hero Section
   ============================================================ */
.hero.section {
  background: url("../img/hero-bg.jpg") center center / cover no-repeat;
  position: relative;
  z-index: 1;
}

.hero.section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  right: 0;
  bottom: 0;
  background: rgba(240, 250, 244, 0.88);
  /* Light green overlay to match theme */
  z-index: -1;
}

/* ============================================================
   Auth Pages (Login / Register)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #e8f8ef 0%, #c8eeda 40%, #f0faf4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 158, 95, 0.12) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 158, 95, 0.08) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(45, 158, 95, 0.15);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 60px rgba(45, 158, 95, 0.12);
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .brand-name {
  font-size: 34px;
  font-weight: 700;
  color: #1a3d2b;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  letter-spacing: -0.5px;
}

.auth-logo .brand-name span {
  color: #2d9e5f;
}

.auth-logo p {
  color: rgba(45, 90, 61, 0.6);
  font-size: 17px;
  margin-top: 6px;
  margin-bottom: 0;
}

.auth-card h2 {
  color: #1a3d2b;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: rgba(45, 90, 61, 0.55);
  font-size: 16px;
  margin-bottom: 28px;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-group label {
  display: block;
  color: #2d5a3d;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.auth-form-group .input-wrapper {
  position: relative;
}

.auth-form-group .input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(45, 158, 95, 0.5);
  font-size: 16px;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.2);
  border-radius: 10px;
  color: #1a3d2b;
  font-size: 17px;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  transition: all 0.3s;
  outline: none;
}

.auth-form-group input::placeholder {
  color: rgba(45, 90, 61, 0.35);
}

.auth-form-group input:focus {
  border-color: #2d9e5f;
  background: #edfaf3;
  box-shadow: 0 0 0 3px rgba(45, 158, 95, 0.12);
}

.btn-auth {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #2d9e5f, #1e7a47);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.btn-auth:hover {
  background: linear-gradient(135deg, #38b26a, #2d9e5f);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(45, 158, 95, 0.3);
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: rgba(45, 90, 61, 0.4);
  font-size: 16px;
}

.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;
  height: 1px;
  background: rgba(45, 158, 95, 0.15);
}

.auth-divider::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;
  height: 1px;
  background: rgba(45, 158, 95, 0.15);
}

.auth-link {
  text-align: center;
  color: rgba(45, 90, 61, 0.6);
  font-size: 16px;
}

.auth-link a {
  color: #2d9e5f;
  font-weight: 600;
  text-decoration: none;
}

.auth-link a:hover {
  color: #1e7a47;
  text-decoration: underline;
}

.auth-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 16px;
  display: none;
}

.auth-alert.error {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.2);
  color: #c0392b;
  display: block;
}

.auth-alert.success {
  background: rgba(45, 158, 95, 0.1);
  border: 1px solid rgba(45, 158, 95, 0.25);
  color: #1e7a47;
  display: block;
}

/* ============================================================
   Navbar extras (login/logout buttons)
   ============================================================ */
.btn-login {
  color: var(--accent-color) !important;
  background: transparent;
  font-size: 17px;
  padding: 6px 18px;
  margin: 0 8px 0 0;
  border-radius: 50px;
  transition: 0.3s;
  border: 1.5px solid var(--accent-color);
  font-family: var(--nav-font);
  font-weight: 500;
  white-space: nowrap;
}

.btn-login:hover {
  background: var(--accent-color) !important;
  color: #fff !important;
}

.btn-logout {
  color: #2d5a3d !important;
  background: rgba(45, 158, 95, 0.08);
  font-size: 16px;
  padding: 5px 16px;
  margin: 0 0 0 8px;
  border-radius: 50px;
  transition: 0.3s;
  border: 1px solid rgba(45, 158, 95, 0.2);
  font-family: var(--nav-font);
  white-space: nowrap;
}

.btn-logout:hover {
  background: rgba(220, 53, 69, 0.08) !important;
  border-color: rgba(220, 53, 69, 0.3) !important;
  color: #c0392b !important;
}

.nav-username {
  color: var(--heading-color);
  font-size: 17px;
  font-weight: 500;
  font-family: var(--nav-font);
  margin: 0 8px;
  white-space: nowrap;
}

/* ============================================================
   Dashboard Page
   ============================================================ */
.dashboard-page {
  background: #f7fdf9;
  min-height: 100vh;
  color: #2d5a3d;
}

.dashboard-header {
  background: linear-gradient(180deg, #ffffff 0%, #f0faf4 100%);
  padding: 100px 0 40px;
  border-bottom: 1px solid rgba(45, 158, 95, 0.12);
}

.dashboard-header h1 {
  color: #1a3d2b;
  font-size: 33px;
  font-weight: 600;
}

.dashboard-header p {
  color: rgba(45, 90, 61, 0.6);
  font-size: 18px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid rgba(45, 158, 95, 0.15);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s;
  box-shadow: 0 2px 12px rgba(45, 158, 95, 0.06);
}

.stat-card:hover {
  border-color: rgba(45, 158, 95, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(45, 158, 95, 0.12);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 158, 95, 0.15), rgba(30, 122, 71, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #2d9e5f;
  margin-bottom: 16px;
}

.stat-card .stat-value {
  font-size: 33px;
  font-weight: 700;
  color: #1a3d2b;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 16px;
  color: rgba(45, 90, 61, 0.55);
}

.dashboard-section {
  padding: 48px 0;
}

.dashboard-section h2 {
  color: #1a3d2b;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45, 158, 95, 0.12);
}

.plot-card {
  background: #ffffff;
  border: 1px solid rgba(45, 158, 95, 0.12);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 158, 95, 0.05);
}

.plot-card:hover {
  border-color: rgba(45, 158, 95, 0.3);
  background: #f5fdf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 158, 95, 0.1);
}

.plot-card .plot-name {
  color: #1a3d2b;
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 8px;
}

.plot-card .plot-meta {
  font-size: 17px;
  color: rgba(45, 90, 61, 0.5);
}

.plot-card .carbon-badge {
  background: linear-gradient(135deg, rgba(45, 158, 95, 0.12), rgba(30, 122, 71, 0.12));
  border: 1px solid rgba(45, 158, 95, 0.25);
  color: #1e7a47;
  font-size: 17px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.dashboard-map-preview {
  border-radius: 16px;
  overflow: hidden;
  height: 320px;
  border: 1px solid rgba(45, 158, 95, 0.15);
  box-shadow: 0 4px 20px rgba(45, 158, 95, 0.08);
}

#dashboard-map {
  width: 100%;
  height: 100%;
}

/* ============================================================
   Map Draw Page
   ============================================================ */
.map-page {
  margin: 0;
  padding: 0;
  background: #f0faf4;
}

#main-map {
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
}

.map-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, transparent 100%);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(45, 158, 95, 0.08);
}

.map-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 390px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-left: 1px solid rgba(45, 158, 95, 0.12);
  z-index: 100;
  overflow-y: auto;
  padding: 68px 22px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(45, 158, 95, 0.06);
}

.map-panel::-webkit-scrollbar {
  width: 3px;
}

.map-panel::-webkit-scrollbar-track {
  background: transparent;
}

.map-panel::-webkit-scrollbar-thumb {
  background: rgba(45, 158, 95, 0.2);
  border-radius: 3px;
}

.panel-step {
  display: none;
}

.panel-step.active {
  display: block;
}

.step-header {
  margin-bottom: 18px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(45, 158, 95, 0.08);
  border: 1px solid rgba(45, 158, 95, 0.2);
  color: #2d9e5f;
  font-size: 16px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.step-header h3 {
  color: #1a3d2b;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.2px;
}

.step-header p {
  color: rgba(45, 90, 61, 0.55);
  font-size: 16px;
  line-height: 1.6;
}

.method-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.method-tab {
  flex: 1;
  padding: 10px 10px;
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.15);
  border-radius: 10px;
  color: rgba(45, 90, 61, 0.55);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
}

.method-tab.active,
.method-tab:hover {
  background: rgba(45, 158, 95, 0.1);
  border-color: rgba(45, 158, 95, 0.3);
  color: #1e7a47;
}

.instruction-box {
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.12);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.instruction-box h4 {
  color: rgba(45, 90, 61, 0.65);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.instruction-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.instruction-steps li {
  color: rgba(45, 90, 61, 0.65);
  font-size: 16px;
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(45, 158, 95, 0.08);
}

.instruction-steps li:last-child {
  border-bottom: none;
}

.instruction-steps li .step-num {
  min-width: 18px;
  height: 18px;
  background: rgba(45, 158, 95, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #2d9e5f;
  margin-top: 1px;
  flex-shrink: 0;
}

.shp-requirements {
  background: rgba(255, 193, 7, 0.05);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 14px;
}

.shp-requirements h4 {
  color: rgba(180, 130, 0, 0.9);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.shp-requirements .req-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(180, 130, 0, 0.75);
  font-size: 18px;
  padding: 3px 0;
}

/* Map input */
.map-input {
  width: 100%;
  padding: 10px 13px;
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.2);
  border-radius: 9px;
  color: #1a3d2b;
  font-size: 16px;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  outline: none;
  transition: all 0.22s;
  margin-bottom: 11px;
  -webkit-appearance: none;
  appearance: none;
}

.map-input:focus {
  border-color: #2d9e5f;
  background: #edfaf3;
  box-shadow: 0 0 0 3px rgba(45, 158, 95, 0.1);
  color: #1a3d2b;
}

.map-input::placeholder {
  color: rgba(45, 90, 61, 0.35);
}

/* Buttons */
.btn-map-primary {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #2d9e5f, #1e7a47);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  margin-bottom: 8px;
  letter-spacing: 0.1px;
}

.btn-map-primary:hover {
  background: linear-gradient(135deg, #38b26a, #2d9e5f);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(45, 158, 95, 0.28);
}

.btn-map-primary:disabled {
  background: rgba(45, 158, 95, 0.15);
  color: rgba(45, 90, 61, 0.35);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-map-secondary {
  width: 100%;
  padding: 9px;
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.2);
  border-radius: 10px;
  color: rgba(45, 90, 61, 0.7);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.22s;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  margin-bottom: 8px;
}

.btn-map-secondary:hover {
  background: rgba(45, 158, 95, 0.08);
  border-color: rgba(45, 158, 95, 0.3);
  color: #1e7a47;
}

.btn-map-danger {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 10px;
  color: rgba(192, 57, 43, 0.65);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.22s;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  margin-bottom: 8px;
}

.btn-map-danger:hover {
  background: rgba(220, 53, 69, 0.06);
  border-color: rgba(220, 53, 69, 0.35);
  color: #c0392b;
}

.result-card {
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.12);
  border-radius: 11px;
  padding: 14px;
  margin-bottom: 10px;
}

.result-card .result-label {
  color: rgba(45, 90, 61, 0.5);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 5px;
}

.result-card .result-value {
  color: #2d9e5f;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 3px;
}

.result-card .result-unit {
  color: rgba(45, 90, 61, 0.5);
  font-size: 17px;
}

.chart-container {
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.1);
  border-radius: 11px;
  padding: 14px;
  margin-bottom: 14px;
}

.chart-container h4 {
  color: rgba(45, 90, 61, 0.65);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.forecast-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.forecast-input-group input {
  flex: 1;
  padding: 10px 13px;
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.2);
  border-radius: 9px;
  color: #1a3d2b;
  font-size: 16px;
  font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.forecast-input-group input:focus {
  border-color: rgba(45, 158, 95, 0.5);
  background: #edfaf3;
}

.forecast-input-group button {
  padding: 10px 16px;
  background: linear-gradient(135deg, #2d9e5f, #1e7a47);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s;
  font-family: 'Roboto', sans-serif;
}

.forecast-input-group button:hover {
  background: linear-gradient(135deg, #38b26a, #2d9e5f);
}

/* Step circle */
.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(45, 158, 95, 0.06);
  border: 1.5px solid rgba(45, 158, 95, 0.15);
  color: rgba(45, 90, 61, 0.45);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.step-circle.current {
  background: rgba(45, 158, 95, 0.15);
  border-color: #2d9e5f;
  color: #2d9e5f;
  box-shadow: 0 0 0 3px rgba(45, 158, 95, 0.1);
}

.step-circle.done {
  background: rgba(45, 158, 95, 0.12);
  border-color: rgba(45, 158, 95, 0.5);
  color: #2d9e5f;
}

/* Year chips */
.year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.year-chip {
  padding: 3px 9px;
  background: rgba(45, 158, 95, 0.06);
  border: 1px solid rgba(45, 158, 95, 0.12);
  border-radius: 20px;
  font-size: 17px;
  color: rgba(45, 90, 61, 0.6);
}

.year-chip.dominant {
  background: rgba(45, 158, 95, 0.14);
  border-color: rgba(45, 158, 95, 0.35);
  color: #2d9e5f;
  font-weight: 600;
}

/* Analyzing overlay */
.analyzing-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
  gap: 14px;
}

.analyzing-overlay.visible {
  display: flex;
}

.analyzing-overlay p {
  color: rgba(45, 90, 61, 0.6);
  font-size: 16px;
  margin: 0;
}

.analyzing-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(45, 158, 95, 0.12);
  border-top-color: #2d9e5f;
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Status bar */
.map-status-bar {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 408px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(45, 158, 95, 0.15);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(45, 90, 61, 0.75);
  font-size: 18px;
  font-family: 'Roboto', sans-serif;
  box-shadow: 0 4px 16px rgba(45, 158, 95, 0.08);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2d9e5f;
  animation: pulse-dot 2.5s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

/* ============================================================
   My Plots Page
   ============================================================ */
.plots-page {
  background: #f7fdf9;
  min-height: 100vh;
  color: #2d5a3d;
  padding-top: 80px;
}

.plots-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(45, 158, 95, 0.1);
}

.plots-header h1 {
  color: #1a3d2b;
  font-size: 31px;
  font-weight: 600;
}

.plots-grid {
  padding: 40px 0;
}

.plot-item-card {
  background: #ffffff;
  border: 1px solid rgba(45, 158, 95, 0.12);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s;
  height: 100%;
  box-shadow: 0 2px 12px rgba(45, 158, 95, 0.06);
}

.plot-item-card:hover {
  border-color: rgba(45, 158, 95, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(45, 158, 95, 0.12);
}

.plot-item-card .plot-thumbnail {
  height: 120px;
  background: rgba(45, 158, 95, 0.08);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
}

.plot-item-card .plot-thumbnail .mini-map {
  width: 100%;
  height: 100%;
}

.plot-item-card h3 {
  color: #1a3d2b;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}

.plot-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.plot-meta-label {
  color: rgba(45, 90, 61, 0.5);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plot-meta-value {
  color: rgba(45, 90, 61, 0.8);
  font-size: 16px;
  font-weight: 500;
}

.plot-carbon-highlight {
  background: linear-gradient(135deg, rgba(45, 158, 95, 0.08), rgba(30, 122, 71, 0.08));
  border: 1px solid rgba(45, 158, 95, 0.18);
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  text-align: center;
}

.plot-carbon-highlight .carbon-value {
  color: #2d9e5f;
  font-size: 26px;
  font-weight: 700;
}

.plot-carbon-highlight .carbon-label {
  color: rgba(45, 90, 61, 0.5);
  font-size: 16px;
}

.plot-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.btn-plot-view {
  flex: 1;
  padding: 8px;
  background: rgba(45, 158, 95, 0.08);
  border: 1px solid rgba(45, 158, 95, 0.2);
  border-radius: 8px;
  color: #2d9e5f;
  font-size: 17px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
}

.btn-plot-view:hover {
  background: rgba(45, 158, 95, 0.15);
  color: #1e7a47;
  text-decoration: none;
}

.btn-plot-delete {
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(220, 53, 69, 0.18);
  border-radius: 8px;
  color: rgba(192, 57, 43, 0.65);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-plot-delete:hover {
  background: rgba(220, 53, 69, 0.06);
  border-color: rgba(220, 53, 69, 0.35);
  color: #c0392b;
}

.empty-plots {
  text-align: center;
  padding: 80px 20px;
  color: rgba(45, 90, 61, 0.45);
}

.empty-plots i {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  color: rgba(45, 158, 95, 0.25);
}

.empty-plots h3 {
  color: rgba(45, 90, 61, 0.5);
  font-size: 21px;
  margin-bottom: 8px;
}

/* ============================================================
   Profile Page
   ============================================================ */
.profile-page {
  background: url("../img/hero-bg.jpg") center center / cover no-repeat fixed;
  background-color: #f7fdf9;
  min-height: 100vh;
  color: #2d5a3d;
  padding-top: 80px;
  position: relative;
  z-index: 1;
}

.profile-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(247, 253, 249, 0.85);
  z-index: -1;
}

.profile-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(45, 158, 95, 0.1);
}

.profile-header h1 {
  color: #1a3d2b;
  font-size: 31px;
  font-weight: 600;
}

.profile-content {
  padding: 48px 0;
}

.profile-avatar-section {
  text-align: center;
  padding: 32px 24px;
  background: #ffffff;
  border: 1px solid rgba(45, 158, 95, 0.12);
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 14px rgba(45, 158, 95, 0.06);
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(45, 158, 95, 0.2), rgba(30, 122, 71, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #2d9e5f;
  margin: 0 auto 16px;
  border: 3px solid rgba(45, 158, 95, 0.25);
}

.profile-name {
  color: #1a3d2b;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-email {
  color: rgba(45, 90, 61, 0.55);
  font-size: 16px;
}

.profile-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.profile-stat {
  text-align: center;
}

.profile-stat .val {
  color: #2d9e5f;
  font-size: 24px;
  font-weight: 700;
}

.profile-stat .lbl {
  color: rgba(45, 90, 61, 0.5);
  font-size: 16px;
}

.profile-form-card {
  background: #ffffff;
  border: 1px solid rgba(45, 158, 95, 0.12);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 14px rgba(45, 158, 95, 0.06);
}

.profile-form-card h3 {
  color: #1a3d2b;
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45, 158, 95, 0.1);
}

.form-group-dark {
  margin-bottom: 16px;
}

.form-group-dark label {
  display: block;
  color: rgba(45, 90, 61, 0.7);
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-group-dark input {
  width: 100%;
  padding: 11px 14px;
  background: #f5fdf8;
  border: 1px solid rgba(45, 158, 95, 0.18);
  border-radius: 10px;
  color: #1a3d2b;
  font-size: 17px;
  font-family: 'Roboto', sans-serif;
  outline: none;
  transition: all 0.3s;
}

.form-group-dark input:focus {
  border-color: #2d9e5f;
  background: #edfaf3;
  box-shadow: 0 0 0 3px rgba(45, 158, 95, 0.1);
}

.form-group-dark input::placeholder {
  color: rgba(45, 90, 61, 0.3);
}

.btn-profile-save {
  padding: 12px 28px;
  background: linear-gradient(135deg, #2d9e5f, #1e7a47);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-profile-save:hover {
  background: linear-gradient(135deg, #38b26a, #2d9e5f);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(45, 158, 95, 0.25);
}

.alert-dark {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 16px;
}

.alert-dark.success {
  background: rgba(45, 158, 95, 0.08);
  border: 1px solid rgba(45, 158, 95, 0.2);
  color: #1e7a47;
}

.alert-dark.error {
  background: rgba(220, 53, 69, 0.06);
  border: 1px solid rgba(220, 53, 69, 0.18);
  color: #c0392b;
}

/* ============================================================
   Rayong Boundary overlay indicator
   ============================================================ */
.map-province-label {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(45, 158, 95, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  color: #2d9e5f;
  font-size: 17px;
  font-weight: 500;
  pointer-events: none;
}

/* ============================================================
   Light header for inner pages
   ============================================================ */
.dark-header .header {
  --background-color: rgba(255, 255, 255, 0.97);
  --default-color: #2d5a3d;
  --heading-color: #1a3d2b;
  background-color: rgba(255, 255, 255, 0.97) !important;
  border-bottom: 1px solid rgba(45, 158, 95, 0.12);
  box-shadow: 0 2px 20px rgba(45, 158, 95, 0.06);
}

.dark-header .header .logo h1 {
  color: #1a3d2b;
}

.dark-header .navmenu a {
  color: rgba(45, 90, 61, 0.8) !important;
}

.dark-header .navmenu a:hover,
.dark-header .navmenu .active {
  color: #2d9e5f !important;
}

.dark-header .btn-login {
  color: #2d9e5f !important;
  border-color: rgba(45, 158, 95, 0.4) !important;
}

.dark-header .nav-username {
  color: #2d5a3d !important;
}

.dark-header .mobile-nav-toggle {
  color: #2d5a3d !important;
}

/* Progress steps indicator */
.progress-steps {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 0;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.progress-step:last-child {
  flex: 0;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(45, 158, 95, 0.08);
  border: 2px solid rgba(45, 158, 95, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: rgba(45, 90, 61, 0.45);
  flex-shrink: 0;
  transition: all 0.3s;
}

.step-circle.done {
  background: rgba(45, 158, 95, 0.15);
  border-color: #2d9e5f;
  color: #2d9e5f;
}

.step-circle.current {
  background: #2d9e5f;
  border-color: #2d9e5f;
  color: #fff;
  box-shadow: 0 0 12px rgba(45, 158, 95, 0.35);
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(45, 158, 95, 0.1);
  margin: 0 4px;
  transition: all 0.3s;
}

.step-line.done {
  background: rgba(45, 158, 95, 0.35);
}

/* Loading state */
.analyzing-overlay {
  display: none;
  text-align: center;
  padding: 24px;
}

.analyzing-overlay.visible {
  display: block;
}

.analyzing-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(45, 158, 95, 0.15);
  border-top-color: #2d9e5f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.analyzing-overlay p {
  color: rgba(45, 90, 61, 0.6);
  font-size: 16px;
}

/* Tag chip */
.info-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(45, 158, 95, 0.08);
  border: 1px solid rgba(45, 158, 95, 0.18);
  color: #2d9e5f;
  font-size: 16px;
  padding: 3px 8px;
  border-radius: 20px;
  margin: 2px;
}

/* Year distribution chips */
.year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.year-chip {
  background: rgba(45, 158, 95, 0.07);
  border: 1px solid rgba(45, 158, 95, 0.15);
  color: rgba(45, 90, 61, 0.7);
  font-size: 18px;
  padding: 3px 8px;
  border-radius: 6px;
}

.year-chip.dominant {
  background: rgba(45, 158, 95, 0.15);
  border-color: rgba(45, 158, 95, 0.35);
  color: #2d9e5f;
  font-weight: 600;
}

/* Navigation logo for map page header */
.map-nav-logo {
  font-size: 22px;
  font-weight: 700;
  color: #1a3d2b;
  font-family: 'Raleway', sans-serif;
  text-decoration: none;
}

.map-nav-logo span {
  color: #2d9e5f;
}

/* Maplibre control override — light theme */
.maplibregl-ctrl-group {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(45, 158, 95, 0.2) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(45, 158, 95, 0.1) !important;
}

.maplibregl-ctrl-group button {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(45, 158, 95, 0.1) !important;
}

.maplibregl-ctrl-group button:last-child {
  border-bottom: none !important;
}

.maplibregl-ctrl-group button:hover {
  background-color: rgba(45, 158, 95, 0.08) !important;
}

.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: hue-rotate(100deg) saturate(1.5) brightness(0.6);
}

/* ============================================================
   Custom Mobile Drawer Navigation (kc-mobile-drawer)
   ============================================================ */
.kc-mobile-drawer {
  display: block;
}

@media (min-width: 1200px) {
  .kc-mobile-drawer {
    display: none !important;
  }
}

.kc-mobile-drawer .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 18, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9996;
}

.kc-mobile-drawer.active .drawer-overlay {
  opacity: 1;
  pointer-events: auto;
}

.kc-mobile-drawer .drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 82vw;
  max-width: 320px;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
  background: #ffffff;
  z-index: 9998;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
}

.kc-mobile-drawer.active .drawer-panel {
  transform: translateX(0);
}

.kc-mobile-drawer .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.kc-mobile-drawer .drawer-brand {
  display: flex;
  flex-direction: column;
}

.kc-mobile-drawer .brand-title {
  font-size: 22px;
  font-weight: 800;
  color: #2d9e5f; /* KeptCarbon green */
  letter-spacing: -0.3px;
  line-height: 1.1;
  font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
}

.kc-mobile-drawer .brand-badge {
  display: inline-block;
  background: rgba(45, 158, 95, 0.1);
  color: #2d9e5f;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 4px;
  align-self: flex-start;
  border: 1px solid rgba(45, 158, 95, 0.2);
}

.kc-mobile-drawer .drawer-close {
  background: #f04e4e;
  color: white;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(240, 78, 78, 0.3);
}

.kc-mobile-drawer .drawer-close:hover {
  background: rgba(45, 158, 95, 0.2);
}

.kc-mobile-drawer .drawer-close:active {
  transform: scale(0.9);
}

.kc-mobile-drawer .drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0 24px;
}

.kc-mobile-drawer .drawer-nav-list {
  display: flex;
  flex-direction: column;
}

.kc-mobile-drawer .drawer-nav-category {
  font-size: 11px;
  font-weight: 700;
  color: #9ba7af;
  letter-spacing: 1.2px;
  margin: 16px 24px 6px;
  text-transform: uppercase;
}

.kc-mobile-drawer .drawer-nav-item {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: #4a5c50;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
  font-family: "Noto Sans Thai", "Noto Sans", sans-serif;
}

.kc-mobile-drawer .drawer-nav-item i {
  font-size: 20px;
  margin-right: 14px;
  color: #8c9b90;
  width: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.kc-mobile-drawer .drawer-nav-item:hover {
  background: rgba(45, 158, 95, 0.04);
  color: #2d9e5f;
}

.kc-mobile-drawer .drawer-nav-item:hover i {
  color: #2d9e5f;
}

.kc-mobile-drawer .drawer-nav-item.active {
  background: linear-gradient(270deg, rgba(45, 158, 95, 0.08) 0%, rgba(45, 158, 95, 0) 100%);
  color: #2d9e5f;
  border-right: 4px solid #2d9e5f;
  border-left-color: transparent;
  font-weight: 600;
}

.kc-mobile-drawer .drawer-nav-item.active i {
  color: #2d9e5f;
}

.kc-mobile-drawer .drawer-auth-actions {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 10px;
  padding-top: 10px;
}

.kc-mobile-drawer .drawer-footer {
  padding: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #8c9b90;
  background: #ffffff;
}

.kc-mobile-drawer .drawer-footer i {
  font-size: 22px;
  margin-bottom: 8px;
}

.kc-mobile-drawer .drawer-footer .footer-title {
  font-size: 14px;
  font-weight: 500;
  color: #6a7c70;
}

.kc-mobile-drawer .drawer-footer .footer-subtitle {
  font-size: 12px;
  text-align: center;
  margin-top: 2px;
}
