/* ============================================
   AFRICA COFFEE PARK — Management Portal CSS
   Inspired by Nelson Tugume's Vision
   ============================================ */

:root {
  --espresso:     #1a0e08;
  --dark-brown:   #2c1a0e;
  --rich-brown:   #3d2b1f;
  --mid-brown:    #6f3f2a;
  --warm-tan:     #b8874a;
  --gold:         #c9a227;
  --light-gold:   #e8c96a;
  --cream:        #fdf6ee;
  --light-cream:  #fef9f4;
  --green:        #4a7c59;
  --light-green:  #6f9a6f;
  --pale-green:   #e8f4e8;
  --blue:         #2a5298;
  --light-blue:   #4a7bc8;
  --pale-blue:    #e8f0fc;
  --teal:         #2a7a7a;
  --pale-teal:    #e0f4f4;
  --orange:       #d4621a;
  --pale-orange:  #fdf0e8;
  --red:          #c0392b;
  --text-primary: #1a0e08;
  --text-muted:   #7a6a5a;
  --border:       #e8d8c8;
  --sidebar-w:    280px;
  --topbar-h:     64px;
  --radius:       12px;
  --shadow:       0 4px 20px rgba(42,27,14,0.1);
  --shadow-lg:    0 8px 40px rgba(42,27,14,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--light-cream);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  font-size: 14px;
}

/* ============ LOGIN PAGE ============ */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 9999;
  background: var(--espresso);
}

/* Left panel — hero */
.login-left {
  width: 55%;
  background: linear-gradient(160deg, #1a0e08 0%, #2c1a0e 40%, #3d2b1f 70%, #6f3f2a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

/* Decorative coffee rings background */
.login-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  border: 60px solid rgba(201,162,39,0.07);
  top: -120px; right: -160px;
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  border: 40px solid rgba(201,162,39,0.05);
  bottom: -80px; left: -80px;
  pointer-events: none;
}

.login-photo-wrap {
  position: relative;
  width: 200px; height: 200px;
  flex-shrink: 0;
}

.login-photo {
  width: 200px; height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(201,162,39,0.15), 0 20px 60px rgba(0,0,0,0.5);
  display: block;
}

.login-photo-fallback {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--espresso);
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(201,162,39,0.15);
}

.login-hero-text { text-align: center; }

.login-hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.login-title {
  color: var(--light-gold);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.login-quote {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  font-style: italic;
  border-left: 3px solid var(--gold);
  padding-left: 14px;
  text-align: left;
  margin: 16px 0;
}

.login-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.login-badges span {
  background: rgba(201,162,39,0.15);
  border: 1px solid rgba(201,162,39,0.3);
  color: var(--light-gold);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
}

.login-park-stats {
  display: flex;
  gap: 24px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 16px 28px;
}

.lstat { text-align: center; }
.lstat span {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
}
.lstat small { font-size: 10px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.06em; }

/* Right panel — form */
.login-right {
  width: 45%;
  background: var(--light-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.login-logo-img {
  height: 52px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.login-logo-sub-wrap { display: flex; flex-direction: column; }

.login-logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-heading {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--espresso);
  margin-bottom: 4px;
}

.login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }

.login-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--rich-brown); text-transform: uppercase; letter-spacing: 0.05em; }

.form-group input,
.password-wrap input {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.password-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}

.password-wrap {
  position: relative;
}

.password-wrap input { width: 100%; padding-right: 44px; }

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.toggle-pw:hover { opacity: 1; }

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.checkbox-label { display: flex; align-items: center; gap: 6px; color: var(--text-muted); cursor: pointer; }
.forgot-link { color: var(--mid-brown); text-decoration: none; font-weight: 600; }
.forgot-link:hover { color: var(--gold); }

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--rich-brown), var(--mid-brown));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.1s;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

.login-btn:hover { opacity: 0.9; }
.login-btn:active { transform: scale(0.99); }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; animation: spin 0.8s linear infinite; font-size: 18px; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.quick-access-btns { display: flex; gap: 10px; margin-bottom: 28px; }

.quick-btn {
  flex: 1;
  padding: 9px 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--rich-brown);
  transition: background 0.2s, border-color 0.2s;
}

.quick-btn:hover { background: var(--cream); border-color: var(--gold); }

.login-footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Error shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.shake { animation: shake 0.4s ease; }

/* Login fade-out */
@keyframes loginFadeOut {
  to { opacity: 0; transform: scale(1.02); }
}

.login-exit { animation: loginFadeOut 0.5s ease forwards; }

/* Hidden when logged in */
.login-screen.hidden { display: none; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--espresso);
  background: linear-gradient(180deg, #1a0e08 0%, #2c1a0e 60%, #3d2b1f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
  font-size: 28px;
  width: 48px; height: 48px;
  background: var(--gold);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  padding: 4px 0;
}

.logo-title {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.logo-sub {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--gold);
  color: var(--espresso);
  font-weight: 700;
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 38px; height: 38px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  color: var(--espresso);
  font-size: 13px;
  flex-shrink: 0;
}

.user-name { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.user-role { display: block; font-size: 10px; color: rgba(255,255,255,0.5); }

.mission-quote {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  line-height: 1.5;
  font-style: italic;
}

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

/* ============ TOPBAR ============ */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0; z-index: 50;
  box-shadow: 0 1px 8px rgba(42,27,14,0.06);
}

.menu-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: none;
}

.topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--rich-brown);
  flex: 1;
}

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

.status-badge {
  background: var(--pale-green);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--light-green);
}

.date-display {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ PAGE CONTENT ============ */
.page-content { padding: 28px 32px; }

.page { display: none; }
.page.active { display: block; }

/* ============ PAGE HEADER ============ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--espresso);
  line-height: 1.2;
}

.page-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.header-badge {
  background: linear-gradient(135deg, var(--rich-brown), var(--mid-brown));
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  max-width: 280px;
}

/* ============ KPI GRID ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 3px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.kpi-gold { border-top-color: var(--gold); }
.kpi-green { border-top-color: var(--green); }
.kpi-brown { border-top-color: var(--mid-brown); }
.kpi-blue { border-top-color: var(--blue); }
.kpi-teal { border-top-color: var(--teal); }
.kpi-orange { border-top-color: var(--orange); }

.kpi-icon { font-size: 22px; margin-bottom: 6px; }

.kpi-value {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--espresso);
  line-height: 1;
  margin-bottom: 4px;
}

.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-trend { font-size: 10px; color: var(--green); margin-top: 4px; }

/* ============ CARDS ============ */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--rich-brown);
}

.card-badge {
  background: var(--pale-orange);
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

/* ============ TWO COLUMN ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ============ CHARTS ROW ============ */
.charts-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card { padding: 0; }

/* ============ BAR CHART ============ */
.bar-chart { padding: 16px 20px; }

.bar-group { margin-bottom: 14px; }

.bar-label { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }

.bar-wrap {
  background: var(--light-cream);
  border-radius: 6px;
  height: 32px;
  overflow: hidden;
  position: relative;
}

.bar {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  min-width: 50px;
  transition: width 1.2s ease;
}

.bar-full { background: linear-gradient(90deg, var(--rich-brown), var(--mid-brown)); }
.bar-low { background: linear-gradient(90deg, var(--red), #e74c3c); min-width: 60px; }
.bar-target { background: linear-gradient(90deg, var(--green), var(--light-green)); min-width: 60px; }

/* ============ PRICE COMPARISON ============ */
.price-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 20px;
}

.price-item { text-align: center; }

.price-circle {
  width: 90px; height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 8px;
}

.price-circle.raw { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.price-circle.processed { background: linear-gradient(135deg, var(--green), var(--light-green)); }

.price-item p { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.price-item small { font-size: 10px; }

.arrow-big { font-size: 32px; color: var(--gold); }

.multiplier {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
}

.multiplier small { font-size: 12px; }

/* ============ MISSION GRID ============ */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.mission-item {
  background: #fff;
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.mission-num {
  font-size: 20px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--cream);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  color: var(--mid-brown);
  font-size: 13px;
}

.mission-item strong { display: block; font-size: 13px; margin-bottom: 4px; }
.mission-item p { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ============ TIMELINE ============ */
.timeline { list-style: none; padding: 20px; }

.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
  margin-left: 6px;
  position: relative;
}

.timeline-item:last-child { border-left-color: transparent; }

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  position: absolute;
  left: -7px;
  top: 2px;
  flex-shrink: 0;
}

.dot.done { background: var(--green); }
.dot.active { background: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,0.3); }
.dot.pending { background: var(--border); border: 2px solid var(--text-muted); }

.timeline-item strong { display: block; font-size: 12px; margin-bottom: 2px; }
.timeline-item div { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.timeline-item.done div { color: var(--text-muted); }
.timeline-item.active div { color: var(--mid-brown); font-weight: 500; }

/* ============ PRODUCT GRID ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.product-card:hover { transform: translateY(-2px); }

.product-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.product-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.product-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 8px; }

.product-stats {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.product-stats > div { margin-bottom: 2px; }

/* ============ STATUS TAGS ============ */
.status-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-active { background: var(--pale-green); color: var(--green); }
.status-pending { background: #fff8e1; color: #f59e0b; }
.status-development { background: var(--pale-blue); color: var(--blue); }

/* ============ INFRASTRUCTURE LIST ============ */
.infra-list { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }

.infra-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  background: var(--light-cream);
  border-radius: 8px;
}

.infra-item span { font-size: 20px; flex-shrink: 0; }
.infra-item strong { display: block; font-size: 13px; }
.infra-item p { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }

/* ============ DATA TABLE ============ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--cream);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--light-cream); }

/* ============ BUTTONS ============ */
.btn-primary {
  background: var(--gold);
  color: var(--espresso);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--light-gold); }

.btn-secondary {
  background: var(--cream);
  color: var(--rich-brown);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.2s;
}

.btn-secondary:hover { background: var(--border); }

/* ============ WORLD MAP / EXPORT ============ */
.world-map-card { padding: 0; margin-bottom: 20px; }

.market-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px;
}

.market-pin {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--light-cream);
  border-radius: 10px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  flex: 1;
  min-width: 160px;
}

.active-market { border-color: var(--green); background: var(--pale-green); }
.upcoming-market { border-color: var(--gold); background: #fff8e1; }

.pin-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.active-dot { background: var(--green); }
.upcoming-dot { background: var(--gold); }

.pin-label { font-size: 12px; font-weight: 600; }
.pin-label small { font-weight: 400; color: var(--text-muted); }

/* ============ EVENTS ============ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.event-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

.event-card:hover { transform: translateY(-2px); }

.featured-event {
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, #fff 0%, #fffcf0 100%);
}

.event-ribbon {
  position: absolute;
  top: 12px; right: -10px;
  background: var(--gold);
  color: var(--espresso);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 18px 3px 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-icon { font-size: 32px; margin-bottom: 10px; }
.event-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }

.event-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.event-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.event-stats {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.event-stats > div { margin-bottom: 3px; }

/* ============ EXPERIENCE LIST ============ */
.experience-list { padding: 16px 20px; }

.exp-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.exp-item:last-child { border-bottom: none; }

.exp-num {
  width: 28px; height: 28px;
  background: var(--gold);
  color: var(--espresso);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.exp-item strong { font-size: 13px; display: block; margin-bottom: 2px; }
.exp-item p { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ============ STATS LIST ============ */
.stats-list { padding: 12px 20px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.stat-row:last-child { border-bottom: none; }
.stat-row span { color: var(--text-muted); }
.stat-row strong { color: var(--rich-brown); }

/* ============ INFRASTRUCTURE CARDS ============ */
.infra-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.infra-big-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.infra-big-card:hover { transform: translateY(-2px); }

.infra-big-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.infra-big-card h3 { font-size: 14px; font-weight: 700; margin: 8px 0 6px; }
.infra-big-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-top: 8px; }

/* ============ EXPANSION ============ */
.vision-card {
  background: linear-gradient(135deg, var(--espresso), var(--rich-brown));
  margin-bottom: 24px;
}

.vision-quote {
  padding: 28px 32px;
  text-align: center;
}

.vision-quote blockquote {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--light-gold);
  line-height: 1.5;
  margin-bottom: 10px;
}

.vision-quote cite { font-size: 13px; color: rgba(255,255,255,0.5); font-style: normal; }

.expansion-timeline { margin-bottom: 24px; }
.expansion-timeline h2 { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 16px; }

.phase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.phase-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.phase-done { border-top: 3px solid var(--green); }
.phase-active { border-top: 3px solid var(--gold); }
.phase-pending { border-top: 3px solid var(--border); }

.phase-num {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.phase-year {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin: 2px 0 8px;
}

.phase-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.phase-card ul { padding-left: 14px; }
.phase-card li { font-size: 11px; color: var(--text-muted); line-height: 1.5; margin-bottom: 4px; }

/* ============ REPORTS ============ */
.pie-legend { display: flex; align-items: center; gap: 24px; padding: 20px; }

.pie-svg { width: 120px; height: 120px; transform: rotate(-90deg); }

.legend-items { display: flex; flex-direction: column; gap: 10px; }

.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.legend-dot {
  width: 14px; height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--mid-brown), var(--gold));
  border-radius: 4px;
  transition: width 1s ease;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .login-left { width: 48%; padding: 36px 32px; }
  .login-right { width: 52%; }
}

@media (max-width: 760px) {
  .login-screen { flex-direction: column; overflow-y: auto; }
  .login-left { width: 100%; padding: 36px 24px; border-radius: 0; }
  .login-right { width: 100%; padding: 32px 20px; }
  .login-park-stats { gap: 16px; padding: 14px 16px; }
  .login-photo { width: 140px; height: 140px; }
  .login-photo-fallback { width: 140px; height: 140px; }
  .login-photo-wrap { width: 140px; height: 140px; }
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .infra-cards { grid-template-columns: repeat(2, 1fr); }
  .phase-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: block; }
  .charts-row { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 16px; }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .phase-grid { grid-template-columns: 1fr; }
  .infra-cards { grid-template-columns: 1fr; }
  .price-comparison { flex-direction: column; }
  .mission-grid { grid-template-columns: 1fr; }
}

/* ============ CLICKABLE CARDS ============ */
.clickable-card {
  cursor: pointer;
  position: relative;
}

.clickable-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-lg) !important;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.card-click-hint {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.2s;
}

.clickable-card:hover .card-click-hint { opacity: 1; }

.exp-item.clickable-card:hover {
  background: var(--cream);
  border-radius: 8px;
  padding: 12px 8px;
}

.le-photo {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 3px solid var(--gold) !important;
}

/* ============ DETAIL MODAL ============ */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 14, 8, 0.65);
  backdrop-filter: blur(4px);
}

.detail-panel {
  position: relative;
  width: 680px;
  max-width: 95vw;
  height: 100vh;
  background: var(--light-cream);
  overflow-y: auto;
  box-shadow: -8px 0 60px rgba(26,14,8,0.4);
  animation: slideInRight 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.detail-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.2s;
}

.detail-close:hover { background: #fff; }

/* Hero image */
.detail-hero {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--rich-brown);
  flex-shrink: 0;
}

.detail-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(26,14,8,0.85) 0%, rgba(26,14,8,0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.detail-category-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--espresso);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  align-self: flex-start;
}

.detail-hero-overlay h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}

/* Body */
.detail-body {
  padding: 28px 28px 48px;
  overflow-y: auto;
}

/* Sections */
.modal-section {
  margin-bottom: 28px;
}

.modal-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--rich-brown);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-overview {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-primary);
}

/* Gallery */
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.modal-gallery img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.2s;
}

.modal-gallery img:hover { transform: scale(1.03); }

.modal-gallery figure {
  margin: 0;
}

.modal-gallery figcaption {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* Varieties */
.modal-varieties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.variety-item {
  background: var(--cream);
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--mid-brown);
}

.variety-item strong { display: block; font-size: 13px; margin-bottom: 4px; }
.variety-item span { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* Process steps */
.modal-process {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.process-step:last-child { border-bottom: none; }

.step-num {
  width: 32px; height: 32px;
  background: var(--gold);
  color: var(--espresso);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.step-content strong { display: block; font-size: 13px; margin-bottom: 3px; }
.step-content p { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Consumption */
.modal-consumption {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.consumption-item {
  background: var(--pale-green);
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
}

.consumption-item strong { display: block; font-size: 13px; margin-bottom: 3px; color: var(--green); }
.consumption-item span { font-size: 12px; color: var(--text-primary); line-height: 1.5; }

/* Pricing */
.modal-pricing {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.modal-pricing th {
  background: var(--cream);
  padding: 8px 12px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}

.modal-pricing td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.modal-pricing tr:last-child td { border-bottom: none; }
.modal-pricing tr:hover td { background: var(--light-cream); }

.price-tag {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

/* Key facts */
.modal-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fact-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.fact-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); font-weight: 700; margin-bottom: 3px; }
.fact-value { font-size: 12px; font-weight: 600; color: var(--rich-brown); line-height: 1.4; }

@media (max-width: 700px) {
  .detail-panel { width: 100%; }
  .modal-varieties { grid-template-columns: 1fr; }
  .modal-facts { grid-template-columns: 1fr; }
}

/* ============ LEAD ENGINEER CARD ============ */
.lead-engineer-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--espresso) 0%, var(--rich-brown) 100%);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
}

.le-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--espresso);
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.2);
}

.le-info { flex: 1; min-width: 200px; }

.le-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.le-role {
  font-size: 12px;
  color: var(--light-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.le-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  max-width: 520px;
}

.le-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(201,162,39,0.15);
  border: 1px solid rgba(201,162,39,0.3);
  border-radius: 12px;
  padding: 14px 20px;
  color: var(--light-gold);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.le-badge span:first-child { font-size: 26px; }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page.active { animation: fadeIn 0.3s ease; }

@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   LOGIN TABS
   ============================================ */
.login-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}
.login-tab-btn {
  flex: 1;
  padding: 9px 16px;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.login-tab-btn.active {
  background: var(--espresso);
  color: var(--light-gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.login-tab-panel { display: none; }
.login-tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* ============================================
   TEAM PAGE — DEPARTMENT OVERVIEW CARDS
   ============================================ */
.dept-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.dept-overview-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--espresso);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(42,27,14,0.06);
  transition: box-shadow 0.2s, transform 0.2s, border-left-color 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dept-overview-card:hover {
  box-shadow: 0 6px 20px rgba(42,27,14,0.12);
  transform: translateY(-2px);
  border-left-color: var(--gold);
}
.dept-overview-card.active-dept {
  border-left-color: var(--gold);
  background: var(--light-cream);
}
.dept-overview-name {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--espresso);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dept-overview-count {
  font-size: 26px;
  font-weight: 800;
  color: var(--mid-brown);
  line-height: 1;
}
.dept-overview-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dept-overview-link {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s;
}
.dept-overview-link:hover { color: var(--espresso); }

/* ============================================
   TEAM PAGE — STAFF CARDS
   ============================================ */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.staff-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: 0 2px 8px rgba(42,27,14,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.staff-card:hover {
  box-shadow: 0 4px 16px rgba(42,27,14,0.12);
  transform: translateY(-2px);
}
.staff-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rich-brown), var(--mid-brown));
  color: var(--light-gold);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.staff-info { flex: 1; min-width: 0; }
.staff-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--espresso);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-dept {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 5px;
}
.staff-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Dept filter button strip */
.dept-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(42,27,14,.05);
}

.dept-filter-label {
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dept-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  font-size: 12px;
  font-weight: 600;
  color: #5a4a3a;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.18s;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(42,27,14,.04);
  position: relative;
  overflow: hidden;
}

.dept-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,162,39,.08), transparent);
  opacity: 0;
  transition: opacity 0.18s;
}

.dept-btn:hover {
  background: #fff;
  border-color: var(--gold);
  color: var(--espresso);
  box-shadow: 0 3px 10px rgba(201,162,39,.18);
  transform: translateY(-1px);
}
.dept-btn:hover::before { opacity: 1; }

.dept-btn .dept-btn-icon {
  font-size: 14px;
  line-height: 1;
}

.dept-btn .dept-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(90,74,58,.1);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  color: #7a6a5a;
  transition: all 0.18s;
}

.dept-btn.active {
  background: var(--espresso);
  color: #fff;
  border-color: var(--espresso);
  box-shadow: 0 4px 14px rgba(26,14,8,.25);
  transform: translateY(-1px);
}

.dept-btn.active::before { opacity: 0; }

.dept-btn.active .dept-btn-count {
  background: rgba(201,162,39,.3);
  color: var(--gold);
}

.dept-btn.active .dept-btn-icon { filter: none; }

/* "All" button gets special gold treatment */
.dept-btn[data-dept="All"],
.dept-btn:first-child {
  border-style: solid;
}
.dept-btn[data-dept="All"].active,
.dept-btn:first-child.active {
  background: linear-gradient(135deg, var(--espresso), #3a1a08);
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(26,14,8,.3);
}

/* ============================================
   DATABASE VIEWER PAGE
   ============================================ */
.db-summary-banner {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.db-banner-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  text-align: center;
  min-width: 120px;
  box-shadow: 0 2px 6px rgba(42,27,14,0.06);
}
.db-banner-item span {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--espresso);
  line-height: 1;
  margin-bottom: 4px;
}
.db-banner-item small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.db-banner-alert span { color: var(--red) !important; }
.db-banner-alert { border-color: rgba(192,57,43,0.3); }

.db-vtab-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.db-vtab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.db-vtab:hover { background: var(--cream); color: var(--espresso); }
.db-vtab.active {
  background: var(--espresso);
  color: var(--light-gold);
  border-color: var(--espresso);
}

.db-viewer-card { padding: 20px; min-height: 200px; }
.db-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--espresso);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.db-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.db-search {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  flex: 1;
  min-width: 160px;
  max-width: 320px;
  background: var(--light-cream);
  color: var(--text-primary);
  transition: border-color 0.15s;
}
.db-search:focus { border-color: var(--warm-tan); }
.db-table-wrap {
  overflow-x: auto;
  margin-bottom: 6px;
}
.btn-outline-sm {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.btn-outline-sm:hover { background: var(--cream); color: var(--espresso); }

.btn-sm {
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  margin-right: 4px;
  transition: opacity 0.15s;
}
.btn-sm:hover { opacity: 0.8; }
.btn-green { background: var(--green); color: #fff; }
.btn-red   { background: var(--red);   color: #fff; }

.no-data-msg {
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px 0;
  text-align: center;
  font-style: italic;
}

/* ============================================
   REPORTS — ERP CHARTS
   ============================================ */
.chart-body {
  padding: 12px 4px 4px;
}
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-bar-label {
  min-width: 160px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}
.chart-bar-track {
  flex: 1;
  height: 18px;
  background: var(--cream);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.chart-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 2px;
}
.chart-bar-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--espresso);
  white-space: nowrap;
  min-width: 80px;
}

/* Zone progress grid */
.zone-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 4px 0;
}
.zone-mini-card {
  background: var(--light-cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.zone-mini-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zone-mini-track {
  height: 10px;
  background: var(--cream);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}
.zone-mini-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.zone-mini-pct {
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

/* Responsive zone grid */
@media (max-width: 900px) {
  .zone-progress-grid { grid-template-columns: repeat(2, 1fr); }
  .dept-overview-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .zone-progress-grid { grid-template-columns: 1fr 1fr; }
  .chart-bar-label { min-width: 100px; font-size: 10px; }
  .db-summary-banner { gap: 8px; }
  .db-banner-item { min-width: 90px; padding: 10px 14px; }
  .db-banner-item span { font-size: 20px; }
  .staff-grid { grid-template-columns: 1fr 1fr; }
  .dept-overview-grid { grid-template-columns: 1fr 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; }
}

/* ============================================
   TOPBAR LIVE BADGES
   ============================================ */
.topbar-live-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-stat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rich-brown);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
}
.topbar-stat-chip .chip-icon { font-size: 13px; }
.topbar-badge {
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  display: inline-block;
}
.topbar-badge.hidden { display: none; }

/* ============================================
   PHOTOS PAGE
   ============================================ */
.photo-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.photo-cat-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.photo-cat-btn:hover { background: var(--cream); color: var(--espresso); }
.photo-cat-btn.active {
  background: var(--espresso);
  color: var(--light-gold);
  border-color: var(--espresso);
}
.photo-grid {
  columns: 4 200px;
  column-gap: 14px;
  margin-top: 4px;
}
.photo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(42,27,14,0.06);
  break-inside: avoid;
  margin-bottom: 14px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.photo-card:hover {
  box-shadow: 0 6px 20px rgba(42,27,14,0.14);
  transform: translateY(-2px);
}
.photo-img-wrap {
  position: relative;
  background: var(--cream);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-img-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 240px;
}
.photo-placeholder {
  width: 100%;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--cream), var(--pale-green));
  padding: 20px;
}
.photo-placeholder-icon { font-size: 32px; opacity: 0.5; }
.photo-placeholder-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.photo-meta {
  padding: 10px 12px 12px;
}
.photo-caption {
  font-size: 12px;
  font-weight: 600;
  color: var(--espresso);
  margin-bottom: 4px;
  line-height: 1.4;
}
.photo-sub {
  font-size: 10px;
  color: var(--text-muted);
}
.photo-cat-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 10px;
  background: var(--pale-green);
  color: var(--green);
  margin-top: 5px;
}
.photo-add-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.db-erp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--light-cream);
  font-size: 11px;
  font-weight: 700;
  color: var(--mid-brown);
  text-decoration: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  white-space: nowrap;
}
.db-erp-link:hover {
  background: var(--espresso);
  color: var(--light-gold);
  border-color: var(--espresso);
}
@media (max-width: 700px) {
  .photo-grid { columns: 2 160px; }
  .topbar-live-stats { display: none; }
}

/* ============================================================
   DYNAMIC DASHBOARD — user hero, dept KPIs, quick links
   ============================================================ */

.dash-user-hero {
  background: linear-gradient(135deg, var(--espresso) 0%, var(--rich-brown) 60%, var(--mid-brown) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 4px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.dash-user-hero::after {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  border: 50px solid rgba(201,162,39,0.06);
  top: -80px; right: -80px;
  pointer-events: none;
}
.dash-hero-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.dash-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--light-gold));
  color: var(--espresso);
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(201,162,39,0.25);
  letter-spacing: 1px;
}
.dash-hero-text {
  flex: 1;
  min-width: 200px;
}
.dash-greeting {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--light-gold);
  margin-bottom: 2px;
}
.dash-hero-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.dash-hero-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
}
.dash-hero-role {
  background: rgba(201,162,39,0.2);
  color: var(--light-gold);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
}
.dash-hero-dept {
  color: rgba(255,255,255,0.7);
}
.dash-hero-empid {
  font-family: monospace;
  color: var(--warm-tan);
  font-size: 11px;
}
.dash-hero-sep {
  margin: 0 4px;
  color: rgba(255,255,255,0.3);
}
.dash-hero-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
  font-style: italic;
}
.dash-hero-date {
  margin-left: auto;
  text-align: right;
}
.dash-date-str {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}

/* Dept KPI card variant */
.kpi-card.kpi-dept {
  background: var(--cream);
  border: 1.5px solid var(--border);
}
.kpi-card.kpi-dept .kpi-value {
  color: var(--espresso);
}
.kpi-empty {
  color: var(--text-muted);
  font-size: 22px;
}
.kpi-trend-empty {
  color: var(--warm-tan) !important;
  font-style: italic;
}

/* Quick links */
.quick-links-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0 4px;
}
.quick-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--espresso);
  color: var(--light-gold);
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.quick-link-btn:hover {
  background: var(--rich-brown);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(42,27,14,0.2);
}

/* ============================================================
   EDIT MODE
   ============================================================ */

.topbar-edit-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--espresso);
  color: var(--light-gold);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
  margin-right: 8px;
}
.topbar-edit-btn:hover,
.topbar-edit-btn.edit-mode-on {
  background: var(--gold);
  color: var(--espresso);
}

.is-editable {
  cursor: text;
  border-radius: 4px;
  outline: 1px dashed rgba(201,162,39,0.4);
  transition: outline 0.15s;
}
.is-editable:hover {
  outline: 2px dashed var(--gold);
  background: rgba(201,162,39,0.06);
}
.editing-now {
  outline: 2px solid var(--gold) !important;
  background: rgba(201,162,39,0.1) !important;
  padding: 2px 4px;
  border-radius: 4px;
}

#edit-mode-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: var(--espresso);
  color: var(--light-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 600;
  z-index: 8000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  letter-spacing: 0.3px;
}
.banner-save-btn {
  background: var(--gold);
  color: var(--espresso);
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.banner-save-btn:hover {
  background: var(--light-gold);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.portal-toast {
  background: var(--espresso);
  color: #fff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  max-width: 320px;
  text-align: center;
  border-left: 3px solid var(--gold);
}
.portal-toast.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.admin-dept-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: var(--cream);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}
.badge-alert {
  background: rgba(192,57,43,0.1) !important;
  color: var(--red) !important;
}

/* ============================================================
   RESPONSIVE ADDITIONS
   ============================================================ */

@media (max-width: 700px) {
  .dash-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .dash-hero-date  { margin-left: 0; text-align: left; }
  .dash-hero-avatar { width: 56px; height: 56px; font-size: 18px; }
  .dash-greeting   { font-size: 18px; }
  .quick-links-wrap { gap: 8px; }
  .quick-link-btn  { font-size: 11px; padding: 7px 12px; }
  #edit-mode-banner { font-size: 11px; gap: 10px; }
}

/* ============================================================
   PROFESSIONAL TEAM PAGE
   ============================================================ */

/* Hero stat bar */
.team-hero-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.team-stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 16px; text-align: center; box-shadow: 0 2px 8px rgba(42,27,14,.06); }
.team-stat-num { font-size: 28px; font-weight: 800; color: var(--rich-brown); font-family: 'Playfair Display', serif; line-height: 1; }
.team-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* Action bar */
.team-action-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }

/* Filter selects */
.team-filter-select { padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 12px; font-family: inherit; background: #fff; color: var(--text-primary); cursor: pointer; }
.team-filter-select:focus { outline: none; border-color: var(--gold); }

/* Department overview grid */
.team-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.team-dept-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 14px; text-align: center; transition: .2s; cursor: pointer; }
.team-dept-card:hover { box-shadow: 0 4px 18px rgba(42,27,14,.12); transform: translateY(-2px); border-color: var(--gold); }
.team-dept-card.active { border-color: var(--espresso); background: var(--cream); box-shadow: 0 4px 18px rgba(42,27,14,.12); }
.team-dept-icon { font-size: 28px; margin-bottom: 8px; }
.team-dept-name { font-size: 13px; font-weight: 700; color: var(--espresso); margin-bottom: 6px; }
.team-dept-count { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.team-dept-badge { display: inline-block; background: var(--cream); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; font-size: 12px; font-weight: 700; color: var(--rich-brown); }
.team-dept-head { font-size: 11px; color: var(--gold); font-weight: 600; margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-dept-bar-wrap { background: #f0e8e0; border-radius: 4px; height: 6px; margin: 8px 0; overflow: hidden; }
.team-dept-bar-fill { height: 100%; background: var(--gold); border-radius: 4px; transition: width .4s ease; }
.team-dept-view-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 10px; font-weight: 600; cursor: pointer; color: var(--text-muted); margin-top: 6px; transition: .15s; }
.team-dept-view-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Professional staff grid */
.staff-grid-pro { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-top: 20px; }
.staff-card-pro { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px 16px 16px; text-align: center; box-shadow: 0 2px 10px rgba(42,27,14,.07); transition: .25s; position: relative; cursor: pointer; }
.staff-card-pro:hover { box-shadow: 0 6px 24px rgba(42,27,14,.14); transform: translateY(-3px); border-color: var(--gold); }

/* Photo / avatar */
.staff-photo-wrap { position: relative; width: 80px; height: 80px; margin: 0 auto 14px; }
.staff-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); display: block; }
.staff-initials-pro { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--rich-brown), #8b4513); color: var(--light-gold, #e8c96a); font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto; border: 3px solid var(--gold); }
.staff-status-dot { position: absolute; bottom: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; background: var(--green); }
.staff-status-dot.inactive { background: var(--text-muted); }

/* Staff card text */
.staff-card-name { font-size: 14px; font-weight: 700; color: var(--espresso); margin-bottom: 4px; line-height: 1.3; }
.staff-card-role { font-size: 12px; color: var(--gold); font-weight: 600; margin-bottom: 6px; }
.staff-card-dept-badge { display: inline-block; background: var(--cream); color: var(--rich-brown); border: 1px solid var(--border); border-radius: 20px; font-size: 10px; font-weight: 600; padding: 2px 10px; margin-bottom: 7px; }
.staff-card-meta { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.staff-card-actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.staff-upload-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; font-size: 11px; cursor: pointer; color: var(--text-muted); transition: .15s; display: inline-block; }
.staff-upload-btn:hover { border-color: var(--gold); color: var(--gold); }

/* Contract badges */
.contract-badge { display: inline-block; border-radius: 12px; font-size: 9px; font-weight: 700; padding: 2px 9px; text-transform: uppercase; letter-spacing: .3px; }
.contract-perm { background: #d4edda; color: #155724; }
.contract-cont { background: #fff3cd; color: #856404; }
.contract-cas  { background: #f8d7da; color: #721c24; }

/* Responsive */
@media (max-width: 900px) {
  .team-hero-stats { grid-template-columns: repeat(3, 1fr); }
  .staff-grid-pro { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 600px) {
  .team-hero-stats { grid-template-columns: repeat(2, 1fr); }
  .team-action-bar { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   HOW TO USE PANELS (shared across ERP modules)
   ============================================================ */
.how-to-wrap { max-width: 900px; margin: 0 auto; padding: 20px 0; }
.how-to-header { margin-bottom: 24px; }
.how-to-header h2 { font-size: 22px; font-weight: 800; color: var(--espresso, #1a0e08); margin-bottom: 6px; }
.how-to-sub { color: #7a6a5a; font-size: 13px; }
.how-to-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.how-to-card { background: #fff; border: 1px solid #e8d8c8; border-radius: 12px; overflow: hidden; transition: .2s; }
.how-to-card-header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; background: #fdf6ee; border-bottom: 1px solid #e8d8c8; transition: .2s; }
.how-to-card-header:hover { background: #f5e8d5; }
.how-to-icon { font-size: 20px; flex-shrink: 0; }
.how-to-card-header strong { flex: 1; font-size: 13px; color: var(--espresso, #1a0e08); }
.how-to-toggle { color: #b8874a; font-size: 11px; transition: transform .2s; }
.how-to-body { display: none; padding: 16px 18px; font-size: 13px; line-height: 1.7; color: #3a2a1a; }
.how-to-body ol { padding-left: 20px; margin-bottom: 12px; }
.how-to-body li { margin-bottom: 6px; }
.how-to-tip { background: #fff8e8; border-left: 3px solid #c9a227; padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 12px; color: #856404; }
.how-to-card.expanded .how-to-body { display: block; }
.how-to-card.expanded .how-to-toggle { transform: rotate(180deg); }
.how-to-footer { margin-top: 24px; padding: 16px; background: #fdf6ee; border-radius: 10px; font-size: 12px; color: #7a6a5a; text-align: center; }
.how-to-footer a { color: #c9a227; font-weight: 600; }

/* ================================================
   ORGANISATIONAL CHART
   ================================================ */

.org-wrap {
  overflow-x: auto;
  padding: 20px 0 40px;
}

/* Top-level column contains both node card and its children */
.org-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

/* Connector lines drawn via ::before on org-children */
.org-children {
  display: flex;
  gap: 0;
  align-items: flex-start;
  position: relative;
  padding-top: 32px;
  transition: all 0.3s ease;
}

/* Horizontal top line spanning all children */
.org-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 32px;
  background: var(--gold, #c9a227);
}

/* Each child col gets a vertical tick up */
.org-children > .org-col::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 16px;
  background: #d4c4a8;
}

/* Horizontal connector between siblings */
.org-children > .org-col:not(:first-child):not(:last-child)::after,
.org-children > .org-col:first-child:not(:last-child)::after,
.org-children > .org-col:last-child:not(:first-child)::after {
  content: '';
  position: absolute;
  top: 0;
  height: 1px;
  background: #d4c4a8;
}
.org-children > .org-col:first-child:not(:last-child)::after { left: 50%; right: 0; }
.org-children > .org-col:last-child:not(:first-child)::after  { left: 0; right: 50%; }
.org-children > .org-col:not(:first-child):not(:last-child)::after { left: 0; right: 0; }

.org-children.org-collapsed { display: none; }

/* ── Node card ── */
.org-node {
  position: relative;
  background: #fff;
  border: 1px solid var(--border, #e8d8c8);
  border-radius: 14px;
  padding: 18px 16px 14px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(42,27,14,.08);
  transition: box-shadow .2s, transform .2s;
  cursor: default;
  min-width: 160px;
  max-width: 180px;
  margin: 0 8px;
}
.org-node:hover {
  box-shadow: 0 6px 24px rgba(42,27,14,.14);
  transform: translateY(-2px);
}

/* CEO node — gold border & gradient header */
.org-node-ceo {
  border: 2px solid var(--gold, #c9a227);
  background: linear-gradient(160deg, #fff9ee 0%, #fff 60%);
  min-width: 200px;
  max-width: 220px;
  box-shadow: 0 6px 28px rgba(201,162,39,.2);
}
.org-node-ceo .org-name { font-size: 15px; }

/* PM node — dark blue accent */
.org-node-pm {
  border: 2px solid #2a5298;
  background: linear-gradient(160deg, #f0f4ff 0%, #fff 60%);
  min-width: 190px;
  max-width: 210px;
  box-shadow: 0 4px 20px rgba(42,82,152,.15);
}
.org-node-pm .org-name { font-size: 14px; }

/* Department head node */
.org-node-head {
  border-top: 3px solid var(--gold, #c9a227);
}

/* Staff node */
.org-node-staff {
  background: #fafaf8;
  border-color: #efe8df;
}

/* ── Photo / avatar ── */
.org-photo-wrap { margin: 0 auto 10px; position: relative; }
.org-photo, .org-initials {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 18px;
  font-weight: 800;
  color: var(--gold, #c9a227);
  background: linear-gradient(135deg, var(--espresso, #1a0e08), #3a1a08);
  border: 3px solid var(--gold, #c9a227);
}
.org-node-ceo .org-photo, .org-node-ceo .org-initials {
  width: 76px; height: 76px; font-size: 22px;
}
.org-node-pm  .org-photo, .org-node-pm .org-initials  {
  width: 70px; height: 70px; font-size: 20px;
  border-color: #2a5298;
  background: linear-gradient(135deg, #0a1628, #1a2a4a);
}
.org-node-staff .org-initials { width: 52px; height: 52px; font-size: 14px; border-width: 2px; }
.org-node-staff .org-photo    { width: 52px; height: 52px; border-width: 2px; }

/* ── Badge ── */
.org-badge {
  display: inline-block;
  position: absolute;
  top: 10px; right: 10px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Text ── */
.org-name  { font-size: 12px; font-weight: 700; color: var(--espresso, #1a0e08); margin-bottom: 3px; }
.org-role  { font-size: 10px; color: var(--gold, #c9a227); font-weight: 600; margin-bottom: 3px; line-height: 1.3; }
.org-dept  { font-size: 9px; color: #9a8a7a; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.org-email { display: block; font-size: 9px; color: #2a5298; text-decoration: none; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-email:hover { text-decoration: underline; }

/* ── Toggle button ── */
.org-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border, #e8d8c8);
  background: var(--cream, #fdf6ee);
  color: var(--gold, #c9a227);
  font-size: 12px;
  cursor: pointer;
  transition: .2s;
  margin-top: 4px;
}
.org-toggle-btn:hover { background: var(--gold, #c9a227); color: #fff; border-color: var(--gold, #c9a227); }
.org-toggle-btn.collapsed { color: var(--text-muted, #9a8a7a); }

/* Print */
@media print {
  .org-toggle-btn, .page-header button { display: none !important; }
  .org-children.org-collapsed { display: flex !important; }
  .org-node { box-shadow: none !important; border-width: 1px !important; }
}

/* Mobile — scroll horizontally */
@media (max-width: 700px) {
  .org-node { min-width: 130px; max-width: 150px; padding: 12px 10px 10px; margin: 0 4px; }
  .org-photo, .org-initials { width: 48px; height: 48px; font-size: 14px; }
  .org-node-ceo .org-photo, .org-node-ceo .org-initials { width: 56px; height: 56px; }
}
