/* ================================================================
   MOSAIC DRM — Complete Design System Reference
   Plain HTML/PHP compatible. No framework dependencies.
   
   HOW TO USE:
   1. Add the Google Fonts <link> to your <head>
   2. Drop this file into your project and @import or <link> it
   3. Use the CSS classes directly on your HTML elements
   4. Reference the token values section to stay consistent
   ================================================================ */


/* ----------------------------------------------------------------
   SECTION 1 — GOOGLE FONTS
   Add this to your HTML <head> instead if you prefer
   ---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');


/* ----------------------------------------------------------------
   SECTION 2 — DESIGN TOKENS (CSS Custom Properties)
   All visual decisions live here. Change a value here and it
   propagates everywhere automatically.
   ---------------------------------------------------------------- */
:root {
  /* --- Typography --- */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* --- Color Palette (HSL — always use with hsl()) --- */
  /* Page surface */
  --background:           210 20% 98%;   /* near-white, cool tint — page bg */
  --foreground:           222 47% 11%;   /* very dark navy — default text */

  /* Primary — bright navy blue */
  --primary:              221 83% 53%;
  --primary-foreground:   210 40% 98%;   /* white text on primary */

  /* Secondary — light grey-blue, used for subtle backgrounds */
  --secondary:            210 40% 96%;
  --secondary-foreground: 222 47% 11%;

  /* Muted — identical to secondary, used for disabled/quiet areas */
  --muted:                210 40% 96%;
  --muted-foreground:     215 16% 47%;   /* medium grey text */

  /* Accent — teal, used sparingly for highlights */
  --accent:               173 80% 40%;
  --accent-foreground:    210 40% 98%;

  /* Destructive — red, errors / delete actions */
  --destructive:          0   84% 60%;
  --destructive-foreground: 210 40% 98%;

  /* Borders & inputs */
  --border:               214 32% 91%;   /* light grey-blue border */
  --input:                214 32% 91%;
  --ring:                 221 83% 53%;   /* focus ring = primary */

  /* Card surface */
  --card:                 0   0%  100%;  /* pure white */
  --card-foreground:      222 47% 11%;
  --card-border:          214 32% 91%;

  /* Sidebar */
  --sidebar:              0   0%  100%;  /* white */
  --sidebar-foreground:   222 47% 11%;
  --sidebar-border:       214 32% 91%;

  /* --- Shape --- */
  --radius:    0.75rem;    /* default — cards, dialogs, dropdowns */
  --radius-sm: 0.1875rem;  /* 3px — tiny chips */
  --radius-md: 0.375rem;   /* 6px — buttons, inputs, badges */
  --radius-lg: 0.5625rem;  /* 9px — large containers */
  --radius-xl: 0.75rem;    /* same as default */
  --radius-full: 9999px;   /* pills */

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.05), 0 4px 6px rgba(0,0,0,0.03);

  /* Elevation shadow used on hover (matches hover-elevate pattern) */
  --shadow-elevate: 0 4px 12px rgba(0,0,0,0.10);
}


/* ----------------------------------------------------------------
   SECTION 3 — BASE / RESET
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection highlight */
::selection {
  background-color: hsl(var(--primary) / 0.2);
  color: hsl(var(--primary));
}

/* Headings always use display font */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;   /* tracking-tight */
  line-height: 1.2;
  color: hsl(var(--foreground));
  margin: 0 0 0.5em;
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: opacity 0.15s;
}
a:hover { opacity: 0.8; }

p { margin: 0 0 1em; }


/* ----------------------------------------------------------------
   SECTION 4 — TYPOGRAPHY SCALE
   Usage: apply these classes to any element.
   ---------------------------------------------------------------- */

/* Sizes */
.text-xs   { font-size: 0.75rem;  line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem;     line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem;  line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem;   line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem;  line-height: 2.5rem; }

/* Weights */
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

/* Color helpers */
.text-muted       { color: hsl(var(--muted-foreground)); }
.text-primary     { color: hsl(var(--primary)); }
.text-accent      { color: hsl(var(--accent)); }
.text-destructive { color: hsl(var(--destructive)); }

/* Font family helpers */
.font-body    { font-family: var(--font-body); }
.font-display { font-family: var(--font-display); }

/* Tracking */
.tracking-tight  { letter-spacing: -0.025em; }
.tracking-wide   { letter-spacing: 0.025em; }
.tracking-wider  { letter-spacing: 0.05em; }

/* Typical page title pattern */
.page-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
}
.page-subtitle {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}

/* Field label pattern (used above form inputs) */
.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* Stat number (large bold value in metric cards) */
.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

/* Section label (small uppercase category headers) */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ----------------------------------------------------------------
   SECTION 5 — LAYOUT
   ---------------------------------------------------------------- */

/* Full app shell: sidebar + main content */
.app-shell {
  display: flex;
  min-height: 100vh;
  background-color: hsl(var(--muted) / 0.3);
}

/* Desktop sidebar — fixed, 256px wide */
.sidebar {
  width: 16rem;            /* 256px */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background-color: hsl(var(--sidebar));
  border-right: 1px solid hsl(var(--sidebar-border));
  z-index: 30;
}

/* Sidebar logo/brand row */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  height: 4rem;
  border-bottom: 1px solid hsl(var(--sidebar-border));
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  flex-shrink: 0;
}

/* Sidebar nav items container */
.sidebar-nav {
  flex: 1;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

/* Individual nav item */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-item:hover {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
  opacity: 1;
}
.nav-item.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 4px 8px hsl(var(--primary) / 0.2);
}
.nav-item .nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Sidebar footer (sign out area) */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid hsl(var(--sidebar-border));
  flex-shrink: 0;
}

/* Main content area — offset by sidebar width */
.main-content {
  flex: 1;
  margin-left: 16rem;
  padding: 2rem;
  min-height: 100vh;
}

/* Inner content wrapper — max width + entrance animation */
.content-wrapper {
  max-width: 80rem;
  margin: 0 auto;
  animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive: hide sidebar, show mobile header */
@media (max-width: 767px) {
  .sidebar     { display: none; }
  .main-content { margin-left: 0; padding: 1rem; padding-top: 5rem; }
}

/* Mobile top bar */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4rem;
  background-color: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  z-index: 30;
  padding: 0 1rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
@media (max-width: 767px) {
  .mobile-header { display: flex; }
}


/* ----------------------------------------------------------------
   SECTION 6 — CARD
   ---------------------------------------------------------------- */

/* Standard card */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--card-border));
  border-radius: var(--radius-xl);    /* 12px */
  box-shadow: var(--shadow-sm);
  color: hsl(var(--card-foreground));
}

/* Card sections */
.card-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;          /* 6px */
}
.card-header-row {
  /* Use when title + action button sit side-by-side */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}
.card-content {
  padding: 1.5rem;
  padding-top: 1rem;
}
.card-footer {
  padding: 1.5rem;
  padding-top: 0;
  display: flex;
  align-items: center;
}

/* Subtle card variant — used inside other cards / list items */
.card-muted {
  background-color: hsl(var(--muted) / 0.3);
  border: 1px solid hsl(var(--border) / 0.5);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

/* Glass card — for hero/overlay areas */
.card-glass {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}


/* ----------------------------------------------------------------
   SECTION 7 — BUTTONS
   ---------------------------------------------------------------- */

/* Base button — all variants inherit this */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  min-height: 2.25rem;    /* 36px — matches icon buttons */
  padding: 0.5rem 1rem;
  transition: box-shadow 0.15s, transform 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.35);
}
.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}
.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  pointer-events: none;
}

/* Hover/active elevation — applied on interactive cards and buttons */
.btn:hover  { box-shadow: var(--shadow-elevate); transform: translateY(-1px); }
.btn:active { box-shadow: var(--shadow-sm);       transform: translateY(0); }

/* Primary */
.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

/* Destructive */
.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  border-color: hsl(var(--destructive));
}

/* Secondary (light grey) */
.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
}

/* Outline (transparent bg, inherits border from context) */
.btn-outline {
  background-color: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}
.btn-outline:hover {
  background-color: hsl(var(--muted));
}

/* Ghost (no border, no bg) */
.btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: hsl(var(--muted-foreground));
}
.btn-ghost:hover {
  background-color: hsl(var(--muted));
  color: hsl(var(--foreground));
  box-shadow: none;
  transform: none;
}

/* Sizes */
.btn-sm  { min-height: 2rem; padding: 0.375rem 0.75rem; font-size: 0.75rem; border-radius: var(--radius-md); }
.btn-lg  { min-height: 2.5rem; padding: 0.625rem 2rem; }
.btn-icon { height: 2.25rem; width: 2.25rem; padding: 0; }

/* Common: primary button with a coloured shadow */
.btn-primary-shadow {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.25);
}


/* ----------------------------------------------------------------
   SECTION 8 — BADGES
   ---------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: box-shadow 0.15s, transform 0.15s;
}

/* Variants */
.badge-primary     { background-color: hsl(var(--primary));     color: hsl(var(--primary-foreground));     border-color: transparent; }
.badge-secondary   { background-color: hsl(var(--secondary));   color: hsl(var(--secondary-foreground));   border-color: transparent; }
.badge-destructive { background-color: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); border-color: transparent; }
.badge-outline     { background-color: transparent; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }

/* Semantic status variants (used throughout the app) */
.badge-new     { background-color: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); border-color: transparent; }
.badge-engaged { background-color: hsl(142 70% 45% / 0.12);    color: hsl(142 70% 35%);   border-color: transparent; }
.badge-at-risk { background-color: hsl(var(--destructive)/0.12);color: hsl(var(--destructive)); border-color: transparent; }
.badge-muted   { background-color: hsl(var(--muted)); color: hsl(var(--muted-foreground)); border-color: transparent; }

/* Counter badge (sidebar notification dot) */
.badge-counter {
  height: 1.25rem;
  min-width: 1.25rem;
  padding: 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ----------------------------------------------------------------
   SECTION 9 — FORM CONTROLS
   ---------------------------------------------------------------- */

/* Text input / select / textarea */
.input {
  display: flex;
  width: 100%;
  height: 2.25rem;         /* matches button height */
  border-radius: var(--radius-md);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.input::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15), 0 0 0 1px hsl(var(--ring));
}
.input:disabled { opacity: 0.5; cursor: not-allowed; }

/* Textarea — same as input but auto-height */
textarea.input {
  height: auto;
  min-height: 5rem;
  resize: vertical;
}

/* Select — needs a wrapper for the chevron arrow */
.select-wrapper {
  position: relative;
  width: 100%;
}
.select-wrapper::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid hsl(var(--muted-foreground));
}
select.input { appearance: none; padding-right: 2rem; cursor: pointer; }

/* Form field wrapper */
.form-field { display: flex; flex-direction: column; gap: 0.375rem; }

/* Label */
label.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

/* Error message */
.field-error {
  font-size: 0.75rem;
  color: hsl(var(--destructive));
}

/* Checkbox / radio */
input[type="checkbox"],
input[type="radio"] {
  accent-color: hsl(var(--primary));
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

/* Search input with icon — wrap in .input-search-wrapper */
.input-search-wrapper {
  position: relative;
  width: 100%;
}
.input-search-wrapper .input { padding-left: 2.25rem; }
.input-search-wrapper .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--muted-foreground));
  pointer-events: none;
  width: 1rem;
  height: 1rem;
}


/* ----------------------------------------------------------------
   SECTION 10 — TABLE
   ---------------------------------------------------------------- */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
}

table.table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
  caption-side: bottom;
}

table.table thead tr {
  border-bottom: 1px solid hsl(var(--border));
}

table.table thead th {
  height: 3rem;
  padding: 0 1rem;
  text-align: left;
  vertical-align: middle;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

table.table tbody tr {
  border-bottom: 1px solid hsl(var(--border));
  transition: background-color 0.15s;
}
table.table tbody tr:last-child { border-bottom: none; }
table.table tbody tr:hover { background-color: hsl(var(--muted) / 0.5); }

table.table td {
  padding: 1rem;
  vertical-align: middle;
}

table.table tfoot {
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted) / 0.5);
  font-weight: 500;
}
table.table caption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}


/* ----------------------------------------------------------------
   SECTION 11 — AVATAR
   ---------------------------------------------------------------- */

.avatar {
  position: relative;
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
}
/* Subtle inner border so avatar never bleeds into white backgrounds */
.avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0,0,0,0.10);
  pointer-events: none;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background-color: hsl(var(--muted));
  font-size: 0.875rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
}
/* Primary-tinted avatar (person initials) */
.avatar-primary .avatar-fallback {
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

/* Sizes */
.avatar-sm { width: 2rem;   height: 2rem; }
.avatar-lg { width: 3rem;   height: 3rem; }
.avatar-xl { width: 4.5rem; height: 4.5rem; font-size: 1.5rem; }


/* ----------------------------------------------------------------
   SECTION 12 — PROGRESS BAR
   ---------------------------------------------------------------- */

.progress {
  position: relative;
  width: 100%;
  height: 0.75rem;       /* h-3 */
  border-radius: var(--radius-full);
  background-color: hsl(var(--secondary));
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background-color: hsl(var(--primary));
  transition: width 0.4s ease;
}
/* Thin variant */
.progress-sm .progress { height: 0.5rem; }  /* h-2 */

/* Semantic fill colours */
.progress-bar-success { background-color: hsl(142 70% 45%); }  /* green */
.progress-bar-warning { background-color: hsl(38 92% 50%); }   /* amber */
.progress-bar-danger  { background-color: hsl(var(--destructive)); }


/* ----------------------------------------------------------------
   SECTION 13 — STAT CARD (Dashboard KPI block)
   Pattern: icon in coloured circle + label + large number
   ---------------------------------------------------------------- */

.stat-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--card-border) / 0.5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;   /* rounded-xl */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
/* Icon background tints */
.stat-icon-blue  { background-color: rgba(59,130,246,0.1);  color: rgb(59,130,246); }
.stat-icon-amber { background-color: rgba(245,158,11,0.1); color: rgb(245,158,11); }
.stat-icon-red   { background-color: rgba(239,68,68,0.1);   color: rgb(239,68,68); }
.stat-icon-teal  { background-color: hsl(var(--accent)/0.1); color: hsl(var(--accent)); }
.stat-icon-primary { background-color: hsl(var(--primary)/0.1); color: hsl(var(--primary)); }

.stat-card-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  margin: 0;
}
.stat-card-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin: 0;
  letter-spacing: -0.025em;
}


/* ----------------------------------------------------------------
   SECTION 14 — LIST ITEM (people list, activity feed rows)
   ---------------------------------------------------------------- */

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.list-item:hover {
  box-shadow: var(--shadow-elevate);
  transform: translateY(-1px);
}
.list-item-left  { display: flex; align-items: center; gap: 0.75rem; }
.list-item-name  { font-size: 0.875rem; font-weight: 500; }
.list-item-sub   { font-size: 0.75rem; color: hsl(var(--muted-foreground)); }


/* ----------------------------------------------------------------
   SECTION 15 — DIVIDER / SEPARATOR
   ---------------------------------------------------------------- */

.divider {
  border: none;
  border-top: 1px solid hsl(var(--border));
  margin: 1rem 0;
}
.divider-vertical {
  display: inline-block;
  width: 1px;
  background-color: hsl(var(--border));
  align-self: stretch;
  margin: 0 0.5rem;
}


/* ----------------------------------------------------------------
   SECTION 16 — EMPTY STATE
   ---------------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: hsl(var(--muted-foreground));
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius-xl);
}
.empty-state-icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.5rem;
  opacity: 0.5;
}
.empty-state p { font-size: 0.875rem; margin: 0; }


/* ----------------------------------------------------------------
   SECTION 17 — TOAST / ALERT BANNER
   ---------------------------------------------------------------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-size: 0.875rem;
}
.alert-default     { background-color: hsl(var(--card)); border-color: hsl(var(--border)); }
.alert-destructive { background-color: hsl(var(--destructive)/0.08); border-color: hsl(var(--destructive)/0.3); color: hsl(var(--destructive)); }
.alert-success     { background-color: hsl(142 70% 45%/0.08); border-color: hsl(142 70% 45%/0.3); color: hsl(142 70% 35%); }
.alert-warning     { background-color: hsl(38 92% 50%/0.08); border-color: hsl(38 92% 50%/0.3); color: hsl(38 60% 35%); }
.alert-title       { font-weight: 600; margin-bottom: 0.25rem; }


/* ----------------------------------------------------------------
   SECTION 18 — SKELETON / LOADING PLACEHOLDER
   ---------------------------------------------------------------- */

.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(
    90deg,
    hsl(var(--muted)) 25%,
    hsl(var(--muted-foreground) / 0.1) 50%,
    hsl(var(--muted)) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ----------------------------------------------------------------
   SECTION 19 — INTERACTIONS (hover elevation)
   The app uses a consistent "lift" on hover for all interactive
   cards and buttons — a slight upward translateY + deeper shadow.
   ---------------------------------------------------------------- */

/* Apply to any interactive card, list row, or clickable element */
.interactive {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}
.interactive:hover  { box-shadow: var(--shadow-elevate); transform: translateY(-1px); }
.interactive:active { box-shadow: var(--shadow-sm);       transform: translateY(0); }


/* ----------------------------------------------------------------
   SECTION 20 — ANIMATIONS
   ---------------------------------------------------------------- */

/* Page / component entrance */
.animate-in {
  animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Spinner */
.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid hsl(var(--border));
  border-top-color: hsl(var(--primary));
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ----------------------------------------------------------------
   SECTION 21 — UTILITY HELPERS
   ---------------------------------------------------------------- */

/* Spacing stacks */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Flex helpers */
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start   { display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; }
.flex-end     { display: flex; align-items: center; justify-content: flex-end;   gap: 0.5rem; }
.flex-wrap    { flex-wrap: wrap; }

/* Truncate single line */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Visually hidden (accessible) */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}