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

:root {
  --bg: #1a1a2e;
  --text: #eee;
  --text-muted: #888;
  --surface: #25253a;
  --border: #3a3a5a;
  --accent: #6366f1;
  --radius: 8px;
  --transition: 150ms ease;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* App layout */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f472b6, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.harmony-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.harmony-select label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.harmony-select select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
}

.harmony-select select:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  flex: 1;
}

.hint kbd {
  background: var(--border);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
}

.btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn:hover {
  opacity: 0.9;
}

/* Palette container */
.palette-container {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

.palette {
  flex: 1;
  display: flex;
}

/* Individual swatch */
.swatch {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 2rem;
  position: relative;
  cursor: pointer;
  transition: flex var(--transition);
  min-width: 80px;
}

.swatch:hover {
  flex: 1.1;
}

.swatch-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.swatch:hover .swatch-controls {
  opacity: 1;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.5);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* Swatch hex display */
.swatch-hex {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.swatch-hex:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Lock indicator */
.swatch.locked::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.6;
}

/* Add button */
.btn-add {
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px dashed var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-add:hover {
  background: var(--border);
  color: var(--text);
}

/* Shade picker panel */
.shade-picker {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 200ms ease;
  z-index: 20;
}

.shade-picker.hidden {
  transform: translateX(100%);
}

.shade-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.shade-picker-title {
  font-weight: 600;
}

.shade-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 2px;
  padding: 1rem;
  overflow: hidden;
}

.shade-cell {
  border-radius: 2px;
  cursor: pointer;
  transition: transform 100ms ease;
}

.shade-cell:hover {
  transform: scale(1.2);
  z-index: 1;
}

.shade-cell.current {
  outline: 2px solid white;
  outline-offset: 1px;
}

.shade-picker-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.hex-input {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.875rem;
  text-align: center;
}

.hex-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: opacity 200ms ease;
  z-index: 100;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .palette {
    flex-direction: column;
  }

  .swatch {
    flex: 1;
    min-width: unset;
    min-height: 80px;
    flex-direction: row;
    justify-content: center;
    padding: 0;
  }

  .swatch:hover {
    flex: 1.1;
  }

  .swatch-controls {
    position: absolute;
    left: 1rem;
    bottom: 50%;
    transform: translateY(50%);
    margin: 0;
  }

  .swatch-hex {
    position: absolute;
    right: 1rem;
  }

  .btn-add {
    width: 100%;
    height: 60px;
  }

  .shade-picker {
    width: 100%;
    height: 50%;
    top: unset;
    bottom: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    transform: translateY(0);
  }

  .shade-picker.hidden {
    transform: translateY(100%);
  }
}

/* Button secondary */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Export Modal */
.export-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.export-modal.hidden {
  display: none;
}

.export-modal-content {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

.export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.export-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.export-options {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.export-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}

.export-option:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.export-option svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--accent);
}

.export-option-title {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.125rem;
}

.export-option-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Preview Modal */
.preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.preview-modal.hidden {
  display: none;
}

.preview-modal-content {
  width: 100%;
  max-width: 1000px;
  height: 90vh;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.preview-tabs {
  display: flex;
  gap: 0.5rem;
}

.preview-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.preview-tab:hover {
  color: var(--text);
}

.preview-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Color Mapper Controls */
.color-mapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
  margin-right: 1rem;
}

.btn-rotate {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-rotate:hover {
  background: var(--border);
}

.btn-rotate svg {
  width: 14px;
  height: 14px;
}

.color-roles {
  display: flex;
  gap: 0.5rem;
}

.color-role {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.color-role label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.color-select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  min-width: 70px;
}

.color-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Hide color mapper on smaller screens */
@media (max-width: 1200px) {
  .color-roles {
    display: none;
  }
}

@media (max-width: 800px) {
  .color-mapper {
    justify-content: center;
  }
}

.preview-container {
  flex: 1;
  overflow: auto;
  background: #fff;
}

.preview-template {
  display: none;
  min-height: 100%;
}

.preview-template.active {
  display: block;
}

/* ============================================
   TEMPLATE STYLES - Using CSS Variables
   Colors will be set dynamically by JS
   ============================================ */

/* Template color variables (defaults) */
.preview-container {
  --t-primary: #6366f1;
  --t-secondary: #8b5cf6;
  --t-accent: #ec4899;
  --t-bg: #f8fafc;
  --t-surface: #ffffff;
  --t-text: #1e293b;
  --t-text-muted: #64748b;
}

/* ============ STYLE SELECTOR ============ */
.style-selector {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--t-surface);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.style-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  color: var(--t-text-muted);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.style-btn:hover {
  border-color: var(--t-primary);
  color: var(--t-primary);
}

.style-btn.active {
  background: var(--t-primary);
  border-color: var(--t-primary);
  color: white;
}

.style-content {
  display: none;
}

.style-content.active {
  display: block;
}

/* ============================================
   WEBSITE TEMPLATE - STYLE A: MODERN SAAS
   ============================================ */
#template-website {
  background: var(--t-bg);
  color: var(--t-text);
}

.style-saas {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.saas-header {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--t-surface);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.saas-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--t-text);
}

.saas-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  border-radius: 8px;
}

.saas-nav {
  display: flex;
  gap: 2rem;
  margin-left: 3rem;
  flex: 1;
}

.saas-nav a {
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.saas-nav a:hover { color: var(--t-text); }

.saas-header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.saas-link {
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.saas-btn-primary {
  background: var(--t-primary);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
}

.saas-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.saas-btn-ghost {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--t-text);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.saas-play-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--t-text);
  position: relative;
}

.saas-play-icon::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 5px;
  border: 5px solid transparent;
  border-left: 7px solid var(--t-surface);
}

.saas-hero {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--t-bg);
}

.saas-hero-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  background: linear-gradient(135deg, color-mix(in srgb, var(--t-primary) 10%, transparent), color-mix(in srgb, var(--t-secondary) 10%, transparent));
  border: 1px solid var(--t-primary);
  border-radius: 100px;
  color: var(--t-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.saas-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--t-text);
}

.saas-gradient-text {
  background: linear-gradient(135deg, var(--t-primary), var(--t-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.saas-hero > p {
  font-size: 1.25rem;
  color: var(--t-text-muted);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.saas-hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.saas-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--t-text-muted);
  font-size: 0.875rem;
}

.saas-avatars {
  display: flex;
}

.saas-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t-secondary), var(--t-accent));
  border: 2px solid var(--t-surface);
  margin-right: -10px;
}

.saas-avatar:nth-child(2) { background: linear-gradient(135deg, var(--t-primary), var(--t-secondary)); }
.saas-avatar:nth-child(3) { background: linear-gradient(135deg, var(--t-accent), var(--t-primary)); }
.saas-avatar:nth-child(4) { background: linear-gradient(135deg, var(--t-secondary), var(--t-primary)); margin-right: 0; }

.saas-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 3rem 2rem 4rem;
  max-width: 960px;
  margin: 0 auto;
}

.saas-feature-card {
  padding: 1.75rem;
  background: var(--t-surface);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.saas-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.saas-feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.saas-feature-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.saas-feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--t-text);
}

.saas-feature-card p {
  font-size: 0.9375rem;
  color: var(--t-text-muted);
  line-height: 1.5;
}

/* ============================================
   WEBSITE TEMPLATE - STYLE B: CREATIVE AGENCY
   ============================================ */
.style-agency {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--t-text);
  min-height: 100%;
}

.agency-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
}

.agency-logo {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--t-surface);
}

.agency-nav {
  display: flex;
  gap: 3rem;
}

.agency-nav a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.agency-nav a:hover { color: var(--t-surface); }

.agency-menu-btn {
  background: var(--t-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.agency-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
  padding: 2rem 2.5rem 3rem;
}

.agency-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.agency-tagline {
  color: var(--t-accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.agency-hero h1 {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--t-surface);
  margin-bottom: 1.25rem;
}

.agency-hero h1 em {
  font-style: italic;
  color: var(--t-primary);
}

.agency-hero p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  max-width: 400px;
}

.agency-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--t-surface);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.agency-arrow {
  width: 40px;
  height: 1px;
  background: var(--t-surface);
  position: relative;
  transition: width 0.2s;
}

.agency-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  border: 4px solid transparent;
  border-left: 6px solid var(--t-surface);
}

.agency-cta:hover .agency-arrow { width: 60px; }

.agency-hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agency-shape {
  position: absolute;
  border-radius: 50%;
}

.agency-shape-1 {
  width: 200px;
  height: 200px;
  background: var(--t-primary);
  opacity: 0.9;
}

.agency-shape-2 {
  width: 140px;
  height: 140px;
  background: var(--t-secondary);
  transform: translate(80px, -60px);
}

.agency-shape-3 {
  width: 80px;
  height: 80px;
  background: var(--t-accent);
  transform: translate(-60px, 80px);
}

.agency-showcase {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1rem;
  padding: 0 2.5rem 2.5rem;
}

.agency-project {
  position: relative;
  height: 200px;
  background: var(--t-primary);
  overflow: hidden;
  cursor: pointer;
}

.agency-project-lg { height: 200px; }

.agency-project-img {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  transition: transform 0.3s;
}

.agency-project:nth-child(2) .agency-project-img { background: linear-gradient(135deg, var(--t-secondary), var(--t-accent)); }
.agency-project:nth-child(3) .agency-project-img { background: linear-gradient(135deg, var(--t-accent), var(--t-primary)); }

.agency-project:hover .agency-project-img { transform: scale(1.05); }

.agency-project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.agency-project-cat {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--t-accent);
  margin-bottom: 0.25rem;
}

.agency-project h3 {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

/* ============================================
   WEBSITE TEMPLATE - STYLE C: E-COMMERCE
   ============================================ */
.style-ecommerce {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--t-bg);
}

.ecom-header {
  display: flex;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--t-surface);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ecom-logo {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--t-text);
}

.ecom-nav {
  display: flex;
  gap: 2rem;
  margin-left: 3rem;
  flex: 1;
}

.ecom-nav a {
  color: var(--t-text);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ecom-nav a:hover { color: var(--t-primary); }

.ecom-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ecom-icon-btn {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ecom-icon-btn svg {
  width: 22px;
  height: 22px;
  color: var(--t-text);
}

.ecom-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--t-accent);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ecom-banner {
  height: 340px;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  display: flex;
  align-items: center;
  padding: 0 4rem;
}

.ecom-banner-content {
  max-width: 450px;
}

.ecom-banner-tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.ecom-banner h1 {
  font-size: 3rem;
  font-weight: 300;
  color: white;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.ecom-banner p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.75rem;
}

.ecom-btn-primary {
  background: white;
  color: var(--t-text);
  border: none;
  padding: 1rem 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.15s;
}

.ecom-btn-primary:hover { transform: translateY(-2px); }

.ecom-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.ecom-product-card {
  background: var(--t-surface);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ecom-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.ecom-product-img {
  height: 180px;
  background: linear-gradient(180deg, var(--t-bg), color-mix(in srgb, var(--t-primary) 5%, var(--t-bg)));
  position: relative;
}

.ecom-product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--t-text);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ecom-badge-sale {
  background: var(--t-accent);
}

.ecom-wishlist-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.ecom-product-card:hover .ecom-wishlist-btn { opacity: 1; }

.ecom-wishlist-btn svg {
  width: 16px;
  height: 16px;
  color: var(--t-text-muted);
}

.ecom-product-info {
  padding: 1rem;
}

.ecom-product-info h4 {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--t-text);
  margin-bottom: 0.375rem;
}

.ecom-product-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--t-text);
}

.ecom-price-old {
  color: var(--t-text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-right: 0.5rem;
}

/* ============================================
   DASHBOARD - STYLE A: ANALYTICS
   ============================================ */
#template-dashboard {
  display: none;
  background: var(--t-bg);
}

#template-dashboard.active {
  display: block;
}

.style-analytics {
  min-height: 600px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.style-analytics.active {
  display: flex;
}

.analytics-sidebar {
  width: 220px;
  background: var(--t-surface);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.analytics-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--t-text);
}

.analytics-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  border-radius: 8px;
}

.analytics-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.75rem;
}

.analytics-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s;
}

.analytics-nav a svg {
  width: 18px;
  height: 18px;
}

.analytics-nav a:hover {
  background: var(--t-bg);
  color: var(--t-text);
}

.analytics-nav a.active {
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  color: white;
}

.analytics-main {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow: auto;
}

.analytics-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.analytics-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--t-text);
  margin-bottom: 0.25rem;
}

.analytics-header p {
  font-size: 0.875rem;
  color: var(--t-text-muted);
}

.analytics-date-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--t-surface);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--t-text);
  cursor: pointer;
}

.analytics-date-picker svg {
  width: 16px;
  height: 16px;
  color: var(--t-text-muted);
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.analytics-kpi {
  background: var(--t-surface);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.analytics-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.analytics-kpi-label {
  font-size: 0.8125rem;
  color: var(--t-text-muted);
  font-weight: 500;
}

.analytics-kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.analytics-trend-up {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.analytics-trend-down {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.analytics-kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--t-text);
  display: block;
  margin-bottom: 0.75rem;
}

.analytics-kpi-sparkline {
  height: 30px;
}

.analytics-kpi-sparkline svg {
  width: 100%;
  height: 100%;
  color: var(--t-primary);
}

.analytics-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.analytics-chart-main,
.analytics-chart-side {
  background: var(--t-surface);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
}

.analytics-chart-main h3,
.analytics-chart-side h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--t-text);
  margin-bottom: 1rem;
}

.analytics-chart-area {
  height: 200px;
  display: flex;
  align-items: flex-end;
}

.analytics-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding-bottom: 1.5rem;
}

.analytics-bar {
  flex: 1;
  height: var(--height);
  background: linear-gradient(to top, var(--t-primary), var(--t-secondary));
  border-radius: 6px 6px 0 0;
  position: relative;
}

.analytics-bar span {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: var(--t-text-muted);
}

.analytics-donut {
  width: 140px;
  height: 140px;
  margin: 0 auto 1rem;
  position: relative;
}

.analytics-donut-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--t-primary) 0deg 241deg, var(--t-secondary) 241deg 324deg, var(--t-accent) 324deg 360deg);
  mask: radial-gradient(transparent 55%, black 55%);
  -webkit-mask: radial-gradient(transparent 55%, black 55%);
}

.analytics-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.analytics-donut-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--t-text);
}

.analytics-donut-label {
  font-size: 0.75rem;
  color: var(--t-text-muted);
}

.analytics-legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.analytics-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--t-text-muted);
}

.analytics-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.analytics-dot-primary { background: var(--t-primary); }
.analytics-dot-secondary { background: var(--t-secondary); }
.analytics-dot-accent { background: var(--t-accent); }

/* ============================================
   DASHBOARD - STYLE B: KANBAN / PROJECT MANAGER
   ============================================ */
.style-kanban {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--t-bg);
  min-height: 600px;
}

.kanban-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--t-surface);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.kanban-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--t-text);
}

.kanban-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--t-primary);
  border-radius: 6px;
}

.kanban-tabs {
  display: flex;
  gap: 0.25rem;
  margin-left: 2rem;
  flex: 1;
}

.kanban-tabs a {
  padding: 0.5rem 1rem;
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s;
}

.kanban-tabs a:hover { background: var(--t-bg); }
.kanban-tabs a.active {
  background: var(--t-bg);
  color: var(--t-text);
}

.kanban-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kanban-members {
  display: flex;
}

.kanban-member {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t-secondary), var(--t-accent));
  border: 2px solid var(--t-surface);
  margin-right: -8px;
}

.kanban-member:nth-child(2) { background: linear-gradient(135deg, var(--t-primary), var(--t-secondary)); }
.kanban-member:nth-child(3) { background: linear-gradient(135deg, var(--t-accent), var(--t-primary)); }

.kanban-member-add {
  background: var(--t-bg);
  color: var(--t-text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
  border: 2px dashed rgba(0, 0, 0, 0.2);
}

.kanban-btn-primary {
  background: var(--t-primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.kanban-board {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  overflow-x: auto;
}

.kanban-column {
  width: 280px;
  flex-shrink: 0;
  background: var(--t-surface);
  border-radius: 12px;
  padding: 1rem;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.kanban-column-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.kanban-dot-todo { background: var(--t-text-muted); }
.kanban-dot-progress { background: var(--t-primary); }
.kanban-dot-review { background: var(--t-secondary); }
.kanban-dot-done { background: #22c55e; }

.kanban-column-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--t-text);
  flex: 1;
}

.kanban-column-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t-text-muted);
  background: var(--t-bg);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kanban-card {
  background: var(--t-bg);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.kanban-card-priority {
  border-left: 3px solid var(--t-accent);
}

.kanban-card-done {
  opacity: 0.6;
}

.kanban-card-labels {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.kanban-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.kanban-label-design {
  background: rgba(139, 92, 246, 0.15);
  color: var(--t-secondary);
}

.kanban-label-dev {
  background: rgba(99, 102, 241, 0.15);
  color: var(--t-primary);
}

.kanban-label-urgent {
  background: rgba(236, 72, 153, 0.15);
  color: var(--t-accent);
}

.kanban-card h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--t-text);
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.kanban-card p {
  font-size: 0.8125rem;
  color: var(--t-text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.kanban-card-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.kanban-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  position: relative;
}

.kanban-progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--progress);
  background: var(--t-primary);
  border-radius: 2px;
}

.kanban-card-progress span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t-text-muted);
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-card-member {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
}

.kanban-card-date {
  font-size: 0.75rem;
  color: var(--t-text-muted);
}

.kanban-card-check {
  font-size: 0.75rem;
  color: #22c55e;
  font-weight: 500;
}

/* ============================================
   DASHBOARD - STYLE C: FINANCE
   ============================================ */
.style-finance {
  min-height: 600px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--t-bg);
}

.style-finance.active {
  display: flex;
}

.finance-sidebar {
  width: 200px;
  background: var(--t-text);
  color: white;
  padding: 1.5rem 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.finance-logo {
  font-size: 1.25rem;
  font-weight: 700;
  padding: 0 1.5rem 2rem;
  letter-spacing: 0.05em;
}

.finance-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.finance-nav a {
  padding: 0.875rem 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.finance-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.finance-nav a.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--t-primary);
}

.finance-sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.finance-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.finance-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
}

.finance-user-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.finance-user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.finance-main {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow: auto;
}

.finance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.finance-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--t-text);
}

.finance-header-actions {
  display: flex;
  gap: 0.75rem;
}

.finance-btn-secondary {
  background: var(--t-surface);
  color: var(--t-text);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.finance-btn-primary {
  background: var(--t-primary);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.finance-summary {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.finance-summary-card {
  background: var(--t-surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.finance-card-balance {
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  border: none;
}

.finance-card-balance .finance-card-label,
.finance-card-balance .finance-card-value,
.finance-card-balance .finance-card-change {
  color: white;
}

.finance-card-label {
  display: block;
  font-size: 0.8125rem;
  color: var(--t-text-muted);
  margin-bottom: 0.5rem;
}

.finance-card-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--t-text);
  margin-bottom: 0.375rem;
}

.finance-value-income { color: #16a34a; }
.finance-value-expense { color: var(--t-text); }

.finance-card-change {
  font-size: 0.8125rem;
  font-weight: 500;
}

.finance-change-up { color: #22c55e; }

.finance-card-sub {
  font-size: 0.8125rem;
  color: var(--t-text-muted);
}

.finance-content {
  background: var(--t-surface);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.finance-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.finance-table-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--t-text);
}

.finance-link {
  color: var(--t-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-table th {
  text-align: left;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--t-bg);
}

.finance-table td {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: var(--t-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.finance-tx-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.finance-tx-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finance-tx-income { background: rgba(34, 197, 94, 0.1); }
.finance-tx-expense { background: rgba(239, 68, 68, 0.1); }

.finance-category {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--t-bg);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--t-text-muted);
}

.finance-amount-positive { color: #16a34a; font-weight: 600; }
.finance-amount-negative { color: var(--t-text); font-weight: 600; }

/* ============================================
   BLOG - STYLE A: TECH BLOG
   ============================================ */
#template-blog {
  background: var(--t-surface);
}

.style-tech {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--t-bg);
  min-height: 100%;
}

.tech-header {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--t-surface);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tech-logo {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--t-primary);
}

.tech-nav {
  display: flex;
  gap: 2rem;
  margin-left: 3rem;
  flex: 1;
}

.tech-nav a {
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.tech-nav a:hover { color: var(--t-text); }

.tech-subscribe-btn {
  background: var(--t-text);
  color: var(--t-surface);
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.tech-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.tech-article-header {
  margin-bottom: 2.5rem;
}

.tech-article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tech-tag {
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.tech-reading-time {
  font-size: 0.8125rem;
  color: var(--t-text-muted);
}

.tech-article-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--t-text);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.tech-article-desc {
  font-size: 1.125rem;
  color: var(--t-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tech-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tech-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t-secondary), var(--t-accent));
}

.tech-author-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--t-text);
}

.tech-author-date {
  font-size: 0.8125rem;
  color: var(--t-text-muted);
}

.tech-article-content {
  color: var(--t-text);
  line-height: 1.8;
}

.tech-article-content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.tech-article-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--t-text);
}

.tech-code-block {
  margin: 1.5rem 0;
  background: var(--t-text);
  border-radius: 12px;
  overflow: hidden;
}

.tech-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-code-lang {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.75rem;
  color: var(--t-text-muted);
}

.tech-code-copy {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

.tech-code-block pre {
  padding: 1.25rem;
  margin: 0;
  overflow-x: auto;
}

.tech-code-block code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.tech-keyword { color: #c084fc; }
.tech-function { color: #60a5fa; }
.tech-method { color: #34d399; }

.tech-callout {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
  border-left: 4px solid var(--t-primary);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

.tech-callout-icon {
  width: 22px;
  height: 22px;
  background: var(--t-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tech-callout p {
  margin: 0;
  font-size: 0.9375rem;
}

/* ============================================
   BLOG - STYLE B: MAGAZINE / EDITORIAL
   ============================================ */
.style-magazine {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--t-surface);
  min-height: 100%;
}

.mag-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.mag-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mag-date {
  font-size: 0.75rem;
  color: var(--t-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.mag-logo {
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--t-text);
}

.mag-social {
  display: flex;
  gap: 1rem;
}

.mag-social a {
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
}

.mag-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 1rem 2rem;
}

.mag-nav a {
  color: var(--t-text);
  text-decoration: none;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
}

.mag-nav a:hover { color: var(--t-primary); }

.mag-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.mag-article-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.mag-category {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--t-primary);
  margin-bottom: 1.5rem;
}

.mag-article-header h1 {
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--t-text);
  margin-bottom: 1.25rem;
}

.mag-article-header h1 em {
  font-style: italic;
}

.mag-lede {
  font-size: 1.25rem;
  color: var(--t-text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.mag-byline {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8125rem;
  color: var(--t-text-muted);
}

.mag-byline strong { color: var(--t-text); }
.mag-byline-sep { margin: 0 0.75rem; }

.mag-hero-image {
  height: 300px;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  margin-bottom: 2.5rem;
  position: relative;
}

.mag-image-caption {
  position: absolute;
  bottom: -2rem;
  left: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.75rem;
  color: var(--t-text-muted);
  font-style: italic;
}

.mag-article-content {
  color: var(--t-text);
  font-size: 1.125rem;
  line-height: 1.9;
}

.mag-article-content p {
  margin-bottom: 1.5rem;
}

.mag-dropcap::first-letter {
  float: left;
  font-size: 4.5rem;
  line-height: 0.8;
  padding-right: 0.75rem;
  padding-top: 0.25rem;
  color: var(--t-primary);
  font-weight: 400;
}

.mag-pullquote {
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.mag-pullquote p {
  font-size: 1.75rem;
  font-style: italic;
  color: var(--t-text);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.mag-pullquote cite {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8125rem;
  font-style: normal;
  color: var(--t-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   BLOG - STYLE C: PERSONAL BLOG
   ============================================ */
.style-personal {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--t-bg);
  min-height: 100%;
}

.personal-header {
  background: var(--t-surface);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.personal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.personal-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--t-text);
}

.personal-logo-emoji {
  font-size: 1.25rem;
}

.personal-nav {
  display: flex;
  gap: 2rem;
}

.personal-nav a {
  color: var(--t-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s;
}

.personal-nav a:hover { color: var(--t-primary); }

.personal-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.personal-article {
  background: var(--t-surface);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.personal-article-header {
  margin-bottom: 2rem;
}

.personal-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.personal-tag {
  padding: 0.375rem 0.875rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  color: var(--t-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 100px;
}

.personal-article h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--t-text);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.personal-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--t-text-muted);
  font-size: 0.875rem;
}

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

.personal-article-body {
  color: var(--t-text);
  line-height: 1.8;
}

.personal-intro {
  font-size: 1.125rem;
  color: var(--t-text-muted);
  margin-bottom: 1.5rem;
}

.personal-article-body p {
  margin-bottom: 1.25rem;
}

.personal-article-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: var(--t-text);
}

.personal-highlight {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border-radius: 16px;
  margin: 1.5rem 0;
}

.personal-highlight p {
  margin: 0;
  font-size: 1rem;
}

.personal-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.personal-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.personal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background: var(--t-accent);
  border-radius: 50%;
}

.personal-cta {
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--t-primary), var(--t-secondary));
  border-radius: 16px;
  text-align: center;
}

.personal-cta p {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.personal-btn {
  background: white;
  color: var(--t-primary);
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}

.personal-btn:hover { transform: translateY(-2px); }

.personal-sidebar {
  position: sticky;
  top: 2rem;
}

.personal-about-card {
  background: var(--t-surface);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.personal-about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--t-primary), var(--t-accent));
  margin: 0 auto 1rem;
}

.personal-about-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--t-text);
  margin-bottom: 0.5rem;
}

.personal-about-card p {
  font-size: 0.9375rem;
  color: var(--t-text-muted);
  line-height: 1.6;
}
