:root {
  --navy-950: #122f32;
  --navy-900: #16383c;
  --navy-800: #1d484d;
  --navy-700: #24575d;
  --blue-600: #4aabb3;
  --blue-500: #6ec2c9;
  --blue-100: #ddeaec;
  --amber-500: #fdbd5a;
  --amber-600: #f0a233;
  --gray-950: #14211f;
  --gray-800: #2c3a3a;
  --gray-600: #57696a;
  --gray-400: #8ba0a1;
  --gray-200: #d9e5e6;
  --gray-100: #eef5f6;
  --white: #ffffff;
  --green-600: #1f9d55;
  --red-600: #c0392b;

  --bg: var(--white);
  --bg-muted: var(--gray-100);
  --text: var(--gray-950);
  --text-muted: var(--gray-600);
  --border: var(--gray-200);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(10, 26, 47, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 26, 47, 0.10);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-muted);
  color: var(--text);
}
h1, h2, h3 { font-family: "Manrope", "Inter", sans-serif; margin: 0 0 0.5rem; }
a { color: var(--blue-600); }

/* ---------- Auth pages (login/signup/forgot/reset) ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
}
.auth-card .brand {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--navy-900);
  margin-bottom: 4px;
}
.auth-card .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--gray-800); }
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
}
.field input:focus { outline: 2px solid var(--blue-500); outline-offset: 1px; border-color: var(--blue-500); }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--navy-900); color: var(--white); width: 100%; }
.btn-primary:hover { background: var(--navy-800); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-secondary { background: var(--gray-100); color: var(--text); }
.btn-danger { background: var(--red-600); color: var(--white); }
.form-error { background: #fbe4e1; color: var(--red-600); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.86rem; margin-bottom: 16px; }
.form-note { background: var(--blue-100); color: var(--navy-800); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.86rem; margin-bottom: 16px; }
.auth-links { margin-top: 18px; font-size: 0.86rem; text-align: center; color: var(--text-muted); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--navy-950);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.app-sidebar .brand { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.1rem; padding: 0 20px 20px; }
.app-sidebar nav { flex: 1; }
.app-sidebar .nav-item {
  display: block;
  padding: 10px 20px;
  color: var(--blue-100);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.app-sidebar .nav-item:hover { background: var(--navy-900); }
.app-sidebar .nav-item.active { background: var(--navy-900); border-left-color: var(--amber-500); color: var(--white); }
.app-sidebar .user-info { padding: 14px 20px 0; font-size: 0.8rem; color: var(--gray-400); border-top: 1px solid var(--navy-800); margin-top: 10px; }
.app-sidebar .user-info button { margin-top: 8px; }

.app-main { flex: 1; padding: 28px 32px; max-width: 1300px; }
.view { display: none; }
.view.active { display: block; }
.view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

.card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--text-muted); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--bg-muted); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.badge.gray { background: var(--gray-200); color: var(--gray-800); }
.badge.blue { background: var(--blue-100); color: var(--blue-600); }
.badge.green { background: #e2f5e8; color: var(--green-600); }
.badge.red { background: #fbe4e1; color: var(--red-600); }
.badge.amber { background: #fff2de; color: var(--amber-600); }

/* Pipeline board */
.pipeline-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.pipeline-col { flex: 0 0 230px; background: var(--bg-muted); border-radius: var(--radius-md); padding: 10px; min-height: 200px; }
.pipeline-col h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 10px; }
.deal-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: grab;
  font-size: 0.86rem;
}
.deal-card .deal-name { font-weight: 700; margin-bottom: 2px; }
.deal-card .deal-value { color: var(--text-muted); font-size: 0.8rem; }
.pipeline-col.drag-over { outline: 2px dashed var(--blue-500); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(18, 47, 50, 0.5);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50;
}
.modal { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 24px; }
.modal h2 { margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.empty-state { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 0.9rem; }
.toolbar { display: flex; gap: 10px; align-items: center; }

.activity-item { border-bottom: 1px solid var(--border); padding: 10px 0; font-size: 0.88rem; }
.activity-item:last-child { border-bottom: none; }
.activity-item .meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }
