/* OPS — black and white editorial. No italics anywhere. */

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

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN ===== */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--gray-50);
}

.login-wrap {
  background: var(--white);
  border: 1px solid var(--black);
  padding: 48px;
  width: 100%;
  max-width: 400px;
}

.login-brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 32px;
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-error {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--black);
  background: var(--gray-50);
  font-size: 12px;
  color: var(--black);
}

/* ===== TOPBAR ===== */

.topbar {
  display: flex;
  align-items: baseline;
  padding: 18px 32px;
  border-bottom: 1px solid var(--gray-200);
  gap: 20px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.subtitle {
  font-size: 13px;
  color: var(--gray-600);
}

.venture-switcher {
  margin-left: 24px;
  display: flex;
  gap: 6px;
}

.venture-pill {
  padding: 4px 12px;
  border: 1px solid var(--gray-300);
  font-size: 12px;
  cursor: pointer;
  color: var(--gray-700);
  user-select: none;
}

.venture-pill.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.user-block {
  margin-left: auto;
  font-size: 12px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logout-link {
  color: var(--gray-700);
  text-decoration: underline;
  cursor: pointer;
}

/* ===== LAYOUT ===== */

.main {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: calc(100vh - 61px);
}

.sidebar {
  border-right: 1px solid var(--gray-200);
  background: var(--gray-50);
  padding: 24px 0;
}

.workspace {
  overflow-y: auto;
  padding: 32px 40px;
}

/* ===== NAV ===== */

.nav-list {
  display: flex;
  flex-direction: column;
}

.nav-item {
  padding: 10px 20px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  border-left: 3px solid transparent;
  text-decoration: none;
  display: block;
}

.nav-item:hover {
  background: var(--gray-100);
}

.nav-item.active {
  background: var(--white);
  color: var(--black);
  font-weight: 600;
  border-left-color: var(--black);
}

/* ===== SECTIONS ===== */

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.page-actions {
  display: flex;
  gap: 8px;
}

/* ===== DASHBOARD ===== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  border: 1px solid var(--gray-200);
  padding: 18px;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.stat-sub {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}

.status-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--black);
  display: inline-block;
}

.status-dot.gray { background: var(--gray-400); }

/* ===== TABLE ===== */

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-bar select, .filter-bar input {
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--black);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-200);
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.data-table tr {
  cursor: pointer;
}

.data-table tr:hover td {
  background: var(--gray-50);
}

.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--gray-300);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-tag.customer { background: var(--black); color: var(--white); border-color: var(--black); }
.status-tag.pilot { background: var(--gray-800); color: var(--white); border-color: var(--gray-800); }
.status-tag.meeting { background: var(--gray-200); color: var(--black); }
.status-tag.replied { background: var(--gray-100); color: var(--black); }
.status-tag.contacted { background: var(--white); color: var(--gray-700); }
.status-tag.cold { background: var(--white); color: var(--gray-500); }
.status-tag.lost { background: var(--white); color: var(--gray-400); border-style: dashed; }

.tier-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid var(--gray-300);
}

.tier-1 { background: var(--black); color: var(--white); border-color: var(--black); }
.tier-2 { background: var(--gray-100); color: var(--black); }
.tier-3 { background: var(--white); color: var(--gray-500); }

/* ===== FORMS ===== */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--black);
  border-radius: 0;
  line-height: 1.5;
}

.text-input:focus {
  outline: none;
  border-color: var(--black);
}

textarea.text-input {
  resize: vertical;
  font-family: inherit;
}

/* ===== BUTTONS ===== */

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border: 1px solid var(--black);
  cursor: pointer;
  background: var(--white);
  color: var(--black);
  letter-spacing: 0.02em;
}

.btn:hover:not(:disabled) {
  background: var(--gray-100);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--gray-800);
}

.btn-small {
  font-size: 11px;
  padding: 5px 12px;
}

.btn-full {
  width: 100%;
}

/* ===== MODAL ===== */

.modal, .drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal.hidden, .drawer.hidden {
  display: none;
}

.modal {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop, .drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: var(--white);
  padding: 32px;
  border: 1px solid var(--black);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ===== DRAWER (prospect detail) ===== */

.drawer-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(640px, 100%);
  background: var(--white);
  border-left: 1px solid var(--black);
  overflow-y: auto;
  padding: 28px 36px;
  z-index: 1;
}

.drawer-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.drawer-title {
  font-size: 18px;
  font-weight: 700;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.kv-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 16px;
  font-size: 13px;
}

.kv-key {
  color: var(--gray-500);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kv-val {
  color: var(--black);
}

.activity-item {
  padding: 10px 0;
  border-top: 1px solid var(--gray-100);
  font-size: 13px;
}

.activity-meta {
  font-size: 11px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.activity-summary {
  color: var(--gray-800);
}

.quick-activity {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.quick-activity button {
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
}

.quick-activity button:hover {
  border-color: var(--black);
  color: var(--black);
}

/* ===== TASKS ===== */

.task-list {
  display: flex;
  flex-direction: column;
}

.task-item {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--gray-400);
  cursor: pointer;
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.task-checkbox.checked {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.task-checkbox.checked::after {
  content: "✓";
  font-size: 12px;
}

.task-title {
  font-size: 14px;
  color: var(--black);
}

.task-item.done .task-title {
  color: var(--gray-400);
  text-decoration: line-through;
}

.task-due {
  font-size: 11px;
  color: var(--gray-500);
}

.task-due.overdue {
  color: var(--black);
  font-weight: 600;
}

/* ===== DAILY LOG ===== */

.daily-log-form {
  border: 1px solid var(--gray-200);
  padding: 20px;
  margin-bottom: 24px;
  background: var(--gray-50);
}

.daily-log-entry {
  padding: 16px 0;
  border-top: 1px solid var(--gray-100);
}

.daily-log-date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.daily-log-summary {
  font-size: 13px;
  color: var(--gray-800);
  white-space: pre-wrap;
}

.daily-log-hours {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ===== TOAST ===== */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  z-index: 200;
  max-width: 360px;
}

.toast.hidden {
  display: none;
}

.toast.error {
  background: var(--gray-900);
  border: 1px solid var(--gray-600);
}

/* ===== EMPTY ===== */

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--gray-500);
  font-size: 13px;
}

.hidden {
  display: none !important;
}
