/* AuroraOS — main stylesheet */

:root {
  --purple: #6C63FF;
  --purple-dark: #4a42d4;
  --navy: #1a1a2e;
  --bg: #f7f8fc;
  --card: #fff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 8px;
}

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

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

/* Nav */
.nav {
  background: var(--navy);
  color: white;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand { flex-shrink: 0; }
.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,0.1); }
.nav-status { flex-shrink: 0; }

/* Status badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.status-draft { background: #f3f4f6; color: #6b7280; }
.status-review { background: #fef3c7; color: #92400e; }
.status-sent-to-title { background: #dbeafe; color: #1e40af; }
.status-under-contract { background: #d1fae5; color: #065f46; }
.status-closed { background: #059669; color: white; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--navy); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--purple); color: white; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-secondary { background: white; color: var(--navy); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f9fafb; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
}
.card-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
}
.data-table td { padding: 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:hover { background: #fafbff; }
.data-table .actions { display: flex; gap: 6px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: white;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}
textarea { resize: vertical; min-height: 80px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* Deal detail */
.deal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.deal-section { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; }
.deal-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }
.field-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.field-row:last-child { border-bottom: none; }
.field-row .label { color: var(--text-muted); font-weight: 400; font-size: 13px; }
.field-row .value { font-weight: 600; }

/* EMD flow */
.emd-flow { background: #f0f4ff; border: 2px solid var(--purple); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.emd-flow h4 { font-size: 14px; color: var(--purple); margin-bottom: 12px; }
.emd-step { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.emd-step .arrow { color: var(--purple); font-weight: bold; }

/* Contract preview */
.contract-preview {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.contract-actions { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }

/* Info grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.info-item .info-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.info-item .info-value { font-size: 16px; font-weight: 600; margin-top: 4px; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state p { margin-bottom: 20px; }

/* Badge pills */
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; background: #f3f4f6; color: #6b7280; }
.pill-active { background: #d1fae5; color: #065f46; }
.pill-new { background: #dbeafe; color: #1e40af; }

/* Utility */
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-lg { font-size: 18px; }
.text-sm { font-size: 13px; }
.text-right { text-align: right; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* Quick stat boxes */
.stat-box { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-box .stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-box .stat-value { font-size: 28px; font-weight: 700; color: var(--navy); margin-top: 4px; }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; }
.filter-bar select { width: auto; }

/* Title company cards */
.company-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.company-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.company-card .meta { font-size: 13px; color: var(--text-muted); }
.company-card .tag { font-size: 12px; background: #d1fae5; color: #065f46; padding: 2px 8px; border-radius: 20px; }