:root {
    --bg-main: #070b14;
    --bg-card: rgba(14, 20, 35, 0.9);
    --bg-card-strong: rgba(18, 25, 43, 0.96);
    --bg-input: rgba(4, 8, 17, 0.62);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #f4f7fb;
    --muted: #9da9c2;
    --pink: #ff3ea5;
    --pink-soft: rgba(255, 62, 165, 0.14);
    --cyan: #00d9ff;
    --cyan-soft: rgba(0, 217, 255, 0.12);
    --violet: #8b5cf6;
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.12);
    --yellow: #facc15;
    --red: #fb7185;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 15px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 32px 18px 48px;
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 62, 165, 0.15), transparent 30%),
        radial-gradient(circle at 92% 3%, rgba(0, 217, 255, 0.11), transparent 28%),
        linear-gradient(180deg, #0a0f1d 0%, var(--bg-main) 100%);
    color: var(--text);
    font-family: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(0, 217, 255, 0.34);
    outline-offset: 2px;
}

.main-shell {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero,
.section-card,
.report-card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 30px 28px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(20, 26, 46, 0.97), rgba(12, 16, 31, 0.94));
}

.hero::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.025), transparent);
    content: "";
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    z-index: -1;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.24;
    pointer-events: none;
}

.hero-glow-pink {
    top: -150px;
    left: 28%;
    background: var(--pink);
}

.hero-glow-cyan {
    right: -130px;
    bottom: -175px;
    background: var(--cyan);
}

.hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.hero-copy {
    min-width: 0;
}

.eyebrow,
.count-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-weight: 700;
}

.eyebrow {
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 62, 165, 0.28);
    background: var(--pink-soft);
    color: #ff9fd2;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.title {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
}

.subtitle {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.stat-chip {
    min-width: 138px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.stat-chip-wide {
    min-width: 205px;
}

.stat-label,
.stat-value {
    display: block;
}

.stat-label {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 0.76rem;
}

.stat-value {
    min-height: 1.25em;
    font-size: 1.18rem;
    font-weight: 700;
}

.stat-value-small {
    font-size: 0.9rem;
}

.top-link,
.action-btn,
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 13px;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.top-link {
    flex: 0 0 auto;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.top-link:hover,
.action-btn:hover:not(:disabled),
.page-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.section-card {
    margin-bottom: 22px;
    padding: 22px;
    border-radius: 24px;
    background: var(--bg-card);
}

.section-head,
.report-head,
.toolbar,
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-head,
.report-head {
    margin-bottom: 18px;
}

.section-title,
.report-title,
.panel-title {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.section-title,
.report-title {
    font-size: 1.2rem;
}

.panel-title {
    font-size: 1rem;
}

.section-desc,
.report-subtitle,
.muted {
    color: var(--muted);
}

.section-desc,
.report-subtitle {
    margin: 6px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.muted {
    margin: 4px 0 0;
    line-height: 1.5;
}

.count-badge {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.8rem;
}

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

.report-btn {
    display: flex;
    min-height: 116px;
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.report-btn:hover,
.report-btn.is-active {
    transform: translateY(-2px);
    border-color: rgba(0, 217, 255, 0.28);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(255, 62, 165, 0.055));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.report-btn.is-active {
    box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.09), 0 12px 28px rgba(0, 0, 0, 0.24);
}

.report-kicker {
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-label {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.report-desc {
    color: var(--muted);
    font-size: 0.8rem;
}

.reports-container {
    min-height: 250px;
}

.report-card {
    overflow: hidden;
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 24px;
    background: var(--bg-card);
}

.loading-card {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.loader {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.metric-card,
.inner-panel,
.chart-wrap,
.empty-state,
.error-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.026);
}

.metric-card {
    min-height: 126px;
    padding: 18px;
}

.metric-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.metric-value {
    display: block;
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1;
}

.metric-note {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 0.72rem;
}

.metric-card-accent {
    border-color: rgba(0, 217, 255, 0.18);
    background: linear-gradient(145deg, var(--cyan-soft), rgba(255, 255, 255, 0.02));
}

.metric-card-success {
    border-color: rgba(34, 197, 94, 0.2);
    background: linear-gradient(145deg, var(--green-soft), rgba(255, 255, 255, 0.02));
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 14px;
}

.inner-panel {
    min-width: 0;
    padding: 18px;
}

.facts-list {
    display: grid;
    gap: 0;
    margin: 14px 0 0;
}

.fact-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.fact-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.fact-label {
    color: var(--muted);
    font-size: 0.83rem;
}

.fact-value {
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
}

.acceptance-track {
    width: 100%;
    height: 10px;
    overflow: hidden;
    margin-top: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.acceptance-progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    margin-top: 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    appearance: none;
}

.acceptance-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.acceptance-progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), var(--cyan));
}

.acceptance-progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), var(--cyan));
}

.acceptance-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--cyan));
}

.toolbar {
    flex-wrap: wrap;
}

.toolbar-actions,
.filter-actions,
.page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.action-btn,
.page-btn {
    min-height: 40px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
}

.action-btn-primary {
    border-color: rgba(0, 217, 255, 0.28);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(139, 92, 246, 0.13));
}

.action-btn:disabled,
.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.filter-panel {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(4, 8, 17, 0.32);
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(150px, 0.75fr)) minmax(120px, 0.5fr);
    gap: 12px;
    align-items: end;
}

.filter-grid-timeline {
    grid-template-columns: repeat(2, minmax(160px, 0.5fr)) minmax(260px, 1fr);
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.field input,
.field select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--bg-input);
    color: var(--text);
}

.field input::placeholder {
    color: #68738c;
}

.field input:focus,
.field select:focus {
    border-color: rgba(0, 217, 255, 0.34);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
}

.chart-wrap {
    position: relative;
    min-height: 370px;
    margin-top: 18px;
    padding: 18px;
}

.chart-wrap canvas {
    width: 100% !important;
    height: 330px !important;
}

.table-shell {
    width: 100%;
    overflow-x: auto;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.data-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.data-table-compact {
    min-width: 560px;
}

.data-table th,
.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-card-strong);
    color: #dce5f6;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.035);
}

.align-right {
    text-align: right !important;
}

.cell-main {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.cell-sub {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.72rem;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8rem;
}

.status-pill {
    padding: 6px 9px;
    border: 1px solid rgba(34, 197, 94, 0.24);
    background: var(--green-soft);
    color: #82eda7;
    font-size: 0.72rem;
}

.status-pill-negative {
    border-color: rgba(251, 113, 133, 0.24);
    background: rgba(251, 113, 133, 0.11);
    color: #fda4af;
}

.pagination-bar {
    flex-wrap: wrap;
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.8rem;
}

.page-current {
    min-width: 112px;
    text-align: center;
}

.empty-state,
.error-card {
    padding: 32px 20px;
    text-align: center;
}

.empty-state h3,
.error-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.empty-state p,
.error-card p {
    max-width: 620px;
    margin: 0 auto 16px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.error-card {
    border-color: rgba(251, 113, 133, 0.22);
    background: rgba(251, 113, 133, 0.055);
}

.dashboard-footer {
    padding: 6px 4px 0;
    color: #69748d;
    font-size: 0.75rem;
    text-align: center;
}

@media (max-width: 980px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    body {
        padding: 20px 13px 36px;
    }

    .hero-top {
        flex-direction: column;
    }

    .top-link {
        align-self: flex-start;
    }

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

    .report-btn {
        min-height: 96px;
    }
}

@media (max-width: 600px) {
    .hero,
    .section-card,
    .report-card {
        padding: 19px;
        border-radius: 20px;
    }

    .hero-stats,
    .metrics-grid,
    .filter-grid,
    .filter-grid-timeline {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .stat-chip,
    .stat-chip-wide {
        min-width: 0;
    }

    .stat-chip-wide,
    .filter-actions {
        grid-column: 1 / -1;
    }

    .section-head,
    .report-head,
    .toolbar,
    .pagination-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .toolbar-actions,
    .filter-actions,
    .page-actions {
        width: 100%;
    }

    .toolbar-actions .action-btn,
    .filter-actions .action-btn,
    .page-actions .page-btn {
        flex: 1 1 auto;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid .filter-actions,
    .filter-grid-timeline .filter-actions {
        grid-column: 1 / -1;
    }

    .chart-wrap {
        min-height: 310px;
        padding: 10px;
    }

    .chart-wrap canvas {
        height: 285px !important;
    }
}

@media (max-width: 390px) {
    .hero-stats,
    .metrics-grid,
    .filter-grid-timeline {
        grid-template-columns: 1fr;
    }

    .stat-chip-wide,
    .filter-grid-timeline .filter-actions {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
