/* ─── CG Demo Shared Styles ─── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --navy: #0C1B33;
  --navy2: #111827;
  --blue: #1565C0;
  --sky: #1E90D6;
  --accent: #00D4FF;
  --white: #FFFFFF;
  --off: #F8FAFC;
  --gray: #64748B;
  --light: #1e2a3a;
  --border: rgba(255,255,255,0.07);
  --text: rgba(255,255,255,0.85);
  --muted: rgba(255,255,255,0.38);
  --card: #111827;
  --sidebar: #0d1520;
  --green: #22C55E;
  --red: #EF4444;
  --yellow: #EAB308;
  --purple: #A855F7;
  --orange: #F97316;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; background: #0a0f1a; color: var(--text); overflow-x: hidden; }

/* Demo announcement bar */
.demo-bar {
  background: linear-gradient(90deg, var(--navy), #0d1a2e, var(--navy));
  border-bottom: 1px solid rgba(0,212,255,0.15);
  padding: 9px 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted);
  position: sticky; top: 0; z-index: 200;
}
.demo-bar-badge {
  background: rgba(0,212,255,0.12); border: 1px solid rgba(0,212,255,0.25);
  color: var(--accent); padding: 3px 10px; border-radius: 100px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; white-space: nowrap;
}
.demo-bar a {
  color: var(--accent); text-decoration: none; font-weight: 700;
  border-bottom: 1px solid rgba(0,212,255,0.3); padding-bottom: 1px;
  transition: opacity 0.2s;
}
.demo-bar a:hover { opacity: 0.75; }
.demo-bar-sep { color: rgba(255,255,255,0.1); }

/* App shell */
.app-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky; top: 37px; z-index: 100;
}
.app-nav-inner {
  max-width: 1400px; margin: 0 auto;
  height: 58px; display: flex; align-items: center; justify-content: space-between;
}
.app-brand { display: flex; align-items: center; gap: 10px; }
.app-brand-mark {
  height: 32px; width: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--sky), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fff; letter-spacing: -0.5px;
  flex-shrink: 0;
}
.app-brand-name { font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.app-brand-sub { font-size: 9px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 1px; }
.app-nav-links { display: flex; gap: 4px; }
.app-nav-link {
  padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  color: var(--muted); text-decoration: none; letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s; white-space: nowrap;
}
.app-nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.app-nav-link.active { color: #fff; background: rgba(30,144,214,0.15); }
.app-nav-actions { display: flex; gap: 8px; align-items: center; }
.btn-sm {
  padding: 7px 16px; border-radius: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: 'Montserrat', sans-serif; letter-spacing: 0.02em;
  border: none; white-space: nowrap;
}
.btn-sm-ghost { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.7); }
.btn-sm-primary { background: linear-gradient(135deg, var(--sky), var(--accent)); color: #fff; }
.btn-sm-primary:hover { opacity: 0.9; }

/* Sidebar */
.app-sidebar {
  position: fixed; top: 95px; left: 0; bottom: 0;
  width: 210px; background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 14px 10px; overflow-y: auto; z-index: 90;
}
.sidebar-group-label {
  font-size: 9px; font-weight: 700; color: rgba(255,255,255,0.2);
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 10px 10px 5px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  cursor: pointer; margin-bottom: 1px;
  text-decoration: none; letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
}
.sidebar-item:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); }
.sidebar-item.active { background: rgba(30,144,214,0.12); color: var(--sky); }
.sidebar-item svg { width: 14px; height: 14px; opacity: 0.6; flex-shrink: 0; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-badge {
  margin-left: auto; background: rgba(239,68,68,0.2); color: #EF4444;
  font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 100px;
}
.sidebar-badge-blue {
  margin-left: auto; background: rgba(30,144,214,0.15); color: var(--sky);
  font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 100px;
}

/* Main content area */
.app-main { margin-left: 210px; padding: 24px 28px; min-height: calc(100vh - 95px); }

/* Page header */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.page-sub { font-size: 13px; color: var(--muted); margin-top: 3px; font-weight: 400; }

/* Stat cards */
.stats-grid { display: grid; gap: 14px; margin-bottom: 24px; }
.stats-4 { grid-template-columns: repeat(4,1fr); }
.stats-3 { grid-template-columns: repeat(3,1fr); }
.stats-5 { grid-template-columns: repeat(5,1fr); }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
}
.stat-val { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 3px; font-weight: 600; }
.stat-trend { font-size: 11px; margin-top: 10px; font-weight: 600; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-neutral { color: var(--muted); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.card-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.card-title { font-size: 13px; font-weight: 700; color: #fff; }
.card-body { padding: 18px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 600px; }
thead th {
  text-align: left; padding: 10px 16px;
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  background: rgba(255,255,255,0.02); white-space: nowrap;
}
tbody td { padding: 11px 16px; border-top: 1px solid var(--border); color: rgba(255,255,255,0.75); vertical-align: middle; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* Badges */
.badge { padding: 3px 9px; border-radius: 100px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.badge-green { background: rgba(34,197,94,0.12); color: #22C55E; }
.badge-yellow { background: rgba(234,179,8,0.12); color: #EAB308; }
.badge-red { background: rgba(239,68,68,0.12); color: #EF4444; }
.badge-blue { background: rgba(30,144,214,0.12); color: #1E90D6; }
.badge-purple { background: rgba(168,85,247,0.12); color: #A855F7; }
.badge-orange { background: rgba(249,115,22,0.12); color: #F97316; }
.badge-gray { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.45); }

/* Kanban */
.kanban-board { display: grid; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; min-height: 300px;
}
.kanban-col-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.kanban-col-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.kanban-col-count {
  width: 20px; height: 20px; background: rgba(255,255,255,0.07);
  border-radius: 50%; font-size: 10px; font-weight: 700; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.job-card {
  background: #0a0f1a; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; margin-bottom: 8px; cursor: pointer; border-left: 3px solid;
  transition: transform 0.15s, border-right-color 0.15s;
}
.job-card:hover { transform: translateY(-2px); }
.job-card-title { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 3px; line-height: 1.3; }
.job-card-sub { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.job-card-foot { display: flex; justify-content: space-between; align-items: center; }
.job-card-amount { font-size: 12px; font-weight: 700; color: var(--green); }

/* Progress bar */
.progress-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }

/* Form elements */
.input {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 10px 14px; font-size: 13px;
  color: #fff; font-family: 'Montserrat', sans-serif; outline: none;
}
.input:focus { border-color: var(--sky); }
.label { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 5px; display: block; letter-spacing: 0.04em; text-transform: uppercase; }

/* Avatar */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(21,101,192,0.2), rgba(0,212,255,0.08));
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 14px; padding: 24px 28px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-top: 24px;
}
.cta-banner-title { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.cta-banner-sub { font-size: 13px; color: var(--muted); }
.cta-banner-btn {
  background: linear-gradient(135deg, var(--sky), var(--accent));
  color: #fff; border: none; padding: 12px 24px; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: 'Montserrat', sans-serif; text-decoration: none;
  white-space: nowrap; letter-spacing: 0.02em;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Responsive */
@media (max-width: 900px) {
  .app-sidebar { display: none; }
  .app-main { margin-left: 0; padding: 16px; }
  .stats-4, .stats-5 { grid-template-columns: repeat(2,1fr); }
  .stats-3 { grid-template-columns: 1fr; }
  .app-nav-links { display: none; }
}
