/* ============================================================
   PRD STUDIO - MAIN DESIGN SYSTEM (DARK THEME & TOKENS)
   ============================================================ */

:root {
  /* Color Palette */
  --bg-app: #09090b;
  --bg-card: #121217;
  --bg-card-hover: #181820;
  --bg-accent: #1e1e28;
  --bg-surface: #14141c;
  --bg-input: #101016;

  /* Borders */
  --border-subtle: #272732;
  --border-focus: #10b981;
  --border-accent: #3f3f50;

  /* Typography Colors */
  --text-main: #f4f4f7;
  --text-muted: #9494a8;
  --text-subtle: #66667a;
  --text-inverse: #09090b;

  /* Brand Accents */
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.25);
  --primary-subtle: rgba(16, 185, 129, 0.12);

  --indigo: #6366f1;
  --indigo-hover: #4f46e5;
  --indigo-glow: rgba(99, 102, 241, 0.25);
  --indigo-subtle: rgba(99, 102, 241, 0.12);

  --sky: #0ea5e9;
  --sky-subtle: rgba(14, 165, 233, 0.12);

  --amber: #f59e0b;
  --amber-subtle: rgba(245, 158, 11, 0.12);

  --rose: #f43f5e;
  --rose-subtle: rgba(244, 63, 94, 0.12);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, "Courier New", monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Elevation Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 25px var(--primary-glow);
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* App Master Layout */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% -20%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
              var(--bg-app);
}

/* Top Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  height: 62px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--indigo));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
  transition: transform var(--transition-normal);
}
.brand-logo:hover .logo-icon {
  transform: rotate(6deg) scale(1.05);
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text-main);
}
.logo-accent {
  color: var(--primary);
  background: linear-gradient(120deg, var(--primary), #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-studio {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--indigo-subtle);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-left: 4px;
}

/* Journey Steps Navigation */
.journey-nav {
  display: flex;
  align-items: center;
}

.journey-steps {
  display: flex;
  align-items: center;
  list-style: none;
  background: rgba(20, 20, 28, 0.7);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.journey-step .step-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-subtle);
  transition: all var(--transition-normal);
}

.journey-step .step-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.journey-step.active {
  background: var(--primary-subtle);
}
.journey-step.active .step-dot {
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}
.journey-step.active .step-label {
  color: var(--text-main);
  font-weight: 700;
}

.journey-step.done {
  color: var(--text-main);
}
.journey-step.done .step-dot {
  background: var(--primary);
}
.journey-step.done .step-label {
  color: var(--text-main);
}

.journey-step.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.step-divider {
  width: 20px;
  height: 2px;
  background: var(--border-subtle);
  margin: 0 2px;
  border-radius: 1px;
}
.step-divider.active {
  background: var(--primary);
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Main Container & View Panels */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-panel {
  display: none;
  width: 100%;
  flex: 1;
}
.view-panel.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 300ms var(--transition-smooth);
}

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

/* Utility / Scrollbars */
.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2a2a38;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #3e3e52;
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }
  .hide-mobile {
    display: none !important;
  }
  .journey-nav {
    display: none;
  }
}
