/* ================================
   Claim Command Pro DESIGN SYSTEM
   Premium Visual Redesign - Phase 11
================================ */

/* ================================
   BRAND TYPOGRAPHY
================================ */
:root {
  --font-sans: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', serif;

  /* ================================
     SPACING SYSTEM (4-based scale)
  ================================= */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 40px;
  --space-10: 48px;
  --space-12: 64px;

  /* ================================
     COLOR SYSTEM — PREMIUM DARK
  ================================= */
  --bg-main: #0f172a;       /* Slate-900 */
  --bg-elevated: #1e293b;   /* Slate-800 */
  --bg-card: #162033;       /* Slightly lighter */
  --bg-glass: rgba(255,255,255,0.05);
  --bg-glass-strong: rgba(255,255,255,0.08);

  --text-primary: #f8fafc;   /* Slate-50 */
  --text-secondary: #cbd5e1; /* Slate-300 */
  --text-muted: #64748b;     /* Slate-400 */
  --text-dim: #475569;      /* Slate-500 */

  --accent: #38bdf8;         /* Sky-400 */
  --accent-dark: #0ea5e9;    /* Sky-500 */
  --accent-light: #7dd3fc;  /* Sky-300 */
  --accent-soft: rgba(56,189,248,0.25);
  --accent-glow: 0 0 32px rgba(56,189,248,0.35);
  --accent-glow-strong: 0 0 48px rgba(56,189,248,0.5);

  --success: #22c55e;        /* Green-500 */
  --success-soft: rgba(34,197,94,0.25);
  --warning: #fbbf24;        /* Amber-400 */
  --error: #ef4444;          /* Red-500 */

  /* ================================
     SHADOW SYSTEM
  ================================= */
  --shadow-soft: 0 4px 14px rgba(0,0,0,0.3);
  --shadow-medium: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-strong: 0 10px 50px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 20px rgba(56,189,248,0.3);

  /* ================================
     RADIUS SYSTEM
  ================================= */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ================================
   GLOBAL RESET + SMOOTHING
================================ */
body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ================================
   UTILITY CLASSES
================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

.card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);
}

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

.text-secondary {
  color: var(--text-secondary);
}

/* ================================
   PREMIUM BUTTON SYSTEM
================================ */
.btn-primary,
button.btn-primary,
a.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 14px rgba(56,189,248,0.3);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(56,189,248,0.5);
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline,
button.btn-outline,
a.btn-outline {
  border: 1px solid var(--accent);
  background: transparent;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  color: var(--accent);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-outline:hover {
  background: var(--accent-soft);
  color: #fff;
  border-color: var(--accent-light);
  box-shadow: 0 0 12px rgba(56,189,248,0.25);
}

.btn-secondary,
button.btn-secondary,
a.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-1px);
}

/* ================================
   PREMIUM ROADMAP REDESIGN
================================ */
.roadmap-stage-node,
.stage-node {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.roadmap-stage-node::before,
.stage-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.1), transparent);
  transition: left 0.5s ease;
}

.roadmap-stage-node:hover::before,
.stage-node:hover::before {
  left: 100%;
}

.roadmap-stage-node:hover,
.stage-node:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(255,255,255,0.12);
}

.roadmap-stage-node.active,
.stage-node.active {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
  background: rgba(56,189,248,0.15);
}

.roadmap-stage-node.active::before,
.stage-node.active::before {
  background: linear-gradient(90deg, transparent, rgba(56,189,248,0.2), transparent);
}

.roadmap-stage-node.completed,
.stage-node.completed {
  background: rgba(22,163,74,0.25);
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34,197,94,0.3);
}

.stage-circle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  position: relative;
}

.stage-node.active .stage-circle {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(56,189,248,0.6);
}

.stage-node.completed .stage-circle {
  background: var(--success);
  border-color: var(--success);
  box-shadow: 0 0 16px rgba(34,197,94,0.4);
}

.stage-node.completed .stage-circle::after {
  content: "✓";
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  position: absolute;
}

/* ================================
   CARD SYSTEM UPGRADE
================================ */
.tool-card {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: var(--shadow-medium);
  border-color: rgba(255,255,255,0.1);
}

.stage-tool-card {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text-primary);
  display: block;
  position: relative;
  overflow: hidden;
}

.stage-tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stage-tool-card:hover::before {
  opacity: 1;
}

.stage-tool-card:hover {
  transform: translateY(-3px);
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: var(--shadow-medium);
  border-color: rgba(56,189,248,0.3);
}

/* ================================
   MICRO-INTERACTIONS
================================ */
.hover-pop {
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1);
}

.hover-pop:hover {
  transform: scale(1.03);
}

.fade-in {
  animation: fade-in 0.35s cubic-bezier(0.4,0,0.2,1) forwards;
}

.fade-out {
  animation: fade-out 0.2s cubic-bezier(0.4,0,0.2,1) forwards;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

.pulse {
  animation: pulse 1.2s cubic-bezier(0.4,0,0.2,1) infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.9;
  }
}

/* ================================
   PREMIUM MODALS
================================ */
.resume-modal-content,
.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-9);
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(255,255,255,0.08);
  animation: fade-in 0.3s cubic-bezier(0.4,0,0.2,1);
  backdrop-filter: blur(20px);
  max-width: 500px;
  width: 90%;
}

.resume-modal,
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.resume-modal.hidden,
.modal-overlay.hidden {
  display: none;
}

/* ================================
   PREMIUM GRADIENT HEADERS
================================ */
.page-title {
  font-family: var(--font-serif);
  background: linear-gradient(90deg, #38bdf8, #0ea5e9, #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 42px;
  font-weight: 700;
  margin-bottom: var(--space-6);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 18px;
  margin-top: var(--space-2);
  font-weight: 400;
}

/* ================================
   HIGH-END PROGRESS RING
================================ */
.progress-ring {
  stroke: var(--accent);
  filter: drop-shadow(0 0 12px rgba(56,189,248,0.7));
  transition: stroke-dashoffset 0.45s cubic-bezier(0.4,0,0.2,1);
}

.progress-ring-circle {
  stroke: rgba(255,255,255,0.1);
  stroke-width: 8;
}

.progress-ring-progress {
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  filter: drop-shadow(0 0 12px rgba(56,189,248,0.7));
  transition: stroke-dashoffset 0.45s cubic-bezier(0.4,0,0.2,1);
}

/* ================================
   PREMIUM NAVIGATION BAR
================================ */
.navbar,
.header .bar {
  background: rgba(15,23,42,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ================================
   PREMIUM TABLES
================================ */
.table {
  width: 100%;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: var(--space-4) var(--space-3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all 0.2s ease;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background: rgba(255,255,255,0.04);
  transform: translateX(4px);
}

.table-header {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid rgba(255,255,255,0.1);
  margin-bottom: var(--space-2);
}

/* ================================
   LOADING SKELETONS
================================ */
.skeleton {
  background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: var(--radius-md);
  min-height: 20px;
}

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

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--space-4);
}

.skeleton-card {
  height: 200px;
  border-radius: var(--radius-lg);
}

/* ================================
   PREMIUM DRAWER SYSTEM
================================ */
.stage-drawer {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(255,255,255,0.08);
  margin-top: var(--space-8);
  animation: fade-in 0.3s ease;
}

.stage-drawer-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.drawer-subcopy {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.stage-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

/* ================================
   PREMIUM BADGES & PILLS
================================ */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-soft);
  color: var(--accent);
}

.tool-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 10;
}

.tool-badge-pro {
  background: rgba(56,189,248,0.18);
  color: #38bdf8;
}

.tool-badge-enterprise {
  background: rgba(251,191,36,0.18);
  color: #fbbf24;
}

/* ================================
   PREMIUM GLASSMORPHISM
================================ */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
}

.glass-strong {
  background: var(--bg-glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
}

/* ================================
   RESPONSIVE UTILITIES
================================ */
@media (max-width: 768px) {
  .page-title {
    font-size: 32px;
  }
  
  .stage-drawer-grid {
    grid-template-columns: 1fr;
  }
  
  .btn-primary,
  .btn-outline {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* ================================
   ACCESSIBILITY
================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus states for accessibility */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
