/* Mhare CRM — visual language aligned to mhareconsulting.co.za marketing site
   (Inter, zinc neutrals, cyan→blue→purple gradients, angular CTAs). */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap");

:root {
  --brand-cyan: #06b6d4;
  --brand-cyan-600: #0891b2;
  --brand-blue: #2563eb;
  --brand-purple: #9333ea;
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-400: #a1a1aa;
  --zinc-500: #71717a;
  --zinc-600: #52525b;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --zinc-950: #09090b;
  --text: #000;
  --border-soft: rgba(24, 24, 27, 0.12);
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}

::selection {
  background: var(--brand-cyan);
  color: #fff;
}

/* Thin top bar (like marketing progress rail, static for CRM) */
.top-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: hsl(0 0% 90%);
  z-index: 120;
}
.top-rail > span {
  display: block;
  height: 100%;
  width: 18%;
  background: #000;
  transition: width 0.35s ease;
}

/* Fixed nav — mirrors saved HTML: bg-white py-6, full width */
.site-nav {
  position: fixed;
  top: 4px;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  padding: 1.5rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.site-nav.is-scrolled {
  border-bottom-color: var(--zinc-100);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.12);
}

.site-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand lockup: logo + rotating diamond frame + MHARE / subtitle */
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo-wrap {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}
.brand-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.125rem;
  display: block;
  transition: transform 0.35s ease;
}
.brand:hover .brand-logo-wrap img {
  transform: rotate(12deg);
}
.brand-frame {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(6, 182, 212, 0.2);
  transform: rotate(45deg);
  pointer-events: none;
  transition: transform 0.7s ease;
}
.brand:hover .brand-frame {
  transform: rotate(90deg);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-text-mhare {
  font-size: 0.875rem;
  font-weight: 900;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #000;
}
.brand-text-sub {
  margin-top: 0.15rem;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand-cyan-600);
}

/* Nav links — uppercase, wide tracking, gradient underline on hover/active */
.nav-main {
  display: none;
  align-items: center;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .nav-main {
    display: flex;
  }
}

.nav-link {
  position: relative;
  padding: 0.5rem 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--zinc-400);
  text-decoration: none;
  transition: color 0.35s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #000;
  outline: none;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  opacity: 0;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue), var(--brand-purple));
  transition: width 0.5s ease, opacity 0.35s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
  opacity: 1;
}
.nav-link.is-active {
  color: #000;
}
.nav-link.is-active::after {
  width: 100%;
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Primary CTA — gradient + clip-path + shadow (Let's Talk style) */
.btn-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue), var(--brand-purple));
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.2);
}
.btn-cta span {
  position: relative;
  z-index: 1;
}

/* Page shell — subtle dot grid + breathing room under fixed nav */
.page-shell {
  min-height: 100vh;
  padding-top: calc(4px + 1.5rem + 2.5rem + 1.5rem + 1rem);
  position: relative;
  background: #fff;
}
.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  background-image: radial-gradient(circle, rgb(0, 0, 0) 1.2px, transparent 1.2px);
  background-size: 40px 40px;
}

.shell-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

/* Cards / tables / forms (CRM-specific, still on-brand) */
.card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: #fff;
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.08);
}

.page-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}
th,
td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
  font-size: 0.875rem;
}
th {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.72);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.72);
  margin-bottom: 0.35rem;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  outline: none;
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

/* Generic buttons used in list pages */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 0.65rem 1rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 10px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue), var(--brand-purple));
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: scale(1.04);
}
.btn-secondary {
  background: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.08);
  transform: scale(1.02);
}
.btn-danger {
  background: #b91c1c;
  color: #fff;
}

/* Footer — zinc-950 band + top gradient hairline */
.site-footer {
  position: relative;
  margin-top: 3rem;
  background: var(--zinc-950);
  color: #fff;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue), var(--brand-purple));
  opacity: 0.5;
}
.site-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--zinc-600);
}
.site-footer a {
  color: var(--zinc-400);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer a:hover {
  color: #fff;
}

/* Mobile nav — simple row of links under header on small screens */
.nav-mobile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0 1.5rem 1rem;
  border-bottom: 1px solid var(--zinc-100);
  background: #fff;
}
@media (min-width: 1024px) {
  .nav-mobile {
    display: none;
  }
}
.nav-mobile a {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--zinc-500);
  text-decoration: none;
}
.nav-mobile a:hover {
  color: var(--brand-cyan-600);
}

/* Nav section divider */
.nav-divider {
  display: inline-block;
  width: 1px;
  height: 1rem;
  background: var(--border-soft);
  align-self: center;
}

/* Home dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.dashboard-card-wide {
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  .dashboard-card-wide {
    grid-column: span 2;
  }
}
.dashboard-card-title {
  margin: 0 0 0.75rem;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.72);
}

/* Account hub sections */
.account-section {
  margin-top: 2rem;
}
.section-heading {
  margin: 0 0 0.35rem;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-lead {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--zinc-600);
  max-width: 56rem;
}

/* Timeline */
.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  background: #fff;
  box-shadow: 0 8px 24px -18px rgba(0, 0, 0, 0.08);
}
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zinc-500);
  margin-bottom: 0.35rem;
}
.timeline-type {
  color: var(--brand-cyan-600);
}
.timeline-body {
  font-size: 0.9rem;
}
.timeline-account a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}
.timeline-account a:hover {
  text-decoration: underline;
}

/* Kanban pipeline */
.kanban-board {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  align-items: flex-start;
}
.kanban-column {
  flex: 0 0 min(260px, 85vw);
  min-height: 120px;
}
.kanban-column-header {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.5rem 0.35rem 0.65rem;
  border-bottom: 2px solid rgba(6, 182, 212, 0.35);
  margin-bottom: 0.5rem;
}
.kanban-column-body {
  min-height: 80px;
  padding: 0.35rem;
  border-radius: var(--radius);
  border: 1px dashed transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.kanban-column-body.is-drop-target {
  border-color: rgba(6, 182, 212, 0.55);
  background: rgba(6, 182, 212, 0.06);
}
.kanban-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #fff;
  box-shadow: 0 8px 20px -16px rgba(0, 0, 0, 0.12);
  cursor: grab;
}
.kanban-card.is-dragging {
  opacity: 0.55;
}
.kanban-card-title {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.kanban-card-meta {
  font-size: 0.75rem;
  color: var(--zinc-600);
}
.kanban-empty {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--zinc-400);
  text-align: center;
}
.pipeline-status {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--zinc-600);
  min-height: 1.25rem;
}
