*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--color-canvas);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-base);
}

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

/* Layout */

.app {
    display: flex;
    min-height: 100vh;
}

.main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-lg);
    min-width: 0;
    padding: var(--space-xl);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.page-header__heading {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.page-header__title {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

/* The sidebar carries its own collapse control on desktop. */
.page-header .icon-button {
    display: none;
}

/* Sidebar — shares the canvas background; content next to it carries the white surface */

.sidebar {
    display: flex;
    flex: 0 0 var(--sidebar-width);
    flex-direction: column;
    width: var(--sidebar-width);
    overflow: hidden;
    padding: var(--space-xl) var(--space-md);
    background-color: var(--color-canvas);
    transition:
        flex-basis var(--transition-sidebar),
        width var(--transition-sidebar),
        padding var(--transition-sidebar);
}

.sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-md);
}

.sidebar__brand {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.sidebar__toggle-icon {
    display: inline-block;
    transition: transform var(--transition-sidebar);
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.sidebar__footer {
    margin-top: var(--space-md);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-pill);
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

.nav-item__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-item:hover {
    background-color: var(--color-accent-soft);
}

.nav-item--active,
.nav-item--active:hover {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
}

.nav-item__labels {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nav-item__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item__subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-regular);
}

.nav-item--active .nav-item__subtitle {
    color: var(--color-text-inverse);
}

.avatar {
    display: flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--color-avatar-surface);
    border-radius: var(--radius-pill);
    color: var(--color-avatar-text);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

/* Controls */

.icon-button {
    display: flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-md);
}

.icon-button:hover {
    color: var(--color-text);
}

.burger,
.burger::before,
.burger::after {
    display: block;
    width: 16px;
    height: 2px;
    background-color: currentColor;
    border-radius: var(--radius-sm);
}

.burger::before,
.burger::after {
    position: relative;
    content: "";
}

.burger::before {
    top: -5px;
}

.burger::after {
    top: 3px;
}

/* Keep a compact icon rail visible when the desktop sidebar is collapsed. */

@media (min-width: 901px) {
    .sidebar-collapsed .sidebar {
        flex-basis: var(--sidebar-collapsed-width);
        width: var(--sidebar-collapsed-width);
        padding-right: var(--space-sm);
        padding-left: var(--space-sm);
    }

    .sidebar-collapsed .sidebar__header {
        justify-content: center;
        padding: 0;
    }

    .sidebar-collapsed .sidebar__brand,
    .sidebar-collapsed .nav-item__label,
    .sidebar-collapsed .nav-item__labels {
        display: none;
    }

    .sidebar-collapsed .sidebar__toggle-icon {
        transform: rotate(180deg);
    }

    .sidebar-collapsed .nav-item {
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-right: auto;
        margin-left: auto;
        padding: 0;
    }
}

/* Cards & placeholders */

.card {
    padding: var(--space-lg);
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
}

.empty-state {
    margin: 0;
    color: var(--color-text-muted);
    text-align: center;
}

.card--table {
    padding: 0;
    overflow-x: auto;
}

.card--table .empty-state {
    padding: var(--space-lg);
}

/* Filters */

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-md);
}

.filters__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 180px;
}

.filters__label {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.filters select,
.filters input {
    width: 100%;
    height: 38px;
    padding: 0 42px 0 var(--space-lg);
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--color-surface);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--color-accent-strong) 50%),
        linear-gradient(135deg, var(--color-accent-strong) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 16px,
        calc(100% - 13px) 16px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-pill);
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.filters input[type="search"] {
    padding-right: var(--space-lg);
    background-image: none;
    cursor: text;
}

.filters__search {
    position: relative;
    flex: 0 1 320px;
}

.filters__search input {
    padding-left: 48px;
}

.filters__search-icon {
    position: absolute;
    top: 50%;
    left: var(--space-lg);
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.filters__hint {
    line-height: 38px;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.filters select:hover,
.filters select:focus {
    border-color: var(--color-accent-strong);
    outline: none;
}

.index-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md) var(--space-lg);
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.index-toolbar .filters {
    flex: 1 1 520px;
}

.review-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md) var(--space-lg);
}

.review-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-md);
}

.sync-form {
    margin: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 var(--space-lg);
    background-color: var(--color-accent);
    border: none;
    border-radius: var(--radius-pill);
    color: var(--color-text-inverse);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.button:hover {
    background-color: var(--color-accent-strong);
}

.button--secondary {
    background-color: var(--color-surface);
    border: 1px solid var(--color-accent);
    color: var(--color-accent-strong);
}

.button--secondary:hover {
    background-color: var(--color-accent-soft);
}

.reviewer-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-xs) var(--space-md);
    font-size: var(--font-size-xs);
    text-align: right;
}

.reviewer-stats__title {
    flex-basis: 100%;
}

.reviewer-stats__item {
    font-weight: var(--font-weight-bold);
}

.reviewer-stats__item--approved {
    color: var(--color-success);
}

.reviewer-stats__item--needs-review {
    color: var(--color-accent-strong);
}

.reviewer-stats__item--needs-changes {
    color: var(--color-danger);
}

/* Tables */

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

.table th {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

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

.table__link {
    color: var(--color-accent-strong);
    font-weight: var(--font-weight-medium);
}

.table__link:hover {
    text-decoration: underline;
}

.table__date {
    white-space: nowrap;
}

.github-link {
    display: inline-flex;
    vertical-align: text-bottom;
    margin-left: var(--space-xs);
    color: var(--color-text-muted);
}

.github-link:hover {
    color: var(--color-text);
}

.github-link__icon {
    width: 16px;
    height: 16px;
}

.table__meta {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.table__row--stale td {
    background-color: var(--color-stale-surface);
}

.reviewers-column {
    min-width: 330px;
}

.reviewers {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin: 0;
}

.reviewer-row {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(120px, 1fr) 8px minmax(120px, auto);
    align-items: center;
    gap: var(--space-xs);
    min-height: 28px;
    white-space: nowrap;
}

.reviewer-row--selected::before {
    position: absolute;
    inset: -2px -6px;
    background-color: var(--color-accent-soft);
    border-radius: var(--radius-sm);
    content: "";
}

.reviewer-row--selected > * {
    z-index: 1;
    font-weight: var(--font-weight-bold);
}

.reviewer-row__index,
.reviewer-row__separator,
.reviewer-row__status,
.reviewer-row__name--empty {
    color: var(--color-text-muted);
}

.reviewer-row--selected .reviewer-row__status {
    color: var(--color-text);
}

.reviewer-select,
.review-status-select {
    width: 100%;
    min-width: 0;
    height: 28px;
    margin: 0;
    padding: 0 24px 0 var(--space-sm);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--font-size-xs);
}

.reviewer-select {
    grid-column: 2;
}

.col-filter {
    position: relative;
}

.col-filter__summary {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    list-style: none;
}

.col-filter__summary::-webkit-details-marker {
    display: none;
}

.col-filter__icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    fill: var(--color-text-muted);
}

.col-filter__icon--active {
    fill: var(--color-accent-strong);
}

.col-filter__panel {
    position: absolute;
    top: calc(100% + var(--space-xs));
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 200px;
    padding: var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    text-transform: none;
    letter-spacing: normal;
}

.col-filter__panel select,
.col-filter__panel input {
    width: 100%;
    height: 34px;
    padding: 0 var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-pill);
    color: inherit;
    font-family: inherit;
    font-size: var(--font-size-sm);
}

.button--small {
    min-height: 30px;
    padding: 0 var(--space-md);
    font-size: var(--font-size-xs);
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.pager {
    display: flex;
    gap: var(--space-md);
}

.pager a {
    color: var(--color-accent-strong);
    font-weight: var(--font-weight-medium);
}

.pager__disabled {
    opacity: 0.5;
}

/* Activities */

.table__number {
    text-align: right;
    white-space: nowrap;
}

.table th.table__number {
    text-align: right;
}

.diff--additions {
    color: var(--color-success);
}

.diff--deletions {
    color: var(--color-danger);
}

.table--activities tbody.activity-group + tbody.activity-group tr:first-child td {
    border-top: 2px solid var(--color-border);
}

.activity-group__total td {
    font-weight: var(--font-weight-bold);
}

.activity-group__detail td {
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
}

/* Issues */

.issue-age--stale {
    color: var(--color-danger);
    font-weight: var(--font-weight-medium);
}

/* Status badges */

.badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.badge--review-needed {
    background-color: #d6eaf8;
    color: #1f6f9e;
}

.badge--approved {
    background-color: #d5f5e3;
    color: #1e7a45;
}

.badge--changes-requested {
    background-color: #f0e1d3;
    color: #a85a20;
}

.badge--commented {
    background-color: #ece7f6;
    color: #5b4b9e;
}

.badge--on-hold {
    background-color: #fff9db;
    color: #8a6d0b;
}

.badge--draft {
    background-color: #e8e8e8;
    color: #606060;
}

.badge--merged {
    background-color: #e5d4f1;
    color: #7b2ba0;
}

.badge--closed {
    background-color: #f7dbd8;
    color: #a13228;
}

.badge--issue-open {
    background-color: #e8e8e8;
    color: #404040;
}

.badge--issue-closed {
    background-color: #d5f5e3;
    color: #1e7a45;
}

.badge--issue-merged {
    background-color: #e5d4f1;
    color: #7b2ba0;
}

.badge--active {
    background-color: #d5f5e3;
    color: #1e7a45;
}

.badge--inactive {
    background-color: #e8e8e8;
    color: #606060;
}

/* People */

.person__name {
    font-weight: var(--font-weight-medium);
}

.person-summary {
    white-space: nowrap;
}

.person__missing {
    font-style: italic;
}

/* Stack each person into a summary card on narrow screens */
@media (max-width: 640px) {
    .table--people {
        min-width: 0;
    }

    .table--people thead {
        display: none;
    }

    .table--people tbody,
    .table--people .person-row,
    .table--people td {
        display: block;
    }

    .table--people .person-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: var(--space-sm) var(--space-md);
        padding: var(--space-md) var(--space-lg);
        border-bottom: 1px solid var(--color-border);
    }

    .table--people tbody .person-row:last-child {
        border-bottom: none;
    }

    .table--people td {
        padding: 0;
        border-bottom: none;
    }

    .table--people .person-row__role,
    .table--people .person-row__repositories,
    .table--people .person-row__summary {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .table--people .person-row__role::before,
    .table--people .person-row__repositories::before,
    .table--people .person-row__summary::before {
        display: block;
        color: var(--color-text-muted);
        content: attr(data-label);
        font-size: var(--font-size-xs);
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

.filters select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Person details */

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.social-platforms {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.social-platform {
    display: flex;
    align-items: center;
}

.social-platform-link {
    display: flex;
    padding: var(--space-xs);
    margin: calc(var(--space-xs) * -1);
    border-radius: var(--radius-sm);
}

.social-platform-link:hover {
    background-color: var(--color-accent-soft);
}

.social-platform__icon {
    width: 20px;
    height: 20px;
}

.social-platform--disconnected .social-platform__icon {
    filter: grayscale(1);
    opacity: 0.45;
}

.connection-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-width: 640px;
}

.connection-card__platform {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.connection-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--color-accent-soft);
    border-radius: var(--radius-md);
}

.connection-card__icon .social-platform__icon {
    width: 28px;
    height: 28px;
}

.connection-card__title {
    margin: 0;
    font-size: var(--font-size-md);
}

.connection-card__status {
    margin-top: var(--space-xs);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.connection-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.connection-card__actions form {
    margin: 0;
}

.tabs {
    display: flex;
    gap: var(--space-xs);
    overflow-x: auto;
}

.tab {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-pill);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

.tab--active {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
}

.tab--disabled {
    color: var(--color-text-muted);
    cursor: not-allowed;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.metric {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
}

.metric__label,
.metric__context {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

.metric__value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.card__title {
    margin: 0 0 var(--space-sm);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
}

.card__header .card__title {
    margin-bottom: 0;
}

.card p {
    margin: var(--space-xs) 0 0;
}

.list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.list__item:last-child {
    border-bottom: none;
}

.list__item > a,
.list__item > .badge {
    flex-shrink: 0;
    white-space: nowrap;
}

.note {
    padding: var(--space-md);
    background-color: var(--color-canvas);
    border-radius: var(--radius-sm);
}

/* Dashboard */

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.dashboard-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md);
}

.dashboard-section__title {
    margin: 0;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.note-text {
    overflow-wrap: anywhere;
}

/* Forms */

.form-card {
    max-width: 640px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: 0;
}

.form__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form__field input,
.form__field select,
.form__field textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--font-size-sm);
}

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
    border-color: var(--color-accent);
    outline: none;
}

.form__field textarea {
    resize: vertical;
}

.form__field input[type='checkbox'] {
    width: auto;
    align-self: flex-start;
}

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

.form__error,
.form .errorlist {
    margin: 0;
    padding: 0;
    color: var(--color-danger);
    font-size: var(--font-size-xs);
    list-style: none;
}

.form__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.broadcast-form {
    max-width: 960px;
}

.broadcast-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-lg);
}

.broadcast-form__group {
    min-width: 0;
    margin: 0;
    border: 0;
}

.broadcast-form__legend {
    margin-bottom: var(--space-md);
    padding: 0;
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
}

.broadcast-form__options {
    display: flex;
    flex-direction: column;
    max-height: 420px;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
}

.broadcast-form__option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
}

.broadcast-form__option input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--color-accent);
}

/* Selection pages */

.selection-form {
    max-width: 960px;
}

.filters .selection-form__search {
    width: 320px;
    max-width: 100%;
}

.table--selection {
    min-width: 0;
}

.table--selection tbody tr:last-child td {
    border-bottom: 1px solid var(--color-border);
}

.table--selection td {
    vertical-align: middle;
}

.table--selection label {
    display: block;
    cursor: pointer;
}

.table__checkbox {
    width: 1px;
    padding-right: 0;
}

.table__checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--color-accent);
    cursor: pointer;
    vertical-align: middle;
}

.selection-form__actions {
    display: flex;
    gap: var(--space-sm);
}

/* Alerts */

.alerts {
    position: fixed;
    top: var(--space-xl);
    right: var(--sidebar-width);
    left: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: 0 var(--space-lg);
    pointer-events: none;
    transition: right var(--transition-sidebar);
}

.sidebar-collapsed .alerts {
    right: 0;
}

.alert {
    --alert-color: var(--color-accent);
    --alert-shadow-color: rgba(56, 125, 162, 0.2);

    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-md);
    width: min(100%, 510px);
    margin: 0;
    padding: var(--space-lg) 28px;
    background-color: var(--color-surface);
    border: 1px solid var(--alert-color);
    border-radius: calc(var(--radius-md) + var(--space-xs));
    box-shadow: 0 18px 40px var(--alert-shadow-color);
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition:
        opacity 200ms ease,
        transform 200ms ease;
}

.alert--dismissing {
    opacity: 0;
    transform: translateY(-8px);
}

.alert__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--alert-color);
    border-radius: var(--radius-pill);
    color: var(--color-text-inverse);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.alert__icon::before {
    content: "i";
}

.alert__message {
    min-width: 0;
    font-size: var(--font-size-md);
}

.alert--success {
    --alert-color: #57b966;
    --alert-shadow-color: rgba(87, 185, 102, 0.2);
}

.alert--success .alert__icon::before {
    content: "\2713";
}

.alert--warning {
    --alert-color: var(--color-warning);
    --alert-shadow-color: rgba(180, 83, 9, 0.2);
}

.alert--warning .alert__icon::before {
    content: "!";
}

.alert--error {
    --alert-color: var(--color-danger);
    --alert-shadow-color: rgba(185, 28, 28, 0.2);
}

.alert--error .alert__icon::before {
    content: "\00d7";
}

.alert--info,
.alert--debug {
    --alert-color: var(--color-accent-strong);
    --alert-shadow-color: rgba(56, 125, 162, 0.2);
}

/* Off-canvas sidebar on small screens */

.scrim {
    display: none;
}

@media (max-width: 900px) {
    .main {
        padding: var(--space-lg);
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        overflow-y: auto;
        transition: transform var(--transition-sidebar);
    }

    .sidebar-collapsed .sidebar {
        margin-right: 0;
        transform: translateX(100%);
    }

    .scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 10;
        background-color: rgba(26, 26, 25, 0.4);
    }

    .sidebar-collapsed .scrim {
        display: none;
    }

    .page-header .icon-button {
        display: flex;
    }

    .alerts {
        right: 0;
    }

    .review-toolbar,
    .reviewer-stats {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .broadcast-form__grid {
        grid-template-columns: 1fr;
    }

    .alerts {
        top: var(--space-md);
        padding: 0 var(--space-md);
    }

    .alert {
        padding: var(--space-md);
    }
}

@media (prefers-reduced-motion: reduce) {
    .alert {
        transition: none;
    }
}
