@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap');

:root {
    --flowapply-ink: #07111f;
    --flowapply-ink-2: #0d1b2f;
    --flowapply-ink-3: #13243a;
    --flowapply-text: #102033;
    --flowapply-muted: #64748b;
    --flowapply-line: rgba(15, 23, 42, 0.10);
    --flowapply-line-strong: rgba(15, 23, 42, 0.16);
    --flowapply-surface: rgba(255, 255, 255, 0.88);
    --flowapply-surface-strong: rgba(255, 255, 255, 0.98);
    --flowapply-soft: #eefbf8;
    --flowapply-mint: #2dd4bf;
    --flowapply-emerald: #059669;
    --flowapply-cyan: #0f766e;
    --flowapply-flow-blue: #047857;
    --flowapply-flow-blue-2: #0f766e;
    --flowapply-flow-blue-deep: #065f46;
    --flowapply-blue: #2563eb;
    --flowapply-violet: #7c3aed;
    --flowapply-amber: #f59e0b;
    --flowapply-coral: #ff6b6b;
    --flowapply-radius-lg: 12px;
    --flowapply-radius-md: 10px;
    --flowapply-radius-sm: 8px;
    --flowapply-shadow: 0 14px 34px rgba(16, 42, 67, 0.10);
    --flowapply-shadow-soft: 0 8px 22px rgba(16, 42, 67, 0.06);
    --flowapply-glow: 0 0 0 1px rgba(15, 118, 110, 0.18), 0 16px 42px rgba(15, 118, 110, 0.10);
}

html body {
    font-family: Inter, "Fira Sans", Helvetica, Arial, sans-serif !important;
    color: var(--flowapply-text) !important;
    background:
        radial-gradient(circle at 10% 0%, rgba(204, 251, 241, 0.48), transparent 34rem),
        radial-gradient(circle at 92% 8%, rgba(219, 234, 254, 0.36), transparent 30rem),
        linear-gradient(180deg, #f7f9fb 0%, #f0fdfa 52%, #ffffff 100%) !important;
    background-attachment: scroll !important;
}

.flowapply-hero,
.flowapply-shell,
.flowapply-export-shell,
.admin-review-shell,
.admin-sessions-shell,
.flowapply-package {
    position: relative;
}

html body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(rgba(15, 118, 110, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.022) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.62), transparent 78%);
}

.flowapply-shell,
.flowapply-hero,
.flowapply-export-shell,
.admin-review-shell,
.admin-sessions-shell,
.flowapply-package {
    font-family: Inter, "Fira Sans", Helvetica, Arial, sans-serif;
}

.flowapply-shell h1,
.flowapply-shell h2,
.flowapply-shell h3,
.flowapply-hero h1,
.flowapply-hero h2,
.flowapply-hero h3,
.flowapply-export-shell h1,
.flowapply-export-shell h2,
.admin-review-shell h1,
.admin-review-shell h2,
.admin-sessions-shell h1,
.admin-sessions-shell h2,
.flowapply-package h1,
.flowapply-package h2,
.flowapply-package h3 {
    font-family: Manrope, Inter, "Fira Sans", Helvetica, Arial, sans-serif;
    letter-spacing: 0;
}

.flowapply-kicker,
.workspace-kicker,
.export-kicker,
.admin-review-kicker,
.admin-kicker,
.package-kicker {
    letter-spacing: 0 !important;
    color: #047857 !important;
}

.flowapply-gradient .flowapply-kicker {
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.24);
}

.flowapply-session-header .workspace-kicker {
    color: #047857 !important;
    text-shadow: none;
}

.flowapply-panel,
.flowapply-card,
.admin-review-card,
.admin-sessions-card,
.card.border-0.shadow-sm {
    background: var(--flowapply-surface-strong) !important;
    border: 1px solid rgba(16, 42, 67, 0.08) !important;
    border-radius: var(--flowapply-radius-lg) !important;
    box-shadow: var(--flowapply-shadow-soft) !important;
    backdrop-filter: none;
}

.flowapply-panel:hover,
.flowapply-card:hover,
.admin-review-card:hover {
    border-color: rgba(15, 118, 110, 0.20) !important;
}

.flowapply-gradient,
.flowapply-session-header {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    background:
        linear-gradient(135deg, #ffffff 0%, #ecfdf5 52%, #ccfbf1 100%) !important;
    color: #0f172a !important;
    box-shadow: 0 0.75rem 2rem rgba(15,118,110,0.08) !important;
}

.flowapply-gradient::before,
.flowapply-session-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.42), transparent 42%, rgba(255,255,255,0.18) 68%, transparent);
    pointer-events: none;
}

.flowapply-gradient > *,
.flowapply-session-header > * {
    position: relative;
    z-index: 1;
}

.flowapply-workspace-preview,
.flowapply-quick-actions,
.export-summary,
.package-summary {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.96)) !important;
    border: 1px solid rgba(15, 118, 110, 0.16) !important;
    border-radius: var(--flowapply-radius-md) !important;
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.06) !important;
}

.flowapply-step {
    border-left-color: rgba(0, 123, 255, 0.58) !important;
}

.flowapply-chip,
.flow-chip,
.badge.text-bg-light,
.badge.text-bg-warning {
    border: 1px solid rgba(255, 255, 255, 0.26) !important;
    background: rgba(255, 255, 255, 0.16) !important;
    color: inherit !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

.flowapply-card .badge.text-bg-light,
.admin-review-card .badge.text-bg-light,
.admin-review-card .badge.text-bg-warning,
.admin-sessions-card .badge.text-bg-warning {
    background: #f0fdfa !important;
    border-color: rgba(15, 118, 110, 0.20) !important;
    color: var(--flowapply-ink-2) !important;
}

.flowapply-hero .btn,
.flowapply-shell .btn,
.flowapply-export-shell .btn,
.flowapply-package .btn,
.admin-review-shell .btn,
.admin-sessions-shell .btn {
    border-radius: 999px !important;
    font-weight: 700 !important;
    letter-spacing: 0;
}

.flowapply-hero .btn-success,
.flowapply-hero .btn-primary,
.flowapply-shell .btn-success,
.flowapply-shell .btn-primary,
.flowapply-export-shell .btn-success,
.flowapply-export-shell .btn-primary,
.flowapply-package .btn-success,
.flowapply-package .btn-primary,
.admin-review-shell .btn-success,
.admin-review-shell .btn-primary,
.admin-sessions-shell .btn-success,
.admin-sessions-shell .btn-primary {
    border: 0 !important;
    background: linear-gradient(135deg, #059669, #0f766e) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(15, 118, 110, 0.18) !important;
}

.flowapply-hero .btn-success:hover,
.flowapply-hero .btn-primary:hover,
.flowapply-shell .btn-success:hover,
.flowapply-shell .btn-primary:hover,
.flowapply-export-shell .btn-success:hover,
.flowapply-export-shell .btn-primary:hover,
.flowapply-package .btn-success:hover,
.flowapply-package .btn-primary:hover,
.admin-review-shell .btn-success:hover,
.admin-review-shell .btn-primary:hover,
.admin-sessions-shell .btn-success:hover,
.admin-sessions-shell .btn-primary:hover {
    filter: saturate(1.1) brightness(1.03);
    transform: translateY(-1px);
}

.flowapply-hero .btn-outline-primary,
.flowapply-hero .btn-outline-success,
.flowapply-hero .btn-outline-dark,
.flowapply-hero .btn-light,
.flowapply-hero .btn-outline-secondary,
.flowapply-shell .btn-outline-primary,
.flowapply-shell .btn-outline-success,
.flowapply-shell .btn-outline-dark,
.flowapply-shell .btn-light,
.flowapply-shell .btn-outline-secondary,
.flowapply-export-shell .btn-outline-primary,
.flowapply-export-shell .btn-outline-success,
.flowapply-export-shell .btn-outline-dark,
.flowapply-export-shell .btn-light,
.flowapply-export-shell .btn-outline-secondary,
.flowapply-package .btn-outline-primary,
.flowapply-package .btn-outline-success,
.flowapply-package .btn-outline-dark,
.flowapply-package .btn-light,
.flowapply-package .btn-outline-secondary,
.admin-review-shell .btn-outline-primary,
.admin-review-shell .btn-outline-success,
.admin-review-shell .btn-outline-dark,
.admin-review-shell .btn-light,
.admin-review-shell .btn-outline-secondary,
.admin-sessions-shell .btn-outline-primary,
.admin-sessions-shell .btn-outline-success,
.admin-sessions-shell .btn-outline-dark,
.admin-sessions-shell .btn-light,
.admin-sessions-shell .btn-outline-secondary {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: var(--flowapply-ink-2) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.flowapply-hero .btn-outline-primary:hover,
.flowapply-hero .btn-outline-success:hover,
.flowapply-hero .btn-outline-dark:hover,
.flowapply-hero .btn-light:hover,
.flowapply-hero .btn-outline-secondary:hover,
.flowapply-shell .btn-outline-primary:hover,
.flowapply-shell .btn-outline-success:hover,
.flowapply-shell .btn-outline-dark:hover,
.flowapply-shell .btn-light:hover,
.flowapply-shell .btn-outline-secondary:hover,
.flowapply-export-shell .btn-outline-primary:hover,
.flowapply-export-shell .btn-outline-success:hover,
.flowapply-export-shell .btn-outline-dark:hover,
.flowapply-export-shell .btn-light:hover,
.flowapply-export-shell .btn-outline-secondary:hover,
.flowapply-package .btn-outline-primary:hover,
.flowapply-package .btn-outline-success:hover,
.flowapply-package .btn-outline-dark:hover,
.flowapply-package .btn-light:hover,
.flowapply-package .btn-outline-secondary:hover,
.admin-review-shell .btn-outline-primary:hover,
.admin-review-shell .btn-outline-success:hover,
.admin-review-shell .btn-outline-dark:hover,
.admin-review-shell .btn-light:hover,
.admin-review-shell .btn-outline-secondary:hover,
.admin-sessions-shell .btn-outline-primary:hover,
.admin-sessions-shell .btn-outline-success:hover,
.admin-sessions-shell .btn-outline-dark:hover,
.admin-sessions-shell .btn-light:hover,
.admin-sessions-shell .btn-outline-secondary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(233, 244, 255, 0.98)) !important;
    border-color: rgba(0, 123, 255, 0.38) !important;
    color: var(--flowapply-ink) !important;
    transform: translateY(-1px);
}

.flowapply-hero .form-control,
.flowapply-hero .form-select,
.flowapply-shell .form-control,
.flowapply-shell .form-select,
.admin-review-shell .form-control,
.admin-review-shell .form-select,
.admin-sessions-shell .form-control,
.admin-sessions-shell .form-select {
    border-radius: 16px !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.flowapply-hero .form-control:focus,
.flowapply-hero .form-select:focus,
.flowapply-shell .form-control:focus,
.flowapply-shell .form-select:focus,
.admin-review-shell .form-control:focus,
.admin-review-shell .form-select:focus,
.admin-sessions-shell .form-control:focus,
.admin-sessions-shell .form-select:focus {
    border-color: rgba(0, 123, 255, 0.58) !important;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.14), inset 0 1px 0 rgba(255,255,255,0.55) !important;
}

.flowapply-msg {
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.flowapply-msg-user {
    background: linear-gradient(135deg, var(--flowapply-flow-blue), var(--flowapply-flow-blue-deep), #102a43) !important;
    color: #fff !important;
}

.flowapply-msg-assistant {
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,247,255,0.94)) !important;
    color: var(--flowapply-text) !important;
}

.flowapply-msg-context {
    background: linear-gradient(135deg, rgba(239, 247, 255, 0.95), rgba(240, 253, 250, 0.92)) !important;
    color: #075985 !important;
}

.flowapply-msg-error {
    background: linear-gradient(135deg, #fff1f2, #fff7ed) !important;
    color: #9f1239 !important;
}

.records-evidence-summary {
    border: 1px solid rgba(0, 123, 255, 0.18);
    border-radius: var(--flowapply-radius-sm);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(239, 247, 255, 0.72));
    padding: 0.85rem;
}

.records-evidence-status {
    flex: 0 0 auto;
    border: 1px solid rgba(0, 123, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--flowapply-flow-blue-deep);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.24rem 0.56rem;
    white-space: nowrap;
}

.records-evidence-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
}

.records-evidence-metrics > div {
    min-width: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
    padding: 0.5rem;
}

.records-evidence-metric-value {
    display: block;
    color: var(--flowapply-ink-2);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.records-evidence-metrics span:last-child {
    display: block;
    color: var(--flowapply-muted);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0.15rem;
}

.records-evidence-list {
    display: grid;
    gap: 0.38rem;
}

.records-evidence-item,
.records-evidence-diagnostics {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    padding: 0.5rem 0.6rem;
}

.records-evidence-section {
    margin-top: 0.65rem;
}

.records-evidence-kind {
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--flowapply-muted);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.2rem 0.38rem;
    text-transform: uppercase;
}

.flowapply-toolbar {
    background: rgba(255, 255, 255, 0.86) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.06);
}

.flowapply-chat,
.flowapply-workspace,
.admin-review-message {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 123, 255, 0.42) transparent;
}

.flowapply-chat::-webkit-scrollbar,
.flowapply-workspace::-webkit-scrollbar,
.admin-review-message::-webkit-scrollbar {
    width: 10px;
}

.flowapply-chat::-webkit-scrollbar-thumb,
.flowapply-workspace::-webkit-scrollbar-thumb,
.admin-review-message::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.28);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.flowapply-hero .border,
.flowapply-hero .list-group-item,
.flowapply-shell .border,
.flowapply-shell .list-group-item,
.flowapply-export-shell .border,
.flowapply-export-shell .list-group-item,
.flowapply-package .border,
.flowapply-package .list-group-item,
.admin-review-shell .border,
.admin-review-shell .list-group-item,
.admin-sessions-shell .border,
.admin-sessions-shell .list-group-item {
    border-color: rgba(15, 23, 42, 0.10) !important;
}

.flowapply-hero .list-group-item,
.flowapply-shell .list-group-item,
.flowapply-export-shell .list-group-item,
.flowapply-package .list-group-item,
.admin-review-shell .list-group-item,
.admin-sessions-shell .list-group-item {
    background: rgba(255,255,255,0.64) !important;
}

.flowapply-hero .list-group-item:hover,
.flowapply-shell .list-group-item:hover,
.flowapply-export-shell .list-group-item:hover,
.flowapply-package .list-group-item:hover,
.admin-review-shell .list-group-item:hover,
.admin-sessions-shell .list-group-item:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(233,244,255,0.78)) !important;
}

.flowapply-hero .text-muted,
.flowapply-shell .text-muted,
.flowapply-export-shell .text-muted,
.flowapply-package .text-muted,
.admin-review-shell .text-muted,
.admin-sessions-shell .text-muted {
    color: var(--flowapply-muted) !important;
}

.flowapply-hero .text-primary,
.flowapply-shell .text-primary,
.flowapply-export-shell .text-primary,
.flowapply-package .text-primary,
.admin-review-shell .text-primary,
.admin-sessions-shell .text-primary {
    color: var(--flowapply-flow-blue-deep) !important;
}

.flowapply-hero .text-success,
.flowapply-shell .text-success,
.flowapply-export-shell .text-success,
.flowapply-package .text-success,
.admin-review-shell .text-success,
.admin-sessions-shell .text-success {
    color: var(--flowapply-flow-blue) !important;
}

.flowapply-hero a,
.flowapply-shell a,
.flowapply-export-shell a,
.flowapply-package a,
.admin-review-shell a,
.admin-sessions-shell a {
    text-decoration-color: rgba(0, 123, 255, 0.35);
    text-underline-offset: 0.18em;
}

.flowapply-hero a:hover,
.flowapply-shell a:hover,
.flowapply-export-shell a:hover,
.flowapply-package a:hover,
.admin-review-shell a:hover,
.admin-sessions-shell a:hover {
    color: var(--flowapply-flow-blue-deep) !important;
}

@media (prefers-reduced-motion: no-preference) {
    .flowapply-hero .btn,
    .flowapply-shell .btn,
    .flowapply-export-shell .btn,
    .flowapply-package .btn,
    .admin-review-shell .btn,
    .admin-sessions-shell .btn,
    .flowapply-card,
    .flowapply-panel,
    .admin-review-card,
    .list-group-item {
        transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, filter 180ms ease;
    }
}

@media (max-width: 575.98px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    header .container-fluid {
        grid-template-columns: minmax(76px, 0.8fr) minmax(0, 2.2fr) !important;
        gap: 0.5rem !important;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    header form {
        flex: 1 1 auto;
        margin-right: 0.35rem !important;
    }

    header .dropdown,
    header .d-flex,
    header form,
    header .form-control {
        min-width: 0;
        max-width: 100%;
    }

    header .form-control {
        width: 100%;
        font-size: 0.92rem;
        text-overflow: ellipsis;
    }

    .flowapply-hero,
    .flowapply-shell,
    .flowapply-export-shell,
    .flowapply-package,
    .proof-wrap,
    .demo-wrap {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .flowapply-panel,
    .flowapply-entry-grid,
    .entry-spine,
    .proof-hero,
    .proof-panel,
    .proof-video-shell,
    .proof-video-shell video,
    .demo-hero,
    .demo-panel,
    .demo-layout,
    .demo-workspace,
    .table-responsive {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .proof-hero,
    .proof-panel,
    .demo-hero,
    .demo-panel {
        width: calc(100vw - 1.5rem);
        max-width: calc(100vw - 1.5rem);
        margin-left: auto;
        margin-right: auto;
        overflow: hidden;
    }

    .proof-hero h1,
    .proof-hero p,
    .proof-flow-step,
    .demo-hero h1,
    .demo-hero p,
    .demo-note,
    .demo-record {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .proof-hero .d-flex,
    .demo-hero .d-flex {
        min-width: 0;
    }

    .proof-pill,
    .demo-chip {
        max-width: 100%;
        white-space: normal;
    }

    .flowapply-panel h1 {
        overflow-wrap: break-word;
    }

    .records-evidence-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    body {
        background: #fff !important;
    }
    body::before {
        display: none !important;
    }
    .flowapply-panel,
    .flowapply-card,
    .admin-review-card,
    .admin-sessions-card,
    .card.border-0.shadow-sm {
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
}
