:root {
  --white: #ffffff;
  --blue: #0066ff;
  --cyan: #00d4ff;
  --purple: #7c3aed;
  --teal: #14b8a6;
  --green: #22c55e;
  --yellow: #eab308;
  --orange: #f97316;
  --gray: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--white); color: #0f172a; }
#app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--white); border-right: 1px solid var(--border); padding: 20px 12px; display: flex; flex-direction: column; }
.logo-area { text-align: center; margin-bottom: 24px; }
.logo { max-width: 160px; height: auto; }
.app-name { font-size: 13px; font-weight: 600; color: var(--blue); margin-top: 4px; }
nav button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: none; background: transparent; border-radius: 8px; cursor: pointer; font-size: 14px; color: #334155; margin-bottom: 2px; }
nav button:hover, nav button.active { background: #f1f5f9; color: var(--blue); font-weight: 600; }
.sidebar-footer { margin-top: auto; font-size: 11px; color: var(--orange); text-align: center; padding: 8px; }
.main { flex: 1; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--white); }
.search-wrap { flex: 1; }
.search-wrap input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.top-actions { display: flex; gap: 12px; align-items: center; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.demo { background: #fff7ed; color: var(--orange); }
.btn { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--white); cursor: pointer; font-size: 14px; }
.btn.primary { background: var(--blue); color: white; border: none; }
.btn.cyan { background: var(--cyan); color: #0f172a; border: none; }
.btn.danger { background: #fee2e2; color: #b91c1c; }
.content { padding: 24px; flex: 1; overflow: auto; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 14px; color: var(--gray); font-weight: 500; }
.card .metric { font-size: 28px; font-weight: 700; color: var(--blue); }
.card .sub { font-size: 12px; color: var(--gray); margin-top: 4px; }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.status.active { background: #dcfce7; color: #166534; }
.status.at-risk { background: #fef9c3; color: #854d0e; }
.status.quiet { background: #ffedd5; color: #9a3412; }
.status.compliant { background: #dcfce7; color: #166534; }
.status.warning { background: #fef9c3; color: #854d0e; }
.status.blocked { background: #fee2e2; color: #b91c1c; }
.status.not-verified { background: #f1f5f9; color: #475569; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--gray); font-weight: 500; }
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { min-width: 220px; background: #f8fafc; border-radius: 8px; padding: 8px; }
.kanban-col h4 { margin: 0 0 8px; font-size: 13px; }
.kanban-card { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: pointer; font-size: 13px; }
.kanban-card:hover { border-color: var(--blue); }
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.chat-toggle { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 50%; background: var(--purple); color: white; border: none; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(124,58,237,.3); z-index: 100; }
.chat-panel { position: fixed; bottom: 90px; right: 24px; width: 380px; height: 520px; background: white; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,.12); display: flex; flex-direction: column; z-index: 99; }
.chat-panel.hidden { display: none; }
.chat-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; justify-content: space-between; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; font-size: 13px; }
.chat-msg { margin-bottom: 10px; padding: 8px 12px; border-radius: 8px; max-width: 90%; }
.chat-msg.user { background: #eff6ff; margin-left: auto; }
.chat-msg.ai { background: #f8fafc; }
.chat-input { display: flex; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; border: none; padding: 12px; font-size: 14px; }
.chat-input button { background: var(--blue); color: white; border: none; padding: 0 16px; cursor: pointer; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal.hidden { display: none; }
.modal-content { background: white; border-radius: 16px; padding: 24px; max-width: 600px; width: 90%; max-height: 80vh; overflow: auto; position: relative; }
.modal-close { position: absolute; top: 12px; right: 16px; cursor: pointer; font-size: 20px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--gray); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; }
.warning { background: #fef9c3; border: 1px solid #fde047; padding: 8px 12px; border-radius: 8px; font-size: 13px; margin: 8px 0; }
.map-placeholder { height: 280px; background: #f1f5f9; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--gray); }
@media (max-width: 900px) { .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; } .sidebar { width: 64px; } .app-name, nav button span { display: none; } }
