/* ============================================================
   PawRunner — Shared Application Stylesheet
   Design language: warm, athletic, premium
   ============================================================ */

/* ---------- 1. Reset & CSS Variables ---------- */

:root {
  --orange: #E8652B;
  --orange-light: #FF8B57;
  --orange-dark: #C7511F;
  --dark: #141210;
  --cream: #FFF8F2;
  --warm-gray: #8A7E74;
  --soft-beige: #F2E8DC;

  /* Semantic aliases */
  --bg: var(--cream);
  --bg-card: #FFFFFF;
  --text-primary: var(--dark);
  --text-secondary: var(--warm-gray);
  --text-inverse: #FFFFFF;
  --border: #E8DDD2;
  --border-focus: var(--orange);
  --shadow-sm: 0 1px 3px rgba(20, 18, 16, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 18, 16, 0.08);
  --shadow-lg: 0 8px 30px rgba(20, 18, 16, 0.12);
  --shadow-orange: 0 4px 14px rgba(232, 101, 43, 0.30);

  /* Status colours */
  --green: #2D9F6F;
  --green-light: #E6F7EF;
  --blue: #3B7DD8;
  --blue-light: #E8F0FD;
  --yellow: #D4A017;
  --yellow-light: #FFF8E1;
  --red: #D94040;
  --red-light: #FDECEC;
  --gray-badge: #6B7280;
  --gray-badge-light: #F3F4F6;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Nav */
  --nav-height: 68px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
  min-height: 100vh;
  padding-top: var(--nav-height);
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--orange-dark);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- 2. Typography ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; }

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--warm-gray); }

/* ---------- 3. Navigation Bar ---------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: opacity var(--transition-fast);
}

.navbar-logo:hover {
  opacity: 0.8;
  color: var(--dark);
}

.navbar-logo .paw-icon {
  font-size: 1.5rem;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.navbar-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--dark);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  width: 100%;
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ---------- 4. Form Styles ---------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 101, 43, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: #BEB3A7;
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--soft-beige);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A7E74' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}

/* ---------- 5. Button Styles ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 11px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary — orange fill */
.btn-primary {
  background: var(--orange);
  color: var(--text-inverse);
  border-color: var(--orange);
}

.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  box-shadow: var(--shadow-orange);
  color: var(--text-inverse);
}

/* Secondary — dark fill */
.btn-secondary {
  background: var(--dark);
  color: var(--text-inverse);
  border-color: var(--dark);
}

.btn-secondary:hover {
  background: #2A2622;
  border-color: #2A2622;
  box-shadow: var(--shadow-md);
  color: var(--text-inverse);
}

/* Outline — border only */
.btn-outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--dark);
  background: rgba(20, 18, 16, 0.04);
  color: var(--dark);
}

/* Danger — red */
.btn-danger {
  background: var(--red);
  color: var(--text-inverse);
  border-color: var(--red);
}

.btn-danger:hover {
  background: #C03030;
  border-color: #C03030;
  box-shadow: 0 4px 14px rgba(217, 64, 64, 0.30);
  color: var(--text-inverse);
}

/* Sizes */
.btn-sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 1.0625rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- 6. Card Styles ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.card-body {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.card-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* ---------- 7. Badge / Tag Styles ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge-pending {
  background: rgba(232, 101, 43, 0.12);
  color: var(--orange);
}

.badge-confirmed {
  background: var(--green-light);
  color: var(--green);
}

.badge-completed {
  background: var(--blue-light);
  color: var(--blue);
}

.badge-cancelled {
  background: var(--gray-badge-light);
  color: var(--gray-badge);
}

.badge-in-progress {
  background: var(--yellow-light);
  color: var(--yellow);
}

/* Dot indicator variant */
.badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ---------- 8. Layout ---------- */

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1200px;
}

.container-narrow {
  max-width: 680px;
}

.page-header {
  padding: var(--space-2xl) 0 var(--space-xl);
}

.page-header h1 {
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

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

.section {
  margin-bottom: var(--space-2xl);
}

/* ---------- 9. Stats Cards ---------- */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.stat-card-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card-icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

/* Accent variant */
.stat-card-accent {
  border-color: var(--orange);
  border-width: 2px;
}

.stat-card-accent .stat-card-value {
  color: var(--orange);
}

/* ---------- 10. Empty State ---------- */

.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.empty-state p {
  color: var(--warm-gray);
  font-size: 0.9375rem;
  max-width: 400px;
  margin: 0 auto var(--space-lg);
}

/* ---------- 11. Alert / Toast ---------- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: 14px var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
  border: 1px solid transparent;
}

.alert-success {
  background: var(--green-light);
  color: var(--green);
  border-color: #C2E8D5;
}

.alert-error {
  background: var(--red-light);
  color: var(--red);
  border-color: #F5C6C6;
}

.alert-warning {
  background: var(--yellow-light);
  color: #9A7400;
  border-color: #F0DDA0;
}

.alert-info {
  background: var(--blue-light);
  color: var(--blue);
  border-color: #BFDAF7;
}

/* Toast (fixed position) */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + var(--space-md));
  right: var(--space-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease forwards;
  max-width: 380px;
}

.toast.toast-out {
  animation: toastOut 0.25s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(30px); }
}

/* ---------- 12. Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(20, 18, 16, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--warm-gray);
  font-size: 1.25rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
  background: var(--soft-beige);
  color: var(--dark);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 13. Responsive ---------- */

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  body {
    font-size: 14px;
  }

  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.125rem; }

  .container {
    padding: 0 var(--space-md);
  }

  .page-header {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .page-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Navbar mobile */
  .navbar-toggle {
    display: flex;
  }

  .navbar-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    gap: var(--space-sm);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-base), opacity var(--transition-base);
  }

  .navbar-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--shadow-md);
  }

  .navbar-links a {
    padding: var(--space-sm) 0;
    font-size: 1rem;
  }

  /* Modal fullscreen on mobile */
  .modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: var(--radius-md);
    margin: var(--space-sm);
  }

  /* Stats stacked */
  .stat-card-value {
    font-size: 1.5rem;
  }

  /* Table scroll */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- 14. Auth Pages ---------- */

.auth-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.auth-card h1,
.auth-card h2 {
  text-align: center;
  margin-bottom: var(--space-xs);
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--warm-gray);
  margin-bottom: var(--space-xl);
  font-size: 0.9375rem;
}

.auth-card .form-group:last-of-type {
  margin-bottom: var(--space-lg);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.875rem;
  color: var(--warm-gray);
}

.auth-footer a {
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--warm-gray);
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- 15. Loading Spinner ---------- */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

.loading::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--soft-beige);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-sm::after {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.loading-lg::after {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.loading-inline {
  display: inline-flex;
  padding: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Full-page loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(255, 248, 242, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.loading-overlay p {
  font-weight: 500;
  color: var(--warm-gray);
}

/* ---------- 16. Table Styles ---------- */

.table-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--soft-beige);
}

th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warm-gray);
  padding: 12px var(--space-md);
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 14px var(--space-md);
  font-size: 0.9375rem;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: rgba(242, 232, 220, 0.35);
}

tbody tr:first-child td {
  border-top: none;
}

/* ---------- 17. Form Groups ---------- */

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group .required {
  color: var(--red);
  margin-left: 2px;
}

.form-help {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--warm-gray);
  line-height: 1.45;
}

.form-error {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--red);
  font-weight: 500;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--red);
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(217, 64, 64, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--orange);
  cursor: pointer;
}

.form-check label {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  margin-bottom: 0;
}

/* ---------- 18. Match Score Indicator ---------- */

.match-score {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 0.9375rem;
}

.match-score-bar {
  position: relative;
  width: 80px;
  height: 8px;
  background: var(--soft-beige);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.match-score-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* Score colour thresholds */
.match-score.score-high .match-score-fill {
  background: var(--green);
}

.match-score.score-high {
  color: var(--green);
}

.match-score.score-medium .match-score-fill {
  background: var(--orange);
}

.match-score.score-medium {
  color: var(--orange);
}

.match-score.score-low .match-score-fill {
  background: var(--warm-gray);
}

.match-score.score-low {
  color: var(--warm-gray);
}

/* Circular variant */
.match-score-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  border: 3px solid currentColor;
}

/* ---------- 19. Session Status Timeline ---------- */

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 9px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.timeline-dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background var(--transition-fast);
}

/* Active state */
.timeline-item.active .timeline-dot {
  border-color: var(--orange);
}

.timeline-item.active .timeline-dot .timeline-dot-inner {
  background: var(--orange);
}

/* Completed state */
.timeline-item.completed .timeline-dot {
  border-color: var(--green);
  background: var(--green);
}

.timeline-item.completed .timeline-dot .timeline-dot-inner {
  background: white;
  width: 6px;
  height: 6px;
}

/* Cancelled state */
.timeline-item.cancelled .timeline-dot {
  border-color: var(--gray-badge);
}

.timeline-item.cancelled .timeline-dot .timeline-dot-inner {
  background: var(--gray-badge);
}

.timeline-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.timeline-desc {
  font-size: 0.8125rem;
  color: var(--warm-gray);
  line-height: 1.5;
}

/* ---------- Utility Classes ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.d-flex { display: flex; }
.d-grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }

.w-full { width: 100%; }
.rounded { border-radius: var(--radius-md); }
.shadow { box-shadow: var(--shadow-md); }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-lg) 0;
}

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

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--warm-gray);
  flex-shrink: 0;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.125rem;
}

/* Pill / tag (non-status) */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--soft-beige);
  color: var(--warm-gray);
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--soft-beige) 25%, #EDE3D6 50%, var(--soft-beige) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Focus ring for accessibility */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--warm-gray);
}
