@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════
   MOLMS · Ministry of Lands Farm Monitoring System
   Design System — Zimbabwe Government Grade
═══════════════════════════════════════════════ */

:root {
  --forest:       #0d2b1a;
  --forest-mid:   #1a4a2e;
  --forest-light: #25613d;
  --sage:         #3a7d52;
  --mint:         #5aad78;
  --mint-pale:    #c8e6d4;

  --gold:         #c8961e;
  --gold-bright:  #f0b429;
  --gold-pale:    #fef3d7;

  --ink:          #0f1a14;
  --charcoal:     #1e2d25;
  --stone:        #6b7e74;
  --mist:         #b8c9be;
  --fog:          #dce8e0;
  --cream:        #f4f7f5;
  --white:        #ffffff;

  --danger:       #b83232;
  --danger-pale:  #fce8e8;
  --warning:      #c47d0e;
  --info:         #1a5c8a;
  --info-pale:    #ddeef8;

  --shadow-xs:  0 1px 3px rgba(13,43,26,.08);
  --shadow-sm:  0 2px 10px rgba(13,43,26,.10);
  --shadow-md:  0 6px 24px rgba(13,43,26,.14);
  --shadow-lg:  0 16px 48px rgba(13,43,26,.20);
  --shadow-xl:  0 28px 72px rgba(13,43,26,.28);

  --sidebar-w:  272px;
  --topbar-h:   68px;
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  22px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fog); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--mist); }

.hidden { display: none !important; }
.mono { font-family: 'DM Mono', monospace; }

/* ══════════════════════════════════════════════
   LOGIN PAGE — Split layout
══════════════════════════════════════════════ */

.login-bg {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

/* ── Left panel ── */
.login-panel-left {
  background: var(--forest);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 56px;
  overflow: hidden;
}

.login-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 10% 90%, rgba(90,173,120,.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(200,150,30,.12) 0%, transparent 55%);
  pointer-events: none;
}

.deco-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.deco-ring-1 { width: 550px; height: 550px; bottom: -180px; right: -180px; border: 1px solid rgba(255,255,255,.05); }
.deco-ring-2 { width: 340px; height: 340px; bottom: -80px;  right: -80px;  border: 1px solid rgba(200,150,30,.09); }
.deco-ring-3 { width: 170px; height: 170px; bottom: 60px;   right: 60px;   border: 1px solid rgba(200,150,30,.13); }

.login-left-logo {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
}

.login-left-logo .coat-circle {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 18px rgba(200,150,30,.45);
  flex-shrink: 0;
}

.login-left-logo .logo-text {
  color: rgba(255,255,255,.85);
  font-size: 0.7rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.55;
}

.login-left-hero { position: relative; z-index: 1; }

.login-left-hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.login-left-hero h1 .gold-word { color: var(--gold-bright); display: block; }

.login-left-hero p {
  color: rgba(255,255,255,.50);
  font-size: 0.92rem;
  max-width: 310px;
  line-height: 1.75;
}

.login-left-stats { position: relative; z-index: 1; display: flex; gap: 28px; }

.login-stat { border-left: 2px solid rgba(200,150,30,.38); padding-left: 16px; }
.login-stat .val {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem; font-weight: 700;
  color: var(--gold-bright); line-height: 1; margin-bottom: 4px;
}
.login-stat .lbl {
  font-size: 0.68rem; color: rgba(255,255,255,.38);
  text-transform: uppercase; letter-spacing: 0.12em;
  font-family: 'DM Mono', monospace;
}

/* ── Right panel ── */
.login-panel-right {
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  padding: 52px 60px;
  position: relative;
}

.login-panel-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(to bottom, transparent 0%, var(--gold) 40%, var(--gold-bright) 60%, transparent 100%);
}

.login-form-wrap {
  width: 100%; max-width: 390px;
  animation: formIn .5s cubic-bezier(.16,1,.3,1);
}

@keyframes formIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.login-form-header { margin-bottom: 36px; }

.login-form-header .eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.login-form-header .eyebrow::before {
  content: ''; width: 22px; height: 2px;
  background: var(--gold); border-radius: 2px;
}

.login-form-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem; font-weight: 700;
  color: var(--forest); line-height: 1.18;
  letter-spacing: -0.02em;
}
.login-form-header p { color: var(--stone); font-size: 0.88rem; margin-top: 8px; }

/* ─────────── SHARED FORM ELEMENTS ─────────── */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--charcoal); margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--fog);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none; appearance: none;
}
.form-control:focus {
  border-color: var(--sage); background: var(--white);
  box-shadow: 0 0 0 3px rgba(58,125,82,.13);
}
.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(184,50,50,.10);
}
.form-control::placeholder { color: var(--mist); }
textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.6; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7e74' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 38px; cursor: pointer;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

.error-msg {
  color: var(--danger); font-size: 0.77rem; margin-top: 5px; display: none;
}

.login-alert {
  background: var(--danger-pale);
  border: 1px solid rgba(184,50,50,.22);
  border-radius: var(--radius);
  padding: 11px 15px;
  color: var(--danger); font-size: 0.88rem;
  margin-bottom: 18px; display: none;
}

/* ─────────── BUTTONS ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px;
  border: none; border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer;
  transition: all .22s cubic-bezier(.16,1,.3,1);
  text-decoration: none; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--forest-mid), var(--forest-light));
  color: var(--white);
  box-shadow: 0 2px 12px rgba(13,43,26,.22);
}
.btn-primary:hover { box-shadow: 0 5px 20px rgba(13,43,26,.32); transform: translateY(-1px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: var(--forest);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(200,150,30,.28);
}
.btn-gold:hover { box-shadow: 0 5px 20px rgba(200,150,30,.42); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--fog); color: var(--charcoal);
}
.btn-outline:hover { border-color: var(--sage); color: var(--forest-mid); background: rgba(58,125,82,.05); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c94040);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(184,50,50,.22);
}
.btn-danger:hover { box-shadow: 0 5px 18px rgba(184,50,50,.36); transform: translateY(-1px); }

.btn-ghost { background: rgba(58,125,82,.08); color: var(--forest-mid); border: none; }
.btn-ghost:hover { background: rgba(58,125,82,.15); }

.btn-full { width: 100%; padding: 13px; font-size: 0.95rem; }
.btn-sm   { padding: 8px 15px; font-size: 0.82rem; }
.btn-xs   { padding: 5px 11px; font-size: 0.74rem; border-radius: var(--radius-sm); }

.register-link { text-align: center; margin-top: 22px; font-size: 0.88rem; color: var(--stone); }
.register-link a { color: var(--forest-mid); text-decoration: none; font-weight: 600; }
.register-link a:hover { color: var(--sage); }

/* ══════════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════════ */

.dash-wrap { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--forest);
  position: fixed; top: 0; left: 0; height: 100vh;
  display: flex; flex-direction: column;
  z-index: 200; overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 100%, rgba(58,125,82,.2) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-brand {
  padding: 26px 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: relative; z-index: 1; flex-shrink: 0;
}

.sidebar-brand-inner { display: flex; align-items: center; gap: 11px; }

.sidebar-brand .coat {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(200,150,30,.38);
}

.sidebar-brand-text h2 {
  color: var(--white); font-size: 0.76rem; font-weight: 600; line-height: 1.4;
}
.sidebar-brand-text span {
  color: rgba(255,255,255,.32);
  font-family: 'DM Mono', monospace; font-size: 0.60rem;
  letter-spacing: 0.13em; text-transform: uppercase;
}

.sidebar-user {
  margin: 10px 14px 4px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 12px 13px;
  position: relative; z-index: 1; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}

.sidebar-user .user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--sage), var(--mint));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}

.sidebar-user .user-name {
  color: var(--white); font-weight: 600; font-size: 0.87rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-role {
  color: var(--gold-bright); font-size: 0.62rem;
  font-family: 'DM Mono', monospace; text-transform: uppercase;
  letter-spacing: 0.12em; margin-top: 1px;
}

.sidebar-nav {
  flex: 1; overflow-y: auto;
  padding: 6px 0 16px;
  position: relative; z-index: 1;
}
.sidebar-nav::-webkit-scrollbar { width: 0; }

.nav-section-label {
  padding: 14px 22px 5px;
  font-size: 0.60rem; font-family: 'DM Mono', monospace;
  letter-spacing: 0.17em; text-transform: uppercase;
  color: rgba(255,255,255,.20);
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin: 1px 8px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.55); font-size: 0.88rem; font-weight: 500;
  cursor: pointer; border: none; background: none;
  width: calc(100% - 16px); text-align: left;
  transition: all .18s; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: var(--white); }
.nav-item.active {
  background: rgba(90,173,120,.18); color: var(--mint); font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: -8px; top: 28%; bottom: 28%;
  width: 3px; background: var(--mint); border-radius: 0 3px 3px 0;
}
.nav-item .icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  position: relative; z-index: 1; flex-shrink: 0;
}

.logout-btn {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.38); font-size: 0.85rem; font-weight: 500;
  cursor: pointer; padding: 10px 13px; border-radius: var(--radius);
  border: none; background: none; width: 100%; transition: all .18s;
}
.logout-btn:hover { background: rgba(184,50,50,.15); color: #f09090; }

/* ── Main content ── */
.main-content {
  margin-left: var(--sidebar-w); flex: 1;
  min-height: 100vh; display: flex; flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: var(--white); border-bottom: 1px solid var(--fog);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(13,43,26,.06);
}

.topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--forest); letter-spacing: -0.01em;
}

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

.topbar-user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--cream); border: 1px solid var(--fog);
  border-radius: 99px; padding: 5px 13px 5px 6px;
}
.topbar-user-chip .chip-dot {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--forest-mid), var(--sage));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.topbar-user-chip .chip-name {
  font-size: 0.80rem; font-weight: 600;
  color: var(--charcoal); font-family: 'DM Mono', monospace;
}

.notif-btn {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--cream); border: 1px solid var(--fog);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; position: relative; transition: all .18s;
}
.notif-btn:hover { background: var(--fog); }
.notif-btn .count {
  position: absolute; top: -3px; right: -3px;
  background: var(--danger); color: white;
  font-size: 0.55rem; font-family: 'DM Mono', monospace;
  min-width: 15px; height: 15px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid var(--white);
}

.page-content { padding: 30px 32px; flex: 1; }

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px; margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--fog);
  position: relative; overflow: hidden;
  transition: box-shadow .22s, transform .22s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--sage), var(--mint));
}
.stat-card.gold::before { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.stat-card.red::before  { background: linear-gradient(90deg, var(--danger), #e05a5a); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--info), #2980b9); }

.stat-icon { font-size: 1.4rem; margin-bottom: 10px; display: block; }
.stat-label {
  font-size: 0.68rem; font-family: 'DM Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--stone); margin-bottom: 5px;
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.3rem; font-weight: 700; color: var(--forest); line-height: 1;
}
.stat-card.gold .stat-value { color: var(--gold); }
.stat-card.red  .stat-value { color: var(--danger); }
.stat-card.blue .stat-value { color: var(--info); }

/* ── Welcome panel ── */
.welcome-panel {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 55%, var(--forest-light) 100%);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  margin-bottom: 26px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.welcome-panel::before {
  content: '';
  position: absolute; right: -50px; top: -50px;
  width: 260px; height: 260px;
  background: rgba(255,255,255,.04); border-radius: 50%;
  pointer-events: none;
}
.welcome-panel::after {
  content: '';
  position: absolute; right: 70px; top: 40px;
  width: 140px; height: 140px;
  background: rgba(200,150,30,.08); border-radius: 50%;
  pointer-events: none;
}
.welcome-panel h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem; font-weight: 700; color: var(--white);
  margin-bottom: 8px; position: relative; z-index: 1;
}
.welcome-panel p {
  color: rgba(255,255,255,.55); font-size: 0.9rem;
  max-width: 520px; line-height: 1.75; position: relative; z-index: 1;
}
.welcome-actions {
  display: flex; gap: 10px; margin-top: 20px;
  flex-wrap: wrap; position: relative; z-index: 1;
}
.welcome-actions .btn-outline {
  border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.08);
}
.welcome-actions .btn-outline:hover {
  background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.48); color: var(--white);
}

/* ── Sections ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.22rem; font-weight: 700;
  color: var(--forest); letter-spacing: -0.01em;
}

/* ── Panel ── */
.panel {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--fog); box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-header {
  padding: 16px 22px; border-bottom: 1px solid var(--fog);
  background: linear-gradient(to right, var(--cream), var(--white));
}
.panel-header h3 { font-size: 0.9rem; font-weight: 600; color: var(--forest); }
.panel-body { padding: 22px; }

/* ── Table ── */
.table-wrap {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--fog); box-shadow: var(--shadow-sm); overflow: hidden;
}
table { width: 100%; border-collapse: collapse; }
thead { background: var(--cream); }
th {
  padding: 12px 18px;
  font-size: 0.66rem; font-family: 'DM Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.13em; color: var(--stone);
  border-bottom: 1px solid var(--fog); white-space: nowrap;
  text-align: left;
}
td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--fog);
  font-size: 0.9rem; color: var(--charcoal); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: rgba(58,125,82,.03); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 0.67rem; font-family: 'DM Mono', monospace; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
}
.badge-green  { background: rgba(90,173,120,.14); color: #1a6b3a; border: 1px solid rgba(90,173,120,.24); }
.badge-yellow { background: rgba(200,150,30,.12);  color: #8a5c00; border: 1px solid rgba(200,150,30,.24); }
.badge-red    { background: rgba(184,50,50,.10);   color: #8a1a1a; border: 1px solid rgba(184,50,50,.20); }
.badge-blue   { background: rgba(26,92,138,.10);   color: #12406a; border: 1px solid rgba(26,92,138,.20); }
.badge-gray   { background: var(--fog); color: var(--stone); border: 1px solid var(--mist); }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(13,27,20,.58); backdrop-filter: blur(5px);
  z-index: 1000; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 580px; max-width: 100%; max-height: 90vh; overflow-y: auto;
  animation: modalPop .3s cubic-bezier(.16,1,.3,1);
  border: 1px solid var(--fog);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(.93) translateY(18px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.modal-header {
  padding: 20px 26px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 {
  color: var(--white); font-size: 1.02rem; font-weight: 600;
  font-family: 'Playfair Display', serif;
}
.modal-close {
  background: rgba(255,255,255,.1); border: none;
  color: rgba(255,255,255,.75); width: 28px; height: 28px;
  border-radius: 7px; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .18s;
}
.modal-close:hover { background: rgba(255,255,255,.2); color: var(--white); }
.modal-body { padding: 26px; }
.modal-footer {
  padding: 16px 26px; border-top: 1px solid var(--fog);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--cream);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state .icon { font-size: 2.8rem; display: block; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 {
  font-family: 'Playfair Display', serif; font-size: 1.12rem;
  color: var(--charcoal); margin-bottom: 7px;
}
.empty-state p { font-size: 0.88rem; color: var(--stone); max-width: 280px; margin: 0 auto; line-height: 1.7; }

/* ── Cards grid ── */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px;
}
.card {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--fog); box-shadow: var(--shadow-sm);
  padding: 22px; transition: all .22s cubic-bezier(.16,1,.3,1);
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--sage), var(--mint));
  opacity: 0; transition: opacity .22s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--mint-pale); }
.card:hover::before { opacity: 1; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--forest); margin-bottom: 8px; font-family: 'Playfair Display', serif; }
.card-meta { font-size: 0.76rem; color: var(--stone); font-family: 'DM Mono', monospace; margin-top: 3px; }

/* ── Chat ── */
.chat-container {
  display: flex; height: 520px;
  border: 1px solid var(--fog); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm);
}
.chat-list { width: 225px; border-right: 1px solid var(--fog); overflow-y: auto; background: var(--cream); flex-shrink: 0; }
.chat-list-header {
  padding: 13px 15px; font-size: 0.65rem; font-family: 'DM Mono', monospace;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone);
  border-bottom: 1px solid var(--fog); background: var(--white);
}
.chat-list-item {
  padding: 13px 15px; border-bottom: 1px solid var(--fog); cursor: pointer; transition: background .15s;
}
.chat-list-item:hover { background: var(--fog); }
.chat-list-item.active { background: rgba(58,125,82,.08); border-left: 3px solid var(--sage); }
.chat-list-item .name { font-weight: 600; font-size: 0.88rem; color: var(--charcoal); }
.chat-list-item .preview { font-size: 0.75rem; color: var(--stone); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header {
  padding: 13px 18px; border-bottom: 1px solid var(--fog);
  background: var(--white); font-weight: 600; font-size: 0.9rem; color: var(--forest);
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 11px; background: var(--cream);
}
.message {
  max-width: 72%; padding: 10px 14px; border-radius: 14px;
  font-size: 0.9rem; line-height: 1.55;
}
.message.sent {
  background: linear-gradient(135deg, var(--forest-mid), var(--sage));
  color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px;
}
.message.received {
  background: var(--white); color: var(--charcoal);
  align-self: flex-start; border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-xs); border: 1px solid var(--fog);
}
.message .time { font-size: 0.63rem; opacity: 0.58; margin-top: 4px; font-family: 'DM Mono', monospace; }
.chat-input {
  display: flex; gap: 10px; padding: 12px 14px;
  border-top: 1px solid var(--fog); background: var(--white); align-items: center;
}
.chat-input input {
  flex: 1; padding: 9px 15px; border: 1.5px solid var(--fog);
  border-radius: 99px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  outline: none; background: var(--cream); transition: border-color .18s, background .18s;
}
.chat-input input:focus { border-color: var(--sage); background: var(--white); }
.chat-input button {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--forest-mid), var(--sage));
  color: white; border: none; border-radius: 50%; cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .18s, transform .18s; flex-shrink: 0;
}
.chat-input button:hover { box-shadow: 0 4px 12px rgba(13,43,26,.3); transform: scale(1.08); }

/* ── Notice ── */
.notice-item {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--fog); box-shadow: var(--shadow-sm);
  padding: 20px 24px; margin-bottom: 14px;
  position: relative; overflow: hidden; transition: box-shadow .2s;
}
.notice-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, var(--gold), var(--gold-bright));
}
.notice-item:hover { box-shadow: var(--shadow-md); }
.notice-item h4 { font-family: 'Playfair Display', serif; font-size: 1.02rem; font-weight: 700; color: var(--forest); margin-bottom: 7px; }
.notice-item p { font-size: 0.9rem; color: var(--stone); line-height: 1.7; }
.notice-item .notice-date { font-size: 0.68rem; font-family: 'DM Mono', monospace; color: var(--mist); margin-top: 10px; }

/* ── Doc item ── */
.doc-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--fog);
  border-radius: var(--radius-lg); padding: 15px 18px;
  margin-bottom: 10px; box-shadow: var(--shadow-sm); transition: all .2s;
}
.doc-item:hover { box-shadow: var(--shadow-md); border-color: var(--mint-pale); }
.doc-icon-wrap {
  width: 44px; height: 44px; background: var(--cream); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0; border: 1px solid var(--fog);
}
.doc-name { font-weight: 600; font-size: 0.92rem; color: var(--forest); }
.doc-meta { font-size: 0.72rem; color: var(--stone); font-family: 'DM Mono', monospace; margin-top: 3px; }

/* ── Log ── */
.log-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--fog); align-items: flex-start; }
.log-item:last-child { border-bottom: none; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); margin-top: 6px; flex-shrink: 0; }
.log-text { font-size: 0.88rem; color: var(--charcoal); }
.log-time { font-size: 0.69rem; font-family: 'DM Mono', monospace; color: var(--stone); margin-top: 3px; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 2px solid var(--fog); margin-bottom: 22px; }
.tab-btn {
  padding: 9px 22px; border: none; background: none;
  font-family: 'DM Mono', monospace; font-size: 0.70rem; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase; cursor: pointer; color: var(--stone);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .18s;
}
.tab-btn.active { color: var(--forest-mid); border-bottom-color: var(--sage); font-weight: 700; }
.tab-btn:hover:not(.active) { color: var(--charcoal); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Back button ── */
.back-btn {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--sage); font-size: 0.80rem; font-weight: 600;
  cursor: pointer; border: none; background: none;
  font-family: 'DM Mono', monospace; letter-spacing: 0.04em;
  margin-bottom: 20px; transition: color .18s; padding: 0;
}
.back-btn:hover { color: var(--forest-mid); }

/* ── Maps ── */
#farm-map      { height: 370px; border-radius: var(--radius); border: 1.5px solid var(--fog); box-shadow: var(--shadow-sm); }
#zim-map       { height: 530px; border-radius: var(--radius-lg); border: 1.5px solid var(--fog); box-shadow: var(--shadow-sm); }
#farm-detail-map { height: 340px; border-radius: var(--radius); border: 1.5px solid var(--fog); box-shadow: var(--shadow-sm); }

/* ── Audit score ── */
.audit-score-wrap { display: flex; align-items: center; gap: 16px; }
.audit-score-wrap input[type=range] { flex: 1; accent-color: var(--sage); height: 6px; cursor: pointer; }
.score-display {
  font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 900;
  color: var(--forest-mid); min-width: 60px; text-align: center; line-height: 1;
}

/* ── Toast ── */
.notif-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.toast {
  background: var(--forest); color: var(--white);
  padding: 13px 18px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); font-size: 0.88rem; max-width: 310px;
  border-left: 4px solid var(--mint);
  animation: toastIn .35s cubic-bezier(.16,1,.3,1);
}
.toast.warn { border-left-color: var(--gold-bright); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(36px) scale(.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── Search ── */
.search-bar { display: flex; gap: 10px; align-items: center; }
.search-bar .form-control { max-width: 270px; padding: 9px 13px; font-size: 0.88rem; }

/* ── Divider ── */
.reg-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.reg-divider::before, .reg-divider::after { content: ''; flex: 1; height: 1px; background: var(--fog); }
.reg-divider span { font-size: 0.68rem; color: var(--mist); font-family: 'DM Mono', monospace; letter-spacing: 0.08em; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .login-bg { grid-template-columns: 1fr; }
  .login-panel-left { display: none; }
  .login-panel-right { padding: 40px 28px; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 18px; }
}

/* ── Login Feature Cards ────────────────────────────── */
.login-left-features{display:grid;gap:14px;margin-top:24px;}
.login-feature{display:flex;align-items:flex-start;gap:14px;background:rgba(255,255,255,.07);border-radius:10px;padding:12px 14px;}
.lf-icon{font-size:1.6rem;flex-shrink:0;margin-top:2px;}
.login-feature strong{display:block;color:var(--gold);font-size:0.88rem;margin-bottom:2px;}
.login-feature p{color:rgba(255,255,255,.7);font-size:0.78rem;margin:0;line-height:1.4;}
/* ── Password Strength ──────────────────────────────── */
.pwd-strength-bar{height:4px;border-radius:2px;margin-top:6px;transition:all .3s;background:var(--fog);}
.pwd-strength-label{font-size:0.72rem;margin-top:4px;font-weight:600;}
/* ── Success Toast ──────────────────────────────────── */
.action-toast{position:fixed;top:20px;right:20px;background:var(--forest);color:white;padding:14px 20px;border-radius:10px;font-size:0.88rem;font-weight:600;z-index:9999;box-shadow:0 4px 20px rgba(0,0,0,.2);display:none;align-items:center;gap:10px;max-width:340px;}
.action-toast.show{display:flex;animation:slideIn .3s ease;}
@keyframes slideIn{from{transform:translateX(100%);opacity:0;}to{transform:translateX(0);opacity:1;}}
/* ── Confirmation Modal ─────────────────────────────── */
.confirm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9000;display:none;align-items:center;justify-content:center;}
.confirm-overlay.show{display:flex;}
.confirm-box{background:white;border-radius:14px;padding:28px 32px;max-width:380px;width:90%;text-align:center;box-shadow:0 8px 40px rgba(0,0,0,.2);}
.confirm-box h3{font-size:1.1rem;color:var(--charcoal);margin-bottom:8px;}
.confirm-box p{font-size:0.88rem;color:var(--stone);margin-bottom:22px;}
.confirm-box .btn-row{display:flex;gap:10px;justify-content:center;}
/* ── Clickable Notice/Notification ─────────────────── */
.notice-card-clickable{cursor:pointer;transition:transform .15s,box-shadow .15s;}
.notice-card-clickable:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(26,74,46,.12);}
/* ── Unread Notification ────────────────────────────── */
.unread-notif{background:#f0f7f3 !important;}
.unread-notif:hover{background:#e8f5ee !important;}
/* ── Modal open state ───────────────────────────────── */
.modal-overlay.open{display:flex !important;}
/* ── Clickable stat card ────────────────────────────── */
a.stat-card{text-decoration:none !important;transition:transform .15s,box-shadow .15s;}
a.stat-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(26,74,46,.15);}
/* ── Field hint ─────────────────────────────────────── */
.field-hint{font-size:0.72rem;color:var(--stone);margin-top:4px;font-family:'DM Mono',monospace;}
/* ── Form section label ─────────────────────────────── */
.form-section-label{font-size:0.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--stone);font-weight:700;margin-bottom:10px;margin-top:4px;padding-bottom:6px;border-bottom:1px solid var(--fog);}
/* ── Multi crop chips ───────────────────────────────── */
.crop-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.crop-chip{display:flex;align-items:center;gap:6px;padding:6px 12px;border:2px solid var(--fog);border-radius:20px;cursor:pointer;font-size:0.82rem;color:var(--charcoal);transition:all .2s;user-select:none;}
.crop-chip:hover{border-color:var(--forest-mid);}
.crop-chip.selected{background:var(--forest);color:white;border-color:var(--forest);}
.crop-chip input[type=checkbox]{display:none;}
/* ── Badge blue ─────────────────────────────────────── */
.badge-blue{background:#dbeafe;color:#1e40af;}

/* ══════════════════════════════════════════════════════
   DARK MODE
══════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --forest:     #2d7a50;
  --forest-mid: #4aad78;
  --cream:      #1e2a22;
  --fog:        #2a3a2f;
  --charcoal:   #e8f5ee;
  --stone:      #9abba8;
  --gold:       #C8961E;
  --bg:         #0f1a13;
  --card-bg:    #162019;
  --panel-bg:   #162019;
  --border:     #2a3a2f;
  --text:       #e8f5ee;
}
[data-theme="dark"] body { background: #0f1a13; color: #e8f5ee; }
[data-theme="dark"] .panel { background: #162019; border-color: #2a3a2f; }
[data-theme="dark"] .panel-header { background: #1e2a22; border-color: #2a3a2f; }
[data-theme="dark"] .panel-body { background: #162019; }
[data-theme="dark"] .form-control { background: #1e2a22; border-color: #2a3a2f; color: #e8f5ee; }
[data-theme="dark"] .form-control::placeholder { color: #5a7a68; }
[data-theme="dark"] table { background: #162019; }
[data-theme="dark"] table thead tr { background: #1e2a22; }
[data-theme="dark"] table tbody tr:hover { background: #1e2a22; }
[data-theme="dark"] table td, [data-theme="dark"] table th { border-color: #2a3a2f; color: #e8f5ee; }
[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #0a1a0d 0%, #0f2015 100%); }
[data-theme="dark"] .nav-item { color: rgba(200,230,210,.7); }
[data-theme="dark"] .nav-item:hover, [data-theme="dark"] .nav-item.active { background: rgba(255,255,255,.08); color: white; }
[data-theme="dark"] .stat-card { background: #162019; border-color: #2a3a2f; color: #e8f5ee; }
[data-theme="dark"] .stat-card .stat-label { color: #9abba8; }
[data-theme="dark"] .stat-card .stat-value { color: #e8f5ee; }
[data-theme="dark"] .stat-card.gold { background: #1a1500; }
[data-theme="dark"] .stat-card.blue { background: #001525; }
[data-theme="dark"] .main-content { background: #0f1a13; }
[data-theme="dark"] .page-header { background: #0f1a13; border-color: #2a3a2f; }
[data-theme="dark"] select option { background: #162019; }
[data-theme="dark"] .badge { opacity: 0.9; }
[data-theme="dark"] .login-panel-right { background: #0f1a13; }
[data-theme="dark"] .login-form-wrap { color: #e8f5ee; }
[data-theme="dark"] .login-form-header h2 { color: #e8f5ee; }
[data-theme="dark"] .login-form-header p { color: #9abba8; }

/* Dark mode toggle button */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.8);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}
.theme-toggle:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }

/* ══════════════════════════════════════════════════════
   IMPROVED BUTTONS
══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--forest);
  color: white;
  box-shadow: 0 2px 8px rgba(26,74,46,.25);
}
.btn-primary:hover { background: #25613d; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,74,46,.35); }
.btn-danger { background: #b83232; color: white; }
.btn-danger:hover { background: #9a2020; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-outline:hover { background: var(--forest); color: white; }
.btn-gold { background: var(--gold); color: #1A4A2E; font-weight: 700; }
.btn-gold:hover { background: #b8860e; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-xs { padding: 4px 10px; font-size: 0.76rem; border-radius: 6px; }
.btn-full { width: 100%; justify-content: center; }
[data-theme="dark"] .btn-outline { color: #4aad78; border-color: #4aad78; }
[data-theme="dark"] .btn-outline:hover { background: #2d7a50; color: white; border-color: #2d7a50; }

/* ══════════════════════════════════════════════════════
   WEATHER ALERT BADGES
══════════════════════════════════════════════════════ */
.alert-badge-Critical { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-badge-High     { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.alert-badge-Medium   { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.alert-badge-Low      { background: #e8f5ee; color: #15803d; border: 1px solid #86efac; }
.alert-bell-badge {
  position: absolute; top: -4px; right: -4px;
  background: #e74c3c; color: white;
  font-size: 0.6rem; font-weight: 700;
  border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* ══════════════════════════════════════════════════════
   IMPROVED CARDS & PANELS
══════════════════════════════════════════════════════ */
.stat-card {
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--fog);
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,74,46,.12); }
.panel { border-radius: 12px; border: 1px solid var(--fog); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.panel-header { padding: 14px 20px; border-bottom: 1px solid var(--fog); display: flex; align-items: center; justify-content: space-between; }
.panel-header h3 { font-size: 0.95rem; font-weight: 700; margin: 0; }
.panel-body { padding: 18px 20px; }

/* ══════════════════════════════════════════════════════
   IMPROVED TABLE
══════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
table th { background: var(--cream); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--stone); padding: 10px 14px; text-align: left; }
table td { padding: 11px 14px; border-bottom: 1px solid var(--fog); font-size: 0.87rem; }
table tbody tr:hover { background: var(--cream); }
table tbody tr:last-child td { border-bottom: none; }


/* ══ LOGIN LAYOUT FIX — information panel BESIDE the sign-in form, no scrolling to sign in ══ */
.login-bg.login-fit{height:100vh;min-height:0;overflow:hidden;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr)}
.login-fit .login-panel-left{justify-content:center;gap:clamp(12px,2.4vh,26px);padding:clamp(20px,4vh,44px) clamp(24px,4vw,52px);overflow-y:auto}
.login-fit .login-left-hero h1{font-size:clamp(1.6rem,3.2vw,2.5rem);margin-bottom:clamp(8px,1.6vh,16px)}
.login-fit .login-left-hero p{max-width:520px;font-size:clamp(.78rem,1.5vh,.9rem);line-height:1.6;color:rgba(255,255,255,.62)}
.login-fit .login-left-features{grid-template-columns:1fr 1fr;gap:10px;margin-top:0}
.login-fit .login-feature{padding:10px 12px;gap:10px}
.login-fit .lf-icon{font-size:1.3rem}
.login-fit .login-role-note{margin-top:0}
.login-fit .login-panel-right{padding:clamp(16px,3vh,40px) clamp(20px,3.5vw,56px);overflow-y:auto;align-items:flex-start}
.login-fit .login-form-wrap{margin:auto}
.login-fit .login-form-header{margin-bottom:clamp(14px,3vh,30px)}
.login-fit .reg-divider{margin:14px 0}
/* short laptop screens: keep the form in view by trimming the info panel */
@media (max-height:780px){.login-fit .login-feature p{display:none}.login-fit .login-role-note{display:none}}
@media (max-height:620px){.login-fit .login-left-features{display:none}}
/* narrow windows / phones: SIGN-IN FIRST, information underneath */
@media (max-width:900px){
  .login-bg.login-fit{height:auto;min-height:100vh;overflow:visible;grid-template-columns:1fr}
  .login-fit .login-panel-right{order:-1;overflow:visible;padding:28px 22px}
  .login-fit .login-panel-left{display:flex;overflow:visible;padding:28px 22px}
  .login-fit .login-left-features{grid-template-columns:1fr}
  .login-fit .login-feature p,.login-fit .login-role-note{display:block}
}


/* ══ SIDEBAR SCROLLING FIX — long menus were cut off and could not be scrolled ══ */
.sidebar-nav{min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.4) rgba(255,255,255,.06)}
.sidebar-nav::-webkit-scrollbar{width:7px}
.sidebar-nav::-webkit-scrollbar-track{background:rgba(255,255,255,.06);border-radius:8px;margin:6px 0}
.sidebar-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.38);border-radius:8px}
.sidebar-nav::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.6)}
.sidebar-brand,.sidebar-user,.sidebar-footer{flex-shrink:0}
@media (max-height:700px){.sidebar-brand{padding:16px 18px 12px}.nav-item{padding:8px 12px}.nav-section-label{padding:10px 20px 3px}}

/* sidebar links are <a> tags — never underline them */
.nav-item,.nav-item:hover,.nav-item:focus,.nav-item:visited{text-decoration:none}
a.btn,a.btn:hover{text-decoration:none}

/* ══ user preferences ══ */
body.text-large{font-size:1.08rem}
body.text-large .nav-item,body.text-large .form-control,body.text-large table{font-size:1rem}
body.compact-tables table td,body.compact-tables table th{padding-top:6px;padding-bottom:6px}
.topbar-user-chip{cursor:pointer}

/* ══ NOTIFICATION BELL (top-right, every role) ══ */
.bell-wrap{position:relative}
.bell-btn{position:relative;background:none;border:none;font-size:1.35rem;cursor:pointer;padding:6px 8px;border-radius:50%;line-height:1;color:var(--charcoal)}
.bell-btn:hover{background:rgba(0,0,0,.06)}
.bell-badge{position:absolute;top:-2px;right:-2px;min-width:18px;height:18px;padding:0 4px;border-radius:99px;background:#e74c3c;color:#fff;font-size:.66rem;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px var(--white,#fff);animation:bellpop .35s}
.bell-badge[hidden]{display:none}
@keyframes bellpop{0%{transform:scale(.3)}70%{transform:scale(1.25)}100%{transform:scale(1)}}
.bell-panel{position:absolute;right:0;top:calc(100% + 10px);width:360px;max-width:calc(100vw - 20px);background:var(--white,#fff);border:1px solid var(--fog,#e6e1d6);border-radius:14px;box-shadow:0 18px 44px rgba(0,0,0,.22);z-index:3000;overflow:hidden}
.bell-panel[hidden]{display:none}
.bell-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--fog,#e6e1d6);background:var(--cream,#faf8f2)}
.bell-head button{background:none;border:none;color:var(--forest-light);font-weight:700;font-size:.78rem;cursor:pointer;font-family:inherit}
.bell-list{max-height:min(420px,60vh);overflow-y:auto}
.bell-item{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid var(--fog,#eee);text-decoration:none;color:inherit;align-items:flex-start}
.bell-item:hover{background:var(--cream,#faf8f2)}.bell-item.unread{background:rgba(45,106,79,.07)}
.bell-item.unread .bt{font-weight:700}.bell-item .bi{font-size:1.25rem;flex-shrink:0}
.bell-item .bt{font-size:.84rem;line-height:1.45;display:block}.bell-item small{display:block;color:var(--stone);font-weight:500;font-size:.72rem;margin-top:2px}
.bell-empty{padding:26px 16px;text-align:center;color:var(--stone);font-size:.88rem}
.bell-foot{display:block;text-align:center;padding:12px;font-weight:700;font-size:.84rem;color:var(--forest-light);text-decoration:none;background:var(--cream,#faf8f2)}
@media(max-width:600px){.bell-wrap{position:static}.bell-panel{position:fixed;left:10px;right:10px;top:64px;width:auto;max-width:none}}

/* visible success banner (shown after redirects, e.g. "Audit submitted") */
.flash-ok{display:flex;gap:12px;align-items:flex-start;background:#e3f4ea;border:1px solid #9fd1b3;color:#14603a;border-radius:var(--radius,12px);padding:14px 18px;margin-bottom:16px;font-weight:700;font-size:.92rem;line-height:1.5;animation:flashin .4s}
@keyframes flashin{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

/* MOLMS logo (image) inside the brand badges */
.coat-circle img,.sidebar-brand .coat img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.login-left-logo .coat-circle,.sidebar-brand .coat{background:none!important;box-shadow:0 3px 12px rgba(0,0,0,.35)!important;border-radius:50%!important;overflow:hidden}
.login-left-logo .coat-circle{width:56px;height:56px}
