body {
    background: #f6f8fb;
}

.vp-page,
.flow-wrap,
.page-container {
    width: min(1180px, calc(100% - 36px));
    max-width: 1180px;
    margin: 0 auto 64px;
    padding: 28px 0 52px;
}

.flow-shell {
    background: #f6f8fb;
    padding: 0;
}

.gateway-workspace {
    width: min(1180px, calc(100% - 36px));
    max-width: 1180px;
    margin: 0 auto 64px;
    padding: 28px 0 52px;
    background: #f6f8fb;
}

.vp-hero,
.flow-hero,
.inner-page-hero,
.gateway-hero {
    background: #102033;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
    margin: 0 0 18px;
    padding: 26px 28px;
}

.vp-hero,
.flow-hero,
.gateway-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 22px;
}

.inner-page-hero {
    width: min(1180px, calc(100% - 36px));
    margin: 28px auto 0;
    text-align: left;
}

.vp-hero::before,
.vp-hero::after,
.flow-hero::before,
.flow-hero::after,
.gateway-hero::before,
.gateway-hero::after {
    display: none !important;
}

.vp-kicker,
.contact-style-kicker,
.gateway-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #86efac;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.vp-hero h2,
.flow-hero h1,
.inner-page-hero h1,
.gateway-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: 0;
}

.vp-hero p,
.flow-hero p,
.inner-page-hero p,
.gateway-hero p {
    max-width: 760px;
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.75;
}

.vp-actions,
.flow-actions,
.gateway-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.btn,
.flow-btn,
.plugin-download,
.gateway-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid #d6dde8;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}

.btn:hover,
.flow-btn:hover,
.plugin-download:hover,
.gateway-btn:hover {
    border-color: #86efac;
    color: #047857;
}

.btn-primary,
.flow-btn.primary,
.plugin-download,
.gateway-btn.primary {
    border-color: #16a34a !important;
    background: #16a34a !important;
    color: #fff !important;
}

.btn-sm {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
}

.stats-grid,
.metric-grid {
    display: grid;
    gap: 14px;
    margin: 18px 0;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card,
.metric-card,
.chart-card,
.flow-card,
.gateway-panel,
.metric,
.plugin-card,
.plugin-summary-box,
.contact-info-card {
    background: #fff;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    box-shadow: none;
}

.stat-card,
.metric-card,
.metric {
    min-height: 92px;
    padding: 16px;
}

.chart-card,
.flow-card,
.gateway-panel,
.plugin-summary-box {
    padding: 20px;
    margin-bottom: 18px;
}

.stat-label,
.metric-card small,
.metric span {
    display: block;
    margin: 0 0 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.stat-number,
.metric-card strong,
.metric strong {
    display: block;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}

.chart-card h3,
.flow-card h2,
.gateway-panel h3,
.contact-style-title,
.plugin-card h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: 0;
}

.muted,
.contact-style-text,
.plugin-card p,
.contact-info-card p,
.step p {
    color: #64748b;
    line-height: 1.7;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    align-items: start;
}

.form-group {
    display: grid;
    gap: 7px;
}

.form-label {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.form-input,
.form-select,
.vp-page input,
.vp-page select,
.vp-page textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d6dde8;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    outline: none;
    padding: 11px 12px;
    font-size: 14px;
}

.form-input:focus,
.form-select:focus,
.vp-page input:focus,
.vp-page select:focus,
.vp-page textarea:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.form-input[readonly],
.form-select[readonly],
.vp-page input[readonly],
.vp-page textarea[readonly] {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}

.btn[disabled] {
    background: #e2e8f0 !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

.alert {
    margin: 0 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 13px 14px;
    font-weight: 700;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.data-table-wrap {
    overflow: auto;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
}

.gateway-table-wrap {
    overflow: auto;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
}

.data-table,
.field-table,
.gateway-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td,
.field-table th,
.field-table td,
.gateway-table th,
.gateway-table td {
    border-bottom: 1px solid #edf2f7;
    padding: 12px 13px;
    text-align: left;
    vertical-align: top;
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
}

.data-table th,
.field-table th,
.gateway-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 900;
}

.data-table tr:last-child td,
.field-table tr:last-child td,
.gateway-table tr:last-child td {
    border-bottom: 0;
}

code,
.data-table code,
.endpoint code {
    display: inline-block;
    max-width: 100%;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 3px 6px;
    word-break: break-all;
}

pre {
    overflow: auto;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #0f172a;
    color: #dbeafe;
    padding: 16px;
    font-size: 12px;
    line-height: 1.7;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: #eef2f7;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.badge-success,
.badge.ok {
    background: #dcfce7;
    color: #166534;
}

.badge-warning,
.badge.warn {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger,
.badge.bad {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info,
.badge.idle {
    background: #dbeafe;
    color: #1d4ed8;
}

.flow-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 18px;
}

.step-list {
    display: grid;
    gap: 12px;
}

.step {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 12px;
    align-items: start;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    padding: 14px;
}

.step-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef2f7;
    color: #475569;
    font-weight: 900;
}

.step.ok .step-mark {
    background: #dcfce7;
    color: #166534;
}

.step.warn .step-mark {
    background: #fef3c7;
    color: #92400e;
}

.step h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 15px;
}

.endpoint {
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.endpoint strong {
    display: block;
    margin-bottom: 8px;
}

.endpoint code {
    display: block;
    background: #f8fafc;
    border-color: #e3e8f0;
    color: #334155;
}

.contact-style-grid {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 24px;
    align-items: start;
}

.plugin-list {
    display: grid;
    gap: 14px;
}

.gateway-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gateway-metric {
    min-width: 110px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .06);
}

.gateway-metric strong,
.gateway-metric span {
    display: block;
}

.gateway-metric strong {
    color: #fff;
    font-size: 14px;
}

.gateway-metric span {
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 12px;
}

.gateway-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.gateway-panel-title span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.api-test-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.api-test-form label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.api-test-form input,
.api-test-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d6dde8;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    outline: none;
    padding: 11px 12px;
    font-size: 14px;
}

.case-detail-grid {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.4fr);
    gap: 18px;
    align-items: start;
}

.app-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.plugin-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 16px;
}

.plugin-cover {
    min-height: 132px;
    border-radius: 8px;
    background-color: #f1f5f9;
    background-position: center;
    background-size: cover;
}

.plugin-meta,
.plugin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plugin-meta span,
.plugin-stats span {
    border: 1px solid #e3e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.plugin-richtext {
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    padding: 12px;
    line-height: 1.7;
}

.plugin-download.disabled {
    background: #e2e8f0 !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

.meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    color: #64748b;
    font-size: 12px;
}

.rich-content {
    background: #f8fafc;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    padding: 16px;
    line-height: 1.85;
    color: #334155;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.rich-content a,
.ticket-card,
.ticket-desc {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.reply {
    border-left: 3px solid #16a34a;
    background: #f8fafc;
    border-radius: 8px;
    padding: 13px;
    margin-bottom: 12px;
}

.reply.admin {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.empty {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    color: #64748b;
}

.ticket-media {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ticket-thumb {
    width: 150px;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: #334155;
}

.ticket-thumb img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    display: block;
}

.ticket-thumb span {
    display: block;
    padding: 7px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 7px 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 980px) {
    .vp-hero,
    .flow-hero,
    .gateway-hero,
    .flow-grid,
    .case-detail-grid,
    .contact-style-grid,
    .plugin-card {
        display: block;
    }

    .vp-actions,
    .flow-actions,
    .gateway-actions {
        justify-content: flex-start;
        margin-top: 16px;
    }

    .stats-grid,
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .app-card-grid {
        grid-template-columns: 1fr;
    }

    .step {
        grid-template-columns: 34px 1fr;
    }

    .step > a {
        grid-column: 2;
    }

    .plugin-cover {
        margin-bottom: 14px;
    }

    .gateway-metrics {
        margin-top: 16px;
    }
}

@media (max-width: 640px) {
    .vp-page,
    .flow-wrap,
    .page-container,
    .inner-page-hero {
        width: min(100% - 28px, 1180px);
    }

    .vp-hero,
    .flow-hero,
    .inner-page-hero {
        padding: 22px;
    }

    .vp-hero h2,
    .flow-hero h1,
    .inner-page-hero h1 {
        font-size: 24px;
    }

    .stats-grid,
    .metric-grid {
        grid-template-columns: 1fr !important;
    }
}
