/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid #e1e1e1;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.tab-button {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    color: #0077C5;
    background: rgba(0, 119, 197, 0.05);
}

.tab-button.active {
    color: #0077C5;
    border-bottom-color: #0077C5;
    background: rgba(0, 119, 197, 0.05);
}

.tab-content {
    display: none;
}

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

/* Sub-Navigation Styles (for Growth Hacks categories) */
.sub-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.sub-nav-button {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-nav-button:hover {
    border-color: #0077C5;
    color: #0077C5;
    background: rgba(0, 119, 197, 0.05);
}

.sub-nav-button.active {
    background: #0077C5;
    color: white;
    border-color: #0077C5;
}

.sub-content {
    display: none;
}

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

/* Growth Hacks chart layout fixes */
#growthhacks-tab .chart-grid:has(> .chart-container:only-child) {
    grid-template-columns: 1fr;
}

/* Markdown Content Styles */
.markdown-content {
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.markdown-content h1 {
    color: #0077C5;
    border-bottom: 3px solid #0077C5;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.markdown-content h2 {
    color: #005a9e;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e1e1e1;
}

.markdown-content h3 {
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.markdown-content table thead {
    background: #0077C5;
    color: white;
}

.markdown-content table th,
.markdown-content table td {
    padding: 0.75rem;
    border: 1px solid #ddd;
    text-align: left;
}

.markdown-content table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.markdown-content table tbody tr:hover {
    background: #f0f8ff;
}

.markdown-content pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    border-left: 4px solid #0077C5;
}

.markdown-content code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content ul, .markdown-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.markdown-content li {
    margin: 0.5rem 0;
}

.markdown-content blockquote {
    border-left: 4px solid #0077C5;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.back-button {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #0077C5;
    text-decoration: none;
    font-weight: 500;
}

.back-button:hover {
    text-decoration: underline;
}

.loading-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.error-message {
    background: #ffe6e6;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

/* Dashboard Specific Styles */
.data-placeholder {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    border: 2px dashed #cbd5e0;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.placeholder-text {
    max-width: 400px;
}

.placeholder-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.placeholder-text p {
    font-size: 0.9rem;
    color: #4a5568;
    margin: 0.5rem 0;
    line-height: 1.5;
}

body {
    background: #f8fafc;
}

.tab-navigation {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.35rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.tab-button.active {
    color: #1B7A12;
    background: #E8F5E3;
    border-bottom-color: #60a5fa;
}

.sub-navigation {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #a78bfa;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.sub-nav-button.active {
    background: #E8F5E3;
    color: #1B7A12;
    border-color: #E8F5E3;
}

.markdown-content {
    border: 1px solid #e2e8f0;
    border-top: 3px solid #60a5fa;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.placeholder-text code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.placeholder-text ul {
    text-align: left;
    margin: 1rem auto;
    padding-left: 1.5rem;
}

.placeholder-text li {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.query-display {
    margin-top: 1rem;
    background: #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
}

.query-header {
    background: #2d2d2d;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.query-header:hover {
    background: #3d3d3d;
}

.query-title {
    color: #4fc3f7;
    font-weight: 600;
    font-size: 0.9rem;
}

.query-toggle {
    color: #888;
    font-size: 0.85rem;
}

.query-content {
    display: none;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.query-content.expanded {
    display: block;
}

.query-content pre {
    margin: 0;
    padding: 0;
    background: transparent;
    color: #d4d4d4;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.query-content .kql-comment {
    color: #6a9955;
}

.query-content .kql-keyword {
    color: #569cd6;
}

.query-content .kql-string {
    color: #ce9178;
}

.query-content .kql-operator {
    color: #d4d4d4;
}

.implementation-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.status-category {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-category h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.status-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.status-category li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #4a5568;
    line-height: 1.5;
}

.status-category li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #0077C5;
    font-weight: bold;
}

.btn-small {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #0077C5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.growth-view-switcher {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #ffffff;
}

.growth-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid #c7d2fe;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.growth-view-link:hover {
    border-color: #3b82f6;
    color: #1e3a8a;
    background: #eaf2ff;
}

.growth-view-link.active {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
}

.growth-hub-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) minmax(220px, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.growth-hub-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
}

.growth-hub-hero-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.growth-hub-hero-card p {
    margin: 0;
    color: rgba(226, 232, 240, 0.95);
    font-size: 0.88rem;
    line-height: 1.45;
}

.growth-hub-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 0.65rem;
}

.growth-hub-kpi {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.06);
}

.growth-hub-kpi-label {
    display: block;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.growth-hub-kpi-value {
    display: block;
    margin-top: 0.18rem;
    color: #0f172a;
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 800;
}

.growth-hub-kpi-note {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.3;
}

@media (max-width: 980px) {
    .growth-hub-hero {
grid-template-columns: 1fr;
    }

    .growth-hub-kpis {
grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 560px) {
    .growth-hub-kpis {
grid-template-columns: 1fr;
    }
}

.btn-small:hover {
    background: #005a9e;
}

.growth-filterbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.growth-filterbar__left,
.growth-filterbar__right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.growth-filterbar .timeframe-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #eff6ff;
    margin: 0;
}

.growth-filterbar .timeframe-selector label {
    margin: 0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.growth-filterbar .timeframe-selector select {
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    background: #fff;
    color: #1e3a8a;
    font-weight: 600;
    padding: 4px 10px;
}

.growth-analytics-page .container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.growth-analytics-page .metrics-section {
    background: #ffffff;
    border: 1px solid #dbe5f1;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.growth-analytics-page .metrics-section h1,
.growth-analytics-page .metrics-section h2,
.growth-analytics-page .metrics-section h3 {
    color: #0f172a;
}

.growth-analytics-page .section-description {
    color: #475569;
}

.growth-analytics-page .chart-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
}

.growth-analytics-page .tab-navigation,
.growth-analytics-page .sub-navigation {
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    box-shadow: none;
}

.growth-analytics-page .tab-button {
    border-radius: 10px;
    bottom: 0;
}

.growth-analytics-page .tab-button.active {
    border-bottom-color: transparent;
    background: #eaf2ff;
    color: #1e3a8a;
}

.growth-analytics-page .sub-nav-button {
    border-radius: 999px;
    border-color: #c7d2fe;
    color: #334155;
}

.growth-analytics-page .sub-nav-button.active {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}

.growth-analytics-page .query-display {
    border: 1px solid #1f2937;
    border-radius: 10px;
}

.growth-analytics-page #dashboard-loading,
.growth-analytics-page #dashboard-error {
    border-radius: 12px;
    border: 1px solid #dbe5f1;
    background: #ffffff;
}

.startup-diagnostics {
    display: none;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
    box-shadow: 0 1px 3px rgba(127, 29, 29, 0.08);
}

.startup-diagnostics.visible {
    display: block;
}

.startup-diagnostics__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.startup-diagnostics__message {
    margin: 0.4rem 0 0;
    font-size: 0.84rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
