/* ── IGNA Innovation System — app.css ── */
:root {
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --bg:        #0F172A;
  --surface:   #1E293B;
  --surface2:  #263548;
  --border:    rgba(255,255,255,.07);
  --accent:    #2563EB;
  --accent-h:  #1d4ed8;
  --accent2:   #38BDF8;
  --success:   #10B981;
  --danger:    #EF4444;
  --warning:   #F59E0B;
  --text:      #F1F5F9;
  --muted:     #94A3B8;
  --radius:    12px;
  --trans:     .2s ease;
}
[data-theme="light"] {
  --bg:      #F1F5F9;
  --surface: #FFFFFF;
  --surface2:#E2E8F0;
  --border:  rgba(0,0,0,.08);
  --text:    #0F172A;
  --muted:   #64748B;
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 1000;
  transition: transform var(--trans);
}
.sidebar-header {
  padding: 1.25rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-icon { font-size: 1.5rem; color: var(--accent); }
.brand-text { font-size: 1rem; font-weight: 800; letter-spacing: -0.3px; color: var(--text); }
.brand-text span { color: var(--muted); font-weight: 400; font-size: .8rem; display: block; line-height: 1; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem 0; }
.nav-section {
  font-size: .65rem; letter-spacing: 1.5px; font-weight: 700;
  color: var(--muted); padding: .9rem 1.1rem .3rem;
  text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem 1.1rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  margin: 1px .5rem;
  font-size: .88rem;
  transition: background var(--trans), color var(--trans);
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-item.active { background: rgba(37,99,235,.18); color: var(--accent2); font-weight: 600; }
.nav-item i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); }
.btn-submit-idea {
  display: flex; align-items: center; gap: .5rem; justify-content: center;
  background: var(--accent); color: #fff;
  padding: .55rem 1rem;
  border-radius: 10px; font-size: .88rem; font-weight: 600;
  text-decoration: none;
  transition: background var(--trans);
}
.btn-submit-idea:hover { background: var(--accent-h); color: #fff; }

/* ── Main wrapper ────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: 1rem;
  position: sticky; top: 0; z-index: 900;
}
.topbar-title { flex: 1; font-weight: 700; font-size: 1rem; }
.topbar-right { display: flex; align-items: center; gap: .5rem; }
.topbar-btn {
  background: none; border: none; color: var(--muted);
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  transition: background var(--trans), color var(--trans);
  position: relative;
}
.topbar-btn:hover { background: var(--surface2); color: var(--text); }
.user-btn { width: auto; padding: 0 .6rem; gap: .5rem; }
.avatar-mini {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.notif-dropdown {
  position: absolute; top: 48px; right: 0;
  width: 320px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  z-index: 9999;
}
.notif-header {
  padding: .75rem 1rem;
  font-weight: 700; font-size: .85rem;
  border-bottom: 1px solid var(--border);
}
.notif-item {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
}
.notif-item:last-child { border-bottom: none; }
.page-content { flex: 1; padding: 1.5rem; }
.flash-wrap { padding: 1rem 1.5rem 0; }

/* ── Cards ───────────────────────────────────────────────────── */
.card-dark {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  transition: transform var(--trans), border-color var(--trans);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-val { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .78rem; color: var(--muted); margin-top: .2rem; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-dark-custom { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table-dark-custom th {
  padding: .65rem 1rem; font-size: .7rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-dark-custom td {
  padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.table-dark-custom tbody tr:hover { background: rgba(255,255,255,.02); }
.table-dark-custom tbody tr:last-child td { border-bottom: none; }

/* ── Badges status ───────────────────────────────────────────── */
.badge-status {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem; border-radius: 99px; font-size: .72rem; font-weight: 600;
}
.badge-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success  { background: rgba(16,185,129,.15); color: #10B981; }
.badge-danger   { background: rgba(239,68,68,.15);  color: #EF4444; }
.badge-warning  { background: rgba(245,158,11,.15); color: #F59E0B; }
.badge-info     { background: rgba(56,189,248,.15); color: #38BDF8; }
.badge-primary  { background: rgba(37,99,235,.15);  color: #60A5FA; }
.badge-secondary{ background: rgba(148,163,184,.15);color: #94A3B8; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-dark .form-control, .form-dark .form-select {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
}
.form-dark .form-control:focus, .form-dark .form-select:focus {
  background: var(--surface2); border-color: var(--accent); color: var(--text);
  box-shadow: 0 0 0 3px rgba(37,99,235,.2);
}
.form-dark label { font-size: .82rem; color: var(--muted); margin-bottom: .3rem; }
.form-dark .form-control::placeholder { color: var(--muted); opacity: .6; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-accent {
  background: var(--accent); color: #fff; border: none;
  padding: .5rem 1.1rem; border-radius: 8px; font-weight: 600; font-size: .875rem;
  cursor: pointer; transition: background var(--trans);
  text-decoration: none; display: inline-flex; align-items: center; gap: .4rem;
}
.btn-accent:hover { background: var(--accent-h); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
  padding: .5rem 1rem; border-radius: 8px; font-size: .875rem;
  cursor: pointer; transition: all var(--trans);
  text-decoration: none; display: inline-flex; align-items: center; gap: .4rem;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }

/* ── Progress bar ────────────────────────────────────────────── */
.progress-bar-custom {
  height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden;
}
.progress-bar-custom .fill {
  height: 100%; border-radius: 99px; background: var(--accent);
  transition: width .5s ease;
}

/* ── Timeline ────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.56rem; top: .25rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.timeline-item .meta { font-size: .75rem; color: var(--muted); }
.timeline-item .body { font-size: .875rem; margin-top: .2rem; }

/* ── Public pages ────────────────────────────────────────────── */
.public-wrap { min-height: 100vh; display: flex; flex-direction: column; }
.public-nav {
  padding: 1rem 2rem; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.brand-public { font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.public-content { flex: 1; padding: 2rem 1rem; max-width: 800px; margin: 0 auto; width: 100%; }

/* ── Upload zone ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2rem; text-align: center; cursor: pointer;
  transition: border-color var(--trans), background var(--trans);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent); background: rgba(37,99,235,.04);
}
.upload-zone i { font-size: 2rem; color: var(--muted); }
.upload-zone p { color: var(--muted); font-size: .875rem; margin: .5rem 0 0; }

/* ── Pagination ──────────────────────────────────────────────── */
.pag { display: flex; gap: .3rem; flex-wrap: wrap; }
.pag a, .pag span {
  padding: .3rem .7rem; border-radius: 6px; font-size: .82rem;
  border: 1px solid var(--border); color: var(--muted); text-decoration: none;
}
.pag a:hover { border-color: var(--accent); color: var(--accent2); }
.pag .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Mobile ──────────────────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 999;
}
.btn-menu, .btn-toggle-sidebar {
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer; padding: .2rem .4rem;
}
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
}
