:root {
    color-scheme: light;
    --nav: #202224;
    --board-bar: rgba(55, 59, 62, 0.82);
    --canvas: #889195;
    --list: #eceeef;
    --card: #ffffff;
    --ink: #243040;
    --muted: #66707a;
    --line: rgba(9, 30, 66, 0.14);
    --primary: #c65d3a;
    --primary-dark: #a94d30;
    --primary-soft: #f4e7e1;
    --brand-grey: #343434;
    --danger: #c9372c;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
}

body.modal-open {
    overflow: hidden;
}

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

strong,
b {
    font-weight: var(--weight-semibold);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--weight-semibold);
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    padding: 9px 10px;
}

textarea {
    resize: vertical;
}

.global-nav {
    align-items: center;
    background: var(--nav);
    color: #ffffff;
    display: flex;
    gap: 12px;
    height: 48px;
    padding: 8px 12px;
}

.brand {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    font-size: 18px;
    font-weight: var(--weight-semibold);
    min-width: 0;
}

.brand-logo-wrap {
    align-items: center;
    background: transparent;
    border-radius: 5px;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    width: 28px;
}

.brand-logo {
    display: block;
    height: 24px;
    object-fit: contain;
    width: 24px;
}

.brand-name {
    line-height: 1;
    white-space: nowrap;
}

.release-pill {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: var(--weight-bold);
    letter-spacing: 0.08em;
    padding: 3px 7px;
}

.release-dev {
    background: #f5cd47;
    color: #172b4d;
}

.nav-search {
    flex: 1 1 auto;
    max-width: 700px;
    position: relative;
}

.nav-search + .nav-button {
    margin-left: auto;
}

.nav-search input {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    height: 32px;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.nav-search input:focus {
    border-color: rgba(198, 93, 58, 0.78);
    box-shadow: 0 0 0 2px rgba(198, 93, 58, 0.16);
    outline: 0;
}

.global-search-menu {
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(9, 30, 66, 0.32);
    color: var(--ink);
    display: grid;
    left: 0;
    max-height: min(520px, calc(100vh - 74px));
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 38px;
    z-index: 170;
}

.global-search-menu[hidden] {
    display: none;
}

.global-search-result {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 10px 12px;
}

.global-search-result:hover,
.global-search-result.is-active {
    background: #f1f2f4;
}

.global-search-result strong,
.global-search-result small {
    display: block;
}

.global-search-result strong {
    overflow-wrap: anywhere;
}

.global-search-result small {
    color: var(--muted);
    margin-top: 2px;
}

.result-type {
    background: #eef2f8;
    border-radius: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: var(--weight-semibold);
    padding: 3px 6px;
    text-align: center;
    text-transform: uppercase;
}

.global-search-empty {
    color: var(--muted);
    padding: 14px;
}

.nav-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    font-weight: var(--weight-semibold);
    height: 32px;
    padding: 0 12px;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.user-menu {
    flex: 0 0 auto;
    position: relative;
}

.user-bubble {
    align-items: center;
    border: 2px solid transparent;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-weight: var(--weight-bold);
    height: 34px;
    justify-content: center;
    list-style: none;
    text-transform: uppercase;
    width: 34px;
}

.user-bubble,
.avatar {
    background: var(--avatar-bg, var(--primary));
}

.avatar-color-0 {
    --avatar-bg: #c65d3a;
}

.avatar-color-1 {
    --avatar-bg: #8f5b45;
}

.avatar-color-2 {
    --avatar-bg: #5f6f7a;
}

.avatar-color-3 {
    --avatar-bg: #3f6f68;
}

.avatar-color-4 {
    --avatar-bg: #6f6a3d;
}

.avatar-color-5 {
    --avatar-bg: #745a85;
}

.avatar-color-6 {
    --avatar-bg: #4f6f8a;
}

.avatar-color-7 {
    --avatar-bg: #8a4f5f;
}

.user-menu[open] .user-bubble,
.user-bubble:hover {
    border-color: var(--primary);
}

.user-bubble::-webkit-details-marker {
    display: none;
}

.user-menu-panel {
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(9, 30, 66, 0.3);
    color: var(--ink);
    display: grid;
    gap: 8px;
    min-width: 300px;
    padding: 14px;
    position: absolute;
    right: 0;
    top: 42px;
    z-index: 170;
}

.user-menu-profile {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 8px 0 10px;
}

.user-menu-profile p {
    color: var(--muted);
    margin: 3px 0 0;
    overflow-wrap: anywhere;
}

.user-menu-time,
.user-menu-version {
    background: #f7f8f9;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 10px;
}

.user-menu-time span,
.user-menu-version span {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.user-menu-time strong,
.user-menu-version strong {
    color: var(--ink);
}

.user-menu-time p,
.user-menu-version p {
    color: var(--muted);
    margin: 0;
    overflow-wrap: anywhere;
}

.user-menu-panel a,
.user-menu-panel button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    gap: 8px;
    padding: 9px 8px;
    text-align: left;
    width: 100%;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
    background: #f1f2f4;
}

.toast-stack {
    display: grid;
    gap: 8px;
    max-width: min(360px, calc(100vw - 24px));
    position: fixed;
    right: 12px;
    top: 60px;
    width: 360px;
    z-index: 160;
}

.toast {
    align-items: start;
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(9, 30, 66, 0.22);
    color: var(--ink);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto;
    min-height: 46px;
    padding: 12px;
}

.toast.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast p {
    line-height: 1.35;
    margin: 0;
}

.toast p[hidden] {
    display: none;
}

.toast-body {
    display: grid;
    gap: 5px;
}

.toast-body strong {
    color: var(--ink);
}

.toast-indicator {
    border-radius: 999px;
    height: 10px;
    margin-top: 4px;
    width: 10px;
}

.toast-success .toast-indicator {
    background: #22a06b;
}

.toast-error .toast-indicator {
    background: var(--danger);
}

.toast-warning .toast-indicator {
    background: #f5cd47;
}

.toast-info .toast-indicator,
.toast:not(.toast-success):not(.toast-error):not(.toast-warning) .toast-indicator {
    background: var(--primary);
}

.toast-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 20px;
    height: 24px;
    justify-content: center;
    line-height: 1;
    margin: -4px -4px 0 0;
    width: 24px;
}

.toast-close:hover {
    background: #f1f2f4;
    color: var(--ink);
}

.toast-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.toast-event-list {
    border-left: 2px solid #e7e9ee;
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 3px 0 0;
    max-height: 150px;
    overflow: auto;
    padding: 0 0 0 10px;
}

.toast-event-list[hidden] {
    display: none;
}

.toast-event-list li {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.3;
}

.toast-event-list strong {
    color: var(--ink);
}

.toast-action {
    background: var(--primary);
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: var(--weight-semibold);
    padding: 7px 10px;
}

.toast-action:hover {
    background: var(--primary-dark);
}

.auth-page {
    background: #f4f6fb;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(23, 32, 51, 0.12);
    display: grid;
    gap: 16px;
    padding: 28px;
    width: min(420px, 100%);
}

.auth-card h1 {
    margin: 0;
}

.auth-card label {
    color: var(--muted);
    display: grid;
    font-weight: var(--weight-medium);
    gap: 8px;
}

.auth-inline-error {
    align-items: flex-start;
    background: #fff4ed;
    border: 1px solid #f0c7b2;
    border-radius: 8px;
    color: #9a3412;
    display: flex;
    gap: 10px;
    padding: 11px 12px;
}

.auth-inline-error span {
    background: #c93a2f;
    border-radius: 999px;
    flex: 0 0 auto;
    height: 10px;
    margin-top: 6px;
    width: 10px;
}

.auth-inline-error p {
    line-height: 1.45;
    margin: 0;
}

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

.auth-switch a {
    color: var(--primary);
    text-decoration: underline;
}

.eyebrow {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.08em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.button {
    align-items: center;
    background: var(--primary);
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    font-weight: var(--weight-semibold);
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
}

.button:hover {
    background: var(--primary-dark);
}

.button.subtle {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.app-shell .button.subtle {
    background: var(--primary-soft);
    color: var(--primary);
}

.button.danger {
    background: #fee2e2;
    color: var(--danger);
}

.button.neutral {
    background: #ffffff;
    border: 1px solid #dfe1e6;
    color: var(--ink);
}

.button.neutral:hover {
    background: #f1f2f4;
}

.button.compact {
    font-size: 0.86rem;
    min-height: 32px;
    padding: 6px 10px;
}

.ui-icon {
    display: inline-block;
    flex: 0 0 auto;
    height: 16px;
    stroke-width: 2.2;
    vertical-align: -0.2em;
    width: 16px;
}

.button .ui-icon,
.nav-button .ui-icon {
    height: 15px;
    width: 15px;
}

.icon-label {
    line-height: 1;
}

.trello-shell {
    display: grid;
    grid-template-rows: 56px 1fr;
    height: calc(100vh - 48px);
    overflow: hidden;
}

.board-bar {
    align-items: center;
    background: var(--board-bar);
    color: #ffffff;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 10px 16px;
}

.board-bar h1 {
    font-size: 20px;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.board-switcher select {
    background: rgba(255, 255, 255, 0.16);
    border: 0;
    color: #ffffff;
    height: 36px;
    min-width: 190px;
}

.board-switcher option {
    color: var(--ink);
}

.board {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px 14px 22px;
    -webkit-overflow-scrolling: touch;
}

.column {
    background: var(--list);
    border-radius: 12px;
    box-shadow: 0 1px 1px rgba(9, 30, 66, 0.18);
    display: flex;
    flex: 0 0 272px;
    flex-direction: column;
    max-height: 100%;
    padding: 8px;
    width: 272px;
}

.add-column {
    background: rgba(235, 236, 240, 0.72);
}

.add-column form {
    display: grid;
    gap: 8px;
}

.column-header {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-height: 36px;
    padding: 4px 4px 8px 8px;
    position: relative;
}

.column-header h2 {
    font-size: 14px;
    font-weight: var(--weight-semibold);
    line-height: 1.35;
    margin: 0;
    overflow-wrap: anywhere;
}

.column-actions {
    align-items: center;
    display: flex;
    gap: 2px;
}

.list-menu {
    position: relative;
}

.list-menu-button {
    align-items: center;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 18px;
    height: 28px;
    justify-content: center;
    letter-spacing: 1px;
    line-height: 1;
    list-style: none;
    width: 28px;
}

.list-menu-button:hover,
.list-menu[open] > .list-menu-button {
    background: rgba(9, 30, 66, 0.08);
    color: var(--ink);
}

.list-menu-button::-webkit-details-marker {
    display: none;
}

.list-menu-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(9, 30, 66, 0.24);
    color: var(--ink);
    display: grid;
    gap: 2px;
    min-width: 260px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: 34px;
    z-index: 30;
}

.list-menu-panel header {
    align-items: center;
    border-bottom: 1px solid #dfe1e6;
    display: grid;
    gap: 8px;
    grid-template-columns: 34px 1fr 34px;
    margin: 0 0 6px;
    min-height: 34px;
}

.list-menu-panel header strong {
    text-align: center;
}

.list-menu-panel header form {
    margin: 0;
}

.list-move-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 18px;
    font-weight: var(--weight-semibold);
    height: 30px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    text-align: center;
    width: 30px;
}

.list-move-button:hover:not(:disabled) {
    background: #f1f2f4;
    color: var(--ink);
}

.list-move-button:disabled {
    background: transparent;
    cursor: default;
    opacity: 0.28;
}

.list-menu-panel hr {
    border: 0;
    border-top: 1px solid #dfe1e6;
    margin: 6px 0;
}

.menu-form {
    display: grid;
    gap: 6px;
    padding: 6px;
}

.menu-action {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--ink);
    cursor: pointer;
    display: block;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.menu-action:hover {
    background: #f1f2f4;
}

.menu-action.danger {
    color: var(--danger);
}

.card-count {
    color: var(--muted);
    min-width: 24px;
    padding: 2px 6px;
    text-align: center;
}

.cards {
    display: grid;
    gap: 8px;
    min-height: 12px;
    overflow-y: auto;
    padding: 2px;
    transition: background 120ms ease, box-shadow 120ms ease, min-height 120ms ease, padding 120ms ease;
}

.dropzone.is-over {
    background: rgba(9, 30, 66, 0.06);
    border-radius: 8px;
}

.is-sorting-card .cards {
    border-radius: 8px;
    flex: 1 1 auto;
    min-height: 150px;
    padding-bottom: 32px;
}

.is-sorting-card .column {
    outline: 1px solid rgba(9, 30, 66, 0.08);
}

.card {
    background: var(--card);
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25);
    color: var(--ink);
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    position: relative;
    transition: box-shadow 120ms ease, outline-color 120ms ease, transform 120ms ease;
    will-change: transform;
}

.card:hover {
    cursor: grab;
    outline: 2px solid rgba(12, 102, 228, 0.16);
}

.card.is-dragging {
    opacity: 0.35;
    cursor: grabbing;
}

.is-sorting-card .card {
    cursor: grabbing;
}

.sortable-chosen {
    box-shadow: 0 10px 24px rgba(9, 30, 66, 0.24);
}

.sortable-drag {
    cursor: grabbing;
    opacity: 0.96;
    transform: rotate(1deg);
}

.sortable-ghost {
    background: rgba(9, 30, 66, 0.08);
    border: 2px dashed rgba(66, 82, 110, 0.28);
    box-shadow: none;
    min-height: 74px;
    opacity: 1;
}

.sortable-ghost > * {
    opacity: 0;
}

.card-badges {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 8px;
    font-size: 12px;
}

.card-badge {
    align-items: center;
    display: inline-flex;
    gap: 3px;
}

.due-badge {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    font-weight: var(--weight-semibold);
    gap: 5px;
    line-height: 1;
    padding: 5px 7px;
}

.due-icon {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    height: 16px;
    justify-content: center;
    line-height: 1;
    width: 16px;
}

.due-icon .ui-icon {
    height: 10px;
    width: 10px;
}

.due-open {
    background: #e9f7ef;
    color: #216e4e;
}

.due-overdue {
    background: #ffebe6;
    color: #ae2e24;
}

.due-complete {
    background: #6a9a23;
    color: #ffffff;
}

.due-complete .due-icon {
    border-color: rgba(255, 255, 255, 0.86);
}

.card-title-row {
    align-items: start;
    display: flex;
    gap: 8px;
}

.card h3 {
    flex: 1;
    font-size: 14px;
    font-weight: var(--weight-medium);
    line-height: 1.35;
    margin: 0;
    overflow-wrap: anywhere;
}

.card p {
    color: #44546f;
    line-height: 1.42;
    margin: 0;
}

.card.is-complete h3 {
    color: #626f86;
}

.complete-form {
    flex: 0 0 auto;
}

.complete-toggle {
    align-items: center;
    background: transparent;
    border: 2px solid #44546f;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    font-weight: var(--weight-bold);
    height: 20px;
    justify-content: center;
    line-height: 1;
    margin-top: 1px;
    width: 20px;
}

.complete-toggle .ui-icon {
    height: 12px;
    width: 12px;
}

.complete-toggle:hover {
    background: rgba(9, 30, 66, 0.08);
    border-color: var(--primary);
}

.complete-toggle.is-static {
    cursor: default;
}

.complete-toggle.is-static:hover {
    background: transparent;
    border-color: #44546f;
}

.card.is-complete .complete-toggle {
    background: #6a9a23;
    border-color: #6a9a23;
    color: #ffffff;
}

.card.is-complete .complete-toggle:hover {
    background: #5b8a1f;
    border-color: #5b8a1f;
}

.card.is-complete .complete-toggle.is-static:hover {
    background: #6a9a23;
    border-color: #6a9a23;
}

.card-menu {
    margin-left: auto;
}

.card-archive-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(9, 30, 66, 0.26);
    color: #172b4d;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    height: 28px;
    justify-content: center;
    opacity: 0;
    position: absolute;
    right: 6px;
    top: 6px;
    transform: translateY(-2px);
    transition: opacity 0.12s ease, transform 0.12s ease, background 0.12s ease;
    width: 28px;
}

.card-archive-button img {
    display: block;
    height: 15px;
    opacity: 0.78;
    width: 15px;
}

.card:hover .card-archive-button,
.card-archive-button:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.card-archive-button:hover {
    background: #f1f2f4;
}

.card-modal[hidden] {
    display: none;
}

.confirm-modal[hidden] {
    display: none;
}

.image-preview-modal[hidden] {
    display: none;
}

.page-modal[hidden] {
    display: none;
}

.email-modal[hidden] {
    display: none;
}

.confirm-modal {
    inset: 0;
    position: fixed;
    z-index: 140;
}

.image-preview-modal {
    inset: 0;
    position: fixed;
    z-index: 130;
}

.page-modal {
    inset: 0;
    position: fixed;
    z-index: 125;
}

.email-modal {
    inset: 0;
    position: fixed;
    z-index: 128;
}

.migration-guide-button {
    align-items: center;
    background: var(--primary);
    border-radius: 999px;
    box-shadow: 0 10px 28px rgba(9, 30, 66, 0.24);
    color: #ffffff;
    display: inline-flex;
    gap: 7px;
    min-height: 42px;
    padding: 10px 14px;
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 90;
}

.migration-guide-button:hover {
    background: var(--primary-dark);
}

.confirm-backdrop {
    background: rgba(9, 14, 19, 0.56);
    inset: 0;
    position: absolute;
}

.image-preview-backdrop {
    background: rgba(9, 14, 19, 0.82);
    inset: 0;
    position: absolute;
}

.page-modal-backdrop {
    background: rgba(9, 14, 19, 0.58);
    inset: 0;
    position: absolute;
}

.email-modal-backdrop {
    background: rgba(9, 14, 19, 0.58);
    inset: 0;
    position: absolute;
}

.confirm-panel {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(9, 30, 66, 0.32);
    left: 50%;
    max-width: 420px;
    padding: 22px;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
}

.confirm-panel h2 {
    font-size: 20px;
    margin: 0 0 10px;
}

.confirm-panel p {
    color: #44546f;
    line-height: 1.45;
    margin: 0 0 18px;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.image-preview-panel {
    background: #1d2125;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
    color: #ffffff;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    left: 50%;
    max-height: calc(100vh - 48px);
    max-width: min(1120px, calc(100vw - 48px));
    overflow: hidden;
    position: absolute;
    top: 24px;
    transform: translateX(-50%);
    width: min(1120px, calc(100vw - 48px));
}

.image-preview-header {
    align-items: center;
    background: #2c333a;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 14px 10px 18px;
}

.image-preview-header h2 {
    font-size: 16px;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-preview-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.image-preview-stage {
    align-items: center;
    background: #111316;
    display: flex;
    justify-content: center;
    min-height: 0;
    overflow: auto;
    padding: 20px;
}

.image-preview-stage img {
    max-height: calc(100vh - 150px);
    max-width: 100%;
    object-fit: contain;
}

.page-modal-panel {
    background: #f4f6fb;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: min(760px, calc(100vh - 72px));
    left: 50%;
    overflow: hidden;
    position: absolute;
    top: 36px;
    transform: translateX(-50%);
    width: min(1040px, calc(100vw - 48px));
}

.page-modal-header {
    align-items: center;
    background: #d9dde3;
    border-bottom: 1px solid rgba(9, 30, 66, 0.1);
    display: flex;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 14px 10px 24px;
}

.page-modal-header h2 {
    color: var(--ink);
    font-size: 22px;
    margin: 0;
}

.page-modal iframe {
    background: #f4f6fb;
    border: 0;
    height: 100%;
    width: 100%;
}

.email-modal-panel {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    left: 50%;
    max-height: min(760px, calc(100vh - 72px));
    overflow: hidden;
    position: absolute;
    top: 36px;
    transform: translateX(-50%);
    width: min(780px, calc(100vw - 48px));
}

.email-modal-header {
    align-items: center;
    background: #f4f6fb;
    border-bottom: 1px solid rgba(9, 30, 66, 0.1);
    display: flex;
    justify-content: space-between;
    min-height: 58px;
    padding: 12px 14px 12px 22px;
}

.email-modal-header h2 {
    color: var(--ink);
    font-size: 20px;
    margin: 2px 0 0;
}

.email-preview-list {
    display: grid;
    gap: 14px;
    overflow: auto;
    padding: 18px;
}

.email-preview-item {
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    overflow: hidden;
}

.email-preview-item dl {
    background: #f8fafc;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
}

.email-preview-item dl div {
    display: grid;
    gap: 2px;
}

.email-preview-item dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
}

.email-preview-item dd {
    margin: 0;
}

.email-preview-item pre {
    background: #ffffff;
    color: var(--ink);
    font-family: inherit;
    line-height: 1.5;
    margin: 0;
    overflow: auto;
    padding: 14px;
    white-space: pre-wrap;
}

.card-modal {
    inset: 0;
    position: fixed;
    z-index: 260;
}

.card-modal-backdrop {
    background: rgba(9, 14, 19, 0.72);
    inset: 0;
    position: absolute;
}

.card-modal-panel {
    background: #f1f2f4;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(9, 30, 66, 0.38);
    color: var(--ink);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    left: 50%;
    max-height: calc(100vh - 48px);
    max-width: 1120px;
    overflow: hidden;
    position: absolute;
    top: 24px;
    transform: translateX(-50%);
    width: min(calc(100vw - 48px), 1120px);
}

.card-modal-cover {
    align-items: flex-start;
    background: #dfe1e6;
    color: #172b4d;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 26px 32px 24px;
}

.card-modal-heading {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    min-width: 0;
}

.card-modal-heading h2 {
    font-size: 28px;
    line-height: 1.18;
    margin: 0;
    overflow-wrap: anywhere;
}

.card-modal-heading p {
    color: var(--muted);
    margin: 6px 0 0;
}

.card-modal-close {
    align-items: center;
    background: rgba(255, 255, 255, 0.42);
    border: 0;
    border-radius: 999px;
    color: #172b4d;
    cursor: pointer;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    line-height: 1;
    width: 40px;
}

.card-modal-close .ui-icon {
    height: 22px;
    width: 22px;
}

.card-modal-close:hover {
    background: rgba(255, 255, 255, 0.72);
}

.card-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    min-height: 0;
    overflow: hidden;
}

.card-modal-main,
.card-modal-comments {
    overflow-y: auto;
    padding: 28px;
}

.card-modal-comments {
    background: #ffffff;
    border-left: 1px solid #dfe1e6;
}

.modal-edit-form {
    display: grid;
    gap: 14px;
    max-width: 680px;
}

.modal-edit-form label {
    color: var(--ink);
    display: grid;
    font-weight: var(--weight-medium);
    gap: 8px;
}

.modal-edit-form input,
.modal-edit-form textarea,
.comment-form textarea,
.reply-form textarea {
    font-weight: 400;
}

.modal-edit-form textarea,
.comment-form textarea,
.reply-form textarea {
    line-height: 1.45;
}

.tox.tox-tinymce {
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
}

.tox.tox-tinymce:focus-within {
    border-color: #0c66e4;
    box-shadow: 0 0 0 1px #0c66e4;
}

.tox .tox-toolbar__primary,
.tox .tox-toolbar-overlord,
.tox .tox-toolbar {
    background: #ffffff;
}

.tox .tox-edit-area::before {
    border: 0;
}

.card-description-preview p,
.readonly-description p {
    margin: 0 0 0.6em;
}

.card-description-preview p:last-child,
.readonly-description p:last-child {
    margin-bottom: 0;
}

.card-description-preview h2,
.card-description-preview h3,
.card-description-preview h4,
.readonly-description h2,
.readonly-description h3,
.readonly-description h4 {
    color: var(--ink);
    font-weight: var(--weight-semibold);
    line-height: 1.25;
    margin: 0.25em 0 0.5em;
}

.card-description-preview h2,
.readonly-description h2 {
    font-size: 1.16rem;
}

.card-description-preview h3,
.readonly-description h3 {
    font-size: 1.05rem;
}

.card-description-preview h4,
.readonly-description h4 {
    font-size: 1rem;
}

.card-description-preview ul,
.card-description-preview ol,
.readonly-description ul,
.readonly-description ol {
    margin: 0.35em 0 0.7em;
    padding-left: 1.3em;
}

.card-description-preview blockquote,
.readonly-description blockquote {
    border-left: 3px solid #cfd7e2;
    color: #4f5d6d;
    margin: 0.6em 0;
    padding: 0.15em 0 0.15em 0.8em;
}

.card-description-preview code,
.card-description-preview pre,
.readonly-description code,
.readonly-description pre {
    background: #eef1f5;
    border-radius: 5px;
    font-family: Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
}

.card-description-preview code,
.readonly-description code {
    padding: 0.1em 0.3em;
}

.card-description-preview pre,
.readonly-description pre {
    overflow-x: auto;
    padding: 0.75em;
    white-space: pre-wrap;
}

.card-description-preview {
    color: #3f4b5c;
    font-weight: 400;
    line-height: 1.45;
    margin: 8px 0 0;
}

.card-description-preview a,
.readonly-description a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.card-description-preview img,
.readonly-description img {
    border-radius: 6px;
    display: block;
    height: auto;
    margin: 0.6em 0;
    max-width: 100%;
}

.card-description-preview table,
.readonly-description table {
    border-collapse: collapse;
    margin: 0.7em 0;
    width: 100%;
}

.card-description-preview td,
.card-description-preview th,
.readonly-description td,
.readonly-description th {
    border: 1px solid #d7dde6;
    padding: 6px 8px;
}

.modal-readonly-card {
    display: grid;
    gap: 10px;
    max-width: 680px;
}

.modal-readonly-card h3 {
    font-size: 1rem;
    margin: 0;
}

.modal-readonly-card p,
.readonly-description {
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    color: #44546f;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    padding: 12px;
}

.attachments-section {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    max-width: 680px;
}

.section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.section-heading h3 {
    font-size: 16px;
    margin: 0;
}

.attachment-upload {
    display: grid;
    gap: 8px;
}

.attachment-drop-area {
    background: #ffffff;
    border: 2px dashed #c7d1db;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    gap: 4px;
    padding: 18px;
    text-align: center;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.attachment-drop-area:hover,
.attachment-drop-area.is-over {
    background: #e9f2ff;
    border-color: var(--primary);
}

.attachment-drop-area input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.drop-title {
    font-weight: var(--weight-semibold);
}

.drop-note {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 400;
}

.attachment-submit {
    justify-self: start;
}

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

.attachment-item {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 82px minmax(0, 1fr) auto;
}

.attachment-preview {
    align-items: center;
    background: #dfe1e6;
    border: 1px solid #c7d1db;
    border-radius: 6px;
    color: var(--muted);
    display: flex;
    font-weight: var(--weight-semibold);
    height: 62px;
    justify-content: center;
    overflow: hidden;
    width: 82px;
}

.attachment-preview img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.attachment-name {
    color: var(--ink);
    display: inline-block;
    font-weight: var(--weight-semibold);
    overflow-wrap: anywhere;
}

.attachment-name:hover,
.icon-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.attachment-details p {
    color: var(--muted);
    font-weight: 400;
    margin: 3px 0 0;
}

.attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.icon-link {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    gap: 4px;
    font-weight: var(--weight-medium);
}

.card-modal-comments h3 {
    align-items: center;
    display: flex;
    gap: 6px;
    margin: 0 0 16px;
}

.comment-form {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
}

.comment-list {
    display: grid;
    gap: 16px;
}

.comment-item {
    align-items: start;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
}

.comment-item.is-reply {
    margin-left: 44px;
}

.avatar.small {
    height: 34px;
    width: 34px;
}

.comment-meta {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-meta span {
    color: var(--primary);
    font-size: 0.9rem;
}

.comment-item p {
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    box-shadow: 0 1px 1px rgba(9, 30, 66, 0.12);
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    padding: 10px 12px;
}

.mention-tag {
    background: #e9f2ff;
    border-radius: 4px;
    color: var(--primary);
    font-weight: var(--weight-semibold);
    padding: 1px 4px;
}

.mention-menu {
    background: #ffffff;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(9, 30, 66, 0.22);
    display: grid;
    left: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 150;
}

.mention-menu[hidden] {
    display: none;
}

.mention-option {
    align-items: center;
    background: #ffffff;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    padding: 10px 12px;
    text-align: left;
}

.mention-option:hover,
.mention-option.is-active {
    background: #f1f2f4;
}

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

.mention-option small {
    color: var(--muted);
    margin-top: 2px;
}

.activity-item p {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #44546f;
    padding: 0;
}

.activity-avatar {
    background: #de350b;
}

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

.comment-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.comment-actions form {
    display: inline;
}

.comment-actions button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    gap: 4px;
    font-weight: var(--weight-medium);
    padding: 2px 0;
}

.comment-actions button:hover {
    color: var(--primary);
    text-decoration: underline;
}

.reply-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    position: relative;
}

.reply-form[hidden] {
    display: none;
}

.icon-button {
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: var(--muted);
    cursor: pointer;
    height: 26px;
    line-height: 1;
    width: 26px;
}

.icon-button:hover {
    background: rgba(9, 30, 66, 0.08);
}

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

.edit-card summary,
.new-card-panel summary {
    align-items: center;
    border-radius: 6px;
    color: #44546f;
    cursor: pointer;
    display: inline-flex;
    gap: 5px;
    font-weight: var(--weight-medium);
    list-style: none;
    padding: 8px;
}

.edit-card summary {
    color: var(--primary);
    padding: 0;
}

.new-card-panel summary:hover {
    background: rgba(9, 30, 66, 0.08);
    color: var(--ink);
}

.edit-card summary::-webkit-details-marker,
.new-card-panel summary::-webkit-details-marker {
    display: none;
}

.edit-card form,
.new-card {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.new-card-panel {
    margin-top: 8px;
}

.app-shell {
    background: #f4f6fb;
    min-height: calc(100vh - 48px);
    padding: 24px;
}

.embedded-panel {
    background: #f4f6fb;
}

.embedded-panel .app-shell {
    min-height: 100vh;
}

.embedded-panel .narrow-shell {
    max-width: none;
}

.narrow-shell {
    margin: 0 auto;
    max-width: 980px;
}

.topbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 auto 24px;
    max-width: 980px;
}

.topbar h1 {
    margin: 0;
}

.manager-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(260px, 360px) 1fr;
}

.board-manager-grid {
    grid-template-columns: minmax(280px, 450px) minmax(0, 1fr);
}

.manager-panel {
    background: #ffffff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    padding: 18px;
}

.manager-panel h2 {
    font-size: 1.05rem;
    margin: 0 0 14px;
}

.stack-form,
.board-list {
    display: grid;
    gap: 10px;
}

.stack-form label {
    color: var(--muted);
    display: grid;
    font-weight: var(--weight-medium);
    gap: 7px;
}

.account-security-panel {
    margin: 0 auto 18px;
    max-width: none;
}

.account-password-form {
    margin-top: 14px;
    max-width: 520px;
}

.account-password-form .button {
    justify-self: start;
}

.password-field {
    display: block;
    position: relative;
}

.password-field input {
    padding-right: 42px;
}

.password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
}

.password-toggle:hover,
.password-toggle.is-visible {
    background: #f1f2f4;
    color: var(--ink);
}

.password-requirement {
    color: var(--muted);
    line-height: 1.45;
    margin: 0;
}

.share-invite-form {
    position: relative;
}

.migration-panel {
    margin: 0 auto 18px;
    max-width: none;
}

.migration-steps {
    display: grid;
    gap: 12px;
}

.migration-step {
    align-items: start;
    background: #f8f9fb;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr;
    padding: 14px;
}

.migration-step > span {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-weight: var(--weight-semibold);
    height: 28px;
    justify-content: center;
    width: 28px;
}

.migration-step h3,
.migration-template p,
.migration-rules {
    margin: 0;
}

.migration-step p,
.migration-rules {
    color: var(--muted);
    line-height: 1.45;
}

.migration-template {
    background: #f8f9fb;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    color: #44546f;
    display: grid;
    gap: 10px;
    line-height: 1.45;
    padding: 14px;
}

.migration-rules {
    display: grid;
    gap: 8px;
    padding-left: 18px;
}

.share-user-menu {
    left: 0;
    right: 0;
    top: 48px;
    z-index: 20;
}

.board-row {
    align-items: center;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto auto;
    padding: 10px;
}

.permission-panel {
    margin: 0 auto 18px;
    max-width: 1180px;
}

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

.role-card {
    background: #f8f9fb;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    display: grid;
    gap: 7px;
    padding: 14px;
}

.role-pill {
    align-self: start;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: var(--weight-semibold);
    padding: 3px 8px;
    text-transform: uppercase;
}

.role-card .role-pill {
    min-width: 176px;
}

.user-role-row .role-pill {
    min-width: 0;
    width: fit-content;
}

.action-picker .role-pill,
.action-picker .status-pill {
    cursor: pointer;
}

.action-picker summary::-webkit-details-marker {
    display: none;
}

.action-picker summary {
    list-style: none;
}

.role-pill.role-admin {
    background: #f6decf;
    color: #8f3f23;
}

.role-pill.role-member,
.role-pill.role-user {
    background: #e7ddd8;
    color: #745142;
}

.role-pill.role-guest,
.role-pill.role-client {
    background: #dfe8e4;
    color: #3d6352;
}

.role-card p {
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

.permission-table,
.user-role-table {
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    overflow: auto;
}

.permission-row,
.user-role-row {
    align-items: center;
    border-bottom: 1px solid #edf0f5;
    display: grid;
    gap: 12px;
    min-width: 900px;
    padding: 11px 12px;
}

.permission-row {
    grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(90px, 0.5fr));
}

.user-role-row {
    grid-template-columns: minmax(140px, 0.72fr) minmax(220px, 1fr) minmax(118px, 0.42fr) minmax(118px, 0.4fr) minmax(150px, 0.48fr) minmax(230px, 0.7fr);
}

.user-request-row {
    grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1fr) minmax(150px, 0.55fr) minmax(150px, 0.5fr) minmax(150px, 0.5fr) minmax(240px, 0.78fr);
}

.user-role-row:not(.user-role-head) {
    align-items: start;
}

.permission-row:last-child,
.user-role-row:last-child {
    border-bottom: 0;
}

.permission-head,
.user-role-head {
    background: #f4f6fb;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.permission-yes,
.permission-no {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: var(--weight-semibold);
    justify-content: center;
    padding: 4px 8px;
}

.permission-yes {
    background: #e4f7ec;
    color: #1f7a45;
}

.permission-no {
    background: #f1f2f4;
    color: var(--muted);
}

.user-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.audit-switch {
    align-items: center;
    background: #f1f2f4;
    border: 1px solid #d6dbe4;
    border-radius: 999px;
    color: #44546f;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: var(--weight-semibold);
    gap: 7px;
    min-height: 36px;
    padding: 5px 10px 5px 6px;
}

.audit-switch .switch-knob {
    background: #ffffff;
    border: 1px solid #c8d0dc;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(9, 30, 66, 0.14);
    display: inline-block;
    height: 20px;
    width: 20px;
}

.audit-switch.is-on {
    background: #dfe8e4;
    border-color: #bfd5c9;
    color: #2f654f;
}

.audit-switch.is-on .switch-knob,
.audit-switch.is-included .switch-knob {
    background: #6a9a23;
    border-color: #6a9a23;
}

.audit-switch.is-included {
    background: #e4f7ec;
    border-color: #c4e7d0;
    color: #1f7a45;
    cursor: default;
}

.reset-password-action {
    align-items: center;
    background: #f5ece8;
    border: 1px solid #ead2c7;
    border-radius: 999px;
    color: #9a4a2f;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: var(--weight-semibold);
    gap: 7px;
    min-height: 36px;
    padding: 5px 11px;
}

.reset-password-action:hover {
    background: #f2ded5;
    border-color: #ddb9a8;
}

.reset-password-action .ui-icon {
    height: 17px;
    width: 17px;
}

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

.permission-panel-heading h2 {
    margin: 0;
}

.permission-search {
    align-items: center;
    display: flex;
    gap: 8px;
}

.permission-search input {
    min-width: min(280px, 38vw);
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: var(--weight-semibold);
    padding: 3px 8px;
    text-transform: uppercase;
    width: fit-content;
}

.status-active {
    background: #e4f7ec;
    color: #1f7a45;
}

.status-inactive,
.status-suspended {
    background: #fae3dd;
    color: #a54831;
}

.status-pending_email {
    background: #fff2cc;
    color: #7a4d00;
}

.status-pending_approval {
    background: #e2edff;
    color: #24579c;
}

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

.action-picker {
    display: inline-block;
    justify-items: start;
    max-width: 100%;
    position: relative;
}

.action-picker[open] summary {
    box-shadow: 0 0 0 2px rgba(198, 93, 58, 0.16);
}

.action-picker-panel {
    background: #ffffff;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(9, 30, 66, 0.16);
    display: grid;
    gap: 4px;
    left: 0;
    min-width: 128px;
    padding: 6px;
    position: absolute;
    top: calc(100% + 6px);
    z-index: 80;
}

.user-role-row:nth-last-child(-n + 3) .action-picker-panel {
    bottom: calc(100% + 6px);
    top: auto;
}

.action-picker-panel form {
    margin: 0;
}

.picker-action {
    align-items: center;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 0.82rem;
    font-weight: var(--weight-semibold);
    justify-content: space-between;
    min-height: 30px;
    padding: 6px 8px;
    text-align: left;
    text-transform: none;
    width: 100%;
}

.picker-action:hover {
    filter: brightness(0.98);
}

.picker-action.is-current {
    cursor: default;
    outline: 2px solid rgba(9, 30, 66, 0.1);
}

.picker-action.is-disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.role-option.role-admin {
    background: #f6decf;
    color: #8f3f23;
}

.role-option.role-member {
    background: #e7ddd8;
    color: #745142;
}

.role-option.role-guest {
    background: #dfe8e4;
    color: #3d6352;
}

.status-option.status-active {
    background: #e4f7ec;
    color: #1f7a45;
}

.status-option.status-inactive {
    background: #fae3dd;
    color: #a54831;
}

.inline-action-form {
    display: inline-flex;
}

.inline-note {
    margin: 0;
}

.pagination {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 14px;
}

.pagination > div {
    align-items: center;
    display: flex;
    gap: 8px;
}

.page-count {
    color: var(--ink);
    font-weight: var(--weight-semibold);
}

.shared-label {
    color: var(--muted);
    font-weight: var(--weight-medium);
}

.rename-board-form {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
}

.share-layout {
    grid-template-columns: minmax(280px, 380px) 1fr;
}

.panel-note {
    color: var(--muted);
    line-height: 1.45;
    margin: 12px 0 0;
}

.member-count {
    background: #dfe4ec;
    border-radius: 4px;
    color: var(--muted);
    display: inline-block;
    font-size: 0.85rem;
    margin-left: 4px;
    padding: 1px 8px;
}

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

.member-row {
    align-items: center;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr auto;
    padding: 10px;
}

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

.archive-wide {
    grid-column: 1 / -1;
}

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

.archive-row {
    align-items: center;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
    padding: 10px;
}

.archive-row p {
    color: var(--muted);
    margin: 4px 0 0;
}

.audit-shell {
    max-width: 1240px;
    margin: 0 auto;
}

.audit-topbar {
    max-width: none;
}

.audit-filter select {
    min-width: 190px;
}

.audit-panel {
    overflow-x: auto;
}

.audit-table {
    display: grid;
    min-width: 1040px;
}

.audit-row {
    align-items: start;
    border-bottom: 1px solid #dfe4ec;
    display: grid;
    gap: 12px;
    grid-template-columns: 150px 190px 150px minmax(240px, 1fr) 100px 150px;
    padding: 12px 0;
}

.activity-table {
    min-width: 860px;
}

.activity-row {
    grid-template-columns: 150px 180px 160px minmax(260px, 1fr) 110px;
}

.audit-head {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
}

.audit-row small {
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.audit-row code {
    background: #eef2f8;
    border-radius: 4px;
    color: var(--ink);
    font-family: inherit;
    padding: 2px 6px;
}

.audit-email-cell {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.email-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: var(--weight-semibold);
    padding: 4px 8px;
}

.email-status-sent {
    background: #e4f7ec;
    color: #1f7a45;
}

.email-status-queued {
    background: #fff1cf;
    color: #8a5a00;
}

.email-status-failed {
    background: #fde2e2;
    color: #b42318;
}

.email-status-disabled,
.email-status-none {
    background: #f1f2f4;
    color: var(--muted);
}

.email-view-button {
    background: #f5ece8;
    border: 1px solid #ead2c7;
    border-radius: 999px;
    color: #9a4a2f;
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: var(--weight-semibold);
    padding: 4px 9px;
}

.email-view-button:hover {
    background: #f2ded5;
    border-color: #ddb9a8;
}

.entity-link {
    color: var(--primary);
    font-weight: var(--weight-semibold);
    text-decoration: none;
}

.entity-link:hover {
    text-decoration: underline;
}

.member-row p {
    color: var(--muted);
    margin: 4px 0 0;
}

.avatar {
    align-items: center;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-weight: var(--weight-bold);
    height: 38px;
    justify-content: center;
    text-transform: uppercase;
    width: 38px;
}

@media (max-width: 1100px) {
    .column {
        flex-basis: 260px;
        width: 260px;
    }

    .board {
        gap: 10px;
        padding: 12px;
    }

    .card-modal-panel {
        max-width: calc(100vw - 24px);
        width: calc(100vw - 24px);
    }

    .card-modal-body {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .card-modal-main,
    .card-modal-comments {
        padding: 22px;
    }

    .manager-grid {
        grid-template-columns: minmax(240px, 320px) 1fr;
    }
}

@media (max-width: 900px) {
    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }

    .manager-grid,
    .share-layout,
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .archive-wide {
        grid-column: auto;
    }

    .card-modal-panel {
        max-height: calc(100vh - 20px);
        top: 10px;
    }

    .card-modal-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .card-modal-main,
    .card-modal-comments {
        overflow: visible;
    }

    .card-modal-comments {
        border-left: 0;
        border-top: 1px solid #dfe1e6;
    }
}

@media (max-width: 720px) {
    .nav-search {
        flex: 1 1 auto;
        flex-basis: auto;
        max-width: none;
        min-width: 0;
    }

    .global-nav {
        flex-wrap: nowrap;
        gap: 6px;
        height: 44px;
        padding: 6px 8px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .brand {
        gap: 0;
    }

    .brand-logo-wrap {
        height: 30px;
        width: 30px;
    }

    .brand-logo {
        height: 26px;
        width: 26px;
    }

    .brand-name,
    .brand .release-pill {
        display: none;
    }

    .nav-search input {
        font-size: 16px;
        height: 32px;
        padding: 6px 10px;
    }

    .nav-button {
        flex: 0 0 34px;
        height: 34px;
        justify-content: center;
        padding: 0;
        width: 34px;
    }

    .nav-button .icon-label {
        display: none;
    }

    .user-bubble {
        height: 34px;
        width: 34px;
    }

    .global-search-menu {
        max-height: 360px;
        top: 38px;
    }

    .global-search-result {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .user-menu {
        margin-left: auto;
    }

    .user-menu-panel {
        min-width: min(320px, calc(100vw - 24px));
        right: 0;
    }

    .toast-stack {
        left: 12px;
        right: 12px;
        top: 96px;
        width: auto;
    }

    .board-bar {
        align-items: stretch;
        flex-direction: column;
        height: auto;
        gap: 8px;
        padding: 8px 10px;
    }

    .board-bar h1 {
        display: none;
    }

    .board-switcher select {
        background: rgba(255, 255, 255, 0.24);
        border: 1px solid rgba(255, 255, 255, 0.34);
        border-radius: 8px;
        box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 1px 2px rgba(9, 30, 66, 0.18);
        font-size: 16px;
        font-weight: var(--weight-semibold);
        height: 38px;
        min-width: 0;
        padding: 0 34px 0 11px;
        width: 100%;
    }

    .board-bar .topbar-actions {
        display: flex;
        flex-wrap: nowrap;
        min-width: 0;
        overflow: visible;
        width: 100%;
    }

    .board-bar .board-switcher {
        flex: 1 1 auto;
        min-width: 0;
    }

    .board-bar .topbar-actions .button {
        flex: 0 0 auto;
        height: 34px;
        min-width: 0;
        padding: 0 10px;
    }

    .permission-panel-heading,
    .permission-search,
    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-search input {
        min-width: 0;
        width: 100%;
    }

    .trello-shell {
        height: calc(100vh - 44px);
        height: calc(100dvh - 44px);
        grid-template-rows: auto 1fr;
    }

    .board {
        gap: 12px;
        padding: 10px 12px 18px;
        scroll-padding-inline: 12px;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
    }

    .column {
        flex: 0 0 calc(100vw - 24px);
        min-height: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        width: calc(100vw - 24px);
    }

    .card:hover {
        cursor: default;
        outline: 0;
    }

    .tox.tox-tinymce {
        min-height: 260px;
    }

    .card-modal-panel {
        border-radius: 0;
        height: 100vh;
        height: 100dvh;
        inset: 0;
        max-height: none;
        max-width: none;
        top: 0;
        transform: none;
        width: 100%;
    }

    .card-modal-cover {
        padding: 18px 16px;
    }

    .card-modal-heading h2 {
        font-size: 22px;
    }

    .image-preview-panel {
        border-radius: 0;
        inset: 0;
        max-height: none;
        max-width: none;
        top: 0;
        transform: none;
        width: 100vw;
    }

    .page-modal-panel {
        border-radius: 0;
        height: 100vh;
        height: 100dvh;
        inset: 0;
        transform: none;
        width: 100%;
    }

    .page-modal-header {
        padding-left: 16px;
    }

    .page-modal-header h2 {
        font-size: 18px;
    }

    .card-modal-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .card-modal-main,
    .card-modal-comments {
        font-size: 16px;
        padding: 18px;
        overflow: visible;
    }

    .app-shell {
        padding: 16px;
    }

    .topbar {
        gap: 12px;
        margin-bottom: 16px;
    }

    .topbar h1 {
        font-size: 26px;
        overflow-wrap: anywhere;
    }

    .topbar-actions,
    .manager-grid,
    .share-layout,
    .board-row,
    .member-row,
    .archive-grid,
    .archive-row,
    .attachment-item,
    .rename-board-form {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 480px) {
    .brand {
        font-size: 16px;
    }

    .nav-button {
        font-size: 13px;
        padding: 0;
    }

    .board-bar .topbar-actions {
        gap: 6px;
    }

    .board-bar .topbar-actions .button {
        width: 38px;
    }

    .board-bar .topbar-actions .button span {
        display: none;
    }

    .card {
        padding: 10px;
    }

    .card-modal-cover {
        gap: 10px;
        padding: 16px 12px;
    }

    .card-modal-close {
        height: 34px;
        width: 34px;
    }

    .card-modal-main,
    .card-modal-comments {
        padding: 14px;
    }

    .attachment-item {
        gap: 8px;
    }

    .attachment-preview {
        height: 56px;
        width: 74px;
    }

    .image-preview-header {
        align-items: stretch;
        flex-direction: column;
    }

    .image-preview-actions {
        justify-content: space-between;
    }

    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 22px;
    }
}
