/* ============================================
   Appsure — Design System CSS
   ============================================ */

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

/* ---- Custom Properties ---- */
:root {
  /* Brand Colors */
  --ap-primary: #1a56db;
  --ap-primary-hover: #1648b8;
  --ap-primary-light: #eff6ff;
  --ap-accent: #06b6d4;
  --ap-dark: #0f172a;
  --ap-dark-surface: #1e293b;
  --ap-white: #ffffff;
  --ap-text: #1e293b;
  --ap-text-secondary: #64748b;
  --ap-border: #e2e8f0;
  --ap-border-light: #f1f5f9;
  --ap-light: #f8fafc;

  /* Semantic Colors */
  --ap-success: #10b981;
  --ap-success-light: #ecfdf5;
  --ap-warning: #f59e0b;
  --ap-warning-light: #fffbeb;
  --ap-danger: #ef4444;
  --ap-danger-light: #fef2f2;
  --ap-info: #3b82f6;
  --ap-info-light: #eff6ff;

  /* Typography */
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --ap-font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --ap-font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing / Radius */
  --ap-radius: 12px;
  --ap-radius-lg: 16px;
  --ap-radius-xl: 24px;
  --ap-radius-full: 9999px;

  /* Shadows (blue tinted) */
  --ap-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --ap-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --ap-shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.12);
  --ap-shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.15);
  --ap-shadow-blue: 0 4px 14px rgba(26, 86, 219, 0.3);
  --ap-shadow-dark: 0 4px 14px rgba(15, 23, 42, 0.2);

  /* Transitions */
  --ap-transition: 0.2s ease;
  --ap-transition-slow: 0.3s ease;
}


/* ============================================
   1. Reset & Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ap-text);
  background: var(--ap-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--ap-primary);
  text-decoration: none;
  transition: color var(--ap-transition);
}

a:hover {
  color: var(--ap-primary-hover);
}

ul, ol {
  list-style: none;
}

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


/* ============================================
   2. Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ap-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

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

.text-lead {
  font-size: 1.125rem;
  color: var(--ap-text-secondary);
  line-height: 1.7;
}

.text-small {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-primary { color: var(--ap-primary); }
.text-accent { color: var(--ap-accent); }
.text-secondary { color: var(--ap-text-secondary); }
.text-success { color: var(--ap-success); }
.text-warning { color: var(--ap-warning); }
.text-danger { color: var(--ap-danger); }
.text-white { color: var(--ap-white); }

strong, .font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }


/* ============================================
   3. Container / Layout
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.section-lg {
  padding: 120px 0;
}


/* ============================================
   4. Site Header
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ap-border);
  padding: 14px 0;
  transition: all var(--ap-transition-slow);
}

.site-header.scrolled {
  padding: 10px 0;
  box-shadow: var(--ap-shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.header-logo {
  height: 32px;
  width: auto;
}

.header-logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ap-dark);
  text-decoration: none;
}

.header-logo-text span {
  color: var(--ap-primary);
}

.header-badge {
  height: 28px;
  width: auto;
  opacity: 0.8;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav a {
  color: var(--ap-text);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-nav a:hover {
  color: var(--ap-primary);
  background: var(--ap-primary-light);
}

.header-nav a.active,
.header-nav a.active-nav {
  color: var(--ap-primary);
  background: var(--ap-primary-light);
  font-weight: 600;
}

.header-nav a .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.header-nav a:hover .nav-icon,
.header-nav a.active .nav-icon {
  opacity: 1;
}

.header-nav .btn-primary {
  padding: 10px 24px;
  font-size: 0.875rem;
}

/* Mobile menu toggle */
.header-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ap-dark);
}


/* ============================================
   5. Buttons
   ============================================ */

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--ap-radius);
  cursor: pointer;
  transition: all var(--ap-transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

/* Primary — blue filled */
.btn-primary {
  background: var(--ap-primary);
  color: var(--ap-white);
  box-shadow: var(--ap-shadow-blue);
}

.btn-primary:hover {
  background: var(--ap-primary-hover);
  color: var(--ap-white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: var(--ap-shadow-blue);
}

.btn-primary:disabled,
.btn-primary.disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Secondary — outlined */
.btn-secondary {
  background: transparent;
  color: var(--ap-primary);
  border: 2px solid var(--ap-primary);
}

.btn-secondary:hover {
  background: var(--ap-primary);
  color: var(--ap-white);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.97);
}

/* Ghost — text only */
.btn-ghost {
  background: transparent;
  color: var(--ap-primary);
  padding: 14px 20px;
}

.btn-ghost:hover {
  background: var(--ap-primary-light);
  color: var(--ap-primary-hover);
}

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

/* Size variants */
.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
  border-radius: var(--ap-radius);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.125rem;
  border-radius: var(--ap-radius-lg);
}

/* Full-width button */
.btn-block {
  width: 100%;
}

/* Button with icon */
.btn-icon {
  padding: 12px;
  border-radius: var(--ap-radius);
}

/* Danger button */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--ap-radius);
  cursor: pointer;
  transition: all var(--ap-transition);
  text-decoration: none;
  background: var(--ap-danger);
  color: var(--ap-white);
}

.btn-danger:hover {
  background: #dc2626;
  color: var(--ap-white);
  transform: translateY(-1px);
}


/* ============================================
   6. Cards
   ============================================ */

.card {
  background: var(--ap-white);
  border-radius: var(--ap-radius-lg);
  padding: 24px;
  box-shadow: var(--ap-shadow-md);
  transition: all var(--ap-transition-slow);
  border: 1px solid var(--ap-border-light);
}

.card:hover {
  box-shadow: var(--ap-shadow-lg);
  transform: translateY(-3px);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--ap-border);
}

.card-flat:hover {
  box-shadow: var(--ap-shadow-md);
  border-color: var(--ap-primary);
}

.card-header {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--ap-border-light);
}

.card-body {
  flex: 1;
}

.card-footer {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--ap-border-light);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ap-dark);
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--ap-text-secondary);
}


/* ============================================
   7. Chips
   ============================================ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--ap-white);
  border: 1.5px solid var(--ap-border);
  border-radius: var(--ap-radius-full);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ap-text);
  cursor: pointer;
  transition: all var(--ap-transition);
  text-decoration: none;
  user-select: none;
}

.chip:hover {
  border-color: var(--ap-primary);
  color: var(--ap-primary);
  background: var(--ap-primary-light);
}

.chip.active {
  background: var(--ap-primary);
  color: var(--ap-white);
  border-color: var(--ap-primary);
}

.chip.active:hover {
  background: var(--ap-primary-hover);
  border-color: var(--ap-primary-hover);
  color: var(--ap-white);
}

.chip-sm {
  padding: 4px 12px;
  font-size: 0.75rem;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


/* ============================================
   8. Badges
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--ap-radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.5;
}

/* Default badge */
.badge {
  background: var(--ap-primary-light);
  color: var(--ap-primary);
  border: 1px solid rgba(26, 86, 219, 0.15);
}

/* Status: Active (green) */
.badge-active,
.badge-success {
  background: var(--ap-success-light);
  color: var(--ap-success);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Status: Pending (amber) */
.badge-pending,
.badge-warning {
  background: var(--ap-warning-light);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Status: Recommended (gold) */
.badge-recommended {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 700;
}

/* Status: Danger */
.badge-danger {
  background: var(--ap-danger-light);
  color: var(--ap-danger);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Status: Info */
.badge-info {
  background: var(--ap-info-light);
  color: var(--ap-info);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* Neutral badge */
.badge-neutral {
  background: var(--ap-light);
  color: var(--ap-text-secondary);
  border: 1px solid var(--ap-border);
}

/* Large badge */
.badge-lg {
  padding: 6px 16px;
  font-size: 0.8rem;
}

/* Dot indicator inside badge */
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}


/* ============================================
   9. Trust Strip
   ============================================ */

.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ap-text-secondary);
}


/* ============================================
   10. KPI Cards
   ============================================ */

.kpi-card {
  background: var(--ap-white);
  border-radius: var(--ap-radius-lg);
  padding: 20px 24px;
  box-shadow: var(--ap-shadow-sm);
  border: 1px solid var(--ap-border);
}

.kpi-card .kpi-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: var(--ap-dark);
  line-height: 1;
}

.kpi-card .kpi-label {
  font-size: 0.85rem;
  color: var(--ap-text-secondary);
  margin-top: 4px;
}

.kpi-card .kpi-trend {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

.kpi-trend.up { color: var(--ap-success); }
.kpi-trend.down { color: var(--ap-danger); }


/* ============================================
   11. Gradients & Backgrounds
   ============================================ */

.bg-hero-gradient {
  background: linear-gradient(135deg, var(--ap-dark) 0%, var(--ap-dark-surface) 50%, var(--ap-dark) 100%);
}

.bg-light {
  background: var(--ap-light);
}

.bg-dark {
  background: var(--ap-dark);
}

.bg-dark-surface {
  background: var(--ap-dark-surface);
}

.bg-primary-light {
  background: var(--ap-primary-light);
}

.bg-white {
  background: var(--ap-white);
}


/* ============================================
   12. Urgency / Alert Badge
   ============================================ */

.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(26, 86, 219, 0.1);
  border: 1px solid rgba(26, 86, 219, 0.2);
  border-radius: var(--ap-radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ap-primary);
}


/* ============================================
   13. Animations
   ============================================ */

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

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes radarDraw {
  from { stroke-dashoffset: 1000; opacity: 0; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

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

/* Animation utility classes */
.fade-in       { animation: fadeIn 0.5s ease-out both; }
.slide-up      { animation: slideUp 0.5s ease-out both; }
.slide-down    { animation: slideDown 0.3s ease-out both; }
.scale-in      { animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.card-reveal   { animation: cardReveal 0.6s ease-out both; }
.count-up      { animation: countUp 0.4s ease-out both; }
.anim-float    { animation: float 6s ease-in-out infinite; }
.anim-pulse    { animation: pulse 2s ease-in-out infinite; }
.anim-shimmer  {
  background: linear-gradient(90deg, transparent 0%, rgba(26, 86, 219, 0.06) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }


/* ============================================
   14. Footer
   ============================================ */

.site-footer {
  background: var(--ap-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand p {
  margin-top: 12px;
  line-height: 1.7;
}

.footer-links h4 {
  color: var(--ap-white);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
  font-size: 0.85rem;
  transition: color var(--ap-transition);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ap-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-badges {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-badges img {
  height: 24px;
  opacity: 0.7;
}


/* ============================================
   15. Forms
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ap-text);
  background: var(--ap-white);
  border: 1.5px solid var(--ap-border);
  border-radius: var(--ap-radius);
  transition: all var(--ap-transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--ap-primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.form-input::placeholder {
  color: var(--ap-text-secondary);
  opacity: 0.6;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--ap-text-secondary);
  margin-top: 4px;
}

.form-error {
  font-size: 0.8rem;
  color: var(--ap-danger);
  margin-top: 4px;
}


/* ============================================
   16. Tables
   ============================================ */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--ap-radius-lg);
  border: 1px solid var(--ap-border);
}

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

.table th {
  background: var(--ap-light);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  color: var(--ap-text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--ap-border);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ap-border-light);
  color: var(--ap-text);
}

.table tbody tr:hover {
  background: var(--ap-primary-light);
}

.table tbody tr:last-child td {
  border-bottom: none;
}


/* ============================================
   17. Responsive
   ============================================ */

/* Mobile: < 768px */
@media (max-width: 767px) {
  .container,
  .container-wide,
  .container-narrow {
    padding: 0 16px;
  }

  .section {
    padding: 48px 0;
  }

  .section-lg {
    padding: 64px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .header-nav {
    display: none;
  }

  .header-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ap-white);
    padding: 16px 20px;
    border-bottom: 1px solid var(--ap-border);
    box-shadow: var(--ap-shadow-md);
    gap: 12px;
  }

  .header-menu-toggle {
    display: block;
  }

  .trust-strip {
    gap: 16px;
  }

  .hide-mobile {
    display: none !important;
  }
}

/* Tablet: 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hide-tablet {
    display: none !important;
  }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  .hide-desktop {
    display: none !important;
  }
}

/* Wide: 1280px+ */
@media (min-width: 1280px) {
  .container-wide {
    padding: 0 40px;
  }
}


/* ============================================
   18. Utility Classes
   ============================================ */

/* Text alignment */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Flex helpers */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.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: flex-start; }
.flex-end     { display: flex; align-items: flex-end; justify-content: flex-end; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1       { flex: 1; }
.gap-xs       { gap: 4px; }
.gap-sm       { gap: 8px; }
.gap-md       { gap: 16px; }
.gap-lg       { gap: 24px; }
.gap-xl       { gap: 32px; }
.gap-2xl      { gap: 48px; }

/* Grid helpers */
.grid         { display: grid; }
.grid-2       { grid-template-columns: repeat(2, 1fr); }
.grid-3       { grid-template-columns: repeat(3, 1fr); }
.grid-4       { grid-template-columns: repeat(4, 1fr); }

@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);
  }
}

/* Spacing */
.m-0  { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mt-8 { margin-top: 64px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }
.mb-6 { margin-bottom: 48px; }
.mb-8 { margin-bottom: 64px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0  { padding: 0; }
.p-1  { padding: 4px; }
.p-2  { padding: 8px; }
.p-3  { padding: 16px; }
.p-4  { padding: 24px; }
.p-5  { padding: 32px; }
.p-6  { padding: 48px; }
.px-3 { padding-left: 16px; padding-right: 16px; }
.px-4 { padding-left: 24px; padding-right: 24px; }
.py-3 { padding-top: 16px; padding-bottom: 16px; }
.py-4 { padding-top: 24px; padding-bottom: 24px; }
.py-5 { padding-top: 32px; padding-bottom: 32px; }

/* Width/height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Border radius */
.rounded     { border-radius: var(--ap-radius); }
.rounded-lg  { border-radius: var(--ap-radius-lg); }
.rounded-xl  { border-radius: var(--ap-radius-xl); }
.rounded-full { border-radius: var(--ap-radius-full); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky   { position: sticky; }

/* Visibility */
.hidden     { display: none; }
.visible    { visibility: visible; }
.invisible  { visibility: hidden; }
.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;
}

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

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

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dividers */
.divider {
  border: none;
  border-top: 1px solid var(--ap-border);
  margin: 24px 0;
}

.divider-light {
  border: none;
  border-top: 1px solid var(--ap-border-light);
  margin: 16px 0;
}
