:root {
  /* Professional Dark Theme - Semantic Tokens */
  --bg: #1f2937;
  --bg-grad: radial-gradient(circle at 50% 0%, #374151 0%, #1f2937 100%);
  --primary: #8b5cf6;
  --primary-rgb: 139, 92, 246;
  --primary-hover: #7c3aed;
  --primary-glow: rgba(139, 92, 246, 0.5);
  --secondary: #ec4899;
  --secondary-glow: rgba(236, 72, 153, 0.4);
  --primary-light: #a78bfa;
  --grad-pro: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --grad-surface: linear-gradient(145deg, rgba(55, 65, 81, 0.8) 0%, rgba(31, 41, 55, 0.8) 100%);
  --grad-nav: linear-gradient(to bottom, rgba(55, 65, 81, 0.95), rgba(31, 41, 55, 0.98));
  --surface: rgba(55, 65, 81, 0.9);
  --surface-active: rgba(75, 85, 99, 0.95);
  --surface-border: rgba(255, 255, 255, 0.15);
  --surface-border-bright: rgba(255, 255, 255, 0.25);
  --text: #f9fafb;
  --text-muted: #d1d5db;
  --text-dim: #9ca3af;
  --header-height: 64px;
  --sidebar-width: 260px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-pro: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px -5px var(--primary-glow);
  --scrollbar-thumb: rgba(255, 255, 255, 0.08);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.15);
}

[data-theme=light] {
  --bg: #f8fafc;
  --bg-grad: none;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-active: #e2e8f0;
  --surface-border: #e2e8f0;
  --surface-border-bright: #cbd5e1;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --primary-light: #4f46e5;
  --grad-pro: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-surface: #ffffff;
  --grad-nav: #ffffff;
  --shadow-pro: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-glow: none;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --scrollbar-thumb: rgba(0, 0, 0, 0.1);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.2);
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-30 {
  margin-bottom: 30px;
}

.text-center {
  text-align: center;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

[data-theme=light] a {
  color: var(--primary);
}
[data-theme=light] a:hover {
  color: var(--primary-hover);
}

h1,
h2,
h3,
h4,
.logo-text {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
}

/* Header */
.glass-nav {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}
.glass-nav .nav-brand .service-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.glass-nav .nav-brand .service-logo i {
  font-size: 24px;
  color: var(--primary);
}
.glass-nav .nav-brand .service-logo .logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.glass-nav .nav-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
}
.glass-nav .nav-tabs .nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-nav .nav-tabs .nav-tab-btn i {
  font-size: 14px;
  opacity: 0.7;
}
.glass-nav .nav-tabs .nav-tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.glass-nav .nav-tabs .nav-tab-btn.active {
  background: var(--surface-active);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.glass-nav .nav-tabs .nav-tab-btn.active i {
  opacity: 1;
}
.glass-nav .nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
}
.glass-nav .nav-user .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  font-size: 16px;
}
.glass-nav .nav-user .theme-toggle-btn:hover {
  background: var(--surface-active);
  border-color: var(--surface-border-bright);
  transform: rotate(15deg) scale(1.1);
  box-shadow: var(--shadow-glow);
}
.glass-nav .nav-user .user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Main Layout */
main {
  display: flex;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  width: 100%;
  background: var(--bg);
}

.glass-sidebar {
  width: var(--sidebar-width);
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-right: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  padding: 24px 16px;
  overflow-y: auto;
}
.glass-sidebar .sidebar-header {
  margin-bottom: 24px;
  padding: 0 12px;
}
.glass-sidebar .sidebar-header h3 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-weight: 700;
}
.glass-sidebar .project-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.glass-sidebar .project-list .project-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  margin-bottom: 2px;
  border: 1px solid transparent;
}
.glass-sidebar .project-list .project-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--surface-border);
}
.glass-sidebar .project-list .project-item:hover .project-icon {
  transform: scale(1.05);
  color: var(--primary);
  border-color: var(--primary);
}
.glass-sidebar .project-list .project-item.active {
  background: var(--surface-active);
  border-color: var(--surface-border-bright);
  box-shadow: var(--shadow-pro);
}
.glass-sidebar .project-list .project-item.active .project-name {
  color: #fff;
  font-weight: 700;
}
.glass-sidebar .project-list .project-item.active .project-icon {
  background: var(--grad-pro);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 15px var(--primary-glow);
}
.glass-sidebar .project-list .project-item.active .project-date {
  color: var(--primary-light);
  opacity: 0.9;
}
.glass-sidebar .project-list .project-item .project-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  font-size: 15px;
  flex-shrink: 0;
}
.glass-sidebar .project-list .project-item .project-info {
  min-width: 0;
  flex: 1;
}
.glass-sidebar .project-list .project-item .project-info .project-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 1px;
  transition: color 0.2s;
}
.glass-sidebar .project-list .project-item .project-info .project-date {
  font-size: 11px;
  color: var(--text-muted);
}
.glass-sidebar .project-list .project-item .delete-project-btn-small {
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 6px;
}
.glass-sidebar .project-list .project-item .delete-project-btn-small:hover {
  color: var(--secondary);
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.1);
}
.glass-sidebar .project-list .project-item:hover .delete-project-btn-small {
  opacity: 1;
}

.delete-project-btn-header {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.delete-project-btn-header i {
  font-size: 14px;
}
.delete-project-btn-header:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}
.delete-project-btn-header:active {
  transform: translateY(0);
}

.main-content-wrapper {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  background: var(--bg);
  border-left: 1px solid var(--surface-border);
}

/* Views */
.view {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.input-card {
  background: var(--grad-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 56px;
  max-width: 850px;
  width: 90%;
  margin: 60px auto;
  box-shadow: var(--shadow-pro);
  position: relative;
  overflow: hidden;
}
.input-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--surface-border-bright), transparent);
}
.input-card .card-hero {
  text-align: center;
  margin-bottom: 56px;
}
.input-card .card-hero i {
  font-size: 64px;
  background: var(--grad-pro);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
  display: inline-block;
  filter: drop-shadow(0 0 15px var(--primary-glow));
}
.input-card .card-hero h3 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: #fff;
}
.input-card .card-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.ga4-help-accordion {
  margin: 8px 0 1em;
  overflow: hidden;
  transition: all 0.3s ease;
}
.ga4-help-accordion summary {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  outline: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ga4-help-accordion summary::-webkit-details-marker {
  display: none;
}
.ga4-help-accordion summary i {
  color: var(--primary-light);
  font-size: 13px;
}
.ga4-help-accordion summary:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.ga4-help-accordion[open] {
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.05);
}
.ga4-help-accordion[open] summary {
  border-bottom: 1px solid var(--surface-border);
  color: var(--text);
}
.ga4-help-accordion .ga4-help-content {
  padding: 12px 16px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
}
.ga4-help-accordion .ga4-help-content ol {
  margin: 0;
  padding-left: 18px;
  list-style: decimal;
}
.ga4-help-accordion .ga4-help-content ol li {
  margin-bottom: 4px;
}
.ga4-help-accordion .ga4-help-content ol li::marker {
  color: var(--primary-light);
  font-weight: 700;
}
.ga4-help-accordion .ga4-help-content ol li:last-child {
  margin-bottom: 0;
}

/* Forms */
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

input[type=text],
input[type=email],
input[type=password],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  transition: all 0.3s;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

button.bg-primary {
  background: var(--grad-pro);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 32px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 0 20px var(--primary-glow);
  position: relative;
  overflow: hidden;
  border: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
button.bg-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 30px -5px var(--primary-glow);
  filter: brightness(1.1);
}
button.bg-primary:active {
  transform: translateY(0) scale(0.98);
}
button.bg-primary::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
button.bg-primary:hover::after {
  opacity: 1;
}

#newResultContainer {
  width: 100%;
}

/* Project Header */
.project-header-premium {
  padding: 24px 40px 0;
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  background: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
}
.project-header-premium .title-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.project-header-premium .proj-title-input-premium {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 4px 8px;
  margin-left: -8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  width: 100%;
  color: var(--text);
  transition: all 0.2s;
}
.project-header-premium .proj-title-input-premium:hover {
  background: rgba(255, 255, 255, 0.05);
}
.project-header-premium .proj-title-input-premium:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.project-header-premium .project-nav-premium {
  display: flex;
  gap: 28px;
}
.project-header-premium .project-nav-premium .p-tab-premium {
  background: transparent;
  border: none;
  padding: 14px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}
.project-header-premium .project-nav-premium .p-tab-premium i {
  margin-right: 6px;
  font-size: 14px;
  opacity: 0.7;
}
.project-header-premium .project-nav-premium .p-tab-premium:hover {
  color: var(--text);
}
.project-header-premium .project-nav-premium .p-tab-premium.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}
.project-header-premium .project-nav-premium .p-tab-premium.active i {
  opacity: 1;
}

#project_content {
  padding: 0 40px;
  width: 100%;
  margin: 0 auto;
}

.section-wrapper {
  background: var(--grad-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  box-shadow: var(--shadow-pro);
  overflow: hidden;
}
.section-wrapper .section-header {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
.section-wrapper .section-header i {
  margin-right: 10px;
  color: var(--primary);
}
.section-wrapper .card {
  padding: 32px;
}

/* Status/Logs */
.status-bar {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
}

/* Generation Tabs (Content Viewers) */
.gen-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  width: fit-content;
  border: 1px solid var(--surface-border);
  position: sticky;
  top: 120px;
  /* Offset for project header (it sticks to top:0 and has padding) */
  z-index: 9;
  box-shadow: var(--shadow-pro);
}
#sub-tab-access_analysis .gen-tab-nav {
  position: sticky;
  top: 188px;
  /* Offset to stick underneath the main gen-tab-nav which is at 120px */
  z-index: 8;
}
.gen-tab-nav .gen-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gen-tab-nav .gen-tab-btn i {
  font-size: 16px;
  opacity: 0.6;
}
.gen-tab-nav .gen-tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.gen-tab-nav .gen-tab-btn.active {
  background: var(--grad-pro);
  color: #fff;
  box-shadow: 0 5px 15px var(--primary-glow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: none;
}
.gen-tab-nav .gen-tab-btn.active i {
  opacity: 1;
  color: #fff;
}
.gen-tab-nav .gen-tab-btn.active:hover {
  background: var(--grad-pro);
  color: #fff;
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

.gen-tab-content .gen-tab-pane {
  display: none;
  background: var(--grad-surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pro);
  overflow: hidden;
  animation: genTabFade 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.gen-tab-content .gen-tab-pane.active {
  display: block;
}
.gen-tab-content .gen-tab-pane .section-header {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -0.01em;
}
.gen-tab-content .gen-tab-pane .card {
  padding: 40px;
}

@keyframes genTabFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.log-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border-light);
  font-family: monospace;
  font-size: 12px;
  margin-top: 24px;
  max-height: 150px;
  overflow-y: auto;
}

/* Project View Components */
#tab-view-tasks {
  margin-top: 1em;
}

.task-list-header {
  display: flex;
  padding: 12px 24px;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border-light);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  gap: 12px;
}

.task-row {
  display: flex;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
  font-size: 14px;
  gap: 12px;
}
.task-row:hover {
  background: var(--surface-hover);
}
.task-row:last-child {
  border-bottom: none;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 20px;
  padding: 0 0 24px;
  overflow-x: auto;
  min-height: calc(100vh - 350px);
}

.kanban-col {
  flex: 1;
  min-width: 260px;
  background: var(--surface-hover);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.kanban-col h5 {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  padding: 0 4px;
  font-weight: 700;
}

.kanban-card {
  background: var(--surface);
  padding: 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Status & Priority Badges */
.p-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.p-status.st-open {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.p-status.st-in_progress {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
.p-status.st-resolved {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
.p-status.st-closed {
  background: var(--surface-hover);
  color: var(--text-muted);
}

.p-priority {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.p-priority.pr-high {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}
.p-priority.pr-normal {
  background: #fbbf24;
}
.p-priority.pr-low {
  background: #94a3b8;
}

/* Wiki Sidebar Item */
#tab-view-wiki {
  margin-top: 1em;
}

.wiki-sidebar-item {
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border-light);
}
.wiki-sidebar-item:hover {
  background: var(--surface-hover);
}
.wiki-sidebar-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  font-weight: 600;
}

/* User Info Cell */
.user-info-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}
.user-info-cell .user-badge {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal .modal-content {
  background: var(--bg);
  background-image: var(--bg-grad);
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 550px;
  position: relative;
  border: 1px solid var(--surface-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.modal .modal-content h4 {
  margin-bottom: 20px;
}
.modal .modal-content textarea {
  width: 100%;
  height: 120px;
  margin-bottom: 20px;
}
.modal .modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 254, 0.05);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.2s;
  z-index: 10;
}
.modal .modal-close:hover {
  background: var(--surface-active);
  color: var(--primary);
  border-color: var(--primary);
  transform: rotate(90deg);
}
.modal .history-list {
  margin-top: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}
.modal .history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal .history-item .history-item-info {
  flex: 1;
}
.modal .history-item .history-date {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
}
.modal .history-item .history-memo {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.modal .history-item i {
  color: var(--primary);
  font-size: 12px;
  transition: transform 0.2s;
  opacity: 0.5;
}
.modal .history-item:hover {
  background: var(--surface-active);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.modal .history-item:hover .history-date {
  color: var(--primary-light);
}
.modal .history-item:hover i {
  transform: translateX(4px);
  opacity: 1;
}
.modal .history-item:active {
  transform: translateY(0);
}

#tab-view-members {
  margin-top: 1em;
}

/* Generating Animation Effect */
.card.generating-mode,
.palette-container.generating-mode,
.wireframe-container.generating-mode {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
}

.wireframe-container main {
  background: #fff;
}

.generating-effect {
  text-align: center;
  position: relative;
  padding: 60px;
}
.generating-effect .glow-ring {
  width: 100px;
  height: 100px;
  border: 4px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  margin: 0 auto 32px;
  animation: spin-glow 1.5s linear infinite;
  position: relative;
  box-shadow: 0 0 25px var(--primary-glow);
}
.generating-effect .glow-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 2px solid var(--secondary);
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spin-glow-reverse 2s linear infinite;
  opacity: 0.6;
}
.generating-effect .spirit-text {
  font-family: "Outfit", sans-serif;
  font-size: 32px;
  font-weight: 800;
  background: var(--grad-pro);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  animation: pulse-gentle 2s ease-in-out infinite;
  letter-spacing: -0.02em;
}
.generating-effect .spirit-sub {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

@keyframes spin-glow {
  0% {
    transform: rotate(0deg);
    border-color: var(--primary);
  }
  50% {
    border-color: var(--primary-light);
  }
  100% {
    transform: rotate(360deg);
    border-color: var(--primary);
  }
}
@keyframes spin-glow-reverse {
  0% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes pulse-gentle {
  0%, 100% {
    opacity: 0.8;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}
/* Task Detail */
#taskDetailWrapper {
  padding: 32px;
  overflow-y: auto;
  display: none;
  background: var(--bg);
}
#taskDetailWrapper .task-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
#taskDetailWrapper .task-detail-container .header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
#taskDetailWrapper .task-detail-container .header h3 {
  font-size: 24px;
  color: var(--text);
}
#taskDetailWrapper .task-detail-container .params-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  background: var(--bg);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}
#taskDetailWrapper .task-detail-container .params-box label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
#taskDetailWrapper .task-detail-container .params-box select,
#taskDetailWrapper .task-detail-container .params-box input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--surface);
  font-size: 14px;
  color: var(--text);
}
#taskDetailWrapper .task-detail-container .desc-box {
  margin-bottom: 40px;
}
#taskDetailWrapper .task-detail-container .desc-box label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}
#taskDetailWrapper .task-detail-container .desc-box textarea {
  min-height: 200px;
  font-family: inherit;
  line-height: 1.6;
}
#taskDetailWrapper .task-detail-container .comment-box {
  border-top: 1px solid var(--border);
  padding-top: 30px;
}
#taskDetailWrapper .task-detail-container .comment-box h5 {
  font-size: 16px;
  margin-bottom: 20px;
}
#taskDetailWrapper .task-detail-container .comment-box .comment-item {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
#taskDetailWrapper .task-detail-container .comment-box .comment-item .comment-meta {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--text-muted);
}
#taskDetailWrapper .task-detail-container .comment-box .comment-item .comment-body {
  font-size: 14px;
  line-height: 1.6;
}
#taskDetailWrapper .task-detail-container .back-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
#taskDetailWrapper .task-detail-container .back-link:hover {
  color: var(--primary);
}
#taskDetailWrapper .task-detail-container .submit-box {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: right;
}
#taskDetailWrapper .task-detail-container .submit-box button {
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.2s;
}
#taskDetailWrapper .task-detail-container .submit-box button:hover {
  opacity: 0.9;
}

/* Utilities & Globals */
.d-flex {
  display: flex;
}

.gap-10 {
  gap: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.w-full {
  width: 100%;
}

.fs-10 {
  font-size: 10px;
}

.fs-11 {
  font-size: 11px;
}

.fs-12 {
  font-size: 12px;
}

.font-bold {
  font-weight: 700;
}

.d-block {
  display: block;
}

.w-full {
  width: 100%;
}

.mt-5 {
  margin-top: 5px;
}

.mt-15 {
  margin-top: 15px;
}

.mb-5 {
  margin-bottom: 5px;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-30 {
  margin-bottom: 30px;
}

.p-5 {
  padding: 5px;
}

.p-10 {
  padding: 10px;
}

.p-15 {
  padding: 15px;
}

.text-right {
  text-align: right;
}

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

.border-basic {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.cursor-pointer {
  cursor: pointer;
}

.border-none {
  border: none;
}

.h-80 {
  height: 80px;
}

/* Floating Status Bar */
#status-bar {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 3000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.3s ease-out;
}
#status-bar::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #60a5fa;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #60a5fa;
  animation: pulse 1.5s infinite;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* Palette Grid Custom Design */
.palette-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 8px 0;
  overflow-x: auto;
}
@media (min-width: 900px) {
  .palette-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}
.palette-grid .palette-card {
  background: var(--surface-active);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.palette-grid .palette-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.palette-grid .palette-card:hover .palette-action {
  background: var(--primary);
  color: #fff;
}
.palette-grid .palette-card .palette-preview {
  height: 50px;
  display: flex;
}
.palette-grid .palette-card .palette-preview .p-color {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: flex 0.3s;
}
.palette-grid .palette-card .palette-preview .p-color span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s;
  mix-blend-mode: difference;
  filter: invert(1);
}
.palette-grid .palette-card .palette-preview .p-color:hover {
  flex: 1.5;
}
.palette-grid .palette-card .palette-preview .p-color:hover span {
  opacity: 0.8;
  transform: translateY(0);
}
.palette-grid .palette-card .palette-info {
  padding: 20px;
  flex: 1;
}
.palette-grid .palette-card .palette-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.palette-grid .palette-card .palette-info p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3;
}
.palette-grid .palette-card .palette-action {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--surface-border);
  color: var(--text-dim);
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.palette-grid .palette-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-pro);
  border-color: var(--primary);
}
.palette-grid .palette-card:hover .palette-action {
  background: var(--primary);
  color: #fff;
  border-top-color: var(--primary);
}

/* Analysis Content & Report Styling */
.section-wrapper .card h1,
.section-wrapper .card h2,
.section-wrapper .card h3 {
  color: #fff;
  margin: 48px 0 24px;
  border-bottom: 1px solid var(--surface-border);
  padding-bottom: 16px;
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-wrapper .card h1 {
  font-size: 30px;
}
.section-wrapper .card h2 {
  font-size: 24px;
}
.section-wrapper .card h3 {
  font-size: 20px;
}
.section-wrapper .card p {
  margin-bottom: 24px;
  line-height: 1.8;
  color: var(--text);
  font-size: 15px;
}
.section-wrapper .card ul,
.section-wrapper .card ol {
  margin-bottom: 28px;
  padding-left: 20px;
}
.section-wrapper .card ul li,
.section-wrapper .card ol li {
  margin-bottom: 14px;
  line-height: 1.7;
  color: var(--text);
  padding-left: 8px;
  font-size: 15px;
}
.section-wrapper .card ul li::marker,
.section-wrapper .card ol li::marker {
  color: var(--primary);
  font-weight: 700;
}
.section-wrapper .card strong {
  color: #fff;
  font-weight: 800;
  background: linear-gradient(transparent 70%, var(--primary-glow) 70%);
  padding: 0 2px;
}
.section-wrapper .card blockquote {
  border-left: 4px solid var(--primary);
  background: rgba(139, 92, 246, 0.05);
  padding: 32px 40px;
  margin: 48px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
}
.section-wrapper .card table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--surface-border);
}
.section-wrapper .card table th {
  background: var(--surface-active);
  color: #fff;
  text-align: left;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.section-wrapper .card table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text);
  font-size: 14px;
}
.section-wrapper .card table tr:last-child td {
  border-bottom: none;
}
.section-wrapper .card table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Header/Sub-header Actions */
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.header-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: var(--surface-active);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  font-size: 15px;
}
.header-actions button i {
  transition: transform 0.3s;
}
.header-actions button:hover {
  border-color: var(--primary);
  color: #fff;
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.header-actions button:hover i {
  transform: rotate(15deg);
}
.header-actions button.regen-btn:hover {
  background: #10b981;
  border-color: #10b981;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.header-actions button.regen-btn:hover i {
  transform: rotate(180deg);
}
.header-actions button.history-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 0 15px var(--secondary-glow);
}

.sub-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--surface-border);
}
.sub-section-header h5 {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sub-section-header h5 i {
  color: var(--primary-light);
  font-size: 15px;
}

/* Competitor Analysis Styling - Accordion UI */
.comp-card {
  background: var(--grad-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: var(--shadow-pro);
}
.comp-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.comp-card.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.comp-card.open .comp-header {
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid var(--surface-border);
  color: #fff;
}
.comp-card.open .comp-header .toggle-icon {
  transform: rotate(180deg);
  color: var(--primary);
}
.comp-card.open .comp-body {
  display: block;
  animation: slideDown 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
.comp-card .comp-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.comp-card .comp-header .comp-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
  word-break: break-all;
  transition: color 0.2s;
}
.comp-card .comp-header .comp-title i {
  color: var(--primary-light);
  font-size: 18px;
  transition: color 0.2s;
}
.comp-card .comp-header:hover .comp-title {
  color: var(--primary);
}
.comp-card .comp-header:hover .comp-title i {
  color: var(--primary);
}
.comp-card .comp-header .toggle-icon {
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.2s;
  font-size: 14px;
}
.comp-card .comp-body {
  display: none;
  padding: 32px;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  /* Markdown fixes inside comp-body */
}
.comp-card .comp-body h1,
.comp-card .comp-body h2,
.comp-card .comp-body h3 {
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  font-size: 18px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.comp-card .comp-body h1:first-child,
.comp-card .comp-body h2:first-child,
.comp-card .comp-body h3:first-child {
  margin-top: 0;
}
.comp-card .comp-body ul,
.comp-card .comp-body ol {
  margin-bottom: 24px;
  background: var(--bg);
  padding: 24px 24px 24px 44px;
  border-radius: 8px;
}
.comp-card .comp-body ul li,
.comp-card .comp-body ol li {
  margin-bottom: 8px;
  padding-left: 0;
}
.comp-card .comp-body ul li::before,
.comp-card .comp-body ol li::before {
  display: none;
}
.comp-card .comp-body ul {
  list-style: disc;
}
.comp-card .comp-body ol {
  list-style: decimal;
}
.comp-card .comp-body p {
  margin-bottom: 1.5em;
}
.comp-card .comp-body strong {
  color: var(--primary-light);
  background: linear-gradient(transparent 60%, rgba(59, 130, 246, 0.2) 60%);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Strategy & Design Report Enhancements */
.card-strategy_report,
.card-proposal_report,
.card-own_site_analysis,
.card-design_report,
.card-competitor_analysis,
.card-wireframe_code,
.card-ga4_analysis {
  padding: 48px;
  position: relative;
  background: var(--grad-surface);
  border: 1px solid var(--surface-border);
  overflow: visible;
  border-radius: var(--radius-lg);
}
.card-strategy_report::before,
.card-proposal_report::before,
.card-own_site_analysis::before,
.card-design_report::before,
.card-competitor_analysis::before,
.card-wireframe_code::before,
.card-ga4_analysis::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--grad-pro);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-strategy_report > h1,
.card-proposal_report > h1,
.card-own_site_analysis > h1,
.card-design_report > h1,
.card-competitor_analysis > h1,
.card-wireframe_code > h1,
.card-ga4_analysis > h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 40px;
  border-bottom: 1px solid var(--surface-border-bright);
  padding-bottom: 24px;
}
.card-strategy_report > h2,
.card-proposal_report > h2,
.card-own_site_analysis > h2,
.card-design_report > h2,
.card-competitor_analysis > h2,
.card-wireframe_code > h2,
.card-ga4_analysis > h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: var(--grad-pro);
  padding: 16px 24px;
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  margin-top: 56px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: -0.01em;
}
.card-strategy_report > h2:first-of-type,
.card-proposal_report > h2:first-of-type,
.card-own_site_analysis > h2:first-of-type,
.card-design_report > h2:first-of-type,
.card-competitor_analysis > h2:first-of-type,
.card-wireframe_code > h2:first-of-type,
.card-ga4_analysis > h2:first-of-type {
  margin-top: 0;
}
.card-strategy_report > h3,
.card-proposal_report > h3,
.card-own_site_analysis > h3,
.card-design_report > h3,
.card-competitor_analysis > h3,
.card-wireframe_code > h3,
.card-ga4_analysis > h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 20px;
  padding-left: 18px;
  border-left: 2px solid var(--secondary);
}
.card-strategy_report p,
.card-proposal_report p,
.card-own_site_analysis p,
.card-design_report p,
.card-competitor_analysis p,
.card-wireframe_code p,
.card-ga4_analysis p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 24px;
}
.card-strategy_report ul,
.card-strategy_report ol,
.card-proposal_report ul,
.card-proposal_report ol,
.card-own_site_analysis ul,
.card-own_site_analysis ol,
.card-design_report ul,
.card-design_report ol,
.card-competitor_analysis ul,
.card-competitor_analysis ol,
.card-wireframe_code ul,
.card-wireframe_code ol,
.card-ga4_analysis ul,
.card-ga4_analysis ol {
  margin-bottom: 32px;
  list-style: none;
  padding: 0;
}
.card-strategy_report ul > li,
.card-strategy_report ol > li,
.card-proposal_report ul > li,
.card-proposal_report ol > li,
.card-own_site_analysis ul > li,
.card-own_site_analysis ol > li,
.card-design_report ul > li,
.card-design_report ol > li,
.card-competitor_analysis ul > li,
.card-competitor_analysis ol > li,
.card-wireframe_code ul > li,
.card-wireframe_code ol > li,
.card-ga4_analysis ul > li,
.card-ga4_analysis ol > li {
  padding-left: 40px;
  position: relative;
  margin-bottom: 18px;
  line-height: 1.8;
  font-size: 15.5px;
}
.card-strategy_report ul > li::before,
.card-strategy_report ol > li::before,
.card-proposal_report ul > li::before,
.card-proposal_report ol > li::before,
.card-own_site_analysis ul > li::before,
.card-own_site_analysis ol > li::before,
.card-design_report ul > li::before,
.card-design_report ol > li::before,
.card-competitor_analysis ul > li::before,
.card-competitor_analysis ol > li::before,
.card-wireframe_code ul > li::before,
.card-wireframe_code ol > li::before,
.card-ga4_analysis ul > li::before,
.card-ga4_analysis ol > li::before {
  content: "\f058";
  /* fa-circle-check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 6px;
  top: 4px;
  color: #fff;
  background: var(--primary);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.card-strategy_report ul > li strong,
.card-strategy_report ol > li strong,
.card-proposal_report ul > li strong,
.card-proposal_report ol > li strong,
.card-own_site_analysis ul > li strong,
.card-own_site_analysis ol > li strong,
.card-design_report ul > li strong,
.card-design_report ol > li strong,
.card-competitor_analysis ul > li strong,
.card-competitor_analysis ol > li strong,
.card-wireframe_code ul > li strong,
.card-wireframe_code ol > li strong,
.card-ga4_analysis ul > li strong,
.card-ga4_analysis ol > li strong {
  color: var(--text);
  font-weight: 700;
}
.card-strategy_report ul > li ul,
.card-strategy_report ul > li ol,
.card-strategy_report ol > li ul,
.card-strategy_report ol > li ol,
.card-proposal_report ul > li ul,
.card-proposal_report ul > li ol,
.card-proposal_report ol > li ul,
.card-proposal_report ol > li ol,
.card-own_site_analysis ul > li ul,
.card-own_site_analysis ul > li ol,
.card-own_site_analysis ol > li ul,
.card-own_site_analysis ol > li ol,
.card-design_report ul > li ul,
.card-design_report ul > li ol,
.card-design_report ol > li ul,
.card-design_report ol > li ol,
.card-competitor_analysis ul > li ul,
.card-competitor_analysis ul > li ol,
.card-competitor_analysis ol > li ul,
.card-competitor_analysis ol > li ol,
.card-wireframe_code ul > li ul,
.card-wireframe_code ul > li ol,
.card-wireframe_code ol > li ul,
.card-wireframe_code ol > li ol,
.card-ga4_analysis ul > li ul,
.card-ga4_analysis ul > li ol,
.card-ga4_analysis ol > li ul,
.card-ga4_analysis ol > li ol {
  margin-top: 12px;
  margin-bottom: 12px;
}
.card-strategy_report ul > li ul li::before,
.card-strategy_report ul > li ol li::before,
.card-strategy_report ol > li ul li::before,
.card-strategy_report ol > li ol li::before,
.card-proposal_report ul > li ul li::before,
.card-proposal_report ul > li ol li::before,
.card-proposal_report ol > li ul li::before,
.card-proposal_report ol > li ol li::before,
.card-own_site_analysis ul > li ul li::before,
.card-own_site_analysis ul > li ol li::before,
.card-own_site_analysis ol > li ul li::before,
.card-own_site_analysis ol > li ol li::before,
.card-design_report ul > li ul li::before,
.card-design_report ul > li ol li::before,
.card-design_report ol > li ul li::before,
.card-design_report ol > li ol li::before,
.card-competitor_analysis ul > li ul li::before,
.card-competitor_analysis ul > li ol li::before,
.card-competitor_analysis ol > li ul li::before,
.card-competitor_analysis ol > li ol li::before,
.card-wireframe_code ul > li ul li::before,
.card-wireframe_code ul > li ol li::before,
.card-wireframe_code ol > li ul li::before,
.card-wireframe_code ol > li ol li::before,
.card-ga4_analysis ul > li ul li::before,
.card-ga4_analysis ul > li ol li::before,
.card-ga4_analysis ol > li ul li::before,
.card-ga4_analysis ol > li ol li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--surface-border-bright);
  border-radius: 50%;
  position: absolute;
  left: 8px;
  top: 12px;
}
.card-strategy_report blockquote,
.card-proposal_report blockquote,
.card-own_site_analysis blockquote,
.card-design_report blockquote,
.card-competitor_analysis blockquote,
.card-wireframe_code blockquote,
.card-ga4_analysis blockquote {
  border-left: 4px solid var(--secondary);
  background: rgba(139, 92, 246, 0.05);
  padding: 32px 40px;
  margin: 48px 0;
  border-radius: 8px;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  font-size: 16.5px;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

/* Wireframe Mockup Styles */
.mockup-root {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5;
  /* Global Nav for Wireframe */
}
.mockup-root header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 64px;
  background: #333;
  /* Dark header for visibility */
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.mockup-root header .logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
}
.mockup-root header nav {
  display: flex;
  gap: 24px;
}
.mockup-root header nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.mockup-root header nav a:hover {
  color: #fff;
}
.mockup-root #main-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  background: #fff;
}
.mockup-root #main-content .page-section {
  padding: 40px;
  margin-bottom: 40px;
  border-radius: 8px;
}
.mockup-root {
  /* Reset for wireframe content */
}
.mockup-root img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
}
.mockup-root h1,
.mockup-root h2,
.mockup-root h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.mockup-root p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #4b5563;
}

/* Gantt Chart - Premium Themed */
#tab-view-gantt {
  margin-top: 1em;
}

/* Toolbar (zoom slider) */
.gantt-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 20px 8px;
  gap: 12px;
}

.gantt-zoom-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
}

/* Wrapper card styling */
#tab-view-gantt .section-wrapper {
  overflow: hidden;
}

#tab-view-gantt .card {
  padding: 0 !important;
}

/* Gantt popup-wrapper close on outside click */
.gantt .popup-wrapper {
  cursor: default;
}

/* Gantt container */
#ganttChart {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}
#ganttChart svg {
  border-radius: 0;
}

/* ---- Light theme ---- */
.gantt .grid-background {
  fill: transparent;
}

.gantt .grid-header {
  fill: var(--surface-hover, #f1f5f9);
  stroke: var(--border, #e2e8f0);
}

.gantt .grid-row {
  fill: transparent;
}

.gantt .grid-row:nth-child(even) {
  fill: rgba(0, 0, 0, 0.02);
}

.gantt .row-line {
  stroke: var(--border, #e2e8f0);
}

.gantt .tick {
  stroke: var(--border, #e2e8f0);
  stroke-width: 0.8;
}

.gantt .tick.thick {
  stroke-width: 1.5;
}

.gantt .upper-text {
  fill: var(--text-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gantt .lower-text {
  fill: var(--text-dim, #94a3b8);
  font-size: 11px;
}

.gantt .bar {
  fill: var(--primary, #6366f1);
  rx: 6;
}

.gantt .bar-progress {
  fill: var(--primary-light, #818cf8);
  rx: 6;
}

.gantt .bar-invalid {
  fill: rgba(100, 116, 139, 0.3);
  stroke: rgba(100, 116, 139, 0.4);
}

.gantt .bar-label {
  fill: #fff;
  font-size: 11px;
  font-weight: 700;
}

.gantt .bar-label.big {
  fill: var(--text-dim, #94a3b8);
}

.gantt .handle {
  fill: rgba(255, 255, 255, 0.5);
}

.gantt .arrow {
  stroke: var(--primary-light, #818cf8);
  stroke-width: 1.4;
  fill: none;
}

.gantt .today-highlight {
  fill: rgba(139, 92, 246, 0.08);
}

/* ---- Dark theme ---- */
[data-theme=dark] #ganttChart svg {
  background: transparent;
  /* Remove the old inverted filter */
  filter: none;
}
[data-theme=dark] .gantt .grid-header {
  fill: rgba(255, 255, 255, 0.04);
  stroke: rgba(255, 255, 255, 0.06);
}
[data-theme=dark] .gantt .grid-row {
  fill: transparent;
}
[data-theme=dark] .gantt .grid-row:nth-child(even) {
  fill: rgba(255, 255, 255, 0.02);
}
[data-theme=dark] .gantt .row-line {
  stroke: rgba(255, 255, 255, 0.06);
}
[data-theme=dark] .gantt .tick {
  stroke: rgba(255, 255, 255, 0.08);
}
[data-theme=dark] .gantt .tick.thick {
  stroke: rgba(255, 255, 255, 0.15);
}
[data-theme=dark] .gantt .upper-text {
  fill: var(--text-muted, #64748b);
}
[data-theme=dark] .gantt .lower-text {
  fill: var(--text-dim, #94a3b8);
}
[data-theme=dark] .gantt .bar {
  fill: var(--primary, #6366f1);
  filter: drop-shadow(0 2px 6px rgba(99, 102, 241, 0.4));
}
[data-theme=dark] .gantt .bar-progress {
  fill: #818cf8;
}
[data-theme=dark] .gantt .bar-label {
  fill: #fff;
}
[data-theme=dark] .gantt .bar-label.big {
  fill: var(--text-dim, #94a3b8);
}
[data-theme=dark] .gantt .today-highlight {
  fill: rgba(139, 92, 246, 0.1);
}
[data-theme=dark] .gantt .arrow {
  stroke: rgba(129, 140, 248, 0.6);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .glass-nav {
    padding: 8px 16px;
    flex-direction: row;
    height: 60px;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
  }
  .glass-nav .nav-brand {
    display: none;
  }
  .glass-nav .nav-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 0;
    width: auto;
  }
  .glass-nav .nav-tabs .nav-tab-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  .glass-nav .mobile-hamburger {
    display: block;
  }
  .glass-nav .nav-user {
    display: none;
  }
  main {
    flex-direction: column;
    margin-top: 60px;
    height: calc(100vh - 60px);
  }
  /* Hamburger sidebar */
  .glass-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--bg);
    z-index: 1999;
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
    padding: 24px;
    border: none;
    overflow-y: auto;
  }
  body.mobile-menu-open {
    overflow: hidden;
  }
  body.mobile-menu-open .glass-sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  /* Show nav-user inside mobile menu explicitly */
  body.mobile-menu-open .glass-nav .nav-user {
    display: flex;
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2005;
  }
  .glass-sidebar .sidebar-header {
    display: block;
    margin-bottom: 16px;
  }
  .glass-sidebar .project-list {
    flex-direction: column;
    gap: 8px;
  }
  .glass-sidebar .project-item {
    margin-bottom: 0;
    padding: 12px 16px;
    white-space: normal;
  }
  .main-content-wrapper {
    width: 100%;
  }
  #project_content {
    padding: 0 16px;
  }
  .project-header-premium {
    padding: 16px 16px 0;
    flex-direction: column;
    align-items: flex-start;
    top: 0;
    z-index: 10;
    background: var(--bg);
    /* Ensure solid background to cover scrolling content */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  body.hide-mobile-headers .project-header-premium {
    transform: translateY(-120%);
  }
  .project-header-premium .title-section {
    width: 100%;
  }
  .project-header-premium .project-nav-premium {
    overflow-x: auto;
    width: 100%;
    gap: 16px;
    padding-bottom: 4px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .project-header-premium .project-nav-premium::-webkit-scrollbar {
    display: none;
  }
  .project-header-premium .p-tab-premium {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .gen-tab-nav {
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 16px;
    padding: 6px;
    border-radius: 12px;
    top: 110px;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Below fixed header + margin */
  }
  body.hide-mobile-headers .gen-tab-nav {
    top: 0;
  }
  .gen-tab-nav::-webkit-scrollbar {
    height: 4px;
  }
  .input-card {
    padding: 24px;
    margin: 20px auto;
    width: 95%;
  }
  .card-hero i {
    font-size: 40px;
  }
  .card-hero h3 {
    font-size: 24px;
  }
  .form-row {
    flex-direction: column;
  }
  /* Reduce spacing for markdown text */
  .comp-body ul,
  .comp-body ol {
    padding: 16px 16px 16px 20px;
    /* Overrides the large 44px padding-left and 24px padding-top/bottom */
  }
  .card h2,
  .comp-body h2,
  .internal-tab-content h2 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    word-break: break-all;
  }
  .card h2 a,
  .comp-body h2 a,
  .internal-tab-content h2 a {
    font-size: 14px;
    margin-top: 4px;
    word-break: break-all;
  }
  .card pre,
  .comp-body pre,
  .internal-tab-content pre {
    padding: 12px;
  }
  .comp-body {
    padding: 16px;
  }
  /* Multi-card margin/padding overrides to preserve width width */
  .gen-tab-content .gen-tab-pane .card,
  .section-wrapper .card,
  .internal-tab-content .card {
    padding: 1em !important;
  }
  .res-container .card {
    padding: 12px;
  }
  .res-container .section-wrapper {
    margin-bottom: 12px;
  }
  .section-wrapper .section-header {
    padding: 16px;
  }
  .page-section {
    padding: 16px;
  }
  .kanban-board {
    flex-direction: column;
  }
  .kanban-col {
    width: 100%;
  }
  #tab-view-members > div {
    flex-direction: column;
  }
  #tab-view-members > div > div {
    width: 100%;
  }
  /* Tasks View Enhancements - mobile card style */
  .task-list-header {
    display: none;
  }
  #tab-view-tasks .section-wrapper {
    /* Remove rounded card border, tasks are individual cards */
    border: none;
    background: none;
    box-shadow: none;
  }
  #tab-view-tasks .card {
    padding: 0 !important;
    background: none;
  }
  .task-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 6px 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--grad-surface);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    align-items: start;
    position: relative;
  }
  /* Task ID (#n) */
  .task-row > div[data-col=id] {
    font-size: 11px;
    color: var(--text-muted);
    grid-column: 1;
    grid-row: 1;
    width: auto;
    margin: 0;
  }
  /* Status badge */
  .task-row > div[data-col=status] {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    margin: 0;
    text-align: right;
  }
  /* Priority dot */
  .task-row > div[data-col=priority] {
    display: none;
    /* merged into title row */
  }
  /* Title */
  .task-row > div[data-col=title] {
    grid-column: 1/-1;
    grid-row: 2;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    width: auto;
    margin: 0;
    line-height: 1.4;
  }
  /* Assignee */
  .task-row > div[data-col=assignee] {
    grid-column: 1;
    grid-row: 3;
    width: auto;
    margin: 0;
  }
  /* Due date */
  .task-row > div[data-col=due] {
    grid-column: 2;
    grid-row: 3;
    width: auto;
    margin: 0;
    font-size: 12px;
    text-align: right;
    color: var(--text-muted);
  }
  /* Arrow indicator */
  .task-row::after {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 10px;
    opacity: 0.4;
  }
  .palette-grid {
    display: flex;
    flex-direction: column;
  }
  /* Wiki Tab Adjustments */
  #tab-view-wiki > .section-wrapper > .card {
    flex-direction: column;
  }
  #tab-view-wiki > .section-wrapper > .card > div:first-child {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: auto;
  }
  #tab-view-wiki > .section-wrapper > .card > div:last-child {
    padding: 20px;
  }
  /* GA4 Advanced Grid Updates */
  .ga4-grid {
    grid-template-columns: 1fr;
  }
  /* Adjust Modals */
  .modal .modal-content {
    padding: 20px;
    width: 95%;
  }
}
/* -------------------------------------------------------------------------- */
/* Internal Tabs (Main Dashboard) */
/* -------------------------------------------------------------------------- */
.internal-tabs-wrapper {
  /* margin-top: 10px; */
}

.internal-tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.internal-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.3s;
}

.internal-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.internal-tab-btn.active {
  background: var(--primary);
  color: white;
  font-weight: bold;
}

/* -------------------------------------------------------------------------- */
/* GA4 Report Advanced Design */
/* -------------------------------------------------------------------------- */
.ga4-report-container {
  color: var(--text-main);
}
.ga4-report-container h2 {
  font-size: 1.5em;
  margin-bottom: 24px;
  color: var(--primary);
}
.ga4-report-container h3 {
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  margin: 32px 0 16px;
  font-size: 1.1em;
  font-weight: 600;
}
.ga4-report-container h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.ga4-report-container table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}
.ga4-report-container tr:first-child th:first-child {
  border-top-left-radius: 12px;
}
.ga4-report-container tr:first-child th:last-child {
  border-top-right-radius: 12px;
}
.ga4-report-container tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
.ga4-report-container tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}
.ga4-report-container th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 12px 15px;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.ga4-report-container td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.ga4-report-container tr:last-child td {
  border-bottom: none;
}

.ga4-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.ga4-stat-card {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.ga4-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.ga4-stat-value {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

.ga4-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 5px;
  color: var(--primary);
  z-index: 10;
}
.ga4-tooltip .tooltip-text {
  visibility: hidden;
  width: 240px;
  background-color: #1a1a1a;
  color: #fff;
  text-align: left;
  border-radius: 8px;
  padding: 12px;
  position: absolute;
  z-index: 10001;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  font-size: 11px;
  line-height: 1.5;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  border: 1px solid #444;
  pointer-events: none;
  white-space: normal;
}
.ga4-tooltip:hover {
  z-index: 10002;
}
.ga4-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* -------------------------------------------------------------------------- */
/* Markdown Body Styles (AI Analysis & Reports) */
/* -------------------------------------------------------------------------- */
.markdown-body {
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.8;
  word-wrap: break-word;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--text);
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.4;
}
.markdown-body h1 {
  font-size: 1.8em;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.3em;
}
.markdown-body h2 {
  font-size: 1.5em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3em;
  color: var(--primary);
}
.markdown-body h2:first-child {
  margin-top: 0;
}
.markdown-body h3 {
  font-size: 1.25em;
  position: relative;
  padding-left: 14px;
}
.markdown-body h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}
.markdown-body h4 {
  font-size: 1.1em;
  color: var(--text-muted);
}
.markdown-body p {
  margin-bottom: 1.5em;
}
.markdown-body ul,
.markdown-body ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}
.markdown-body li {
  margin-bottom: 0.5em;
}
.markdown-body li::marker {
  color: var(--primary);
  font-weight: bold;
}
.markdown-body strong {
  color: var(--text);
  font-weight: 700;
  background: rgba(var(--primary-rgb), 0.1);
  padding: 0 4px;
  border-radius: 4px;
}
.markdown-body blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 4px solid var(--primary);
  background: var(--surface-hover);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
}
.markdown-body blockquote p:last-child {
  margin-bottom: 0;
}
.markdown-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 2em;
  background: var(--surface-hover);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.markdown-body table th,
.markdown-body table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.markdown-body table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: var(--text-muted);
}
.markdown-body table tr:last-child td {
  border-bottom: none;
}
.markdown-body a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary);
  transition: all 0.2s;
}
.markdown-body a:hover {
  color: #fff;
  border-bottom-style: solid;
}
.markdown-body code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text-dim);
}
.markdown-body pre {
  background: #111;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5em;
  border: 1px solid var(--border);
}
.markdown-body pre code {
  background: none;
  padding: 0;
  color: #ddd;
}

/* Analysis Content Units */
.analysis-unit {
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(5px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.analysis-unit:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(var(--primary-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.analysis-unit .unit-content {
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text-main);
}
.analysis-unit .unit-content h2,
.analysis-unit .unit-content h3,
.analysis-unit .unit-content h4 {
  color: #fff;
  margin-top: 0;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.analysis-unit .unit-content p {
  margin-bottom: 14px;
}
.analysis-unit .unit-content ul,
.analysis-unit .unit-content ol {
  margin-bottom: 14px;
  padding-left: 20px;
}
.analysis-unit .unit-content li {
  margin-bottom: 6px;
}
.analysis-unit .unit-actions {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--surface-border);
  padding-top: 20px;
  margin-top: 10px;
}
.analysis-unit .unit-btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.analysis-unit .unit-btn i {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}
.analysis-unit .unit-btn.adopt-btn {
  background: var(--grad-pro);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}
.analysis-unit .unit-btn.adopt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.5);
  filter: brightness(1.1);
}
.analysis-unit .unit-btn.adopt-btn:hover i {
  transform: scale(1.2) rotate(-5deg);
}
.analysis-unit .unit-btn.adopt-btn:active {
  transform: translateY(1px);
}
.analysis-unit .unit-btn.adopt-btn.adopted {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  cursor: default;
  box-shadow: none;
  transform: none;
}
.analysis-unit .unit-btn.adopt-btn.adopted i {
  transform: scale(1.1);
}
.analysis-unit .unit-btn.feedback-btn {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(10px);
}
.analysis-unit .unit-btn.feedback-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.analysis-unit .unit-btn.feedback-btn:hover i {
  transform: translateY(-2px);
}
.analysis-unit .unit-chat-box {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  animation: slideDown 0.3s ease-out;
}
.analysis-unit .unit-chat-box .unit-chat-input-area {
  padding: 16px;
}
.analysis-unit .unit-chat-box .unit-chat-input-area textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.analysis-unit .unit-chat-box .unit-chat-input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}
.analysis-unit .unit-chat-box .unit-chat-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}/*# sourceMappingURL=style.css.map */