:root {
  --agri-green: #235b2f;
  --agri-green-soft: #edf5ee;
  --text-main: #1f2937;
  --bg-main: #f4f7f6;
}

body {
  background: radial-gradient(circle at top right, #e7f4ea, #f6f8f7 35%, #f4f7f6 75%);
  color: var(--text-main);
}

.sidebar {
  background: linear-gradient(180deg, #ffffff, #f7faf8);
  border-right: 1px solid #e3e9e5;
}

.brand {
  color: var(--agri-green);
  font-weight: 800;
}

.page-wrap {
  background: transparent;
}

.breadcrumb {
  background: transparent;
  margin: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
  font-size: 0.88rem;
  color: #5e6f67;
  text-decoration: none;
}

.breadcrumb-item.active {
  color: #2b3b32;
  font-weight: 600;
}

.nav-pills .nav-link.active {
  background: var(--agri-green);
}

.menu-section {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6d7d74;
  margin-top: 8px;
  margin-bottom: 2px;
  padding-left: 4px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e5ebe7;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  min-height: 92px;
}

.stat-card span {
  color: #5f6f67;
  font-size: 0.9rem;
}

.stat-card strong {
  font-size: 1.7rem;
  color: #1f2d23;
}

.chat-box {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e5ebe7;
  max-height: 66vh;
  overflow: auto;
}

.msg {
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  max-width: 88%;
}

.msg-farmer {
  margin-left: auto;
  background: #eef2f6;
}

.msg-ai {
  margin-right: auto;
  background: var(--agri-green-soft);
}

.msg-human {
  margin-right: auto;
  background: #fff6df;
}

.msg-escalated {
  border-left: 4px solid #dc3545;
  box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.15);
}

.msg-farmer.msg-escalated {
  background: #fdebed;
}

.msg-ai.msg-escalated,
.msg-human.msg-escalated {
  background: #fff5f5;
}

.reply-quote,
.reply-preview {
  background: #f7f9fb;
  border-left: 3px solid #9aa8b6;
  border-radius: 10px;
  padding: 10px 12px;
}

.reply-quote-sender {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4b5c6a;
  margin-bottom: 2px;
}

.reply-quote-body {
  font-size: 0.9rem;
  color: #627381;
}

.avatar-sm {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d5e2d8;
}

.farmer-profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid #d5e2d8;
}

.photo-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}

.photo-actions {
  position: absolute;
  right: -10px;
  top: -8px;
}

.login-visual {
  background-image: url('/static/img/login-bg.svg');
  background-size: cover;
  background-position: center;
  position: relative;
}

.login-overlay {
  position: absolute;
  inset: 0;
  padding: 56px;
  color: #f2f8f3;
  background: linear-gradient(180deg, rgba(20, 55, 30, 0.25), rgba(20, 55, 30, 0.45));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
}

.login-overlay h1 {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.login-overlay p {
  font-size: 1.05rem;
  max-width: 460px;
  opacity: 0.95;
}

.login-brand-logo {
  display: block;
  width: min(300px, 72%);
  max-height: 120px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 10px;
  margin-left: 0;
  margin-right: auto;
}

.login-avatar {
  display: block;
  width: min(380px, 78%);
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.22));
  margin-left: 0;
  margin-right: auto;
}

.login-card {
  width: 100%;
  max-width: 460px;
}

.login-card-logo {
  width: 180px;
  max-width: 100%;
  object-fit: contain;
}

.admin-map-wrap {
  height: 430px;
  border-radius: 12px;
  overflow: hidden;
}

#adminGeoMap {
  width: 100%;
  height: 100%;
}

@media (max-width: 991px) {
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #e3e9e5;
  }

  .admin-map-wrap {
    height: 360px;
  }
}
