:root {
    --bg: #f3f5f9;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Manrope, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    color: inherit;
}

.topbar {
    height: 76px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 300px minmax(280px, 1fr) auto 44px;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand-wrap {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 27px;
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 34px;
    font-weight: 800;
}

.brand-text small {
    color: var(--muted);
    font-size: 14px;
}

.global-search input,
input,
select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #f8fafc;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topnav-link,
.mode-btn {
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.lang-switch {
    display: inline-flex;
    padding: 4px;
    background: #f3f4f6;
    border-radius: 10px;
    gap: 4px;
}

.lang-switch form {
    margin: 0;
}

.lang-switch button {
    border: 0;
    background: transparent;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: 700;
    color: #334155;
    font-size: 12px;
}

.lang-switch .active {
    background: #fff;
    color: #2563eb;
}

.mode-btn {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    background: #fff;
}

.user-block.clean {
    justify-self: end;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: #111827;
    font-weight: 700;
    font-size: 13px;
}

.container {
    max-width: 1580px;
    margin: 0 auto;
    padding: 22px;
}

.layout {
    display: grid;
    grid-template-columns: 344px 1fr;
    gap: 22px;
    align-items: start;
}

.filter-panel,
.dashboard-panel,
.metric-card {
    background: #fff;
    border: 1px solid #dfe3ea;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.filter-panel {
    border-radius: 18px;
    padding: 20px 18px;
    position: sticky;
    top: 96px;
}

.panel-title {
    margin: 2px 0 20px;
    font-size: 21px;
}

.stat-block h4,
.filters h4,
.sidebar-note h4 {
    margin: 0 0 12px;
    font-size: 16px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    color: #334155;
    font-size: 14px;
}

.count-pill {
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.count-pill.gray { background: #e5e7eb; }
.count-pill.green { background: #bbf7d0; }
.count-pill.violet { background: #e9d5ff; }
.count-pill.blue { background: #bfdbfe; }

.filters {
    margin-top: 26px;
    display: grid;
    gap: 8px;
}

.filters label {
    font-size: 14px;
    font-weight: 700;
    margin-top: 6px;
}

.btn-light,
.btn-reset-full {
    margin-top: 8px;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    font-weight: 700;
    text-align: center;
    font-size: 15px;
    background: #fff;
}

.btn-light {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.sidebar-note {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.sidebar-note p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.source-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.source-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 10px;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.dashboard-shell > * {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.dashboard-tabs,
.dashboard-filters-card {
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    padding: 8px 14px 0;
    align-items: flex-end;
}

.dashboard-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 2px solid transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.dashboard-tab-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    border: 1px solid var(--tab-accent);
    color: var(--tab-accent);
    font-size: 12px;
    font-weight: 800;
}

.dashboard-filters-card {
    padding: 20px 24px;
}

.dashboard-filters-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.dashboard-filters-head h2 {
    margin: 0;
    font-size: 18px;
}

.dashboard-filters-head p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.dashboard-filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.filters-primary-btn,
.filters-ghost-btn {
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filters-primary-btn {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}

.filters-ghost-btn {
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
}

.dashboard-filters-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-field {
    display: grid;
    gap: 8px;
}

.filter-field label {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.dashboard-filters-submit {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.dashboard-active-filters {
    padding-top: 16px;
    display: grid;
    gap: 10px;
}

.active-filters-label {
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.active-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-chip,
.active-filter-empty {
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbe3ef;
    font-size: 13px;
}

.active-filter-chip {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
}

.active-filter-empty {
    color: var(--muted);
    background: #fff;
}

.dashboard-context {
    margin-top: 18px;
}

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

.dashboard-context-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #f8fafc;
}

.dashboard-context-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.dashboard-context-card b {
    font-size: 28px;
    line-height: 1;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.metric-card {
    border-radius: 18px;
    padding: 16px 18px;
    min-height: 0;
    height: auto;
    display: grid;
    align-content: start;
    gap: 10px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    align-self: start;
}

.metric-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.metric-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.metric-title {
    margin: 0;
    color: #334155;
    font-size: 15px;
    line-height: 1.3;
}

.metric-source {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.metric-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.metric-meta {
    display: flex;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.metric-delta {
    font-weight: 700;
}

.metric-delta.positive {
    color: #16a34a;
}

.metric-delta.negative {
    color: #dc2626;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-panel {
    border-radius: 18px;
    padding: 20px;
}

.dashboard-panel.wide {
    grid-column: span 2;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.panel-heading h3 {
    margin: 0;
    font-size: 20px;
}

.panel-heading span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.panel-heading span:only-of-type {
    max-width: 52ch;
    text-align: right;
    line-height: 1.35;
}

.highcharts-panel {
    width: 100%;
    min-height: 320px;
}

.highcharts-panel-trend,
.highcharts-panel-bars,
.highcharts-panel-wide-bars,
.highcharts-panel-mix,
.highcharts-panel-stacked-columns,
.highcharts-panel-grouped-columns,
.highcharts-panel-ranking-compare {
    height: 320px;
}

.highcharts-panel-donut {
    height: 320px;
}

.highcharts-panel .highcharts-container,
.highcharts-panel svg {
    border-radius: 14px;
}

.highcharts-panel .highcharts-background {
    fill: transparent;
}

.highcharts-panel .highcharts-plot-background {
    fill: #f8fafc;
}

.highcharts-panel .highcharts-data-label text,
.highcharts-panel .highcharts-axis-labels text,
.highcharts-panel .highcharts-legend-item text {
    font-family: Manrope, sans-serif !important;
}

.highcharts-panel .highcharts-title {
    display: none;
}

.trend-chart {
    display: grid;
    gap: 12px;
}

.trend-chart-svg {
    width: 100%;
    height: 240px;
    display: block;
    border-radius: 14px;
    background:
        linear-gradient(to bottom, transparent 24%, #e5e7eb 24%, #e5e7eb 25%, transparent 25%, transparent 49%, #e5e7eb 49%, #e5e7eb 50%, transparent 50%, transparent 74%, #e5e7eb 74%, #e5e7eb 75%, transparent 75%),
        linear-gradient(to right, transparent 24%, #eef2f7 24%, #eef2f7 25%, transparent 25%, transparent 49%, #eef2f7 49%, #eef2f7 50%, transparent 50%, transparent 74%, #eef2f7 74%, #eef2f7 75%, transparent 75%);
}

.trend-legend,
.trend-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #64748b;
    font-size: 13px;
}

.trend-legend i {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 999px;
    margin-right: 6px;
}

.donut-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: center;
}

.donut-chart {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #eef2f7;
}

.donut-legend {
    display: grid;
    gap: 12px;
}

.donut-legend-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}

.donut-legend-item span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.donut-legend-item i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.column-chart {
    min-height: 300px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 16px;
    align-items: end;
}

.column-chart-item {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.column-chart-bar-wrap {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: end;
}

.column-chart-bar {
    width: 100%;
    border-radius: 12px 12px 0 0;
}

.column-chart-item span {
    text-align: center;
    color: #475569;
    font-size: 13px;
}

.wide-bars {
    display: grid;
    gap: 14px;
}

.wide-bar-row {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr 64px;
    align-items: center;
    gap: 12px;
}

.detail-table {
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
}

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

.detail-table thead th {
    padding: 18px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    background: #f8fafc;
    border-bottom: 1px solid #dbe3ef;
    white-space: nowrap;
}

.detail-table tbody td {
    padding: 18px 20px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.detail-table tbody tr:hover td {
    background: #f8fbff;
}

.detail-table .section-row th {
    padding: 14px 18px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.03));
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-top: 1px solid #dbe4f0;
    border-bottom: 1px solid #dbe4f0;
}

.editor-shell {
    display: grid;
    gap: 18px;
}

.editor-topbar,
.editor-panel,
.editor-filters {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.editor-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.editor-topbar h1,
.editor-panel h2,
.editor-chart h3,
.editor-card h3,
.editor-table-card h3 {
    margin: 0;
}

.editor-topbar p {
    margin: 8px 0 0;
    color: #64748b;
}

.editor-link,
.editor-actions button,
.editor-filters button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 0;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
}

.editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.editor-tabs a {
    text-decoration: none;
    color: #334155;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
}

.editor-tabs a.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.editor-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

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

.editor-grid--dataset {
    grid-template-columns: 2fr 2fr 1fr 1fr;
    align-items: start;
}

.editor-cards,
.editor-chart-list,
.editor-table-list {
    display: grid;
    gap: 16px;
}

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

.editor-card,
.editor-chart,
.editor-table-card,
.editor-series,
.editor-table-section {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.editor-chart header,
.editor-table-card header,
.editor-panel__heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.editor-chart header span,
.editor-table-card header span,
.editor-badges span {
    border-radius: 999px;
    background: #e2e8f0;
    padding: 6px 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.editor-series,
.editor-table-section {
    margin-top: 14px;
}

.editor-points,
.editor-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.editor-form label,
.editor-filters label {
    display: grid;
    gap: 8px;
}

.editor-form label span,
.editor-filters label span {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.editor-form input,
.editor-form textarea,
.editor-form select,
.editor-filters input,
.editor-filters select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    color: #0f172a;
}

.editor-check {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.editor-check input {
    width: auto;
}

.editor-check span {
    margin: 0;
}

.editor-actions {
    display: flex;
    justify-content: flex-end;
}

.editor-message {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
}

.editor-hint {
    margin: 0;
    color: #64748b;
}

@media (max-width: 1080px) {
    .editor-filters,
    .editor-grid,
    .editor-grid--dataset,
    .editor-cards,
    .editor-points,
    .editor-row {
        grid-template-columns: 1fr;
    }

    .editor-topbar {
        flex-direction: column;
    }
}

.detail-table thead th:first-child,
.detail-table tbody td:first-child {
    padding-left: 24px;
}

.detail-table thead th:last-child,
.detail-table tbody td:last-child {
    padding-right: 24px;
}

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

.detail-table tbody td strong,
.detail-table tbody td b {
    font-weight: 800;
}

.dashboard-panel.wide .detail-table {
    margin-top: 4px;
}

.faculty-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.faculty-cell i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.table-progress {
    min-width: 180px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
}

.delta-positive {
    color: #16a34a;
    font-weight: 700;
}

.delta-negative {
    color: #dc2626;
    font-weight: 700;
}

.quality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.quality-high {
    background: #dcfce7;
    color: #15803d;
}

.quality-excellent {
    background: #d1fae5;
    color: #047857;
}

.quality-medium {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.status-warn {
    background: #fef3c7;
    color: #b45309;
}

.status-ok {
    background: #dcfce7;
    color: #15803d;
}

.bar-stack,
.ranking-list,
.matrix-table {
    display: grid;
    gap: 12px;
}

.bar-stack-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(180px, 3fr) auto;
    gap: 12px;
    align-items: center;
    font-size: 14px;
}

.bar-track,
.mini-progress {
    height: 12px;
    background: #eff3f9;
    border-radius: 999px;
    overflow: hidden;
}

.bar-track i,
.mini-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    padding: 14px 16px;
}

.ranking-item div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-index {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
}

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

.mix-card {
    border: 1px solid #e8eef6;
    border-radius: 16px;
    padding: 16px;
    background: #f8fafc;
}

.mix-card small {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.mix-card b {
    display: block;
    margin-bottom: 10px;
    font-size: 28px;
}

.matrix-head,
.matrix-row {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) 120px 120px;
    gap: 10px;
    align-items: center;
}

.matrix-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 2px 6px;
}

.matrix-row {
    padding: 14px 16px;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    background: #f8fafc;
    font-size: 14px;
}

.priority-tag {
    display: inline-flex;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: #ede9fe;
    color: #6d28d9;
    font-weight: 700;
}

.empty-state {
    grid-column: 1 / -1;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 26px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin: 0 0 6px;
}

.auth-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

.auth-card form p {
    margin: 0 0 14px;
}

.auth-card button {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    font: inherit;
    font-weight: 700;
}

@media (max-width: 1280px) {
    .dashboard-filters-form,
    .dashboard-context-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 1080px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
    }

    .dashboard-panels,
    .kpi-grid,
    .mix-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-panel.wide {
        grid-column: auto;
    }

    .dashboard-filters-head {
        flex-direction: column;
    }

    .dashboard-filters-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .donut-layout {
        grid-template-columns: 1fr;
    }

    .highcharts-panel,
    .highcharts-panel-trend,
    .highcharts-panel-bars,
    .highcharts-panel-wide-bars,
    .highcharts-panel-mix,
    .highcharts-panel-stacked-columns,
    .highcharts-panel-grouped-columns,
    .highcharts-panel-ranking-compare,
    .highcharts-panel-donut {
        height: 300px;
        min-height: 300px;
    }

    .topbar {
        grid-template-columns: 1fr;
        height: auto;
        padding: 16px;
    }
}

@media (max-width: 760px) {
    .container {
        padding: 14px;
    }

    .dashboard-tabs {
        padding: 8px 10px 0;
    }

    .dashboard-filters-card {
        padding: 16px;
    }

    .dashboard-filters-form,
    .dashboard-context-grid,
    .dashboard-panels,
    .kpi-grid,
    .mix-grid {
        grid-template-columns: 1fr;
    }

    .bar-stack-row,
    .wide-bar-row,
    .matrix-head,
    .matrix-row {
        grid-template-columns: 1fr;
    }

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

    .detail-table table {
        min-width: 760px;
    }

    .highcharts-panel,
    .highcharts-panel-trend,
    .highcharts-panel-bars,
    .highcharts-panel-wide-bars,
    .highcharts-panel-mix,
    .highcharts-panel-stacked-columns,
    .highcharts-panel-grouped-columns,
    .highcharts-panel-ranking-compare,
    .highcharts-panel-donut {
        height: 280px;
        min-height: 280px;
    }
}
