:root {
  --bg: #0b1020;
  --panel: #1a2648;
  --panel-2: #101935;
  --panel-3: #22315c;
  --text: #f3f7ff;
  --muted: #c1ceed;
  --accent: #8fc0ff;
  --accent-2: #8ef5d5;
  --danger: #ff7b8b;
  --border: #4a6399;
  --shadow: 0 12px 34px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #0b1228 0%, #101935 45%, #0a1226 100%);
  color: var(--text);
}
button, input, select, textarea {
  font: inherit;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.card {
  background: linear-gradient(180deg, rgba(30, 43, 80, 0.98) 0%, rgba(20, 30, 58, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
}
.login-card h1 { margin-top: 0; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; }
.col { display: grid; gap: 10px; }
label { font-size: 14px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  background: #101936;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { min-height: 100px; resize: vertical; }
button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
button.primary { background: var(--accent); color: #06101f; font-weight: 700; }
button.secondary { background: #223055; color: var(--text); border: 1px solid var(--border); }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.title-block h1 { margin: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #1a2a50;
  border: 1px solid var(--border);
  color: var(--muted);
}
.grid {
  display: grid;
  gap: 16px;
}
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { padding: 16px; }
.panel h3 { margin: 0 0 8px; }
.metric {
  font-size: 32px;
  font-weight: 800;
  margin-top: 8px;
}
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.tab.active { background: var(--accent); color: #08111d; }
.table-wrap { overflow: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th { color: var(--muted); font-weight: 600; }
.small { font-size: 12px; }
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.full { grid-column: 1 / -1; }
.hidden { display: none !important; }
.link { color: var(--accent-2); text-decoration: none; }
.status { font-size: 12px; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--border); display: inline-block; }
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.pipeline-lane {
  background: linear-gradient(180deg, rgba(29, 43, 79, 0.92) 0%, rgba(21, 31, 58, 0.92) 100%);
  border: 1px solid #41588d;
  border-radius: 18px;
  padding: 14px;
}
.pipeline-lane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pipeline-lane.research { border-color: #6b7cff; }
.pipeline-lane.review { border-color: #d4a64f; }
.pipeline-lane.draftable { border-color: #53b6ff; }
.pipeline-lane.ready { border-color: #56d39b; }
.pipeline-lane.followup { border-color: #7ee7d2; }
.pipeline-card-list {
  display: grid;
  gap: 10px;
}
.pipeline-card {
  background: linear-gradient(180deg, #1a274b 0%, #16203d 100%);
  border: 1px solid #3d5488;
  border-radius: 14px;
  padding: 12px;
}
.pipeline-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
}
.pipeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}
.pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #48629a;
  background: #23355f;
  color: var(--text);
}
.chip.blocked { background: rgba(255, 107, 107, 0.15); color: #ff9ca7; }
.chip.review { background: rgba(247, 185, 85, 0.15); color: #ffd27c; }
.chip.good { background: rgba(123, 216, 143, 0.15); color: #9ef0ae; }
.chip.strong { background: rgba(92, 200, 255, 0.15); color: #93ddff; }
.chip.followup { background: rgba(126, 240, 201, 0.15); color: #9bf3d8; }
.help-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px dashed #6a84be;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.empty-state {
  color: var(--muted);
  border: 1px dashed #4a6296;
  background: rgba(22, 32, 61, 0.55);
  border-radius: 12px;
  padding: 12px;
}
.today-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.today-action-card {
  background: linear-gradient(180deg, #263862 0%, #182544 100%);
  border: 1px solid #5a79bb;
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
}
.today-action-card:hover {
  border-color: #6b86c8;
  transform: translateY(-1px);
}
.today-action-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.today-action-count {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}
.workflow-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.today-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.today-mini-card {
  background: linear-gradient(180deg, #24345d 0%, #182543 100%);
  border: 1px solid #5872ab;
  border-radius: 14px;
  padding: 12px;
}
.review-queue {
  display: grid;
  gap: 12px;
}
.review-card {
  background: linear-gradient(180deg, #243660 0%, #182543 100%);
  border: 1px solid #5b78b8;
  border-radius: 15px;
  padding: 14px;
}
.crm-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
.resolver-grid {
  display: grid;
  gap: 12px;
}
.resolver-card {
  background: linear-gradient(180deg, #243660 0%, #182543 100%);
  border: 1px solid #5b78b8;
  border-radius: 15px;
  padding: 14px;
}
.chip.conf-high { background: rgba(92, 200, 255, 0.15); color: #93ddff; }
.chip.conf-medium { background: rgba(247, 185, 85, 0.15); color: #ffd27c; }
.chip.conf-low { background: rgba(255, 107, 107, 0.15); color: #ff9ca7; }
.draft-review {
  display: grid;
  gap: 14px;
}
.review-banner {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #445b90;
}
.review-banner.blocked { background: rgba(120, 32, 46, 0.45); border-color: #a85a6a; }
.review-banner.review { background: rgba(102, 79, 24, 0.45); border-color: #c49a45; }
.review-banner.strong { background: rgba(20, 82, 64, 0.45); border-color: #57d39b; }
.hero-card.blocked { border-color: #b56273; background: linear-gradient(180deg, rgba(90, 28, 39, 0.92) 0%, rgba(52, 18, 29, 0.92) 100%); }
.hero-card.review { border-color: #c49a45; background: linear-gradient(180deg, rgba(92, 66, 20, 0.92) 0%, rgba(50, 36, 13, 0.92) 100%); }
.hero-card.strong { border-color: #57d39b; background: linear-gradient(180deg, rgba(20, 84, 65, 0.92) 0%, rgba(13, 47, 38, 0.92) 100%); }
.hero-card.good { border-color: #5b76b0; }
.hero-card h2 { margin: 8px 0 0; }
.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.review-summary-card {
  background: linear-gradient(180deg, #23345d 0%, #182543 100%);
  border: 1px solid #5b76b0;
  border-radius: 14px;
  padding: 12px;
}
.subject-preview {
  min-width: 260px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.4;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 980px) {
  .grid-3, .form-grid, .pipeline-board, .today-actions, .today-mini-grid, .crm-split, .workflow-rail { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .grid-3, .form-grid, .pipeline-board { grid-template-columns: 1fr; }
}
