:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --text: #20242a;
    --muted: #68707d;
    --border: #dde1e7;
    --dark: #2b2f36;
    --dark-soft: #3a4049;
    --red: #c92332;
    --red-dark: #9e1724;
    --red-soft: #fff0f2;
    --shadow: 0 18px 45px rgba(32, 36, 42, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(201, 35, 50, 0.08), transparent 32%),
        var(--bg);
    font-family: Inter, Arial, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    background: linear-gradient(180deg, #252930 0%, #343a43 100%);
    color: #ffffff;
    overflow-y: auto;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.brand-mark img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.brand strong,
.brand span {
    display: block;
}

.brand span {
    margin-top: 3px;
    color: #b8c0cc;
    font-size: 12px;
}

.nav-menu {
    display: grid;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 8px;
    color: #dce1e8;
    font-weight: 600;
    transition: 180ms ease;
}

.nav-link svg {
    width: 19px;
    height: 19px;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.is-active {
    box-shadow: inset 4px 0 0 var(--red);
}

.nav-group {
    display: grid;
    gap: 6px;
}

.nav-parent {
    width: 100%;
    border: 0;
    appearance: none;
    color: #dce1e8;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.nav-parent .nav-chevron {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: #b8c0cc;
    transition: transform 180ms ease;
}

.nav-group.is-open .nav-chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    gap: 4px;
    margin-left: 31px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-group.is-open .nav-submenu {
    display: grid;
}

.nav-sublink {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    color: #c8ced8;
    font-size: 14px;
    font-weight: 700;
    transition: 180ms ease;
}

.nav-sublink:hover,
.nav-sublink.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-sublink.is-active {
    box-shadow: inset 3px 0 0 var(--red);
}

.sidebar-card {
    margin-top: 28px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-card strong,
.sidebar-card p {
    display: block;
    margin: 0;
}

.sidebar-card strong {
    margin-top: 8px;
}

.sidebar-card p {
    margin-top: 8px;
    color: #c8ced8;
    font-size: 13px;
    line-height: 1.55;
}

.main-panel {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 86px;
    padding: 18px 32px;
    background: rgba(244, 245, 247, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(221, 225, 231, 0.8);
    z-index: 10;
}

.topbar h1 {
    margin: 4px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
}

.eyebrow {
    color: var(--red);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--dark);
    background: var(--surface);
    cursor: pointer;
}

.menu-toggle {
    display: none;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.user-chip span {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #ffffff;
    overflow: hidden;
}

.user-chip span img {
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.content {
    min-width: 0;
    padding: 28px 32px 42px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
}

.welcome-panel,
.stats-grid {
    grid-column: 1 / -1;
}

.welcome-panel {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    min-height: 190px;
    padding: 30px;
    border-radius: 8px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(201, 35, 50, 0.96), rgba(43, 47, 54, 0.95)),
        var(--dark);
    box-shadow: var(--shadow);
}

.welcome-panel h2 {
    max-width: 650px;
    margin: 8px 0 10px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.03;
}

.welcome-panel p {
    max-width: 620px;
    margin: 0;
    color: #f0d8dc;
    line-height: 1.7;
}

.welcome-panel .eyebrow {
    color: #ffd6db;
}

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

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

.dashboard-chart-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--dark);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(32, 36, 42, 0.06);
}

.chart-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.chart-card-header h2 {
    margin: 6px 0 6px;
    font-size: 22px;
    line-height: 1.2;
}

.chart-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.chart-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: var(--red);
    background: var(--red-soft);
}

.chart-icon svg {
    width: 20px;
    height: 20px;
}

.chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 260px;
}

.chart-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.stat-card,
.panel,
.form-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(32, 36, 42, 0.06);
}

.stat-card {
    padding: 20px;
}

.stat-card span,
.stat-card small {
    display: block;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin: 12px 0 7px;
    font-size: 32px;
}

.stat-card.tone-red {
    border-color: rgba(201, 35, 50, 0.22);
    background: var(--red-soft);
}

.stat-card.tone-dark {
    color: #ffffff;
    background: var(--dark);
}

.stat-card.tone-dark span,
.stat-card.tone-dark small {
    color: #c9d0dc;
}

.panel {
    padding: 22px;
}

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

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

.activity-list,
.priority-list {
    display: grid;
    gap: 12px;
}

.activity-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
}

.activity-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--red);
    background: #ffffff;
}

.activity-item strong,
.activity-item span {
    display: block;
}

.activity-item span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.activity-item em {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--red-dark);
    background: var(--red-soft);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.priority-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.priority-item:last-child {
    border-bottom: 0;
}

.priority-item strong {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 32px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--red);
}

.form-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.form-intro {
    position: sticky;
    top: 116px;
    padding: 22px;
    border-left: 5px solid var(--red);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(32, 36, 42, 0.05);
}

.form-intro h2 {
    margin: 8px 0 10px;
    font-size: 28px;
    line-height: 1.12;
}

.form-intro p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.form-card {
    padding: 24px;
}

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

label {
    display: grid;
    gap: 8px;
    color: var(--dark);
    font-size: 14px;
    font-weight: 700;
}

.field-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.is-hidden {
    display: none !important;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: 160ms ease;
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

.file-field small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(201, 35, 50, 0.11);
}

.span-2 {
    grid-column: span 2;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.options-panel {
    align-self: start;
}

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

.option-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
}

.option-toggle strong,
.option-toggle small {
    display: block;
}

.option-toggle small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.option-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 30px;
    border-radius: 999px;
    background: #c8ced8;
    transition: background 160ms ease;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(32, 36, 42, 0.22);
    transition: transform 160ms ease;
}

.option-toggle input:checked + .toggle-switch {
    background: var(--red);
}

.option-toggle input:checked + .toggle-switch::after {
    transform: translateX(22px);
}

.primary-action,
.secondary-action,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.primary-action {
    border: 1px solid var(--red);
    color: #ffffff;
    background: var(--red);
    box-shadow: none;
    transition: background 140ms ease, border-color 140ms ease;
}

.primary-action:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
}

.primary-action:active {
    background: #7f111c;
}

.secondary-action,
.ghost-button {
    border: 1px solid var(--border);
    color: var(--dark);
    background: #ffffff;
}

.ghost-button {
    min-height: 38px;
}

.primary-action svg,
.secondary-action svg,
.ghost-button svg {
    width: 18px;
    height: 18px;
}

.mobile-overlay {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(32, 36, 42, 0.62);
    backdrop-filter: blur(8px);
    z-index: 40;
}

.modal-backdrop.is-visible {
    display: flex;
}

.submit-modal {
    width: min(100%, 470px);
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(32, 36, 42, 0.24);
    text-align: center;
}

.submit-modal h2 {
    margin: 10px 0 8px;
    color: var(--dark);
    font-size: 26px;
    line-height: 1.15;
}

.submit-modal p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.modal-icon {
    display: inline-grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 8px;
}

.modal-icon svg {
    width: 30px;
    height: 30px;
}

.modal-icon.success {
    color: #ffffff;
    background: var(--red);
    box-shadow: 0 14px 30px rgba(201, 35, 50, 0.28);
}

.modal-icon.error {
    color: var(--red);
    background: var(--red-soft);
}

.modal-summary {
    display: grid;
    gap: 5px;
    margin: 20px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    text-align: left;
}

.modal-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.modal-summary strong {
    color: var(--dark);
}

.modal-errors {
    display: grid;
    gap: 8px;
    margin: 18px 0 22px;
    padding: 0;
    color: var(--muted);
    list-style: none;
    text-align: left;
}

.modal-errors li {
    padding: 11px 12px;
    border: 1px solid rgba(201, 35, 50, 0.18);
    border-radius: 8px;
    background: var(--red-soft);
}

.report-page {
    display: grid;
    gap: 24px;
    min-width: 0;
}

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

.report-status-card,
.report-table-card {
    border: 1px solid var(--border);
    border-top: 4px solid var(--dark);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(32, 36, 42, 0.06);
}

.report-status-card {
    padding: 22px;
}

.report-status-card h3 {
    margin: 10px 0 18px;
    font-size: 24px;
    line-height: 1.15;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    font-weight: 800;
}

.status-row strong {
    color: var(--red);
    font-size: 26px;
}

.report-table-card {
    padding: 24px;
    min-width: 0;
    overflow: hidden;
}

.report-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.report-table-header h2 {
    margin: 6px 0 0;
    font-size: 26px;
}

.report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.report-filter-row {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 18px;
}

.report-date-filter {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}

.report-date-filter label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.report-date-filter input {
    min-height: 36px;
    width: 150px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.date-range-separator {
    align-self: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.filter-action,
.filter-reset-action {
    min-height: 36px;
    padding: 0 12px;
    font-size: 11px;
}

.add-data-action {
    min-height: 30px;
    padding: 0 25px;
    border-color: #159447;
    color: #ffffff;
    background: #17984a;
    box-shadow: none;
    font-size: 11px;
    transition: background 140ms ease, border-color 140ms ease;
}

.add-data-action:hover {
    background: #127c3c;
    border-color: #127c3c;
}

.add-data-action:active {
    background: #0d6f34;
}

.table-search {
    position: relative;
    display: block;
    width: min(390px, 100%);
    color: var(--muted);
    font-weight: 600;
}

.table-search input {
    min-height: 54px;
    padding: 0 54px 0 20px;
    border-radius: 999px;
    background: var(--surface-muted);
    font-weight: 700;
}

.table-search svg {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 26px;
    height: 26px;
    color: var(--dark);
    transform: translateY(-50%);
}

.report-alert {
    margin: 12px 0 18px;
    padding: 13px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.report-alert.is-success {
    color: #12643a;
    background: #eaf8f0;
}

.report-alert.is-error {
    color: var(--red-dark);
    background: var(--red-soft);
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: #9ba1aa #edf0f3;
    scrollbar-width: thin;
}

.table-scroll::-webkit-scrollbar {
    height: 14px;
}

.table-scroll::-webkit-scrollbar-track {
    background: #edf0f3;
    border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: #9ba1aa;
    border-radius: 999px;
}

.data-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #e7ebf0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table th {
    color: #657187;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.data-table td {
    color: #394457;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #fbfcfd;
}

.table-code {
    color: var(--red);
}

.table-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--red-dark);
    background: var(--red-soft);
    font-size: 12px;
    font-weight: 800;
}

.proof-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--red);
    font-weight: 800;
}

.proof-link svg {
    width: 16px;
    height: 16px;
}

.proof-link-inline {
    width: fit-content;
    margin-top: 2px;
    font-size: 13px;
}

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

.table-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-action-group form {
    margin: 0;
}

.icon-action {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
}

.icon-action svg {
    width: 17px;
    height: 17px;
}

.icon-action.edit {
    color: #344054;
}

.icon-action.delete {
    color: var(--red);
}

.empty-table {
    padding: 34px !important;
    color: var(--muted) !important;
    text-align: center !important;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e7ebf0;
    color: #657187;
    font-weight: 800;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-buttons button {
    min-width: 55px;
    min-height: 30px;
    border: 1px solid var(--red);
    border-radius: 8px;
    color: #ffffff;
    background: var(--red);
    box-shadow: none;
    font-size: 11px !important;
    font-weight: 800;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.pagination-buttons button:hover:not(:disabled) {
    background: var(--red-dark);
    border-color: var(--red-dark);
}

.pagination-buttons button:active:not(:disabled) {
    background: #7f111c;
}

.pagination-buttons button:disabled {
    border-color: #d65a65;
    color: #ffffff;
    background: #d65a65;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.58;
}

.pagination-buttons .pagination-prev {
    border-color: #1f242b;
    background: #151a20;
    box-shadow: none;
}

.pagination-buttons .pagination-prev:hover:not(:disabled) {
    background: #2b313a;
    border-color: #2b313a;
}

.pagination-buttons .pagination-prev:active:not(:disabled) {
    background: #05070a;
}

.pagination-buttons .pagination-prev:disabled {
    border-color: #4a515d;
    background: #4a515d;
    box-shadow: none;
}

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

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

    .dashboard-grid,
    .dashboard-charts,
    .form-layout {
        grid-template-columns: 1fr;
    }

    .form-intro {
        position: static;
    }
}

@media (max-width: 820px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(82vw, 310px);
        transform: translateX(-105%);
        transition: transform 200ms ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        display: none;
        background: rgba(32, 36, 42, 0.45);
        z-index: 15;
    }

    body.sidebar-open .mobile-overlay {
        display: block;
    }

    .menu-toggle {
        display: inline-grid;
    }

    .topbar {
        padding: 14px 18px;
    }

    .content {
        padding: 20px 18px 34px;
    }

    .welcome-panel {
        display: grid;
        min-height: auto;
        padding: 24px;
    }

    .report-table-header {
        align-items: stretch;
        flex-direction: column;
    }

    .report-actions {
        justify-content: flex-start;
    }

    .table-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-item {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .activity-item em {
        grid-column: 2;
        width: fit-content;
    }
}

@media (max-width: 620px) {
    .topbar-actions .icon-button {
        display: none;
    }

    .user-chip {
        padding-right: 8px;
    }

    .stats-grid,
    .report-summary-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .form-actions {
        display: grid;
    }

    .primary-action,
    .secondary-action {
        width: 100%;
    }
}
