* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050816;
  color: #f9fafb;
}
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  border-right: 1px solid rgba(148,163,184,0.2);
  padding: 16px;
  background: radial-gradient(circle at top, #111827 0, #020617 60%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.brand-title {
  font-weight: 600;
}
.brand-subtitle {
  font-size: 12px;
  color: #9ca3af;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.nav-item {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  text-align: left;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 14px;
}
.nav-item.active {
  background: rgba(15,118,110,0.25);
}
.sidebar-metrics {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.metric {
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(15,23,42,0.9);
}
.metric-label {
  font-size: 11px;
  color: #9ca3af;
}
.metric-value {
  font-size: 15px;
  font-weight: 600;
}
.main {
  padding: 16px 18px;
}
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.main-header h1 {
  font-size: 22px;
  margin: 0;
}
.main-header p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #9ca3af;
}
.main-actions {
  display: flex;
  gap: 8px;
}
.btn {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  border-color: transparent;
  color: #020617;
  font-weight: 600;
}
.btn-outline {
  background: transparent;
}
.btn-xs {
  padding: 2px 8px;
  font-size: 11px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.filters input,
.filters select {
  width: 100%;
}
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
  background: rgba(15,23,42,0.9);
  padding: 4px;
  border-radius: 999px;
}
.tab-btn {
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 13px;
  padding: 4px 10px;
  cursor: pointer;
}
.tab-btn.active {
  background: rgba(15,118,110,0.35);
}
.tab-section {
  display: none;
}
.tab-section.active {
  display: block;
}
.card {
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.2);
  margin-bottom: 10px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
}
.card-subtitle {
  font-size: 12px;
  color: #9ca3af;
}
.table-wrapper {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(31,41,55,0.8);
  text-align: left;
}
th {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}
tbody tr:hover {
  background: rgba(15,23,42,0.7);
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  background: rgba(15,23,42,1);
}
.brand-legal {
  background: rgba(59,130,246,0.15);
  color: #bfdbfe;
}
.brand-design {
  background: rgba(244,114,182,0.15);
  color: #f9a8d4;
}
.status-new { background: rgba(59,130,246,0.15); color: #bfdbfe; }
.status-in-progress { background: rgba(249,115,22,0.15); color: #fed7aa; }
.status-proposal { background: rgba(8,145,178,0.15); color: #a5f3fc; }
.status-won { background: rgba(22,163,74,0.2); color: #bbf7d0; }
.status-lost { background: rgba(239,68,68,0.15); color: #fecaca; }
.status-hold { background: rgba(148,163,184,0.15); color: #e5e7eb; }
.status-completed { background: rgba(34,197,94,0.3); color: #bbf7d0; }

.pill-small {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.4);
  padding: 1px 6px;
  font-size: 11px;
}
.value-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.contact-meta {
  display: block;
  font-size: 10px;
  color: #9ca3af;
}
.followups-list {
  display: grid;
  gap: 6px;
}
.followup-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-radius: 12px;
  padding: 6px 8px;
  background: rgba(15,23,42,0.9);
  border: 1px dashed rgba(148,163,184,0.4);
}
.followup-main {
  font-size: 12px;
}
.followup-meta {
  font-size: 11px;
  color: #9ca3af;
}
.followup-tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(15,118,110,0.2);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  margin-top: 6px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label {
  font-size: 11px;
  color: #9ca3af;
}
.field input,
.field select,
.field textarea {
  border-radius: 10px;
  border: 1px solid rgba(30,64,175,0.7);
  background: #020617;
  color: #f9fafb;
  padding: 6px 8px;
  font-size: 12px;
}
.field textarea {
  min-height: 70px;
}
.form-grid-full {
  grid-column: 1 / -1;
}
.form-footer {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.client-link {
  color: #a5b4fc;
  text-decoration: none;
}
.client-link:hover {
  text-decoration: underline;
}
.hint-text {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}
.report-block {
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148,163,184,0.4);
  font-size: 12px;
}
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
}
.report-metric {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(55,65,81,0.8);
}
.report-metric-title {
  font-size: 11px;
  color: #9ca3af;
}
.report-metric-value {
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .filters {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .form-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
