﻿/* =========================================================
   Flexpress Insights Demo UI
   Matched to existing Flexpress theme
   Primary: #6f1064
   Accent: teal
   ========================================================= */

:root {
    --fp-purple: #6f1064;
    --fp-purple-dark: #5b0b52;
    --fp-teal: #08b8b0;
    --fp-bg: #f4f6fa;
    --fp-text: #07111f;
    --fp-muted: #536580;
    --fp-border: #e3e8f0;
}

/* Public shell */

.insights-shell {
    background: var(--fp-bg);
    min-height: 100vh;
}

.insights-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

/* Hero - Flexpress style */

.insights-hero {
    padding: 72px 0 78px;
    background: var(--fp-purple);
    color: #ffffff;
}

.insights-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 22px;
}

.insights-title {
    max-width: 940px;
    margin: 0;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
    color: #ffffff;
}

    .insights-title .accent,
    .insights-title-accent {
        color: var(--fp-teal);
    }

.insights-lead {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 19px;
    line-height: 1.65;
    font-weight: 600;
}

/* Breadcrumbs */

.insight-breadcrumbs {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 14px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.68);
}

    .insight-breadcrumbs a {
        color: #ffffff;
        text-decoration: none;
        font-weight: 800;
    }

        .insight-breadcrumbs a:hover {
            color: var(--fp-teal);
        }

.insight-article-header .insight-breadcrumbs {
    color: var(--fp-muted);
}

    .insight-article-header .insight-breadcrumbs a {
        color: var(--fp-purple);
    }

/* Sections */

.insights-section {
    padding: 44px 0;
}

.insight-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 26px;
}

.insight-section-title {
    margin: 0;
    color: var(--fp-text);
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.insight-section-subtitle,
.insight-card-text {
    margin: 10px 0 0;
    color: var(--fp-muted);
    font-size: 16px;
    line-height: 1.65;
}

/* Cards */

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

    .insights-grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.insight-card {
    background: #ffffff;
    border: 1px solid var(--fp-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(18, 29, 48, 0.07);
}

.insight-card-body {
    padding: 25px;
}

.insight-card-kicker {
    color: var(--fp-teal);
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 12px;
}

.insight-card-title {
    margin: 0;
    color: var(--fp-text);
    font-size: 23px;
    line-height: 1.25;
    letter-spacing: -0.025em;
    font-weight: 900;
}

    .insight-card-title a {
        color: inherit;
        text-decoration: none;
    }

        .insight-card-title a:hover {
            color: var(--fp-purple);
        }

.insight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
    color: var(--fp-muted);
    font-size: 14px;
}

/* Pills */

.insight-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--fp-teal);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

/* Buttons */

.insight-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--fp-teal);
    border: 1px solid var(--fp-teal);
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
}

    .insight-button:hover {
        background: #079f99;
        border-color: #079f99;
        color: #ffffff;
    }

    .insight-button.secondary {
        background: transparent;
        border-color: var(--fp-purple);
        color: var(--fp-purple);
    }

        .insight-button.secondary:hover {
            background: var(--fp-purple);
            color: #ffffff;
        }

/* Article */

.insight-article-shell {
    background: #ffffff;
    min-height: 100vh;
}

.insight-article-header {
    padding: 58px 0 46px;
    background: var(--fp-bg);
    border-bottom: 1px solid var(--fp-border);
}

.insight-article-title {
    max-width: 930px;
    margin: 18px 0 0;
    color: var(--fp-text);
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.045em;
    font-weight: 900;
}

.insight-article-excerpt {
    max-width: 760px;
    margin: 20px 0 0;
    color: var(--fp-muted);
    font-size: 19px;
    line-height: 1.65;
    font-weight: 600;
}

.insight-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    color: var(--fp-muted);
    font-size: 14px;
}

.insight-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 315px;
    gap: 42px;
    padding: 44px 0 70px;
}

.insight-content {
    max-width: 820px;
    color: #26364d;
    font-size: 18px;
    line-height: 1.8;
}

    .insight-content h2 {
        margin: 42px 0 14px;
        color: var(--fp-text);
        font-size: 32px;
        line-height: 1.2;
        letter-spacing: -0.03em;
        font-weight: 900;
    }

    .insight-content h3 {
        margin: 32px 0 12px;
        color: var(--fp-text);
        font-size: 24px;
        line-height: 1.25;
        font-weight: 900;
    }

    .insight-content p {
        margin: 0 0 22px;
    }

    .insight-content ul,
    .insight-content ol {
        margin: 0 0 24px 24px;
    }

    .insight-content li {
        margin-bottom: 9px;
    }

    .insight-content blockquote {
        margin: 34px 0;
        padding: 24px 26px;
        border-left: 6px solid var(--fp-teal);
        background: #f4f6fa;
        border-radius: 16px;
        color: var(--fp-purple);
        font-weight: 900;
    }

.insight-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}

.insight-side-card {
    background: var(--fp-bg);
    border: 1px solid var(--fp-border);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 18px;
}

    .insight-side-card h3 {
        margin: 0 0 14px;
        color: var(--fp-text);
        font-size: 18px;
        font-weight: 900;
    }

/* Admin */

.admin-insights-page {
    padding: 28px;
    background: var(--fp-bg);
    min-height: 100vh;
}

.admin-insights-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.admin-insights-title {
    margin: 0;
    color: var(--fp-text);
    font-size: 31px;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.admin-insights-subtitle {
    margin: 8px 0 0;
    color: var(--fp-muted);
}

.admin-panel {
    background: #ffffff;
    border: 1px solid var(--fp-border);
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(18, 29, 48, 0.06);
    overflow: hidden;
}

.admin-panel-padding {
    padding: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table th {
        text-align: left;
        padding: 15px 18px;
        background: #f9fafc;
        border-bottom: 1px solid var(--fp-border);
        color: var(--fp-muted);
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.07em;
    }

    .admin-table td {
        padding: 18px;
        border-bottom: 1px solid #eef2f7;
        color: #26364d;
        vertical-align: top;
    }

    .admin-table tr:last-child td {
        border-bottom: 0;
    }

.admin-title-cell {
    color: var(--fp-text);
    font-weight: 400;
}

.admin-muted {
    color: var(--fp-muted);
    font-size: 13px;
    margin-top: 5px;
}

.status-badge {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

    .status-badge.published {
        background: rgba(8, 184, 176, 0.14);
        color: #087a76;
    }

    .status-badge.draft {
        background: rgba(111, 16, 100, 0.12);
        color: var(--fp-purple);
    }

.admin-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.admin-field {
    margin-bottom: 18px;
}

    .admin-field label {
        display: block;
        margin-bottom: 7px;
        color: #26364d;
        font-size: 13px;
        font-weight: 900;
    }

.admin-input,
.admin-textarea,
.admin-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #ffffff;
    color: var(--fp-text);
    outline: none;
}

    .admin-input:focus,
    .admin-textarea:focus,
    .admin-select:focus {
        border-color: var(--fp-teal);
        box-shadow: 0 0 0 3px rgba(8, 184, 176, 0.15);
    }

.admin-textarea {
    min-height: 170px;
    resize: vertical;
}

    .admin-textarea.large {
        min-height: 400px;
        font-family: Consolas, Monaco, monospace;
    }

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive */

@media (max-width: 900px) {
    .insights-grid,
    .insights-grid.two,
    .insight-article-layout,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-insights-header,
    .insight-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-table {
        min-width: 780px;
    }

    .admin-panel {
        overflow-x: auto;
    }
}
