/**
 * CareLane Brand Styles
 * Version 1.0
 * A Vivid Care Platform
 * 
 * Usage: Include after Bootstrap CSS
 * <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
 * <link href="path/to/bootstrap.min.css" rel="stylesheet">
 * <link href="path/to/carelane.css" rel="stylesheet">
 */

/* ========================================
   CSS Variables (Custom Properties)
   ======================================== */

:root {
  /* Bootstrap Overrides */
  --bs-primary: #00B097;
  --bs-primary-rgb: 0, 176, 151;
  --bs-link-color: #00B097;
  --bs-link-hover-color: #00997F;
  --bs-btn-active-bg: #00997F;
  --bs-btn-active-border-color: #00997F;
  
  /* Primary Colours */
  --cl-teal: #00B097;
  --cl-teal-hover: #00997F;
  --cl-teal-light: #E6F7F4;
  --cl-charcoal: #262635;
  --cl-white: #FFFFFF;
  
  /* Neutrals */
  --cl-warm-grey: #D9D2CA;
  --cl-light-grey: #F1F3F4;
  --cl-mid-grey: #6B7280;
  --cl-border: #E5E7EB;
  
  /* Semantic Colours */
  --cl-success: #059669;
  --cl-success-light: #D1FAE5;
  --cl-warning: #D97706;
  --cl-warning-light: #FEF3C7;
  --cl-error: #DC2626;
  --cl-error-light: #FEE2E2;
  --cl-info: #0284C7;
  --cl-info-light: #E0F2FE;
  
  /* Shadows */
  --cl-shadow-sm: 0 1px 2px rgba(38, 38, 53, 0.05);
  --cl-shadow-md: 0 4px 6px rgba(38, 38, 53, 0.07);
  --cl-shadow-lg: 0 10px 15px rgba(38, 38, 53, 0.1);
  
  /* Spacing */
  --cl-space-1: 4px;
  --cl-space-2: 8px;
  --cl-space-3: 12px;
  --cl-space-4: 16px;
  --cl-space-5: 20px;
  --cl-space-6: 24px;
  --cl-space-8: 32px;
  --cl-space-10: 40px;
  --cl-space-12: 48px;
  
  /* Border Radius */
  --cl-radius-sm: 4px;
  --cl-radius-md: 6px;
  --cl-radius-lg: 8px;
  --cl-radius-xl: 12px;
  --cl-radius-full: 9999px;
}

/* ========================================
   Base Styles
   ======================================== */

html {
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--cl-charcoal);
  background-color: var(--cl-light-grey);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ========================================
   Typography
   ======================================== */

h1, .cl-h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--cl-charcoal);
  margin-bottom: 1rem;
}

h2, .cl-h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--cl-charcoal);
  margin-bottom: 0.75rem;
}

h3, .cl-h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cl-charcoal);
  margin-bottom: 0.5rem;
}

h4, .cl-h4 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cl-charcoal);
  margin-bottom: 0.5rem;
}

h5, .cl-h5 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cl-charcoal);
  margin-bottom: 0.5rem;
}

h6, .cl-h6 {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cl-charcoal);
  margin-bottom: 0.5rem;
}

.cl-body-lg {
  font-size: 1rem;
  line-height: 1.6;
}

.cl-body-sm {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--cl-mid-grey);
}

.cl-caption {
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--cl-mid-grey);
}

.cl-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--cl-charcoal);
}

.cl-text-muted {
  color: var(--cl-mid-grey);
}

.cl-text-teal {
  color: var(--cl-teal);
}

/* ========================================
   Links
   ======================================== */

a {
  color: var(--cl-teal);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--cl-teal-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--cl-teal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--cl-radius-md);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:focus-visible {
  outline: 2px solid var(--cl-teal);
  outline-offset: 2px;
}

.btn i,
.btn .cl-icon {
  flex-shrink: 0;
}

/* Primary Button */
.btn-primary,
.cl-btn-primary {
  background-color: var(--cl-teal);
  border-color: var(--cl-teal);
  color: var(--cl-white);
}

.btn-primary:hover,
.cl-btn-primary:hover {
  background-color: var(--cl-teal-hover);
  border-color: var(--cl-teal-hover);
  box-shadow: var(--cl-shadow-md);
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary.active,
.cl-btn-primary:active,
.cl-btn-primary:focus,
.cl-btn-primary.active {
  background-color: var(--cl-teal-hover) !important;
  border-color: var(--cl-teal-hover) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 176, 151, 0.25) !important;
  transform: translateY(1px);
}

.btn-primary:focus-visible,
.cl-btn-primary:focus-visible {
  background-color: var(--cl-teal-hover) !important;
  border-color: var(--cl-teal-hover) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 176, 151, 0.25) !important;
  outline: none !important;
}

/* Prevent default Bootstrap blue outline/flash */
.btn:focus,
.btn:active,
.btn:focus-visible {
  outline: none !important;
}

.btn-check:focus + .btn,
.btn:focus {
  box-shadow: none !important;
}

.btn-check:checked + .btn-primary,
.btn-check:active + .btn-primary {
  background-color: var(--cl-teal-hover) !important;
  border-color: var(--cl-teal-hover) !important;
}

/* Global button active state - prevent any blue flash */
.btn:not(.btn-secondary):not(.btn-outline-secondary):active {
  background-color: var(--cl-teal-hover) !important;
  border-color: var(--cl-teal-hover) !important;
  color: #fff !important;
}

.btn-outline-primary:active,
.btn-outline-primary:focus {
  background-color: var(--cl-teal) !important;
  border-color: var(--cl-teal) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* Secondary Button */
.btn-secondary,
.cl-btn-secondary {
  background-color: var(--cl-white);
  border-color: var(--cl-border);
  color: var(--cl-charcoal);
}

.btn-secondary:hover,
.cl-btn-secondary:hover {
  background-color: var(--cl-light-grey);
  border-color: var(--cl-warm-grey);
  color: var(--cl-charcoal);
}

/* Outline Button */
.btn-outline-primary,
.cl-btn-outline {
  background-color: transparent;
  border-color: var(--cl-teal);
  color: var(--cl-teal);
}

.btn-outline-primary:hover,
.cl-btn-outline:hover {
  background-color: var(--cl-teal-light);
  border-color: var(--cl-teal);
  color: var(--cl-teal);
}

/* Button Sizes */
.btn-sm, .cl-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg, .cl-btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* ========================================
   Forms
   ======================================== */

.form-label,
.cl-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cl-charcoal);
  margin-bottom: 6px;
}

.cl-form-label-required::after {
  content: " *";
  color: var(--cl-error);
}

.form-control,
.cl-input {
  padding: 10px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--cl-charcoal);
  background-color: var(--cl-white);
  border: 1px solid var(--cl-border);
  border-radius: var(--cl-radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:hover,
.cl-input:hover {
  border-color: var(--cl-warm-grey);
}

.form-control:focus,
.cl-input:focus {
  border-color: var(--cl-teal);
  box-shadow: 0 0 0 3px var(--cl-teal-light);
  outline: none;
}

.form-control::placeholder,
.cl-input::placeholder {
  color: var(--cl-mid-grey);
}

.form-select,
.cl-select {
  padding: 10px 40px 10px 12px;
  font-size: 0.875rem;
  border: 1px solid var(--cl-border);
  border-radius: var(--cl-radius-md);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-select:focus,
.cl-select:focus {
  border-color: var(--cl-teal);
  box-shadow: 0 0 0 3px var(--cl-teal-light);
  outline: none;
}

.form-check-input {
  width: 18px;
  height: 18px;
}

.form-check-input:checked {
  background-color: var(--cl-teal);
  border-color: var(--cl-teal);
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px var(--cl-teal-light);
  border-color: var(--cl-teal);
}

.cl-form-help {
  font-size: 0.75rem;
  color: var(--cl-mid-grey);
  margin-top: 4px;
}

.is-invalid,
.form-control.is-invalid {
  border-color: var(--cl-error);
}

.is-invalid:focus,
.form-control.is-invalid:focus {
  border-color: var(--cl-error);
  box-shadow: 0 0 0 3px var(--cl-error-light);
}

.invalid-feedback,
.cl-form-error {
  font-size: 0.75rem;
  color: var(--cl-error);
  margin-top: 4px;
}

/* Input Group */
.cl-input-group {
  position: relative;
}

.cl-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cl-mid-grey);
  pointer-events: none;
  z-index: 4;
}

.cl-input-group .form-control,
.cl-input-group .cl-input {
  padding-left: 40px;
}

/* ========================================
   Cards
   ======================================== */

.card,
.cl-card {
  background-color: var(--cl-white);
  border: 1px solid var(--cl-border);
  border-radius: var(--cl-radius-lg);
}

.card-body {
  padding: 20px;
}

.card-header,
.cl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: transparent;
  border-bottom: 1px solid var(--cl-border);
}

.card-title,
.cl-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.cl-card-elevated {
  box-shadow: var(--cl-shadow-md);
  border: none;
}

.cl-card-interactive {
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.cl-card-interactive:hover {
  box-shadow: var(--cl-shadow-md);
  transform: translateY(-1px);
}

/* CareLane-specific card classes */
.carelane-card {
  background-color: var(--cl-white);
  border: 1px solid var(--cl-border);
  border-radius: var(--cl-radius-lg);
  margin-bottom: 24px;
}

.carelane-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: transparent;
  border-bottom: 1px solid var(--cl-border);
}

.carelane-card-header h3,
.carelane-card-header h4,
.carelane-card-header h5 {
  margin: 0;
}

.carelane-card-body {
  padding: 24px;
}

/* ========================================
   Tables
   ======================================== */

.table,
.cl-table {
  font-size: 0.875rem;
}

.table > thead > tr > th,
.cl-table th {
  font-weight: 600;
  color: var(--cl-mid-grey);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cl-border);
  background-color: var(--cl-light-grey);
}

.table > tbody > tr > td,
.cl-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cl-border);
  vertical-align: middle;
}

.table > tbody > tr:hover,
.cl-table tbody tr:hover {
  background-color: var(--cl-light-grey);
}

/* Client detail tables - cleaner styling */
.carelane-card-body .table-borderless th,
.carelane-card-body .table-borderless td {
  background-color: transparent;
  border: none;
  padding: 8px 0;
}

.carelane-card-body .table-borderless th {
  font-weight: 600;
  color: var(--cl-mid-grey);
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: normal;
}

.carelane-card-body .table-borderless {
  margin-bottom: 0;
}

/* Cleaner table styling for client details */
.carelane-card-body .table-sm th,
.carelane-card-body .table-sm td {
  background-color: transparent;
  border-bottom: 1px solid var(--cl-border);
  padding: 12px 16px;
}

.carelane-card-body .table-sm th {
  font-weight: 600;
  color: var(--cl-charcoal);
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: normal;
  background-color: transparent;
}

/* ========================================
   Badges
   ======================================== */

.badge,
.cl-badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--cl-radius-full);
}

.bg-primary,
.cl-badge-teal {
  background-color: var(--cl-teal-light) !important;
  color: var(--cl-teal) !important;
}

.bg-success,
.cl-badge-success {
  background-color: var(--cl-success-light) !important;
  color: var(--cl-success) !important;
}

.bg-warning,
.cl-badge-warning {
  background-color: var(--cl-warning-light) !important;
  color: var(--cl-warning) !important;
}

.bg-danger,
.cl-badge-error {
  background-color: var(--cl-error-light) !important;
  color: var(--cl-error) !important;
}

.bg-info,
.cl-badge-info {
  background-color: var(--cl-info-light) !important;
  color: var(--cl-info) !important;
}

.bg-secondary,
.cl-badge-default {
  background-color: var(--cl-light-grey) !important;
  color: var(--cl-mid-grey) !important;
}

/* Status Dots */
.cl-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.cl-status-dot-success { background-color: var(--cl-success); }
.cl-status-dot-warning { background-color: var(--cl-warning); }
.cl-status-dot-error { background-color: var(--cl-error); }
.cl-status-dot-info { background-color: var(--cl-info); }

/* ========================================
   Alerts
   ======================================== */

.alert,
.cl-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--cl-radius-lg);
  font-size: 0.875rem;
  border: none;
}

.alert-success,
.cl-alert-success {
  background-color: var(--cl-success-light);
  color: var(--cl-success);
}

.alert-warning,
.cl-alert-warning {
  background-color: var(--cl-warning-light);
  color: var(--cl-warning);
}

.alert-danger,
.cl-alert-error {
  background-color: var(--cl-error-light);
  color: var(--cl-error);
}

.alert-info,
.cl-alert-info {
  background-color: var(--cl-info-light);
  color: var(--cl-info);
}

/* ========================================
   Navigation - Header
   ======================================== */

.cl-header {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 64px;
  background-color: var(--cl-white);
  border-bottom: 1px solid var(--cl-border);
  box-shadow: var(--cl-shadow-sm);
  z-index: 1030;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 16px;
}

.cl-header-logo {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.cl-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 24px;
}

.cl-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cl-header-actions .user-info {
  line-height: 1.3;
}

.cl-header-actions .user-info p {
  margin: 0;
  padding: 0;
}

.cl-header-actions .user-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--cl-charcoal);
}

.cl-header-actions .user-org {
  font-size: 0.75rem;
  color: var(--cl-mid-grey);
}

.cl-header-actions .credit-display {
  text-align: right;
  line-height: 1.3;
}

.cl-header-actions .credit-label {
  font-size: 0.75rem;
  color: var(--cl-mid-grey);
  margin: 0;
}

.cl-header-actions .credit-amount {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--cl-charcoal);
  margin: 0;
}

/* ========================================
   Navigation - Sidebar
   ======================================== */

.cl-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background-color: var(--cl-white);
  border-right: none;
  padding: 0;
  overflow-y: auto;
  z-index: 1020;
  display: flex;
  flex-direction: column;
}

.cl-sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background-color: var(--cl-white);
  border-bottom: 1px solid var(--cl-border);
  flex-shrink: 0;
}

.cl-sidebar-section {
  padding: 16px 12px;
  margin-bottom: 0;
  border-right: 1px solid var(--cl-border);
  flex: 1;
  overflow-y: auto;
}

.cl-sidebar-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cl-mid-grey);
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 16px;
}

.cl-sidebar-label:first-child {
  margin-top: 0;
}

.cl-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--cl-charcoal);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--cl-radius-md);
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
  margin-bottom: 2px;
}

.cl-sidebar-link:hover {
  background-color: var(--cl-light-grey);
  color: var(--cl-charcoal);
  text-decoration: none;
}

.cl-sidebar-link.active {
  background-color: var(--cl-teal-light);
  color: var(--cl-teal);
}

.cl-sidebar-link svg,
.cl-sidebar-link i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.cl-sidebar-link .badge {
  margin-left: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  min-width: 18px;
  text-align: center;
}

.cl-sidebar-link span + .badge {
  margin-left: 4px;
}

/* Navigation Link (generic) */
.cl-nav-link {
  color: var(--cl-charcoal);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--cl-radius-md);
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.cl-nav-link:hover {
  background-color: var(--cl-light-grey);
  color: var(--cl-charcoal);
  text-decoration: none;
}

.cl-nav-link.active {
  color: var(--cl-teal);
  background-color: var(--cl-teal-light);
}

/* ========================================
   Main Content Area
   ======================================== */

.cl-main {
  margin-left: 240px;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  background-color: var(--cl-light-grey);
  display: flex;
  flex-direction: column;
  width: calc(100% - 240px);
  overflow-x: hidden;
}

.cl-content {
  padding: 0px 32px;
  max-width: 100%;
  width: 100%;
  flex: 1 0 auto;
  box-sizing: border-box;
}

.cl-page-header {
  margin-bottom: 24px;
}

.cl-page-title {
  margin-bottom: 4px;
}

.cl-page-subtitle {
  color: var(--cl-mid-grey);
  font-size: 0.875rem;
  margin: 0;
}

/* Full width layout (no sidebar) */
.cl-main-full {
  margin-left: 0;
}

/* Footer stays at bottom */
.carelane-footer {
  flex-shrink: 0;
  margin-top: auto;
}

/* ========================================
   Icons
   ======================================== */

.cl-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.cl-icon-sm {
  width: 16px;
  height: 16px;
}

.cl-icon-xl {
  width: 48px;
  height: 48px;
}

.cl-icon-lg {
  width: 24px;
  height: 24px;
}

.cl-icon-teal { color: var(--cl-teal); }
.cl-icon-muted { color: var(--cl-mid-grey); }
.cl-icon-success { color: var(--cl-success); }
.cl-icon-warning { color: var(--cl-warning); }
.cl-icon-error { color: var(--cl-error); }

/* ========================================
   Dropdowns
   ======================================== */

.dropdown-menu {
  border: 1px solid var(--cl-border);
  border-radius: var(--cl-radius-lg);
  box-shadow: var(--cl-shadow-lg);
  padding: 8px;
}

.dropdown-item {
  padding: 8px 12px;
  border-radius: var(--cl-radius-sm);
  font-size: 0.875rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--cl-light-grey);
  color: var(--cl-charcoal);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--cl-teal-light);
  color: var(--cl-teal);
}

.dropdown-divider {
  margin: 8px 0;
  border-color: var(--cl-border);
}

/* ========================================
   Modals
   ======================================== */

.modal-content {
  border: none;
  border-radius: var(--cl-radius-xl);
  box-shadow: var(--cl-shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--cl-border);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--cl-border);
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
  gap: 4px;
}

.page-link {
  border: 1px solid var(--cl-border);
  border-radius: var(--cl-radius-md);
  color: var(--cl-charcoal);
  padding: 8px 14px;
  font-size: 0.875rem;
}

.page-link:hover {
  background-color: var(--cl-light-grey);
  border-color: var(--cl-warm-grey);
  color: var(--cl-charcoal);
}

.page-item.active .page-link {
  background-color: var(--cl-teal);
  border-color: var(--cl-teal);
  color: var(--cl-white);
}

.page-item.disabled .page-link {
  background-color: var(--cl-light-grey);
  border-color: var(--cl-border);
  color: var(--cl-mid-grey);
}

/* ========================================
   Utilities
   ======================================== */

/* Background Colours */
.bg-teal { background-color: var(--cl-teal) !important; }
.bg-teal-light { background-color: var(--cl-teal-light) !important; }
.bg-charcoal { background-color: var(--cl-charcoal) !important; }
.bg-light-grey { background-color: var(--cl-light-grey) !important; }
.bg-warm-grey { background-color: var(--cl-warm-grey) !important; }

/* Text Colours */
.text-teal { color: var(--cl-teal) !important; }
.text-charcoal { color: var(--cl-charcoal) !important; }
.text-mid-grey { color: var(--cl-mid-grey) !important; }

/* Border Colours */
.border-teal { border-color: var(--cl-teal) !important; }

/* ========================================
   Responsive - Mobile
   ======================================== */

@media (max-width: 991.98px) {
  .cl-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .cl-sidebar.show {
    transform: translateX(0);
  }
  
  .cl-main {
    margin-left: 0;
    width: 100%;
  }
  
  .cl-header {
    left: 0;
    padding: 0 24px;
  }
}

@media (max-width: 575.98px) {
  .cl-header {
    padding: 0 16px;
    left: 0;
  }
  
  .cl-content {
    padding: 20px 16px;
  }
  
  h1, .cl-h1 {
    font-size: 1.5rem;
  }
  
  h2, .cl-h2 {
    font-size: 1.25rem;
  }
  
  .cl-header-logo {
    height: 24px;
  }
}

/* ========================================
   Additional Polish
   ======================================== */

/* Auth pages (login, register) */
.carelane-auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--cl-light-grey);
  padding: 2rem 1rem;
}

.carelane-auth-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.carelane-auth-card {
  background: var(--cl-white);
  padding: 2.5rem;
  box-shadow: var(--cl-shadow-lg);
}

.carelane-auth-logo {
  margin-bottom: 2rem;
}

.carelane-auth-card form {
  margin-top: 1.5rem;
}

/* Smooth transitions */
a, button, .btn {
  transition: all 0.15s ease;
}

/* Card spacing improvements */
.card-body {
  padding: 24px;
}

/* Table improvements */
.table {
  margin-bottom: 0;
}

/* Better spacing for form rows */
.row.mb-3, .row.g-3 {
  margin-bottom: 1rem !important;
}

/* Container improvements */
.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

/* Improved empty states */
.text-center.py-5 {
  padding: 3rem 1.5rem;
}

/* Better spacing for alerts */
.alert {
  margin-bottom: 1.5rem;
}

/* Stat cards on dashboard */
.stat-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

/* Breadcrumbs styling */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.breadcrumb-item a {
  color: var(--cl-teal);
}
/* Input group improvements */
.input-group {
  gap: 0;
}

.input-group .btn {
  border-left: none;
}

/* Page title improvements */
.cl-page-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--cl-border);
}

/* ========================================
   Product Cards & Archive Layout
   ======================================== */

/* Product card improvements for better spacing */
.product-card {
  transition: all 0.2s ease;
}

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

.product-card .card-body {
  padding: 1rem;
}

.product-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* Better responsive grid spacing */
@media (min-width: 768px) {
  .row-cols-md-2 > .col {
    flex: 0 0 auto;
    width: 50%;
  }
}

@media (min-width: 992px) {
  .row-cols-lg-3 > .col {
    flex: 0 0 auto;
    width: 33.333333%;
  }
}

/* Product image improvements */
.product-image-link {
  display: block;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}

.product-image-link:hover .product-image {
  transform: scale(1.05);
}

/* ========================================
   Tab Styling & Backgrounds
   ======================================== */

/* White backgrounds for tab containers on product pages */
.nav-tabs {
  background: var(--cl-white);
  padding: 0.5rem 1rem 0;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid var(--cl-border);
}

.tab-content {
  background: var(--cl-white);
  padding: 1.5rem;
  border-radius: 0 0 8px 8px;
  border: 1px solid var(--cl-border);
  border-top: none;
}

.nav-tabs .nav-link {
  color: var(--cl-mid-grey);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 0.75rem 1.25rem;
}

.nav-tabs .nav-link:hover {
  color: var(--cl-teal);
  border-bottom-color: var(--cl-teal);
  background: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--cl-teal);
  border-bottom-color: var(--cl-teal);
  background: transparent;
  font-weight: 600;
}
