/* ═══════════════════════════════════════════════════════════════
   MVP Valley — Design System v3
   Bricolage Grotesque + Montserrat
   Yellow #FFE65E · Blue #3B4AD7 · Black #00090A · White #FFFFFF
═══════════════════════════════════════════════════════════════ */

:root {
  --y:         #FFE65E;
  --yd:        #F0D500;
  --yl:        #FFFBDA;
  --b:         #3B4AD7;
  --bd:        #2D3AB8;
  --bl:        #EEF0FF;
  --bk:        #00090A;
  --wh:        #FFFFFF;
  --bg:        #F5F5F2;
  --bg2:       #ECECEA;
  --card:      #FFFFFF;
  --border:    #E2E2DC;
  --border2:   #D0D0C8;
  --text:      #00090A;
  --text2:     #4A4A45;
  --text3:     #9A9A8E;
  --sidebar-w: 248px;
  --topbar-h:  60px;
  --r:         10px;
  --r-sm:      7px;
  --r-lg:      14px;
  --shadow:    0 1px 3px rgba(0,9,10,.05), 0 4px 12px rgba(0,9,10,.04);
  --shadow-md: 0 2px 8px rgba(0,9,10,.08), 0 8px 24px rgba(0,9,10,.08);
  --font-h:    'Bricolage Grotesque', sans-serif;
  --font:      'Montserrat', sans-serif;
  --mono:      'DM Mono', 'Courier New', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--b); text-decoration: none; }
a:hover { color: var(--bd); }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════ */
.mv-sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: #0C0C10;
  display: flex; flex-direction: column;
  z-index: 1000;
  transition: transform .25s ease;
  border-right: 1px solid rgba(255,255,255,.06);
}
.mv-main {
  margin-left: var(--sidebar-w);
  height: 100vh; display: flex; flex-direction: column;
  transition: margin-left .25s ease;
}
.mv-content { flex: 1; overflow-y: auto; padding: 28px; }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR — BRAND
═══════════════════════════════════════════════════════════════ */
.mv-sidebar-brand {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.mv-sidebar-brand a {
  display: block; line-height: 0; text-decoration: none;
}
.mv-sidebar-brand img {
  height: 26px; width: auto; display: block;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR — NAV
═══════════════════════════════════════════════════════════════ */
.mv-sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 1px;
}
.mv-sidebar-nav::-webkit-scrollbar { width: 2px; }
.mv-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 4px; }

/* SECTION LABELS — the key fix */
.mv-nav-section {
  font-family: var(--font);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 16px 8px 5px;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.mv-nav-section:first-child { padding-top: 4px; }

/* NAV ITEMS */
.mv-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.42);
  font-size: .82rem;
  font-weight: 500;
  transition: background .12s, color .12s;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.mv-nav-item i {
  font-size: .88rem;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}
.mv-nav-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.mv-nav-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.85);
}
.mv-nav-item:hover i { opacity: 1; }

.mv-nav-item.active {
  background: var(--y);
  color: var(--bk);
  font-weight: 700;
}
.mv-nav-item.active i { opacity: 1; color: var(--bk); }
.mv-nav-item.active:hover { background: var(--yd); color: var(--bk); }

/* Divider */
.mv-nav-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 8px 4px;
  flex-shrink: 0;
}

/* Admin link */
.mv-nav-item.mv-admin-link { color: rgba(255,230,94,.38); }
.mv-nav-item.mv-admin-link:hover { background: rgba(255,230,94,.06); color: rgba(255,230,94,.8); }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR — USER FOOTER
═══════════════════════════════════════════════════════════════ */
.mv-sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0;
}
.mv-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--y);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-size: .78rem; font-weight: 800;
  color: var(--bk); flex-shrink: 0;
}
.mv-user-info { flex: 1; min-width: 0; }
.mv-user-name {
  font-size: .77rem; font-weight: 600; color: rgba(255,255,255,.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
}
.mv-user-role { font-size: .66rem; color: rgba(255,255,255,.28); line-height: 1.3; }
.mv-logout-btn {
  color: rgba(255,255,255,.22); font-size: .92rem;
  padding: 5px; border-radius: 6px; flex-shrink: 0; transition: all .15s;
}
.mv-logout-btn:hover { color: #FF6B6B; background: rgba(255,107,107,.1); }

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════════════════════ */
.mv-topbar {
  height: var(--topbar-h);
  background: var(--wh);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 14px; flex-shrink: 0;
}
.mv-toggle-btn {
  background: none; border: none; color: var(--text3);
  font-size: 1.2rem; cursor: pointer; padding: 5px 6px; display: none;
  border-radius: var(--r-sm); transition: background .12s;
}
.mv-toggle-btn:hover { background: var(--bg); }
.mv-page-title {
  font-family: var(--font-h);
  font-size: .95rem; font-weight: 700; color: var(--text);
  margin: 0; flex: 1; letter-spacing: -.02em;
}
.mv-topbar-right { display: flex; align-items: center; gap: 10px; }
.mv-topbar-time {
  font-family: var(--mono); font-size: .68rem; color: var(--text3);
  background: var(--bg); padding: 3px 10px;
  border-radius: 20px; border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════ */
.mv-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px; box-shadow: var(--shadow);
}
.mv-card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.mv-card-title {
  font-family: var(--font-h); font-size: .88rem; font-weight: 700;
  color: var(--text); letter-spacing: -.02em;
}

/* ═══════════════════════════════════════════════════════════════
   STATS
═══════════════════════════════════════════════════════════════ */
.mv-stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.mv-stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.mv-stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--stat-color, var(--y));
}
.mv-stat-label {
  font-size: .67rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text3); margin-bottom: 10px;
}
.mv-stat-value {
  font-family: var(--font-h); font-size: 2.2rem; font-weight: 800;
  line-height: 1; color: var(--text); margin-bottom: 4px; letter-spacing: -.04em;
}
.mv-stat-sub { font-size: .72rem; color: var(--text3); }
.mv-stat-icon { position: absolute; top: 18px; right: 18px; font-size: 1.6rem; opacity: .07; }

/* ═══════════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════════ */
.mv-type-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: .69rem; font-weight: 600;
}
.type-general    { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }
.type-bug        { background: #FFF1F2; color: #E11D48; border: 1px solid #FECDD3; }
.type-feature    { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.type-nps        { background: var(--yl); color: #92400E; border: 1px solid #FDE68A; }
.type-idea       { background: #FAF5FF; color: #7C3AED; border: 1px solid #DDD6FE; }
.type-compliment { background: #F0FDFA; color: #0F766E; border: 1px solid #99F6E4; }
.type-other      { background: var(--bg); color: var(--text3); border: 1px solid var(--border); }

.mv-status-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .69rem; font-weight: 600;
}
.status-new         { background: var(--bl); color: var(--b); border: 1px solid #C7CBF5; }
.status-reviewed    { background: #FFF7ED; color: #C2410C; border: 1px solid #FED7AA; }
.status-in_progress { background: var(--yl); color: #92400E; border: 1px solid #FDE68A; }
.status-resolved    { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.status-dismissed   { background: var(--bg); color: var(--text3); border: 1px solid var(--border); }

.mv-priority-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.priority-low      { color: var(--text3); }
.priority-medium   { color: #B45309; }
.priority-high     { color: #DC2626; }
.priority-critical { color: #DC2626; background: #FFF1F2; border: 1px solid #FECDD3; }

/* ═══════════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════════ */
.mv-table { width: 100%; border-collapse: collapse; }
.mv-table thead th {
  font-size: .65rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text3);
  padding: 10px 16px; border-bottom: 2px solid var(--border);
  background: var(--bg); white-space: nowrap;
}
.mv-table tbody td {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  color: var(--text2); vertical-align: middle;
}
.mv-table tbody tr { transition: background .1s; }
.mv-table tbody tr:hover td { background: var(--bg); }
.mv-table tbody tr:last-child td { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.mv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: .81rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .15s; font-family: var(--font); white-space: nowrap;
}
.mv-btn-primary {
  background: var(--y); color: var(--bk);
  box-shadow: 0 2px 8px rgba(255,230,94,.3);
}
.mv-btn-primary:hover { background: var(--yd); color: var(--bk); transform: translateY(-1px); }
.mv-btn-blue   { background: var(--b); color: #fff; }
.mv-btn-blue:hover { background: var(--bd); color: #fff; }
.mv-btn-ghost  { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.mv-btn-ghost:hover { background: var(--bg); color: var(--text); border-color: var(--border2); }
.mv-btn-danger { background: #FFF1F2; color: #E11D48; border: 1px solid #FECDD3; }
.mv-btn-danger:hover { background: #FFE4E6; }
.mv-btn-sm { padding: 5px 12px; font-size: .75rem; }

/* ═══════════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════════ */
.mv-form-group { margin-bottom: 16px; }
.mv-form-label {
  display: block; font-size: .75rem; font-weight: 600;
  color: var(--text2); margin-bottom: 6px; letter-spacing: .02em;
}
.mv-form-control {
  width: 100%; background: var(--wh); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 12px; font-size: .875rem; font-family: var(--font);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.mv-form-control:focus { border-color: var(--b); box-shadow: 0 0 0 3px rgba(59,74,215,.1); }
.mv-form-control::placeholder { color: var(--text3); }
select.mv-form-control { cursor: pointer; }
textarea.mv-form-control { resize: vertical; min-height: 100px; }

/* ═══════════════════════════════════════════════════════════════
   APP CARDS
═══════════════════════════════════════════════════════════════ */
.mv-app-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 20px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  cursor: pointer; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.mv-app-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--app-color, var(--y));
}
.mv-app-card:hover { border-color: var(--app-color, var(--y)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.mv-app-icon {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 12px; overflow: hidden;
}
.mv-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.mv-app-name { font-family: var(--font-h); font-size: .92rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.mv-app-domain { font-size: .71rem; color: var(--text3); font-family: var(--mono); }
.mv-app-stats {
  display: flex; gap: 16px; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.mv-app-stat-val { font-family: var(--font-h); font-size: 1.1rem; font-weight: 700; color: var(--text); line-height: 1; }
.mv-app-stat-lbl { font-size: .65rem; color: var(--text3); margin-top: 2px; text-transform: uppercase; letter-spacing: .05em; }
.mv-app-key {
  font-family: var(--mono); font-size: .66rem; color: var(--text3);
  background: var(--bg); padding: 3px 8px; border-radius: 4px;
  border: 1px solid var(--border); margin-top: 8px; display: inline-block;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   ICON PICKER
═══════════════════════════════════════════════════════════════ */
.mv-icon-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px;
}
.mv-icon-option {
  width: 100%; aspect-ratio: 1;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer; background: var(--bg);
  transition: all .12s;
}
.mv-icon-option:hover { border-color: var(--b); background: var(--bl); transform: scale(1.08); }
.mv-icon-option.selected { border-color: var(--y); background: var(--yl); box-shadow: 0 0 0 2px var(--y); }

/* App logo upload preview */
.mv-logo-upload {
  width: 64px; height: 64px; border-radius: var(--r-sm);
  border: 2px dashed var(--border2); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; transition: border-color .15s;
  flex-shrink: 0;
}
.mv-logo-upload:hover { border-color: var(--b); }
.mv-logo-upload img { width: 100%; height: 100%; object-fit: cover; }

/* ═══════════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════════ */
.mv-modal .modal-content {
  background: var(--wh); border: 1px solid var(--border);
  border-radius: var(--r-lg); color: var(--text);
  box-shadow: 0 24px 64px rgba(0,9,10,.12);
}
.mv-modal .modal-header { border-bottom: 1px solid var(--border); padding: 18px 22px; }
.mv-modal .modal-title { font-family: var(--font-h); font-size: .92rem; font-weight: 700; }
.mv-modal .modal-body    { padding: 22px; }
.mv-modal .modal-footer  { border-top: 1px solid var(--border); padding: 14px 22px; }

/* ═══════════════════════════════════════════════════════════════
   MISC
═══════════════════════════════════════════════════════════════ */
.mv-feedback-msg {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 18px;
  color: var(--text); font-size: .9rem; line-height: 1.8; white-space: pre-wrap;
}
.mv-meta-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: .77rem; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.mv-meta-row:last-child { border-bottom: none; }
.mv-meta-label { color: var(--text3); font-weight: 600; min-width: 90px; }
.mv-meta-val { font-family: var(--mono); font-size: .72rem; color: var(--text2); }

.mv-empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.mv-empty-icon  { font-size: 2.5rem; margin-bottom: 12px; opacity: .22; }
.mv-empty-title { font-family: var(--font-h); font-size: .92rem; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.mv-empty-sub   { font-size: .81rem; line-height: 1.6; }

.mv-alert {
  padding: 12px 16px; border-radius: var(--r-sm);
  font-size: .82rem; margin-bottom: 16px; border: 1px solid;
  display: flex; align-items: flex-start; gap: 8px;
}
.mv-alert-success { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }
.mv-alert-error   { background: #FFF1F2; color: #BE123C; border-color: #FECDD3; }
.mv-alert-info    { background: var(--bl); color: var(--bd); border-color: #C7CBF5; }
.mv-alert-warn    { background: var(--yl); color: #92400E; border-color: #FDE68A; }

.mv-snippet {
  background: var(--bk); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-sm); padding: 14px 16px;
  font-family: var(--mono); font-size: .76rem; color: #a8c5ff;
  position: relative; overflow-x: auto; white-space: pre;
}
.mv-snippet-copy {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.5); border-radius: 4px;
  padding: 2px 8px; font-size: .68rem; cursor: pointer; font-family: var(--font);
}
.mv-snippet-copy:hover { background: rgba(255,255,255,.18); color: #fff; }

.mv-roadmap-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 14px;
  margin-bottom: 8px; transition: box-shadow .15s;
}
.mv-roadmap-card:hover { box-shadow: var(--shadow); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .mv-sidebar { transform: translateX(-100%); box-shadow: none; }
  .mv-sidebar.open { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,9,10,.35); }
  .mv-main { margin-left: 0; }
  .mv-toggle-btn { display: flex; }
  .mv-content { padding: 16px; }
}
