/* ══════════════════════════════════════
   PSD MEMBERS PLATFORM — MAIN CSS
   ══════════════════════════════════════ */

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

:root {
  --red: #ED1C24;
  --red-dark: #B5121B;
  --red-light: #FCEEF0;
  --green: #1A7A4A;
  --green-light: #EAF5EE;
  --gold: #C9922A;
  --gold-light: #FEF3E2;
  --blue: #2563EB;
  --blue-light: #E8F0FE;
  --purple: #7C3AED;
  --purple-light: #F3E8FF;
  --gray-50: #F8F7F5;
  --gray-100: #EEECE8;
  --gray-200: #D8D5CF;
  --gray-300: #C8C5BF;
  --gray-400: #9E9B94;
  --gray-500: #6B6860;
  --gray-600: #5C5A55;
  --gray-700: #4A4845;
  --gray-800: #2C2B28;
  --gray-900: #1A1917;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
}

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.6;
}

/* ── HEADER ── */
#psd-header {
  background: var(--red);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 17px;
  color: #fff;
  letter-spacing: .01em;
}

/* ── ROLE DROPDOWN în header (admin@psd.ro) ── */
.role-dropdown {
  position: relative;
  flex-shrink: 0;
}

.role-dropdown-trigger {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  color: #fff;
  padding: 5px 12px;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.role-dropdown-trigger:hover { background: rgba(255,255,255,.25); }
.role-dropdown-trigger strong { color: #fff; font-size: 12px; }
.role-dropdown-current {
  color: rgba(255,255,255,.7);
  font-size: 11px;
  border-left: 1px solid rgba(255,255,255,.3);
  padding-left: 6px;
}

.role-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 220px;
  z-index: 500;
  padding: 4px 0;
}
.role-dropdown-menu.open { display: block; }

.role-dropdown-label {
  padding: 6px 14px 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-400);
}

.role-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 400;
  color: var(--gray-700);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background .1s;
}
.role-dropdown-item:hover { background: var(--gray-50); color: var(--red); }
.role-dropdown-item.active { color: var(--red); font-weight: 600; }

.role-dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
}


.header-right {
  color: rgba(255,255,255,.8);
  font-size: 12px;
  text-align: right;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-right strong {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.header-right span {
  color: rgba(255,255,255,.65);
  font-size: 11px;
}
.header-logout {
  color: rgba(255,255,255,.65);
  font-size: 12px;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.2);
  transition: all .15s;
}
.header-logout:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ── NAV ── */
#psd-nav {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: visible;
  position: sticky;
  top: 52px;
  z-index: 150;
  padding: 0 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
#psd-nav::-webkit-scrollbar { height: 2px; }
#psd-nav::-webkit-scrollbar-thumb { background: var(--gray-200); }

/* Item nav simplu */
.nav-item {
  padding: 14px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s;
  flex-shrink: 0;
}
.nav-item:hover { color: var(--red); }
.nav-item.active { color: var(--red); border-bottom-color: var(--red); }

/* Separator nav */
.nav-sep {
  color: var(--gray-300);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 0 6px;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

/* Badge nav */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  padding: 0 3px;
}
.nav-badge.gold { background: var(--gold); }

/* ── DROPDOWN NAV ── */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
}

.nav-dropdown-trigger {
  padding: 14px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font);
}
.nav-dropdown-trigger::after {
  content: '▾';
  font-size: 10px;
  opacity: .5;
}
.nav-dropdown-trigger::after {
  content: '▾';
  font-size: 9px;
  opacity: .6;
  margin-left: 2px;
}
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown-trigger:hover {
  color: var(--red);
}
.nav-dropdown.active .nav-dropdown-trigger {
  color: var(--red);
  border-bottom-color: var(--red);
}

.nav-dropdown-menu {
  display: none;
  position: fixed;
  background: #fff;
  border-top: 2px solid var(--red);
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  min-width: 200px;
  z-index: 999;
  padding: 6px 0;
}
.nav-dropdown-item {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-800);
  text-decoration: none;
  white-space: nowrap;
  transition: background .1s, color .1s;
}
.nav-dropdown-item:hover {
  background: var(--gray-50);
  color: var(--red);
}
.nav-dropdown-item.active {
  color: var(--red);
  font-weight: 600;
}
.nav-dropdown-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 0;
}
.nav-dropdown-label {
  padding: 6px 18px 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-400);
}

/* ── MAIN CONTENT ── */
#main-content {
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
  min-height: 60vh;
}

/* ── FLASH MESSAGES ── */
#flash-container {
  padding: 0 24px;
  max-width: 1100px;
  margin: 12px auto 0;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}
.flash-success { background: var(--green-light); color: var(--green); border-left: 3px solid var(--green); }
.flash-error, .flash-danger { background: var(--red-light); color: var(--red-dark); border-left: 3px solid var(--red); }
.flash-warning { background: var(--gold-light); color: #7A4A00; border-left: 3px solid var(--gold); }
.flash-info { background: var(--blue-light); color: #1D4ED8; border-left: 3px solid var(--blue); }
.flash-close { background: none; border: none; cursor: pointer; color: inherit; opacity: .6; font-size: 13px; margin-left: 12px; }

/* ── PAGE TITLES cu DM Serif Display ── */
.sh {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.sh h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.sh .sub { font-size: 12px; color: var(--gray-400); }
.sh-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* ── CARDS ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  padding: 20px;
  margin-bottom: 16px;
}
.card-p0 { padding: 0; overflow: hidden; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

/* ── STATS ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  text-align: center;
}
.stat-n {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--red);
  line-height: 1;
}
.stat-n.warn { color: var(--gold); }
.stat-n.ok { color: var(--green); }
.stat-n.sm { font-size: 18px; }
.stat-l { font-size: 10px; color: var(--gray-400); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ── GRIDS ── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ── TABLE ── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gray-400);
  padding: 9px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  vertical-align: middle;
}
.tbl tr:last-child td { border: none; }
.tbl tbody tr:hover td { background: var(--gray-50); }

/* ── BADGES ── */
.b { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.b-g { background: var(--green-light); color: var(--green); }
.b-r { background: var(--red-light); color: var(--red-dark); }
.b-o { background: var(--gold-light); color: #7A4A00; }
.b-b { background: var(--blue-light); color: var(--blue); }
.b-gr { background: var(--gray-100); color: var(--gray-500); }
.b-p { background: var(--purple-light); color: var(--purple); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .15s;
}
.btn-r { background: var(--red); color: #fff; }
.btn-r:hover { background: var(--red-dark); color: #fff; }
.btn-s { background: var(--gray-100); color: var(--gray-800); }
.btn-s:hover { background: var(--gray-200); }
.btn-g { background: var(--green); color: #fff; }
.btn-g:hover { background: #156040; }
.btn-gh { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn-gh:hover { background: var(--gray-100); }
.btn-p { background: var(--purple); color: #fff; }
.btn-p:hover { background: #6D28D9; }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-danger { background: var(--red-light); color: var(--red-dark); border: 1px solid #F9C4C4; }

/* ── FORMS ── */
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=number], input[type=tel], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--gray-800);
  background: #fff;
  outline: none;
  transition: border .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); }
input[readonly], input[disabled] { background: var(--gray-50); color: var(--gray-400); }
textarea { resize: vertical; min-height: 80px; }
.fg { margin-bottom: 13px; }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.f3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 11px; }

/* ── ALERTS ── */
.al {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
  border-left: 3px solid;
  display: flex;
  gap: 8px;
  line-height: 1.6;
}
.al-g { background: var(--green-light); border-color: var(--green); color: var(--green); }
.al-w { background: var(--gold-light); border-color: var(--gold); color: #7A4A00; }
.al-r { background: var(--red-light); border-color: var(--red); color: var(--red-dark); }
.al-b { background: var(--blue-light); border-color: var(--blue); color: #1D4ED8; }

/* ── FILTERS ── */
.fls { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 13px; }
.fb {
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  font-family: var(--font);
  text-decoration: none;
  display: inline-block;
}
.fb.active, .fb:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ── SEARCH ── */
.srch { display: flex; gap: 7px; margin-bottom: 13px; }
.srch input { flex: 1; }

/* ── FEED ── */
.feed-item { padding: 15px 0; border-bottom: 1px solid var(--gray-100); }
.feed-item:last-child { border-bottom: none; }
.feed-meta { font-size: 11px; color: var(--gray-400); margin-bottom: 5px; }
.feed-meta strong { color: var(--gray-500); }
.feed-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.feed-body { font-size: 13px; color: var(--gray-600); line-height: 1.65; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; margin-right: 4px; margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; }
.tag-r { background: var(--red-light); color: var(--red-dark); }
.tag-b { background: var(--blue-light); color: var(--blue); }
.tag-g { background: var(--green-light); color: var(--green); }

/* ── EVENTS ── */
.ev-item { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--gray-100); }
.ev-item:last-child { border-bottom: none; }
.ev-date { min-width: 48px; text-align: center; background: var(--gold-light); border-radius: 8px; padding: 7px 5px; flex-shrink: 0; }
.ev-date .dd { font-size: 20px; font-weight: 700; color: var(--gold); line-height: 1; }
.ev-date .dm { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--gold); margin-top: 2px; }

/* ── AGENDA ITEMS ── */
.agenda-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--gray-100); align-items: flex-start; }
.agenda-item:last-child { border-bottom: none; }
.agenda-time { min-width: 46px; font-size: 13px; font-weight: 700; color: var(--red); flex-shrink: 0; }
.agenda-prio { width: 4px; border-radius: 2px; flex-shrink: 0; align-self: stretch; min-height: 34px; }
.ap-r { background: var(--red); }
.ap-o { background: var(--gold); }
.ap-b { background: var(--blue); }

/* ── URGENT ALERT ── */
.urg { background: var(--gray-800); border-radius: 10px; padding: 15px; color: #fff; margin-bottom: 12px; border-left: 4px solid var(--red); }
.urg-head { font-size: 10px; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }

/* ── LEGITIMATIE ── */
.leg { background: linear-gradient(135deg, var(--red), var(--red-dark)); border-radius: 12px; padding: 20px; color: #fff; max-width: 320px; position: relative; overflow: hidden; }
.leg::after { content: 'PSD'; position: absolute; right: -10px; bottom: -22px; font-size: 88px; font-weight: 800; opacity: .07; pointer-events: none; }

/* ── KIT CARDS ── */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 13px; }
.kit-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100); overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.kit-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kit-img { height: 100px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.kit-img.red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.kit-img.blue { background: linear-gradient(135deg, #1D4ED8, #1E3A8A); }
.kit-img.gold { background: linear-gradient(135deg, var(--gold), #7A4A00); }
.kit-body { padding: 11px; }
.kit-body strong { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.kit-body span { font-size: 11px; color: var(--gray-400); }

/* ── MISSION CARD ── */
.mission-card { border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.mission-card.done { border-color: var(--green); background: #FAFFFC; }
.post-preview { background: var(--gray-50); border-radius: 8px; padding: 13px; margin-bottom: 12px; border-left: 3px solid var(--gray-200); }
.approved-msg { background: var(--gray-800); border-radius: 8px; padding: 13px; margin-bottom: 12px; }
.approved-msg .lbl { font-size: 10px; color: var(--gray-400); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.approved-msg .txt { font-size: 13px; color: #fff; line-height: 1.65; }
.ai-result { background: var(--purple-light); border-radius: 8px; padding: 13px; margin-bottom: 12px; border: 1px solid #E9D5FF; }
.ai-result .lbl { font-size: 10px; color: var(--purple); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }

/* ── LIVE BADGE ── */
.live { display: inline-flex; align-items: center; gap: 5px; background: var(--red-light); color: var(--red); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ── BAR CHART ── */
.bar-chart { display: flex; gap: 7px; align-items: flex-end; height: 80px; margin: 8px 0 3px; }
.bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--red); opacity: .7; cursor: pointer; transition: opacity .2s; }
.bar:hover { opacity: 1; }
.bar-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--gray-400); }

/* ── KV (key-value) ── */
.kv { background: var(--gray-50); border-radius: 8px; padding: 11px; }
.kv-l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); margin-bottom: 2px; }
.kv-v { font-size: 13px; font-weight: 500; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* ── AVATAR ── */
.av { width: 60px; height: 60px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; flex-shrink: 0; }

/* ── PROGRESS BAR ── */
.prog-bar { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 4px; transition: width .5s; }
.prog-fill.red { background: var(--red); }
.prog-fill.green { background: var(--green); }
.prog-fill.gold { background: var(--gold); }

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 40px; color: var(--gray-400); }
.empty-icon { font-size: 36px; margin-bottom: 10px; }

/* ── DISCIPLINARY STEPS ── */
.disc-step { border-left: 4px solid; padding: 14px; border-radius: 0 8px 8px 0; margin-bottom: 10px; }
.disc-1 { border-color: var(--gold); background: var(--gold-light); }
.disc-2 { border-color: var(--red); background: var(--red-light); }
.disc-3 { border-color: var(--purple); background: var(--purple-light); }
.disc-done { border-color: var(--green); background: var(--green-light); opacity: .7; }

/* ── AGENDA PSD ── */
.apsd-main { background: var(--gold-light); border-radius: 10px; padding: 16px; margin-bottom: 14px; border: 1px solid #F5D99A; }
.apsd-title { font-family: var(--font-display); font-size: 16px; font-weight: 400; margin-bottom: 7px; }
.apsd-meta { font-size: 11px; color: var(--gray-400); margin-bottom: 7px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.apsd-body { font-size: 13px; color: var(--gray-600); line-height: 1.7; margin-bottom: 12px; }
.gen-count { font-size: 11px; color: var(--gray-400); }

/* ── MAP PANEL ── */
#map-panel { position: fixed; top: 0; right: -380px; width: 360px; height: 100vh; background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.12); z-index: 500; transition: right .3s ease; overflow-y: auto; display: flex; flex-direction: column; }
#map-panel.open { right: 0; }
#map-panel-head { background: var(--red); padding: 18px 20px; color: #fff; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
#map-panel-head h3 { font-family: var(--font-display); font-size: 17px; font-weight: 400; color: #fff; margin: 0; }
#map-close { background: rgba(255,255,255,.2); border: none; color: #fff; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 14px; }
#map-panel-body { padding: 20px; flex: 1; }
#map-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.2); z-index: 499; }
#map-overlay.open { display: block; }
.mp-metric { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.mp-metric:last-child { border-bottom: none; }
.mp-metric .lbl { color: var(--gray-500); }
.mp-metric .val { font-weight: 700; }

/* ── SVG MAP ── */
.jud { fill: #F5F3F0; stroke: var(--gray-300); stroke-width: .6; cursor: pointer; transition: fill .2s, stroke .2s; }
.jud:hover { stroke: var(--red); stroke-width: 1.5; }
.jud.d0 { fill: #FAF8F6; }
.jud.d1 { fill: #FDE8E8; }
.jud.d2 { fill: #F9C4C4; }
.jud.d3 { fill: #F28A8A; }
.jud.d4 { fill: #E84040; }
.jud.d5 { fill: #8B0000; }

/* ── PUBLIC PAGES ── */
.public-wrap { max-width: 440px; margin: 44px auto; }
.public-logo { text-align: center; margin-bottom: 26px; }
.public-logo-box { width: 70px; height: 70px; background: var(--red); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; margin: 0 auto 16px; box-shadow: 0 4px 20px rgba(237,28,36,.3); }

/* ── TRANSFER STEPS ── */
.tsteps { display: flex; gap: 8px; margin-bottom: 18px; }
.tstep { flex: 1; text-align: center; padding: 10px; border-radius: 8px; background: var(--gray-50); border: 1px solid var(--gray-200); font-size: 11px; font-weight: 600; color: var(--gray-500); }
.tstep.active { background: var(--red-light); border-color: var(--red); color: var(--red); }
.tstep.done { background: var(--green-light); border-color: var(--green); color: var(--green); }

/* ── CHATBOT ── */
.chat-wrap { border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; }
.chat-msgs { padding: 16px; min-height: 180px; background: var(--gray-50); }
.chat-msg { margin-bottom: 12px; }
.cm-bubble { font-size: 13px; line-height: 1.65; max-width: 80%; padding: 11px 13px; border-radius: 10px; }
.chat-msg.bot .cm-bubble { background: #fff; border: 1px solid var(--gray-200); border-radius: 0 10px 10px 10px; }
.chat-msg.user .cm-bubble { background: var(--red); color: #fff; border-radius: 10px 0 10px 10px; margin-left: auto; }
.chat-input { display: flex; border-top: 1px solid var(--gray-200); }
.chat-input input { border: none; border-radius: 0; padding: 12px 14px; flex: 1; }
.chat-input input:focus { border: none; }
.chat-input button { background: var(--red); color: #fff; border: none; padding: 12px 18px; font-family: var(--font); font-weight: 600; font-size: 13px; cursor: pointer; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .role-switcher { display: none; }
}
@media (max-width: 640px) {
  .g2, .g3, .fr, .f3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  #main-content { padding: 14px; }
  .kit-grid { grid-template-columns: 1fr 1fr; }
  .nav-dropdown-menu { position: fixed; left: 0; right: 0; width: 100%; }
}
