/* Domin8 Agency OS — Styles */

:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a2a;
  --text: #e8e8f0;
  --text2: #9090a0;
  --accent: #7c3aed;
  --accent2: #a855f7;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --border: #2a2a3a;
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

#app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.logo-icon {
  font-size: 28px;
  color: var(--accent2);
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text2);
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .15s;
}

.nav-btn:hover {
  background: var(--bg3);
  color: var(--text);
}

.nav-btn.active {
  background: var(--accent);
  color: white;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 0;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.topbar h1 {
  font-size: 22px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg3);
  color: var(--text2);
}

.badge.green { background: rgba(34,197,94,.15); color: var(--green); }
.badge.yellow { background: rgba(234,179,8,.15); color: var(--yellow); }
.badge.red { background: rgba(239,68,68,.15); color: var(--red); }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
}

/* Views */
.view {
  display: none;
  padding: 30px;
}

.view.active { display: block; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent2);
}

.stat-label {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.help-text {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 16px;
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.btn-primary:hover {
  background: var(--accent2);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.action-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: all .15s;
}

.action-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.action-btn span {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}

/* Chat */
.chat-box {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.chat-message {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  max-width: 80%;
  font-size: 14px;
}

.chat-message.user {
  background: var(--accent);
  color: white;
  margin-left: auto;
}

.chat-message.assistant {
  background: var(--bg3);
  color: var(--text);
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
}

.chat-input-row button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: pointer;
}

/* Pipeline */
.pipeline-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.pipeline-col {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.pipeline-col h3 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.pipeline-item {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}

.pipeline-item:hover {
  border-color: var(--accent);
}

/* Integration list */
.integration-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.integration-item:last-child {
  border-bottom: none;
}

/* Score bars */
.score-bar-container {
  margin: 8px 0;
}

.score-bar-bg {
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .5s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .view { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
