﻿:root {
    --report-bg: #f3f6fb;
    --report-surface: #ffffff;
    --report-border: #e2e8f0;
    --report-border-strong: #cbd5e1;
    --report-text: #0f172a;
    --report-text-soft: #475569;
    --report-text-muted: #64748b;
    --report-primary: #2563eb;
    --report-primary-2: #1d4ed8;
    --report-primary-soft: rgba(37,99,235,.10);
    --report-danger-soft: rgba(220,38,38,.08);
    --report-danger: #b91c1c;
    --report-info-soft: rgba(37,99,235,.08);
    --report-info: #1d4ed8;
    --report-success-soft: rgba(22,163,74,.08);
    --report-success: #15803d;
    --report-shadow-sm: 0 8px 20px rgba(15,23,42,.05);
    --report-shadow-md: 0 18px 40px rgba(15,23,42,.08);
}

/* common */
.report-page,
.reports-page,
.report-run-page,
.report-designer-page,
.report-group-edit-page,
.report-groups-page,
.report-icon-picker,
.pivot-wrap {
    display: grid;
    gap: 16px;
}

.muted {
    color: var(--report-text-muted);
}

.report-panel {
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 22px;
    box-shadow: var(--report-shadow-md);
    overflow: hidden;
}

    .report-panel + .report-panel {
        margin-top: 16px;
    }

.report-panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(15,23,42,.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.report-panel-body {
    padding: 18px 20px;
}

.report-panel-title {
    font-size: 1rem;
    font-weight: 900;
    color: var(--report-text);
}

.report-panel-subtitle {
    margin-top: 3px;
    font-size: .88rem;
    color: var(--report-text-muted);
}

.report-btn {
    min-height: 44px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    border: 1px solid var(--report-border);
    background: #fff;
    color: var(--report-text-soft);
    text-decoration: none;
    font-weight: 800;
    transition: .18s ease;
    box-shadow: var(--report-shadow-sm);
    cursor: pointer;
}

    .report-btn:hover {
        color: var(--report-text);
        border-color: var(--report-border-strong);
        transform: translateY(-1px);
    }

    .report-btn:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
    }

    .report-btn.primary {
        background: linear-gradient(135deg, var(--report-primary), #3b82f6);
        border-color: transparent;
        color: #fff;
        box-shadow: 0 14px 28px rgba(37,99,235,.22);
    }

        .report-btn.primary:hover {
            color: #fff;
            filter: brightness(.98);
        }

    .report-btn.soft {
        background: var(--report-primary-soft);
        color: var(--report-primary-2);
        border-color: rgba(37,99,235,.12);
    }

        .report-btn.soft:hover {
            color: var(--report-primary-2);
        }

.report-input,
.report-select,
.report-textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(15,23,42,.10);
    background: #fff;
    color: var(--report-text);
    border-radius: 14px;
    padding: 10px 12px;
    outline: none;
    transition: .18s ease;
    box-shadow: none;
}

.report-textarea {
    min-height: 110px;
    resize: vertical;
}

    .report-input:focus,
    .report-select:focus,
    .report-textarea:focus {
        border-color: rgba(37,99,235,.45);
        box-shadow: 0 0 0 4px rgba(37,99,235,.08);
    }

.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0,1fr));
    gap: 12px;
}

.report-filter-item {
    grid-column: span 3;
    min-width: 0;
}

    .report-filter-item.w-2 {
        grid-column: span 2;
    }

    .report-filter-item.w-3 {
        grid-column: span 3;
    }

    .report-filter-item.w-4 {
        grid-column: span 4;
    }

    .report-filter-item.w-6 {
        grid-column: span 6;
    }

    .report-filter-item.w-8 {
        grid-column: span 8;
    }

    .report-filter-item.w-12 {
        grid-column: span 12;
    }

    .report-filter-item label {
        display: block;
        margin-bottom: 7px;
        font-size: .79rem;
        font-weight: 800;
        color: var(--report-text-muted);
        letter-spacing: .03em;
        text-transform: uppercase;
    }

.report-alert {
    min-height: 48px;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
}

    .report-alert.info {
        background: var(--report-info-soft);
        border-color: rgba(37,99,235,.12);
        color: var(--report-info);
    }

    .report-alert.danger {
        background: var(--report-danger-soft);
        border-color: rgba(220,38,38,.12);
        color: var(--report-danger);
    }

    .report-alert.success {
        background: var(--report-success-soft);
        border-color: rgba(22,163,74,.12);
        color: var(--report-success);
    }

.report-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--report-text-muted);
    padding: 24px;
}

.report-grid-wrap {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    overflow: auto;
    background: #fff;
}

.report-grid-table {
    width: 100%;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0;
}

    .report-grid-table thead th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        color: rgba(15,23,42,.76);
        font-size: 12px;
        font-weight: 800;
        text-align: left;
        padding: 14px;
        border-bottom: 1px solid rgba(15,23,42,.08);
        white-space: nowrap;
        z-index: 1;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    .report-grid-table tbody td {
        padding: 13px 14px;
        border-bottom: 1px solid #eef2f7;
        color: #0f172a;
        font-size: 13px;
        vertical-align: middle;
    }

    .report-grid-table tbody tr:hover {
        background: #fbfdff;
    }

.report-mobile-stack {
    display: none;
}

.report-mobile-row {
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 16px;
    box-shadow: var(--report-shadow-sm);
    padding: 14px;
}

    .report-mobile-row + .report-mobile-row {
        margin-top: 10px;
    }

.report-mobile-row-title {
    font-size: .96rem;
    font-weight: 900;
    color: var(--report-text);
    margin-bottom: 10px;
}

.report-mobile-pairs {
    display: grid;
    gap: 8px;
}

.report-mobile-pair {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px dashed #edf2f7;
    padding-top: 8px;
}

    .report-mobile-pair:first-child {
        border-top: 0;
        padding-top: 0;
    }

.report-mobile-key {
    color: var(--report-text-muted);
    font-size: .8rem;
    font-weight: 700;
    min-width: 96px;
}

.report-mobile-value {
    color: var(--report-text);
    font-size: .88rem;
    text-align: right;
    word-break: break-word;
}

.report-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.72);
    backdrop-filter: blur(3px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.report-loading-box {
    min-width: 280px;
    max-width: 420px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(2,6,23,.14);
    padding: 24px;
    text-align: center;
}

.report-loading-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.report-loading-sub {
    color: rgba(15,23,42,.58);
    font-size: 14px;
    margin-top: 6px;
}

.report-loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(37,99,235,.16);
    border-top-color: #2563eb;
    border-radius: 999px;
    margin: 0 auto 14px;
    animation: report-spin .9s linear infinite;
}

@keyframes report-spin {
    to {
        transform: rotate(360deg);
    }
}

/* reports list */
.reports-hero,
.group-edit-hero,
.report-groups-hero,
.report-run-hero-content,
.designer-hero-content {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.reports-hero-left,
.group-edit-hero-left,
.report-groups-hero-left,
.report-run-hero-left,
.designer-hero-left {
    min-width: 0;
}

.reports-kicker,
.group-edit-kicker,
.report-groups-kicker,
.report-run-kicker,
.designer-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.reports-title,
.group-edit-title,
.report-groups-title,
.report-run-title,
.designer-title {
    margin: 0;
    font-weight: 950;
    letter-spacing: -.02em;
    font-size: 2rem;
    line-height: 1.05;
    color: #0f172a;
}

.reports-sub,
.group-edit-sub,
.report-groups-sub,
.report-run-desc,
.designer-desc {
    color: rgba(15,23,42,.62);
    font-size: 14px;
    margin-top: 8px;
    max-width: 760px;
    line-height: 1.5;
}

.report-run-key,
.designer-key {
    margin-top: 8px;
    color: rgba(15,23,42,.55);
    font-size: 13px;
    word-break: break-all;
}

.reports-actions,
.group-edit-actions,
.report-groups-actions,
.report-run-hero-actions,
.designer-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reports-active-group-chip {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px 0 12px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
    border: 1px solid rgba(37,99,235,.10);
    font-size: 13px;
    font-weight: 800;
}

.reports-chip-clear {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(37,99,235,.12);
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.reports-stats,
.report-run-stats,
.designer-stats {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
}

.reports-stat-card,
.report-run-stat-card,
.designer-stat-card {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(2,6,23,.05);
    padding: 16px 18px;
    min-width: 0;
}

.reports-stat-label,
.report-run-stat-label,
.designer-stat-label {
    color: rgba(15,23,42,.58);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.reports-stat-value {
    color: #0f172a;
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

.report-run-stat-value,
.designer-stat-value {
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
    line-height: 1.1;
}

.reports-group-panel {
    overflow: hidden;
}

.reports-group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.reports-group-icon,
.report-group-icon,
.group-preview-icon,
.report-icon-picker-preview-box,
.report-icon-item-preview {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37,99,235,.14), rgba(96,165,250,.12));
    color: var(--group-color,#2563eb);
    flex: 0 0 44px;
}

.report-icon-picker-preview-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    flex-basis: 56px;
}

.report-icon-item-preview {
    width: 48px;
    height: 48px;
}

.reports-count-badge,
.report-groups-count {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15,23,42,.14);
}

.reports-loading,
.reports-empty,
.report-run-state,
.report-groups-state,
.designer-state-box {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.reports-loading-icon,
.reports-empty-icon,
.report-run-state-icon,
.report-groups-state-icon,
.designer-state-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37,99,235,.08);
    color: #2563eb;
    font-size: 22px;
    margin-bottom: 14px;
}

.report-run-state.error .report-run-state-icon,
.designer-state-box.error .designer-state-icon {
    background: rgba(220,38,38,.08);
    color: #dc2626;
}

.reports-loading-text,
.reports-empty-title,
.report-run-state-title,
.report-groups-state-title,
.designer-state-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.reports-empty-sub,
.report-run-state-sub,
.report-groups-state-sub,
.designer-state-sub {
    margin-top: 6px;
    color: rgba(15,23,42,.58);
    font-size: 14px;
    max-width: 520px;
}

.reports-grid,
.report-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px,1fr));
    gap: 16px;
}

.report-item-card,
.report-group-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.99), rgba(248,250,252,.97));
    box-shadow: 0 14px 30px rgba(2,6,23,.05);
    min-height: 245px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .report-item-card:hover,
    .report-group-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 38px rgba(2,6,23,.08);
        border-color: rgba(37,99,235,.18);
    }

    .report-item-card.active::before,
    .report-item-card.passive::before {
        content: "";
        position: absolute;
        left: 0;
        top: 18px;
        bottom: 18px;
        width: 4px;
        border-radius: 999px;
    }

    .report-item-card.active::before {
        background: linear-gradient(180deg,#16a34a,#22c55e);
    }

    .report-item-card.passive::before {
        background: linear-gradient(180deg,#64748b,#94a3b8);
    }

.report-item-bg-icon,
.report-group-card-bg {
    position: absolute;
    right: 14px;
    bottom: -10px;
    font-size: 82px;
    color: rgba(37,99,235,.07);
    pointer-events: none;
}

.report-item-content,
.report-group-card-content {
    position: relative;
    z-index: 1;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

.report-item-top,
.report-group-card-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.report-item-head {
    min-width: 0;
}

.report-item-title,
.report-group-title {
    font-size: 22px;
    font-weight: 950;
    line-height: 1.12;
    color: #0f172a;
    word-break: break-word;
}

.report-item-key,
.report-group-code {
    color: rgba(15,23,42,.52);
    font-size: 12px;
    margin-top: 6px;
    word-break: break-word;
}

.report-status-chip,
.group-preview-status,
.report-group-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
}

    .report-status-chip.is-active,
    .group-preview-status.is-active,
    .report-group-status.is-active {
        background: rgba(34,197,94,.10);
        color: #15803d;
        border-color: rgba(34,197,94,.14);
    }

    .report-status-chip.is-passive,
    .group-preview-status.is-passive,
    .report-group-status.is-passive {
        background: rgba(100,116,139,.10);
        color: #475569;
        border-color: rgba(100,116,139,.14);
    }

.report-item-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    color: var(--group-color,#1d4ed8);
    border: 1px solid rgba(37,99,235,.10);
    font-size: 12px;
    font-weight: 800;
}

.report-item-desc,
.report-group-desc,
.group-preview-desc {
    color: rgba(15,23,42,.72);
    font-size: 14px;
    line-height: 1.55;
}

.report-item-desc {
    min-height: 64px;
    max-width: 90%;
}

.report-item-footer,
.report-group-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-group-report-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
}

.report-group-top-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-group-meta {
    display: grid;
    gap: 8px;
}

.report-group-meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

    .report-group-meta-item .label {
        color: rgba(15,23,42,.55);
        font-weight: 700;
    }

    .report-group-meta-item .value {
        color: #0f172a;
        font-weight: 800;
    }

/* designer */
.designer-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(15,23,42,.07);
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
    box-shadow: 0 18px 42px rgba(2,6,23,.06);
}

.designer-hero-bg-icon,
.report-run-hero-bg-icon {
    position: absolute;
    right: 18px;
    bottom: -10px;
    font-size: 92px;
    color: rgba(37,99,235,.07);
    pointer-events: none;
}

.designer-main-grid {
    display: grid;
    grid-template-columns: 320px minmax(0,1fr);
    gap: 16px;
    align-items: start;
}

.designer-sidebar {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 96px;
}

.designer-side-panel .report-panel-body {
    padding-top: 14px;
}

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

.designer-kv-item {
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(15,23,42,.08);
}

    .designer-kv-item:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

.designer-kv-key {
    color: rgba(15,23,42,.55);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.designer-kv-value {
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    word-break: break-word;
}

.designer-check-list {
    display: grid;
    gap: 10px;
}

.designer-check-item {
    display: flex;
    align-items: start;
    gap: 10px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
}

    .designer-check-item input {
        margin-top: 3px;
    }

.designer-side-form {
    display: grid;
    gap: 12px;
}

.designer-role-cloud {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.designer-role-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
    border: 1px solid rgba(37,99,235,.10);
    font-size: 12px;
    font-weight: 700;
}

.designer-tabs-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 16px 0 16px;
    border-bottom: 1px solid rgba(15,23,42,.06);
}

.designer-tab {
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 14px 14px 0 0;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(15,23,42,.64);
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: .18s ease;
}

    .designer-tab:hover {
        color: #0f172a;
        background: rgba(15,23,42,.03);
    }

    .designer-tab.active {
        color: #1d4ed8;
        background: rgba(37,99,235,.07);
        border-color: rgba(37,99,235,.10);
    }

.designer-tab-body {
    display: grid;
    gap: 16px;
}

.designer-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

    .designer-toolbar.between {
        justify-content: space-between;
    }

.designer-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.designer-section-title {
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.designer-align-end {
    display: flex;
    align-items: end;
}

.designer-inline-checks {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.designer-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
}

    .designer-inline-check input {
        margin: 0;
    }

.designer-selected-group-chip {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    color: var(--group-color,#1d4ed8);
    border: 1px solid rgba(37,99,235,.10);
    font-size: 13px;
    font-weight: 800;
}

.designer-sql-editor {
    min-height: 340px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
}

.designer-preview-panel {
    display: grid;
    gap: 12px;
}

.designer-preview-head {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.designer-table-wrap {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.designer-table {
    margin-bottom: 0;
}

    .designer-table thead th {
        background: #f8fafc;
        color: rgba(15,23,42,.72);
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .03em;
        border-bottom: 1px solid rgba(15,23,42,.08);
        white-space: nowrap;
    }

.designer-footer-action {
    display: flex;
    justify-content: flex-end;
}

/* groups edit */
.group-edit-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) 340px;
    gap: 16px;
    align-items: start;
}

.group-edit-side {
    display: grid;
    gap: 16px;
}

.group-edit-check {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.group-edit-check-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #0f172a;
}

.group-preview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.99), rgba(248,250,252,.97));
    box-shadow: 0 14px 30px rgba(2,6,23,.05);
    min-height: 220px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.group-preview-top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.group-preview-title {
    font-size: 22px;
    font-weight: 950;
    line-height: 1.1;
    color: #0f172a;
}

.group-preview-code {
    color: rgba(15,23,42,.52);
    font-size: 12px;
    margin-top: -8px;
}

/* icon picker */
.report-icon-picker-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.report-icon-picker-search {
    position: relative;
    flex: 1 1 320px;
}

    .report-icon-picker-search i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(15,23,42,.45);
        font-size: .9rem;
    }

    .report-icon-picker-search .report-input {
        padding-left: 40px;
    }

.report-icon-picker-category {
    min-width: 220px;
}

.report-icon-picker-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 18px;
    background: rgba(248,250,252,.75);
    padding: 14px;
}

.report-icon-picker-preview-meta {
    min-width: 0;
}

.report-icon-picker-preview-label {
    font-size: 12px;
    font-weight: 800;
    color: rgba(15,23,42,.55);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 4px;
}

.report-icon-picker-preview-value {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.report-icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px,1fr));
    gap: 12px;
}

.report-icon-item {
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    border-radius: 18px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    transition: .18s ease;
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

    .report-icon-item:hover {
        transform: translateY(-2px);
        border-color: rgba(37,99,235,.18);
        box-shadow: 0 14px 28px rgba(15,23,42,.08);
    }

    .report-icon-item.selected {
        border-color: rgba(37,99,235,.28);
        background: rgba(37,99,235,.04);
        box-shadow: 0 14px 28px rgba(37,99,235,.10);
    }

.report-icon-item-name {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.report-icon-item-category {
    font-size: 11px;
    color: rgba(15,23,42,.55);
    font-weight: 700;
}

/* pivot */
.pivot-card {
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    box-shadow: var(--report-shadow-sm);
}

.field-list {
    max-height: 70vh;
    overflow: auto;
}

.saved-item {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

    .saved-item + .saved-item {
        margin-top: 10px;
    }

.pivot-zone {
    min-height: 84px;
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.field-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
    border: 1px solid rgba(37,99,235,.10);
    font-size: 12px;
    font-weight: 800;
}

.mini-btn {
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 900;
    line-height: 1;
    padding: 0;
}

.pivot-grid {
    overflow: auto;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 18px;
    background: #fff;
}

.pivot-table {
    width: 100%;
    min-width: 680px;
    border-collapse: separate;
    border-spacing: 0;
}

    .pivot-table th, .pivot-table td {
        padding: 12px 14px;
        border-bottom: 1px solid #eef2f7;
        font-size: 13px;
    }

    .pivot-table thead th {
        background: #f8fafc;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        color: rgba(15,23,42,.76);
    }

/* states */
.report-page-size-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

    .report-page-size-wrap label {
        margin: 0;
        color: rgba(15,23,42,.62);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

.report-page-indicator {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.08);
    background: rgba(248,250,252,.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(15,23,42,.72);
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1399.98px) {
    .designer-main-grid {
        grid-template-columns: 290px minmax(0,1fr);
    }
}

@media (max-width: 1199.98px) {
    .reports-stats,
    .report-run-stats,
    .designer-stats {
        grid-template-columns: 1fr 1fr;
    }

    .report-filter-item,
    .report-filter-item.w-2,
    .report-filter-item.w-3,
    .report-filter-item.w-4,
    .report-filter-item.w-6,
    .report-filter-item.w-8 {
        grid-column: span 6;
    }

    .designer-main-grid,
    .group-edit-grid {
        grid-template-columns: 1fr;
    }

    .designer-sidebar {
        position: static;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 991.98px) {
    .reports-grid,
    .report-groups-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
    }

    .reports-title,
    .group-edit-title,
    .report-groups-title,
    .report-run-title,
    .designer-title {
        font-size: 1.7rem;
    }

    .designer-sidebar {
        grid-template-columns: 1fr;
    }

    .report-run-hero-content,
    .designer-hero-content {
        padding: 20px;
    }
}

@media (max-width: 767.98px) {
    .report-filter-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-item,
    .report-filter-item.w-2,
    .report-filter-item.w-3,
    .report-filter-item.w-4,
    .report-filter-item.w-6,
    .report-filter-item.w-8,
    .report-filter-item.w-12 {
        grid-column: auto;
    }

    .report-panel-header,
    .report-panel-body {
        padding: 14px;
    }

    .reports-actions,
    .group-edit-actions,
    .report-groups-actions,
    .report-run-hero-actions,
    .designer-hero-actions,
    .designer-toolbar,
    .designer-toolbar-actions,
    .report-run-panel-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .reports-actions .report-btn,
        .group-edit-actions .report-btn,
        .report-groups-actions .report-btn,
        .report-run-hero-actions .report-btn,
        .designer-hero-actions .report-btn,
        .designer-toolbar .report-btn,
        .designer-toolbar-actions .report-btn,
        .report-run-panel-actions .report-btn {
            justify-content: center;
        }

    .reports-stats,
    .report-run-stats,
    .designer-stats {
        grid-template-columns: 1fr;
    }

    .reports-grid,
    .report-groups-grid {
        grid-template-columns: 1fr;
    }

    .report-item-title,
    .report-group-title,
    .group-preview-title {
        font-size: 18px;
    }

    .report-item-desc {
        max-width: 100%;
        min-height: auto;
    }

    .report-item-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .report-item-footer .report-btn {
            justify-content: center;
        }

    .designer-tabs-wrap {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 14px 14px 0 14px;
    }

    .designer-tab {
        border-radius: 14px;
        justify-content: center;
    }

    .designer-footer-action {
        justify-content: stretch;
    }

        .designer-footer-action .report-btn {
            width: 100%;
        }

    .report-icon-picker-toolbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .report-icon-picker-category {
        min-width: 0;
    }

    .report-icon-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px,1fr));
    }
}

@media (max-width: 575.98px) {
    .report-grid-wrap {
        display: none;
    }

    .report-mobile-stack {
        display: block;
    }

    .reports-title,
    .group-edit-title,
    .report-groups-title,
    .report-run-title,
    .designer-title {
        font-size: 1.45rem;
    }

    .reports-sub {
        font-size: 13px;
    }

    .reports-actions,
    .group-edit-actions,
    .report-groups-actions,
    .report-run-hero-actions,
    .designer-hero-actions,
    .designer-toolbar,
    .designer-toolbar-actions,
    .report-run-panel-actions,
    .designer-tabs-wrap {
        grid-template-columns: 1fr;
    }

    .report-item-footer {
        grid-template-columns: 1fr;
    }

    .report-item-content,
    .report-group-card-content,
    .report-run-hero-content,
    .designer-hero-content {
        padding: 16px;
    }

    .report-run-key,
    .designer-key {
        font-size: 12px;
    }

    .report-loading-box {
        min-width: auto;
        width: 100%;
    }
}
