:root,
html[data-theme="light"] {
    --primary: #2563eb;
    --secondary: #eef4ff;
    --accent: #4f46e5;
    --primary-fg: #ffffff;
    --body-fg: #253044;
    --body-bg: #f7f9fd;
    --body-quiet-color: #5d6a7e;
    --body-medium-color: #334155;
    --body-loud-color: #172033;
    --header-color: #334155;
    --header-branding-color: #172033;
    --header-bg: #ffffff;
    --header-link-color: #334155;
    --breadcrumbs-fg: #64748b;
    --breadcrumbs-link-fg: #1d4ed8;
    --breadcrumbs-bg: #f5f8ff;
    --link-fg: #1d4ed8;
    --link-hover-color: #1e40af;
    --link-selected-fg: #3730a3;
    --hairline-color: #e8edf5;
    --border-color: #d8e0ec;
    --darkened-bg: #f1f5fb;
    --selected-bg: #e8f0ff;
    --selected-row: #eef4ff;
    --button-bg: #2563eb;
    --button-hover-bg: #1d4ed8;
    --default-button-bg: #2563eb;
    --default-button-hover-bg: #1d4ed8;
    --object-tools-bg: #2563eb;
    --object-tools-hover-bg: #1d4ed8;
    --ca-surface: #ffffff;
    --ca-surface-muted: #f5f8ff;
    --ca-soft-accent: #e8f0ff;
    --ca-focus: #2563eb;
    --ca-success: #059669;
    --ca-danger: #dc2626;
    --ca-warning: #d97706;
    --ca-radius: 12px;
    --ca-radius-small: 8px;
    color-scheme: light;
}

html[data-theme="dark"] {
    --primary: #60a5fa;
    --secondary: #172554;
    --accent: #a5b4fc;
    --body-fg: #e5efec;
    --body-bg: #0d1513;
    --body-quiet-color: #a8bbb6;
    --body-medium-color: #c6d5d1;
    --body-loud-color: #ffffff;
    --header-bg: #111827;
    --breadcrumbs-bg: #172033;
    --link-fg: #93c5fd;
    --link-hover-color: #bfdbfe;
    --link-selected-fg: #c7d2fe;
    --hairline-color: #293449;
    --border-color: #3a465c;
    --darkened-bg: #171f2f;
    --selected-bg: #1e3a5f;
    --selected-row: #1d3150;
    --button-bg: #2563eb;
    --button-hover-bg: #3b82f6;
    --ca-surface: #151d2b;
    --ca-surface-muted: #1b2638;
    --ca-soft-accent: #1e3a5f;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    letter-spacing: -0.005em;
}

a,
button,
input,
select,
textarea {
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ca-focus) 45%, transparent);
    outline-offset: 2px;
}

#container {
    min-height: 100%;
}

#header {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    min-height: 112px;
    padding: 12px clamp(18px, 3vw, 44px) 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    gap: 24px;
}

#branding {
    order: 1;
    min-width: 220px;
    flex: 1 1 auto;
}

#branding #site-name {
    margin: 0;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--header-branding-color) !important;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

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

.brand-copy strong {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--body-quiet-color);
    font-size: 0.68rem;
    font-weight: 500;
}

#user-tools {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 0;
    font-size: 0.75rem;
    letter-spacing: 0;
}

#user-tools a,
#user-tools button {
    border-radius: 6px;
}

.account-menu {
    position: relative;
    text-align: left;
}

.account-menu summary {
    display: flex;
    min-width: 174px;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 5px 9px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--ca-surface);
    color: var(--body-medium-color);
    cursor: pointer;
    list-style: none;
    text-transform: none;
}

.account-menu summary::-webkit-details-marker {
    display: none;
}

.account-menu summary:hover,
.account-menu[open] summary {
    border-color: #9dbbff;
    background: var(--ca-surface-muted);
}

.account-menu summary:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ca-focus) 30%, transparent);
    outline-offset: 2px;
}

.account-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 7px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.account-menu__identity {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    line-height: 1.15;
}

.account-menu__identity small,
.account-menu__panel small {
    color: var(--body-quiet-color);
    font-size: 0.64rem;
    font-weight: 500;
    text-transform: none;
}

.account-menu__identity strong {
    overflow: hidden;
    color: var(--body-loud-color);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.account-menu__arrow {
    font-size: 18px;
    transition: transform 160ms ease;
}

.account-menu[open] .account-menu__arrow {
    transform: rotate(180deg);
}

.account-menu__panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    width: 248px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--ca-surface);
    box-shadow: 0 4px 8px color-mix(in srgb, var(--body-loud-color) 12%, transparent);
}

.account-menu__panel > a,
.account-menu__panel .logout-button {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border: 0;
    border-radius: 0 !important;
    background: var(--ca-surface);
    color: var(--body-medium-color) !important;
    text-align: left;
    text-decoration: none;
    text-transform: none;
}

.account-menu__panel > * + * {
    border-top: 1px solid var(--hairline-color);
}

.account-menu__panel > a:hover,
.account-menu__panel .logout-button:hover {
    background: var(--ca-surface-muted);
}

.account-menu__panel .material-icons {
    color: var(--primary);
    font-size: 20px;
}

.account-menu__panel a > span:last-child,
.account-menu__panel button > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-menu__panel strong {
    color: inherit;
    font-size: 0.76rem;
}

.account-menu__panel .logout-button,
.account-menu__panel .logout-button .material-icons {
    color: var(--ca-danger) !important;
}

#logout-form {
    margin: 0;
}

.primary-nav {
    display: flex;
    width: 100%;
    grid-column: 1 / -1;
    order: 3;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.primary-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border-bottom: 3px solid transparent;
    color: var(--body-medium-color) !important;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
    border-bottom-color: var(--primary);
    background: var(--ca-surface-muted);
    color: var(--link-fg) !important;
}

.primary-nav .material-icons {
    font-size: 18px;
}

.breadcrumbs {
    padding: 10px clamp(18px, 3vw, 44px);
    font-size: 0.75rem;
}

.main > .content {
    padding: 28px clamp(18px, 3vw, 44px) 44px;
}

#content {
    max-width: 1480px;
    margin: 0 auto;
}

#content h1 {
    margin-bottom: 22px;
    color: var(--body-loud-color);
    font-size: 1.55rem;
    font-weight: 720;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.workspace-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 4px 0 26px;
}

.workspace-heading h1 {
    margin: 3px 0 6px !important;
    font-size: 1.8rem !important;
}

.workspace-heading p:last-child,
.activity-heading p {
    margin: 0;
    color: var(--body-quiet-color);
    font-size: 0.84rem;
}

.workspace-context {
    margin: 0;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.quick-start {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid #cfe0ff;
    border-radius: var(--ca-radius);
    background: #ffffff;
}

.quick-start__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.quick-start__heading h2 {
    margin: 0;
    color: var(--body-loud-color);
    font-size: 1rem;
}

.quick-start__heading p {
    margin: 0;
    color: var(--body-quiet-color);
    font-size: 0.78rem;
}

.quick-start__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.quick-action {
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #ffffff;
    color: var(--body-medium-color) !important;
    text-decoration: none !important;
}

.quick-action * {
    text-decoration: none !important;
}

.quick-action:hover {
    border-color: #9dbbff;
    background: var(--ca-surface-muted);
    color: var(--link-fg) !important;
}

.quick-action > .material-icons {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--ca-soft-accent);
    color: var(--primary);
    font-size: 19px;
}

.quick-action span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.quick-action strong {
    color: inherit;
    font-size: 0.82rem;
}

.quick-action small {
    margin-top: 2px;
    color: var(--body-quiet-color);
    font-size: 0.68rem;
}

.quick-action--primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff !important;
}

.quick-action--primary:hover {
    border-color: var(--button-hover-bg);
    background: var(--button-hover-bg);
    color: #ffffff !important;
}

.quick-action--primary > .material-icons {
    background: color-mix(in srgb, #ffffff 18%, transparent);
    color: #ffffff;
}

.quick-action--primary small {
    color: #dbeafe;
}

.dashboard #content {
    width: 100%;
}

.dashboard #content-main {
    float: none;
}

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

.workspace-module {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--ca-radius);
    background: var(--ca-surface);
}

.workspace-module__header {
    display: flex;
    min-height: 70px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline-color);
}

.workspace-module__mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: var(--ca-soft-accent);
    color: var(--link-fg);
    font-weight: 800;
}

.workspace-module__header > div {
    min-width: 0;
    flex: 1;
}

.workspace-module__header h2 {
    margin: 0 0 2px;
    font-size: 0.94rem;
}

.workspace-module__header h2 a {
    color: var(--body-loud-color);
}

.workspace-module__header div > span {
    color: var(--body-quiet-color);
    font-size: 0.72rem;
}

.workspace-module__open {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: var(--body-quiet-color) !important;
}

.workspace-module__open:hover {
    background: var(--ca-surface-muted);
    color: var(--link-fg) !important;
}

.workspace-module__open .material-icons {
    font-size: 19px;
}

.workspace-module__list {
    margin: 0;
    padding: 4px 0;
}

.workspace-module__list li {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 16px;
    list-style: none;
}

.workspace-module__list li + li {
    border-top: 1px solid var(--hairline-color);
}

.workspace-module__list li:hover,
.workspace-module__list .current-model {
    background: var(--ca-surface-muted);
}

.workspace-module__name {
    min-width: 0;
    font-size: 0.83rem;
    font-weight: 620;
}

.workspace-module__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.workspace-module__actions a {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--ca-surface);
    color: var(--body-medium-color);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}

.workspace-module__actions a::before {
    display: none;
}

.workspace-module__actions a:hover {
    border-color: #9dbbff;
    background: var(--ca-soft-accent);
    color: var(--link-fg);
}

.workspace-module__actions .material-icons {
    font-size: 15px;
}

.workspace-module__actions .addlink {
    border-color: #b8cdfc;
    color: var(--link-fg);
}

.dashboard #content-related {
    width: min(100%, 330px);
    margin-left: 20px;
}

#recent-actions-module {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--ca-radius);
    background: var(--ca-surface);
}

.activity-heading {
    padding: 16px;
    border-bottom: 1px solid var(--hairline-color);
}

.activity-heading h2 {
    margin: 0 0 3px;
    color: var(--body-loud-color);
    font-size: 0.94rem;
}

#recent-actions-module .actionlist {
    margin: 0;
    padding: 6px 16px;
}

#recent-actions-module .actionlist li {
    padding: 10px 0 10px 22px;
    border-bottom: 1px solid var(--hairline-color);
}

#recent-actions-module .actionlist li:last-child {
    border-bottom: 0;
}

#recent-actions-module .actionlist .mini {
    display: block;
    margin-top: 3px;
}

.empty-state {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.empty-state .material-icons {
    margin-bottom: 10px;
    color: var(--body-quiet-color);
    font-size: 28px;
}

.empty-state strong {
    color: var(--body-medium-color);
}

.empty-state p {
    max-width: 30ch;
    color: var(--body-quiet-color);
}

.empty-state--wide {
    grid-column: 1 / -1;
}

.dashboard-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 4px 0 24px;
}

.dashboard-intro h1 {
    margin: 4px 0 7px !important;
    font-size: 1.8rem !important;
}

.dashboard-intro > div > p:last-child {
    max-width: 66ch;
    margin: 0;
    color: var(--body-quiet-color);
    font-size: 0.86rem;
    line-height: 1.5;
}

.dashboard-primary-action {
    display: inline-flex;
    min-height: 42px;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--primary);
    color: var(--primary-fg) !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none !important;
}

.dashboard-primary-action:hover {
    background: var(--button-hover-bg);
}

.dashboard-primary-action .material-icons {
    font-size: 18px;
}

.daily-summary {
    display: flex;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--ca-radius);
    background: var(--ca-surface);
}

.daily-summary__item {
    display: flex;
    min-width: 0;
    min-height: 92px;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    padding: 16px 18px;
    color: var(--body-medium-color) !important;
    text-decoration: none !important;
}

.daily-summary__item + .daily-summary__item {
    border-left: 1px solid var(--hairline-color);
}

.daily-summary__item:hover {
    background: var(--ca-surface-muted);
}

.daily-summary__item strong {
    color: var(--body-loud-color);
    font-size: 1.7rem;
    line-height: 1;
}

.daily-summary__item span {
    margin-top: 7px;
    color: var(--body-quiet-color);
    font-size: 0.75rem;
    font-weight: 650;
}

.daily-summary__item--urgent strong {
    color: var(--ca-danger);
}

.dashboard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--ca-surface-muted);
}

.dashboard-actions h2,
.attention-panel h2,
.recent-activity-panel h2,
.dashboard-links h2 {
    margin: 0;
    color: var(--body-loud-color);
    font-size: 0.98rem;
}

.dashboard-actions p,
.attention-panel__heading p {
    margin: 3px 0 0;
    color: var(--body-quiet-color);
    font-size: 0.74rem;
}

.dashboard-actions__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.dashboard-actions__list a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #b8cdfc;
    border-radius: 7px;
    background: var(--ca-surface);
    color: var(--link-fg) !important;
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none !important;
}

.dashboard-actions__list a:hover {
    border-color: var(--primary);
    background: var(--ca-soft-accent);
}

.dashboard-actions__list .material-icons {
    font-size: 17px;
}

.attention-panel,
.recent-activity-panel,
.dashboard-links {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--ca-radius);
    background: var(--ca-surface);
}

.attention-panel {
    margin-bottom: 18px;
}

.attention-panel__heading {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline-color);
}

.attention-panel__heading > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 700;
}

.attention-panel__heading > a .material-icons {
    font-size: 17px;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.attention-group {
    min-width: 0;
    padding: 16px;
}

.attention-group + .attention-group {
    border-left: 1px solid var(--hairline-color);
}

.attention-group h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px;
    color: var(--body-medium-color);
    font-size: 0.78rem;
}

.attention-group h3 .material-icons {
    color: var(--primary);
    font-size: 18px;
}

.attention-list,
.activity-list {
    margin: 0;
    padding: 0;
}

.attention-list li,
.activity-list li {
    list-style: none;
}

.attention-list li + li,
.activity-list li + li {
    border-top: 1px solid var(--hairline-color);
}

.attention-list a {
    display: flex;
    min-height: 57px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -8px;
    padding: 8px;
    border-radius: 7px;
    color: var(--body-medium-color) !important;
    text-decoration: none !important;
}

.attention-list a:hover {
    background: var(--ca-surface-muted);
}

.attention-list__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.attention-list__content strong {
    overflow: hidden;
    color: var(--body-loud-color);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attention-list__content small {
    overflow: hidden;
    color: var(--body-quiet-color);
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attention-badge,
.attention-list__date {
    flex: 0 0 auto;
    color: var(--body-quiet-color);
    font-size: 0.66rem;
    font-weight: 650;
}

.attention-badge {
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--ca-surface-muted);
}

.attention-badge--urgent {
    background: color-mix(in srgb, var(--ca-danger) 10%, var(--ca-surface));
    color: var(--ca-danger);
}

.dashboard-empty-state {
    display: flex;
    min-height: 140px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
}

.dashboard-empty-state > .material-icons {
    color: var(--ca-success);
    font-size: 28px;
}

.dashboard-empty-state strong {
    color: var(--body-medium-color);
}

.dashboard-empty-state p {
    margin: 3px 0 0;
    color: var(--body-quiet-color);
    font-size: 0.74rem;
}

.dashboard-empty-state--compact {
    min-height: 120px;
}

.dashboard-lower {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.activity-list {
    padding: 4px 16px 8px;
}

.activity-list li {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.activity-list > li > .material-icons {
    color: var(--primary);
    font-size: 18px;
}

.activity-list li > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.activity-list a,
.activity-list strong {
    overflow: hidden;
    color: var(--body-medium-color);
    font-size: 0.76rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-list small {
    color: var(--body-quiet-color);
    font-size: 0.66rem;
}

.dashboard-links {
    padding: 14px 16px 8px;
}

.dashboard-links h2 {
    margin-bottom: 8px;
}

.dashboard-links > a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 9px;
    margin-inline: -8px;
    padding: 10px 8px;
    border-radius: 7px;
    color: var(--body-medium-color) !important;
    text-decoration: none !important;
}

.dashboard-links > a + a {
    border-top: 1px solid var(--hairline-color);
}

.dashboard-links > a:hover {
    background: var(--ca-surface-muted);
}

.dashboard-links > a > .material-icons:first-child {
    color: var(--primary);
    font-size: 20px;
}

.dashboard-links > a > .material-icons:last-child {
    color: var(--body-quiet-color);
    font-size: 18px;
}

.dashboard-links > a > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-links strong {
    color: var(--body-loud-color);
    font-size: 0.76rem;
}

.dashboard-links small {
    color: var(--body-quiet-color);
    font-size: 0.66rem;
}

.more-tools {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--ca-surface);
}

.more-tools summary {
    display: grid;
    min-height: 58px;
    grid-template-columns: 28px 1fr 22px;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    cursor: pointer;
    list-style: none;
}

.more-tools summary::-webkit-details-marker {
    display: none;
}

.more-tools summary > .material-icons:first-child {
    color: var(--primary);
    font-size: 20px;
}

.more-tools summary > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.more-tools summary strong {
    color: var(--body-medium-color);
    font-size: 0.78rem;
}

.more-tools summary small {
    color: var(--body-quiet-color);
    font-size: 0.68rem;
}

.more-tools__arrow {
    color: var(--body-quiet-color);
    font-size: 19px;
    transition: transform 160ms ease;
}

.more-tools[open] .more-tools__arrow {
    transform: rotate(180deg);
}

.more-tools__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--hairline-color);
}

.more-tools__links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 9px;
    border-radius: 7px;
    background: var(--ca-surface-muted);
    color: var(--body-medium-color);
    font-size: 0.72rem;
    font-weight: 650;
    text-decoration: none;
}

.more-tools__links a:hover {
    color: var(--link-fg);
}

.more-tools__links .material-icons {
    font-size: 15px;
}

.module,
.inline-group {
    border-radius: var(--ca-radius-small);
}

.module h2,
.module caption,
.inline-group h2 {
    padding: 10px 12px;
    background: var(--secondary);
    font-weight: 700;
}

.addlink::before {
    color: var(--ca-success);
}

.deletelink,
a.deletelink,
.submit-row a.deletelink {
    color: var(--ca-danger) !important;
}

.submit-row a.deletelink {
    padding: 9px 12px;
    border-radius: 7px;
    background: #fff1f2;
    font-weight: 700;
}

.submit-row a.deletelink:hover {
    background: #ffe4e6;
}

.field-logo_preview .readonly .material-icons {
    font-size: 72px !important;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--ca-surface);
    color: var(--body-fg);
}

textarea {
    min-height: 92px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--ca-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ca-focus) 18%, transparent);
    outline: none;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 7px;
    font-weight: 700;
    text-transform: none !important;
}

.object-tools a {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 7px;
    font-weight: 700;
    text-transform: none;
}

#changelist .actions,
#toolbar,
.submit-row {
    border-radius: var(--ca-radius-small);
}

#changelist table,
.results {
    overflow: hidden;
    border-radius: var(--ca-radius-small);
}

#changelist table thead th {
    padding-block: 11px;
}

#changelist table tbody td,
#changelist table tbody th {
    padding-block: 10px;
}

#nav-sidebar {
    border-right-color: var(--hairline-color);
    background: var(--ca-surface);
}

#nav-sidebar .current-model {
    background: var(--ca-soft-accent);
}

#footer + p {
    padding: 18px;
    color: var(--body-quiet-color);
}

.login {
    background: var(--body-bg);
}

.login #container {
    width: min(92vw, 430px);
    margin: 8vh auto 0;
    border: 0;
    border-radius: 14px;
    background: var(--ca-surface);
    box-shadow: 0 8px 32px color-mix(in srgb, var(--body-loud-color) 10%, transparent);
}

.login #header {
    min-height: 76px;
    padding: 16px 22px;
    border-radius: 14px 14px 0 0;
}

.login #content {
    padding: 28px 30px 32px;
}

.login-welcome {
    margin-bottom: 24px;
}

.login-welcome h1 {
    margin: 4px 0 7px !important;
    font-size: 1.65rem !important;
}

.login-welcome > p:last-child {
    max-width: 38ch;
    margin: 0;
    color: var(--body-quiet-color);
    line-height: 1.5;
}

.login .form-row {
    padding: 0 0 16px;
}

.login .form-row label {
    display: block;
    margin-bottom: 6px;
    color: var(--body-medium-color);
    font-weight: 700;
}

.login .form-row input {
    width: 100%;
}

.login .submit-row {
    padding: 8px 0 0 !important;
    background: transparent;
}

.login .submit-row input {
    width: 100%;
}

@media (max-width: 1024px) {
    .dashboard .workspace-grid {
        grid-template-columns: 1fr;
    }

    .dashboard #content-related {
        width: 100%;
        margin: 20px 0 0;
    }

    .attention-group + .attention-group {
        border-left: 0;
        border-top: 1px solid var(--hairline-color);
    }

    .dashboard-lower {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    #header {
        grid-template-columns: 1fr auto;
        min-height: 104px;
        padding: 10px 16px 0;
    }

    #branding {
        min-width: 0;
    }

    .brand-copy small,
    .account-menu__identity small {
        display: none;
    }

    .account-menu summary {
        min-width: 132px;
    }

    .main > .content {
        padding: 20px 14px 32px;
    }

    .primary-nav {
        margin-inline: -16px;
        padding-inline: 12px;
    }

    .quick-start__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .workspace-heading h1 {
        font-size: 1.5rem !important;
    }

    .dashboard-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .dashboard-intro h1 {
        font-size: 1.5rem !important;
    }

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

    .daily-summary__item {
        min-height: 82px;
    }

    .daily-summary__item + .daily-summary__item {
        border-left: 0;
    }

    .daily-summary__item:nth-child(even) {
        border-left: 1px solid var(--hairline-color);
    }

    .daily-summary__item:nth-child(n + 3) {
        border-top: 1px solid var(--hairline-color);
    }

    .dashboard-actions {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .workspace-module__list li {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .workspace-module__actions {
        width: 100%;
    }

    .workspace-module__actions a {
        justify-content: center;
        flex: 1;
    }

    .login #container {
        margin-top: 3vh;
    }

    .login #content {
        padding: 24px 22px 28px;
    }
}

@media (max-width: 480px) {
    .brand-copy,
    #user-tools .theme-toggle,
    #user-tools select,
    #user-tools > a:last-child {
        display: none;
    }

    .dashboard-primary-action {
        width: 100%;
        justify-content: center;
    }

    .daily-summary {
        grid-template-columns: 1fr;
    }

    .daily-summary__item:nth-child(even) {
        border-left: 0;
    }

    .daily-summary__item + .daily-summary__item {
        border-top: 1px solid var(--hairline-color);
    }

    .dashboard-actions__list a {
        flex: 1 1 calc(50% - 7px);
        justify-content: center;
    }
}

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