/* NAVIRION Design System v1
   Brand: magenta #e6007e · Font: Manrope · Sidebar layout
   nv-* prefix, layered over Tailwind CDN */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --nv-primary:        #e6007e;
  --nv-primary-hover:  #cf0071;
  --nv-primary-soft:   #fff0f7;
  --nv-primary-text:   #c0005f;
  --nv-sidebar-w:      248px;
  --nv-sidebar-col-w:  72px;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Manrope', 'Montserrat', ui-sans-serif, system-ui, sans-serif; }

/* ── Shell ────────────────────────────────────────────────── */
.nv-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────────────────── */
.nv-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--nv-sidebar-w); z-index: 40;
  background: #111827;
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: width 220ms cubic-bezier(.4,0,.2,1);
}
html.nv-collapsed .nv-sidebar { width: var(--nv-sidebar-col-w); }

/* Logo */
.nv-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px; text-decoration: none; flex-shrink: 0;
}
.nv-logo__mark {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: var(--nv-primary); color: #fff;
  font-size: 15px; font-weight: 800; letter-spacing: -0.5px;
  display: flex; align-items: center; justify-content: center;
}
.nv-logo__text {
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0.08em;
  white-space: nowrap;
  transition: opacity 180ms;
}
html.nv-collapsed .nv-logo__text { opacity: 0; }

/* Nav */
.nv-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 4px 8px 8px; list-style: none; margin: 0;
}
.nv-nav__group {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #4b5563; padding: 14px 10px 4px; white-space: nowrap;
  transition: opacity 180ms;
}
html.nv-collapsed .nv-nav__group { opacity: 0; height: 0; padding: 6px 0; overflow: hidden; }

.nv-nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; margin-bottom: 2px;
  color: #9ca3af; text-decoration: none;
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden;
  transition: background 150ms, color 150ms;
}
.nv-nav__item:hover { background: rgba(255,255,255,0.07); color: #e5e7eb; }
.nv-nav__item[aria-current="page"] { background: rgba(230,0,126,0.18); color: var(--nv-primary); }

.nv-nav__icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; line-height: 1; }
.nv-nav__label { transition: opacity 180ms; }
html.nv-collapsed .nv-nav__label { opacity: 0; }
html.nv-collapsed .nv-nav__item { padding: 10px; justify-content: center; }

/* Toggle button */
.nv-toggle {
  display: flex; align-items: center; justify-content: center;
  margin: 8px auto; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none; cursor: pointer;
  color: #6b7280; font-size: 11px;
  transition: background 150ms, color 150ms, transform 220ms cubic-bezier(.4,0,.2,1);
}
.nv-toggle:hover { background: rgba(255,255,255,0.15); color: #d1d5db; }
html.nv-collapsed .nv-toggle { transform: rotate(180deg); }

/* Sidebar footer */
.nv-sidebar-foot {
  padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 10px; flex-shrink: 0; overflow: hidden;
}
.nv-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--nv-primary); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.nv-sidebar-foot__info {
  flex: 1; min-width: 0;
  transition: opacity 180ms;
}
html.nv-collapsed .nv-sidebar-foot__info { opacity: 0; width: 0; overflow: hidden; }
.nv-sidebar-foot__name { color: #d1d5db; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-sidebar-foot__btn { background: none; border: none; cursor: pointer; color: #6b7280; font-size: 12px; padding: 0; transition: color 150ms; }
.nv-sidebar-foot__btn:hover { color: #e5e7eb; }
html.nv-collapsed .nv-sidebar-foot__btn { display: none; }

/* ── Main area ────────────────────────────────────────────── */
.nv-main {
  margin-left: var(--nv-sidebar-w); flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  transition: margin-left 220ms cubic-bezier(.4,0,.2,1);
}
html.nv-collapsed .nv-main { margin-left: var(--nv-sidebar-col-w); }
.nv-content { flex: 1; padding: 24px; }

/* ── Buttons ──────────────────────────────────────────────── */
.nv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  border-radius: 9px; padding: 8px 16px; line-height: 1.4;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background 140ms, border-color 140ms, color 140ms;
}
.nv-btn--primary { background: var(--nv-primary); color: #fff; border-color: var(--nv-primary); }
.nv-btn--primary:hover { background: var(--nv-primary-hover); border-color: var(--nv-primary-hover); }
.nv-btn--ghost { background: transparent; color: #374151; border-color: #d1d5db; }
.nv-btn--ghost:hover { background: #f9fafb; }
.nv-btn--sm { font-size: 12px; padding: 5px 12px; }
.nv-btn--warn { background: #d97706; color: #fff; border-color: #d97706; }
.nv-btn--warn:hover { background: #b45309; }
.nv-btn--danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.nv-btn--danger:hover { background: #dc2626; }

/* ── Badges ───────────────────────────────────────────────── */
.nv-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; line-height: 1.4;
}
.nv-badge--green  { background: #dcfce7; color: #15803d; }
.nv-badge--blue   { background: #dbeafe; color: #1d4ed8; }
.nv-badge--gray   { background: #f3f4f6; color: #6b7280; }
.nv-badge--amber  { background: #fef9c3; color: #a16207; }
.nv-badge--pink   { background: var(--nv-primary-soft); color: var(--nv-primary-text); }
.nv-badge--orange { background: #fff7ed; color: #c2410c; }

/* ── Cards ────────────────────────────────────────────────── */
.nv-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.nv-card__head { padding: 14px 20px; border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; justify-content: space-between; }
.nv-card__body { padding: 20px; }

/* ── Alert ────────────────────────────────────────────────── */
.nv-alert { border-radius: 9px; padding: 10px 14px; font-size: 13px; }
.nv-alert--warn   { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.nv-alert--info   { background: var(--nv-primary-soft); border: 1px solid #fbcfe8; color: var(--nv-primary-text); }
.nv-alert--danger { background: #fff1f2; border: 1px solid #fecdd3; color: #be123c; }

/* ── Form ─────────────────────────────────────────────────── */
.nv-label { display: block; font-size: 11px; font-weight: 600; color: #6b7280; margin-bottom: 4px; letter-spacing: 0.03em; }
.nv-input {
  display: block; width: 100%; font-family: inherit; font-size: 14px;
  border: 1.5px solid #d1d5db; border-radius: 8px; padding: 8px 12px;
  background: #fff; color: #111827; outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.nv-input:focus { border-color: var(--nv-primary); box-shadow: 0 0 0 3px rgba(230,0,126,0.12); }

/* ── Breadcrumb ───────────────────────────────────────────── */
.nv-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9ca3af; margin-bottom: 20px; }
.nv-breadcrumb a { color: #9ca3af; text-decoration: none; }
.nv-breadcrumb a:hover { color: #374151; }
.nv-breadcrumb__sep { color: #d1d5db; }
.nv-breadcrumb__current { color: #374151; font-weight: 500; }

/* ── Tailwind indigo → magenta override ───────────────────── */
/* Applied after Tailwind so specificity wins */
.bg-indigo-50  { background-color: #fff0f7 !important; }
.bg-indigo-100 { background-color: #fce7f3 !important; }
.bg-indigo-600 { background-color: var(--nv-primary) !important; }
.bg-indigo-700 { background-color: var(--nv-primary-hover) !important; }
.hover\:bg-indigo-50:hover  { background-color: #fff0f7 !important; }
.hover\:bg-indigo-100:hover { background-color: #fce7f3 !important; }
.hover\:bg-indigo-600:hover { background-color: var(--nv-primary) !important; }
.hover\:bg-indigo-700:hover { background-color: var(--nv-primary-hover) !important; }
.text-indigo-400 { color: #f9a8d4 !important; }
.text-indigo-500 { color: var(--nv-primary) !important; }
.text-indigo-600 { color: var(--nv-primary) !important; }
.text-indigo-700 { color: var(--nv-primary-hover) !important; }
.text-indigo-800 { color: #a0005a !important; }
.hover\:text-indigo-600:hover { color: var(--nv-primary) !important; }
.hover\:text-indigo-700:hover { color: var(--nv-primary-hover) !important; }
.hover\:text-indigo-800:hover { color: #a0005a !important; }
.border-indigo-200 { border-color: #fbcfe8 !important; }
.border-indigo-300 { border-color: #f9a8d4 !important; }
.hover\:border-indigo-300:hover { border-color: #f9a8d4 !important; }
.focus\:ring-indigo-400:focus { --tw-ring-color: rgba(230,0,126,0.4) !important; }
.focus\:ring-indigo-500:focus { --tw-ring-color: rgba(230,0,126,0.5) !important; }
.focus\:border-indigo-500:focus { border-color: var(--nv-primary) !important; }
.border-t-indigo-500 { border-top-color: var(--nv-primary) !important; }
/* spinner accent */
.border-t-indigo-500 { border-top-color: var(--nv-primary) !important; }

/* ── Mobile tab bar ───────────────────────────────────────── */
@media (max-width: 767px) {
  .nv-sidebar { display: none; }
  .nv-main { margin-left: 0 !important; }
  .nv-content { padding: 16px 12px 72px; }
  .nv-tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: #111827; border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 50; padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .nv-tabbar__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: #9ca3af; font-size: 10px; font-weight: 500;
    padding: 8px 0;
  }
  .nv-tabbar__item[aria-current="page"] { color: var(--nv-primary); }
  .nv-tabbar__icon { font-size: 20px; line-height: 1; }
}
@media (min-width: 768px) {
  .nv-tabbar { display: none; }
}
