@import "tailwindcss";

/* ============================================
   BMT DESIGN SYSTEM
   Two distinct design languages:
   - Mission Control: GoodNotes-inspired (warm, organized, calm)
   - Client Portal: Linear-inspired (premium, dark, professional)
   ============================================ */

@theme {
  /* Mission Control Colors (GoodNotes-inspired) */
  --color-mc-bg: #FAF8F5;
  --color-mc-bg-light: #FDFCFA;
  --color-mc-text: #2D2D2D;
  --color-mc-text-secondary: #8C8C8C;
  --color-mc-border: #E8E4DF;
  --color-mc-accent-terracotta: #C4A484;
  --color-mc-accent-sage: #9CAF88;
  --color-mc-accent-blue: #8BA4B4;
  --color-mc-highlight-yellow: #FEF3C7;
  --color-mc-highlight-peach: #FED7AA;

  /* Client Portal Colors (Linear-inspired) */
  --color-cp-bg: #0A0A0B;
  --color-cp-bg-elevated: #111113;
  --color-cp-surface: #1A1A1E;
  --color-cp-surface-hover: #1C1C20;
  --color-cp-text: #F5F5F5;
  --color-cp-text-secondary: #888888;
  --color-cp-border: #2A2A2E;
  --color-cp-accent: #7C5DFA;
  --color-cp-accent-hover: #9277FF;

  /* Status Colors */
  --color-status-success: #22C55E;
  --color-status-warning: #F59E0B;
  --color-status-error: #EF4444;
  --color-status-info: #3B82F6;

  /* Status Indicators (Muted for Mission Control) */
  --color-status-needs-attention: #D97706;
  --color-status-pending: #3B82F6;
  --color-status-on-track: #16A34A;

  /* Typography */
  --font-family-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows */
  --shadow-mc-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-mc-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-cp-subtle: 0 1px 2px rgba(0, 0, 0, 0.3);

  /* Border Radius */
  --radius-mc: 12px;
  --radius-cp: 8px;
}

/* ============================================
   MISSION CONTROL BASE STYLES
   ============================================ */
.mc-layout {
  background-color: var(--color-mc-bg);
  color: var(--color-mc-text);
  font-family: var(--font-family-sans);
  min-height: 100vh;
}

.mc-card {
  background-color: var(--color-mc-bg-light);
  border: 1px solid var(--color-mc-border);
  border-radius: var(--radius-mc);
  box-shadow: var(--shadow-mc-card);
}

.mc-card-hover:hover {
  box-shadow: var(--shadow-mc-soft);
  transition: box-shadow 0.2s ease;
}

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

.mc-highlight-yellow {
  background-color: var(--color-mc-highlight-yellow);
}

.mc-highlight-peach {
  background-color: var(--color-mc-highlight-peach);
}

/* Task completion animation */
.mc-task-complete {
  text-decoration: line-through;
  opacity: 0.7;
  background: linear-gradient(90deg, var(--color-mc-highlight-yellow) 0%, transparent 100%);
  transition: all 0.3s ease;
}

/* Time slot styles (like planner slots) */
.mc-time-slot {
  border-bottom: 1px solid var(--color-mc-border);
  min-height: 48px;
  transition: background-color 0.15s ease;
}

.mc-time-slot:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Status dots */
.mc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mc-status-needs-attention {
  background-color: var(--color-status-needs-attention);
}

.mc-status-pending {
  background-color: var(--color-status-pending);
}

.mc-status-on-track {
  background-color: var(--color-status-on-track);
}

/* ============================================
   CLIENT PORTAL BASE STYLES
   ============================================ */
.cp-layout {
  background-color: var(--color-cp-bg);
  color: var(--color-cp-text);
  font-family: var(--font-family-sans);
  min-height: 100vh;
}

.cp-surface {
  background-color: var(--color-cp-surface);
  border: 1px solid var(--color-cp-border);
  border-radius: var(--radius-cp);
}

.cp-surface-hover:hover {
  background-color: var(--color-cp-surface-hover);
  transition: background-color 0.15s ease;
}

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

.cp-accent {
  color: var(--color-cp-accent);
}

.cp-btn-primary {
  background-color: var(--color-cp-accent);
  color: white;
  border-radius: var(--radius-cp);
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.cp-btn-primary:hover {
  background-color: var(--color-cp-accent-hover);
}

.cp-btn-ghost {
  background-color: transparent;
  color: var(--color-cp-text);
  border: 1px solid var(--color-cp-border);
  border-radius: var(--radius-cp);
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.cp-btn-ghost:hover {
  background-color: var(--color-cp-surface);
  border-color: var(--color-cp-text-secondary);
}

/* Monospace for metrics/numbers */
.cp-mono {
  font-family: var(--font-family-mono);
  letter-spacing: -0.02em;
}

/* Status pills */
.cp-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============================================
   SHARED COMPONENTS
   ============================================ */

/* Skeleton loading states */
.skeleton {
  background: linear-gradient(90deg,
    rgba(200, 200, 200, 0.1) 25%,
    rgba(200, 200, 200, 0.2) 50%,
    rgba(200, 200, 200, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

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

/* Smooth transitions for state changes */
.transition-smooth {
  transition: all 0.2s ease;
}

/* Focus states for accessibility */
.focus-visible-ring:focus-visible {
  outline: 2px solid var(--color-cp-accent);
  outline-offset: 2px;
}

/* Scrollbar styling */
.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(155, 155, 155, 0.3);
  border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 155, 155, 0.5);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Mobile-first sidebar collapse */
@media (max-width: 768px) {
  .sidebar-collapsed {
    transform: translateX(-100%);
    position: fixed;
    z-index: 50;
  }

  .sidebar-open {
    transform: translateX(0);
  }
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }
}
