:root {
    --brand: #0052d9;
    --brand-hover: #003cab;
    --brand-soft: #e8f3ff;
    --text: #1d2129;
    --text-secondary: #4e5969;
    --text-muted: #86909c;
    --line: #e5e6eb;
    --line-light: #f0f1f3;
    --page: #f5f6f7;
    --surface: #ffffff;
    --success: #00a870;
    --success-soft: #e8f8f1;
    --warning: #ed7b2f;
    --warning-soft: #fff3e8;
    --danger: #d54941;
    --danger-soft: #fff0ef;
    --purple: #7a5af8;
    --purple-soft: #f3f0ff;
    --cyan: #1a9bd7;
    --cyan-soft: #e8f8ff;
    --shadow: 0 2px 8px rgb(29 33 41 / 5%);
    --shadow-hover: 0 6px 16px rgb(29 33 41 / 9%);
    font-family: Inter, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    color: var(--text);
    background: var(--page);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}
html {
    min-width: 1180px;
    background: var(--page);
}
body {
    margin: 0;
    min-width: 1180px;
    min-height: 100vh;
    background: var(--page);
    font-size: 14px;
}
button,
input {
    font: inherit;
}
button {
    color: inherit;
}
a {
    color: inherit;
    text-decoration: none;
}
.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon-xs {
    width: 16px;
    height: 16px;
}
.topbar i,
.nav-item > i,
.global-search > i,
.button > i,
.button-secondary > i,
.quick-icon > i,
.quick-arrow,
.todo-status > i,
.text-action > i,
.link-button > i,
.project-symbol > i,
.task-icon > i {
    flex: 0 0 auto;
}
.nav-item > i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}
.global-search > i {
    font-size: 14px;
}
.topbar-actions .icon-button > i {
    font-size: 17px;
}
.profile-button > i {
    font-size: 12px;
}
.breadcrumb > i {
    color: var(--text-muted);
    font-size: 12px;
}
.button > i,
.link-button > i,
.text-action > i {
    font-size: 12px;
}
.quick-icon > i {
    font-size: 18px;
}
.quick-arrow {
    font-size: 14px;
}
.todo-status > i {
    font-size: 15px;
}
.project-symbol > i {
    font-size: 13px;
}
.task-icon > i {
    font-size: 15px;
}
.more-button > i {
    font-size: 14px;
}
.pagination button > i {
    font-size: 12px;
}
.tag-input .tag > i,
.tag-input button > i {
    margin-left: 3px;
    font-size: 12px;
}
.fa-icon {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    line-height: 1;
}
.fa-icon.icon-xs {
    width: 16px;
    flex-basis: 16px;
    font-size: 12px;
}

.app-shell {
    min-height: 100vh;
    padding-top: 64px;
    padding-left: 240px;
}
.topbar {
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 480px) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
}
.topbar > .brand {
    min-width: 0;
    justify-self: start;
}
.topbar > .global-search {
    width: 100%;
    justify-self: center;
}
.topbar > .topbar-actions {
    justify-self: end;
}
.brand {
    display: inline-flex;
    align-items: center;
    min-width: 330px;
    gap: 11px;
    font-weight: 600;
    letter-spacing: 0.1px;
    white-space: nowrap;
}
.brand-mark {
    display: grid;
    grid-template-columns: repeat(2, 9px);
    grid-template-rows: repeat(2, 9px);
    gap: 3px;
    width: 21px;
    height: 21px;
    transform: rotate(0deg);
}
.brand-mark span {
    display: block;
    background: var(--brand);
    border-radius: 3px;
}
.brand-mark span:nth-child(1) {
    grid-row: span 2;
    border-radius: 3px 3px 9px 3px;
}
.brand-mark span:nth-child(2) {
    opacity: 0.76;
}
.brand-mark span:nth-child(3) {
    opacity: 0.46;
}
.brand-name {
    font-size: 16px;
}
.global-search {
    width: min(480px, 42vw);
    height: 36px;
    padding: 0 9px 0 12px;
    color: var(--text-muted);
    background: #f7f8fa;
    border: 1px solid transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s ease;
}
.global-search:focus-within {
    border-color: #93baff;
    background: var(--surface);
    box-shadow: 0 0 0 3px rgb(0 82 217 / 10%);
}
.global-search input {
    width: 100%;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
    font-size: 13px;
}
.global-search input::placeholder {
    color: #a7abb3;
}
kbd {
    padding: 2px 5px;
    color: var(--text-muted);
    background: #eef0f4;
    border: 1px solid #e1e3e8;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon-button,
.profile-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}
.icon-button {
    position: relative;
    width: 32px;
    height: 32px;
    padding: 6px;
    color: var(--text-secondary);
    border-radius: 5px;
    display: grid;
    place-items: center;
}
.icon-button:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.notification-dot {
    position: absolute;
    top: 5px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--surface);
}
.topbar-divider {
    width: 1px;
    height: 22px;
    margin: 0 5px;
    background: var(--line);
}
.profile-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 4px;
    border-radius: 6px;
}
.profile-button:hover {
    background: #f7f8fa;
}
.avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}
.avatar-blue {
    background: linear-gradient(145deg, #4f86e6, #2f5db9);
}
.profile-name {
    color: var(--text-secondary);
    font-size: 13px;
}

.sidebar {
    position: fixed;
    z-index: 5;
    top: 64px;
    bottom: 0;
    left: 0;
    width: 240px;
    padding: 18px 12px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}
.nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.nav-item {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text-secondary);
    border: 0;
    border-radius: 6px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}
.nav-item:hover {
    color: var(--brand);
    background: #f4f7fc;
}
.nav-item.active {
    color: var(--brand);
    background: var(--brand-soft);
    font-weight: 600;
}
.nav-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}
.nav-expandable.expanded .nav-chevron {
    transform: rotate(90deg);
}
.nav-count {
    min-width: 18px;
    height: 18px;
    margin-left: auto;
    color: var(--brand);
    background: #d8e9ff;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 12px;
}
.subnav {
    display: flex;
    flex-direction: column;
    margin: -1px 0 2px 43px;
    gap: 2px;
}
.subnav a {
    padding: 7px 4px;
    color: var(--text-muted);
    font-size: 13px;
}
.subnav a:hover {
    color: var(--brand);
}
.sidebar-bottom {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line-light);
}

.main-content {
    min-height: calc(100vh - 64px);
    padding: 28px 30px 48px;
}
.page-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
.breadcrumb {
    margin-bottom: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}
.breadcrumb strong {
    color: var(--text-secondary);
    font-weight: 400;
}
.heading-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
h1,
h2,
p {
    margin: 0;
}
h1 {
    font-size: 26px;
    line-height: 36px;
    letter-spacing: -0.3px;
}
.date-label {
    color: var(--text-muted);
    font-size: 13px;
}
.page-heading p {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 14px;
}
.button {
    min-height: 32px;
    padding: 0 14px;
    color: #fff;
    border: 1px solid var(--brand);
    border-radius: 6px;
    background: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}
.button:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    box-shadow: 0 3px 8px rgb(0 82 217 / 20%);
}
.button:disabled {
    color: #a5aab2;
    border-color: #dfe2e7;
    background: #f2f3f5;
    box-shadow: none;
    cursor: not-allowed;
}
.button-secondary {
    color: var(--text-secondary);
    background: var(--surface);
    border-color: var(--line);
}
.button-secondary:hover {
    color: var(--brand);
    background: var(--brand-soft);
    border-color: #b9d4ff;
    box-shadow: none;
}
.button-small {
    min-width: 80px;
    min-height: 30px;
    padding: 0 10px;
    color: var(--brand);
    background: var(--surface);
    border-color: #b9d4ff;
    font-size: 13px;
}
.button-small:hover {
    color: #fff;
    background: var(--brand);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(640px, 1.82fr) minmax(300px, 0.98fr);
    gap: 20px;
    align-items: start;
}
.primary-column,
.secondary-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}
.panel {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.panel-header {
    min-height: 74px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.panel-header h2 {
    font-size: 16px;
    line-height: 22px;
    letter-spacing: -0.1px;
}
.panel-header p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}
.panel-header.compact {
    min-height: 58px;
    padding: 18px 20px;
    align-items: center;
}
.title-count {
    display: inline-grid;
    min-width: 19px;
    height: 19px;
    margin-left: 4px;
    padding: 0 5px;
    color: var(--brand);
    border-radius: 10px;
    background: var(--brand-soft);
    place-items: center;
    vertical-align: 1px;
    font-size: 12px;
    font-weight: 600;
}
.link-button,
.text-action,
.task-inline-action {
    padding: 2px 0;
    color: var(--brand);
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
}
.link-button:hover,
.text-action:hover,
.task-inline-action:hover {
    color: var(--brand-hover);
    text-decoration: underline;
}

.todo-status {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.todo-status .icon {
    width: 16px;
    height: 16px;
}
.status-error {
    color: var(--danger);
    background: var(--danger-soft);
}
.status-warning {
    color: var(--warning);
    background: var(--warning-soft);
}
.status-info {
    color: var(--brand);
    background: var(--brand-soft);
}
.text-action {
    margin-left: 8px;
    font-size: 12px;
}

.tabbar {
    height: 47px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: end;
    gap: 22px;
}
.tab {
    position: relative;
    height: 47px;
    padding: 0;
    color: var(--text-secondary);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}
.tab span {
    margin-left: 2px;
    color: var(--text-muted);
}
.tab.active {
    color: var(--brand);
    font-weight: 500;
}
.tab.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: '';
}
.project-table-wrap {
    overflow-x: auto;
}
.project-table {
    width: 100%;
    min-width: 680px;
    border-spacing: 0;
    border-collapse: collapse;
    table-layout: fixed;
}
.project-table th {
    height: 38px;
    padding: 0 20px;
    color: var(--text-muted);
    background: #fafbfc;
    border-bottom: 1px solid var(--line-light);
    text-align: left;
    font-size: 12px;
    font-weight: 400;
}
.project-table td {
    height: 69px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--line-light);
    font-size: 12px;
    vertical-align: middle;
}
.project-table tbody tr:last-child td {
    border-bottom: 0;
}
.project-table tbody tr:hover {
    background: #fafcff;
}
.project-table th:nth-child(1) {
    width: 42%;
}
.project-table th:nth-child(2) {
    width: 13%;
}
.project-table th:nth-child(3) {
    width: 19%;
}
.project-table th:nth-child(4) {
    width: 12%;
}
.project-table th:nth-child(5) {
    width: 14%;
}
.project-name {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.project-name > div {
    min-width: 0;
}
.project-name strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.project-name small {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.project-symbol {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 6px;
    display: grid;
    place-items: center;
}
.symbol-blue {
    color: var(--brand);
    background: var(--brand-soft);
}
.symbol-orange {
    color: var(--warning);
    background: var(--warning-soft);
}
.symbol-cyan {
    color: var(--cyan);
    background: var(--cyan-soft);
}
.tag,
.status-tag {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 0 7px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
}
.tag-blue {
    color: var(--brand);
    background: var(--brand-soft);
}
.tag-purple {
    color: #6b46c1;
    background: var(--purple-soft);
}
.tag-cyan {
    color: #087cab;
    background: var(--cyan-soft);
}
.status-tag-blue {
    color: #087cab;
    background: var(--cyan-soft);
}
.status-tag-orange {
    color: #bd5d16;
    background: var(--warning-soft);
}
.status-tag-gray {
    color: #5e6570;
    background: #f0f1f3;
}
.progress-cell {
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.progress-cell small {
    color: var(--text-muted);
    font-size: 12px;
}
.progress-track {
    height: 5px;
    flex: 1;
    overflow: hidden;
    background: #edf0f4;
    border-radius: 99px;
}
.progress-track span {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: inherit;
}
.update-time {
    color: var(--text-muted);
    white-space: nowrap;
    font-size: 12px;
}

.document-icon {
    width: 36px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 4px;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
}
.docx {
    color: #2d6cca;
    background: #f2f7ff;
}
.pdf {
    color: #cf4a43;
    background: #fff1f0;
}
.pptx {
    color: #d9502c;
    background: #fff5f1;
}

.task-list {
    padding: 4px 20px 8px;
}
.task-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    gap: 10px;
}
.task-item:last-child {
    border-bottom: 0;
}
.task-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 6px;
    display: grid;
    place-items: center;
}
.task-icon .icon {
    width: 17px;
    height: 17px;
}
.task-blue {
    color: var(--brand);
    background: var(--brand-soft);
}
.task-purple {
    color: var(--purple);
    background: var(--purple-soft);
}
.task-green {
    color: var(--success);
    background: var(--success-soft);
}
.task-red {
    color: var(--danger);
    background: var(--danger-soft);
}
.task-info {
    min-width: 0;
    flex: 1;
}
.task-info strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.task-info p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}
.status-blue {
    color: var(--brand);
}
.status-green {
    color: var(--success);
}
.status-red {
    color: var(--danger);
}
.task-info .progress-track {
    max-width: 175px;
    margin-top: 8px;
}
.task-inline-action {
    margin-top: 5px;
    font-size: 12px;
}
.task-retry {
    color: var(--danger);
}

.metric-grid {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.metric {
    min-height: 83px;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}
.metric-label {
    color: var(--text-secondary);
    font-size: 12px;
}
.metric strong {
    margin-top: 3px;
    font-size: 24px;
    line-height: 29px;
    letter-spacing: -0.5px;
}
.metric-note {
    margin-top: auto;
    color: var(--text-muted);
    font-size: 12px;
}
.metric-blue {
    background: #f0f6ff;
}
.metric-blue strong {
    color: var(--brand);
}
.metric-purple {
    background: #f5f2ff;
}
.metric-purple strong {
    color: var(--purple);
}
.metric-orange {
    background: #fff7ef;
}
.metric-orange strong {
    color: var(--warning);
}
.metric-cyan {
    background: #eefaff;
}
.metric-cyan strong {
    color: var(--cyan);
}
.muted-text {
    color: var(--text-muted);
    font-size: 12px;
}

.timeline {
    margin: 0;
    padding: 14px 20px 5px 25px;
    list-style: none;
}
.timeline li {
    position: relative;
    min-height: 65px;
    padding: 0 0 15px 17px;
    border-left: 1px solid #dfe4eb;
}
.timeline li:last-child {
    min-height: 48px;
    padding-bottom: 0;
    border-left-color: transparent;
}
.timeline-dot {
    position: absolute;
    top: 3px;
    left: -5px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 1px currentColor;
}
.dot-blue {
    color: var(--brand);
    background: var(--brand);
}
.dot-purple {
    color: var(--purple);
    background: var(--purple);
}
.dot-orange {
    color: var(--warning);
    background: var(--warning);
}
.dot-green {
    color: var(--success);
    background: var(--success);
}
.timeline p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 18px;
}
.timeline p strong {
    color: var(--text);
    font-weight: 500;
}
.timeline a {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--brand);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.timeline a:hover {
    text-decoration: underline;
}
.timeline time {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

.toast {
    position: fixed;
    z-index: 30;
    bottom: 30px;
    left: 50%;
    padding: 10px 16px;
    color: #fff;
    background: rgb(29 33 41 / 92%);
    border-radius: 6px;
    box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 14px);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
    font-size: 13px;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Prototype navigator */
.prototype-navigator {
    position: fixed;
    z-index: 80;
    right: 24px;
    bottom: 24px;
    font-family: Inter, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

.prototype-nav-trigger {
    min-height: 42px;
    padding: 0 15px;
    color: #fff;
    border: 0;
    border-radius: 22px;
    background: var(--brand);
    box-shadow: 0 6px 18px rgb(0 82 217 / 26%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition:
        background 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}
.prototype-nav-trigger:hover {
    background: var(--brand-hover);
    box-shadow: 0 9px 24px rgb(0 82 217 / 32%);
    transform: translateY(-1px);
}
.prototype-nav-panel {
    position: absolute;
    right: 0;
    bottom: 54px;
    width: 330px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgb(29 33 41 / 18%);
}
.prototype-nav-panel[hidden] {
    display: none;
}
.prototype-nav-panel header {
    min-height: 68px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.prototype-nav-eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
}
.prototype-nav-panel h2 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 16px;
}
.prototype-nav-close {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    border: 0;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}
.prototype-nav-close:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.prototype-nav-list {
    max-height: min(560px, calc(100vh - 160px));
    padding: 8px 0;
    overflow-y: auto;
}
.prototype-nav-group {
    margin: 0;
    padding: 8px 8px 3px;
}
.prototype-nav-group h3 {
    margin: 0 0 4px;
    padding: 0 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}
.prototype-nav-link {
    min-height: 37px;
    padding: 7px 8px;
    color: var(--text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
}
.prototype-nav-link:hover {
    color: var(--brand);
    background: #f5f9ff;
}
.prototype-nav-link.active {
    color: var(--brand);
    background: var(--brand-soft);
    font-weight: 600;
}
.prototype-nav-link > i {
    width: 16px;
    text-align: center;
}
.prototype-nav-link span {
    min-width: 0;
    flex: 1;
}
.prototype-nav-link small,
.prototype-nav-link em {
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
}
.prototype-nav-link em {
    padding: 2px 5px;
    color: var(--brand);
    border-radius: 3px;
    background: #d9ebff;
}
.prototype-nav-panel footer {
    padding: 10px 14px;
    color: var(--text-muted);
    background: #fafbfc;
    border-top: 1px solid var(--line-light);
    font-size: 12px;
}
.prototype-nav-panel footer i {
    margin-right: 4px;
    color: var(--brand);
}

@media (max-width: 1300px) {
    .brand {
        min-width: 260px;
    }
    .brand-name {
        font-size: 14px;
    }
    .topbar {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 330px) minmax(0, 1fr);
        gap: 16px;
    }
    .topbar > .brand {
        min-width: 0;
    }
    .global-search {
        width: 330px;
    }
    .main-content {
        padding: 24px;
    }
    .dashboard-grid {
        grid-template-columns: minmax(590px, 1.72fr) minmax(290px, 1fr);
    }
}

/* Management sidebar */
.app-shell > .sidebar .main-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.app-shell > .sidebar .main-nav a,
.app-shell > .sidebar .sidebar-section a {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    font-size: 14px;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}
.app-shell > .sidebar .main-nav a > i,
.app-shell > .sidebar .sidebar-section a > i {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    font-size: 16px;
}
.app-shell > .sidebar .main-nav a:hover,
.app-shell > .sidebar .sidebar-section a:hover {
    color: var(--brand);
    background: #f4f7fc;
}
.app-shell > .sidebar .main-nav a.active {
    color: var(--brand);
    background: var(--brand-soft);
    font-weight: 600;
}
.app-shell > .sidebar .sidebar-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line-light);
}
.app-shell > .sidebar .sidebar-section > p {
    margin: 0 12px 7px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 16px;
}
.app-shell > .sidebar .sidebar-section a {
    min-height: 36px;
    color: var(--text-muted);
    font-size: 12px;
}
.app-shell > .sidebar .sidebar-section a > i {
    font-size: 13px;
}
.app-shell > .sidebar .sidebar-user {
    min-height: 54px;
    margin-top: auto;
    padding: 11px 7px 0;
    border-top: 1px solid var(--line-light);
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 8px;
}
.app-shell > .sidebar .sidebar-user .avatar {
    width: 30px;
    height: 30px;
}
.app-shell > .sidebar .sidebar-user strong,
.app-shell > .sidebar .sidebar-user small {
    display: block;
}
.app-shell > .sidebar .sidebar-user strong {
    color: var(--text-secondary);
    font-size: 12px;
}
.app-shell > .sidebar .sidebar-user small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}
.app-shell > .sidebar .sidebar-user > i {
    color: var(--text-muted);
    font-size: 12px;
}
/* Unified route-tree sidebar */
.sidebar.has-unified-sidebar {
    overflow: hidden;
}
.unified-history-notice {
    min-height: 50px;
    margin-bottom: 16px;
    padding: 10px 14px;
    color: #725319;
    border: 1px solid #e9cf95;
    border-radius: 6px;
    background: #fff9e9;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    line-height: 1.6;
}
.unified-history-notice > i {
    color: #a46f0d;
}
.unified-history-notice strong {
    margin-right: 8px;
}
.unified-sidebar-nav {
    min-height: 0;
    padding-right: 3px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    scrollbar-color: #d7dbe2 transparent;
    scrollbar-width: thin;
}
.unified-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.unified-sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: #d7dbe2;
}
.unified-nav-group {
    margin: 0;
}
.unified-nav-item {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text-secondary);
    border: 0;
    border-radius: 6px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}
.unified-nav-item:hover {
    color: var(--brand);
    background: #f4f7fc;
}
.unified-nav-item.active {
    color: var(--brand);
    background: var(--brand-soft);
    font-weight: 600;
}
.unified-nav-item > i:first-child {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    font-size: 16px;
}
.unified-nav-item > span {
    min-width: 0;
    overflow: hidden;
    flex: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.unified-nav-chevron {
    width: 12px;
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
    transition: transform 0.18s ease;
}
.unified-nav-group.expanded > .unified-nav-item .unified-nav-chevron {
    transform: rotate(90deg);
}
.unified-subnav[hidden] {
    display: none;
}
.unified-subnav {
    margin: 2px 0 5px 22px;
    padding: 2px 0 3px 10px;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.unified-subnav-link {
    position: relative;
    min-height: 31px;
    padding: 6px 8px;
    color: var(--text-muted);
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 18px;
}
.unified-subnav-link:hover {
    color: var(--brand);
    background: #f4f7fc;
}
.unified-subnav-link.active {
    color: var(--brand);
    background: var(--brand-soft);
    font-weight: 600;
}
.unified-subnav-link > span {
    min-width: 0;
    overflow: hidden;
    flex: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.unified-subnav-link > em {
    min-width: 22px;
    padding: 0 4px;
    color: #6f5eb4;
    border-radius: 8px;
    background: var(--purple-soft);
    font-size: 9px;
    font-style: normal;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}
.unified-subnav-heading {
    min-height: 31px;
    margin-left: -24px;
    padding: 12px 8px 4px;
    color: var(--text-primary);
    background: #fff;
    display: flex;
    align-items: flex-end;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}
.sidebar.has-unified-sidebar .sidebar-user {
    flex: 0 0 auto;
}

/* Admin management */
.admin-sidebar .nav-list {
    padding-bottom: 20px;
}
.admin-subnav {
    padding-bottom: 5px;
}
.danger-text {
    color: var(--danger);
}
.admin-security-note {
    padding: 16px;
    color: #4d709a;
    background: #f3f8ff;
    border-color: #d7e7ff;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.admin-security-note > i {
    margin-top: 2px;
    color: var(--brand);
    font-size: 16px;
}
.admin-security-note strong {
    color: #315d91;
    font-size: 12px;
}
.admin-security-note p {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.65;
}
.admin-security-note button {
    margin-top: 9px;
    padding: 0;
    color: var(--brand);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}
.avatar-gray {
    background: #8a94a3;
}
.tag-orange {
    color: #bd5d16;
    background: var(--warning-soft);
}
.tag-green {
    color: #16835a;
    background: var(--success-soft);
}
.tag-gray {
    color: #5e6570;
    background: #f0f1f3;
}
.admin-management-main {
    padding-bottom: 45px;
}
.admin-domain-tabs {
    height: 43px;
    margin: 13px 0;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    display: flex;
    align-items: stretch;
    gap: 25px;
}
.admin-domain-tabs a {
    position: relative;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    font-size: 12px;
}
.admin-domain-tabs a.active {
    color: var(--brand);
    font-weight: 600;
}
.admin-domain-tabs a.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: '';
}
.organization-search {
    height: 34px;
    margin: 11px 13px 6px;
    padding: 0 10px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.organization-search input {
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    flex: 1;
    font-size: 12px;
}
.admin-management-metrics {
    margin-bottom: 13px;
    padding: 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}
.admin-management-metrics .metric-card {
    position: relative;
    min-height: 92px;
    padding: 14px 14px 11px 64px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgb(24 35 52 / 3%);
}
.admin-management-metrics .metric-card > p,
.admin-management-metrics .metric-card > strong,
.admin-management-metrics .metric-card > small {
    display: block;
}
.admin-management-metrics .metric-card > p {
    color: var(--text-muted);
    font-size: 12px;
}
.admin-management-metrics .metric-card > strong {
    margin-top: 5px;
    font-size: 20px;
    line-height: 1.15;
}
.admin-management-metrics .metric-card > small {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}
.admin-management-metrics .metric-icon {
    position: absolute;
    top: 16px;
    left: 14px;
    width: 38px;
    height: 38px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 14px;
}
.admin-management-metrics .metric-icon.blue {
    color: var(--brand);
    background: var(--brand-soft);
}
.admin-management-metrics .metric-icon.green {
    color: var(--success);
    background: var(--success-soft);
}
.admin-management-metrics .metric-icon.cyan {
    color: var(--cyan);
    background: var(--cyan-soft);
}
.admin-management-metrics .metric-icon.purple {
    color: var(--purple);
    background: var(--purple-soft);
}
.admin-management-metrics .metric-icon.orange {
    color: var(--warning);
    background: var(--warning-soft);
}
.admin-management-metrics .metric-icon.gray {
    color: #687384;
    background: #f0f2f5;
}
.admin-filter {
    margin-bottom: 13px;
    padding: 18px 20px 14px;
}
.admin-filter .filter-grid {
    grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(120px, 1fr)) auto;
}
.admin-filter .filter-actions {
    align-self: end;
}
.project-auth-filter .filter-grid {
    grid-template-columns: repeat(6, minmax(110px, 1fr)) auto;
}
.admin-user-query {
    min-width: 190px;
}
.admin-management-grid {
    display: grid;
    grid-template-columns: minmax(790px, 1.9fr) minmax(250px, 0.55fr);
    gap: 14px;
    align-items: start;
}
.admin-table-panel {
    min-width: 0;
}
.admin-table-panel .panel-header p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}
.admin-data-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-data-table th,
.admin-data-table td {
    height: 50px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line-light);
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}
.admin-data-table th {
    height: 36px;
    color: var(--text-muted);
    background: #f7f9fc;
    font-weight: 600;
}
.admin-data-table tbody tr:hover {
    background: #f8fbff;
}
.admin-data-table tr[hidden] {
    display: none;
}
.admin-data-table input[type='checkbox'] {
    accent-color: var(--brand);
}
.admin-data-table .member-cell {
    min-width: 126px;
    gap: 8px;
}
.admin-data-table .member-cell .avatar {
    width: 27px;
    height: 27px;
}
.admin-data-table .member-cell strong,
.admin-data-table .member-cell small {
    display: block;
}
.admin-data-table .member-cell strong {
    font-size: 12px;
}
.admin-data-table .member-cell small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}
.admin-data-table .tag {
    min-height: 18px;
    margin-right: 3px;
    padding: 0 5px;
    font-size: 12px;
}
.admin-data-table .status-tag {
    min-height: 19px;
    font-size: 12px;
}
.admin-data-table .text-action {
    margin-right: 5px;
    font-size: 12px;
}
.modal-backdrop[hidden] {
    display: none;
}
.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    padding: 24px;
    background: rgb(20 31 48 / 42%);
    display: grid;
    place-items: center;
}
.admin-modal {
    width: min(550px, calc(100vw - 48px));
    overflow: hidden;
    background: var(--surface);
    border-radius: 9px;
    box-shadow: 0 20px 48px rgb(20 31 48 / 24%);
}
.admin-modal > header {
    min-height: 69px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-modal > header h2 {
    font-size: 15px;
}
.admin-modal > header p {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}
.admin-modal-body {
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 13px;
}
.admin-modal-body .form-field {
    margin-bottom: 13px;
}
.admin-modal-body .form-field > span {
    margin-bottom: 6px;
    font-size: 12px;
}
.admin-modal-body .form-field b {
    color: var(--danger);
}
.admin-modal-body .form-field input,
.admin-modal-body .form-field select {
    height: 34px;
    font-size: 12px;
}
.admin-modal-body .essential-notice {
    grid-column: 1 / -1;
    margin: 3px 0 0;
}
.admin-modal form > footer {
    min-height: 60px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
/* Shared configuration atoms */
.version-badge {
    height: 32px;
    padding: 0 10px;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.version-badge i {
    color: var(--brand);
}
.text-blue {
    color: var(--brand);
}
.drawer-mask {
    position: fixed;
    z-index: 111;
    inset: 0;
    background: rgb(20 31 48 / 25%);
}
.switch {
    position: relative;
    width: 30px;
    height: 17px;
    display: inline-flex;
}
.switch input {
    position: absolute;
    opacity: 0;
}
.switch > span {
    position: absolute;
    inset: 0;
    border-radius: 9px;
    background: #c7cbd2;
    cursor: pointer;
    transition: 0.15s;
}
.switch > span::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 18%);
    content: '';
    transition: 0.15s;
}
.switch input:checked + span {
    background: var(--brand);
}
.switch input:checked + span::after {
    transform: translateX(13px);
}
.switch.mini {
    width: 25px;
    height: 14px;
}
.switch.mini > span::after {
    width: 10px;
    height: 10px;
}
.switch.mini input:checked + span::after {
    transform: translateX(11px);
}
.dictionary-search {
    height: 32px;
    margin: 10px 12px 5px;
    padding: 0 9px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dictionary-search input {
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    flex: 1;
    font-size: 12px;
}

/* Admin AI and notification */
.ai-admin-tabs {
    height: 43px;
    margin: 13px 0;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    display: flex;
    align-items: stretch;
    gap: 28px;
}
.ai-admin-tabs a {
    position: relative;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    font-size: 12px;
}
.ai-admin-tabs a.active {
    color: var(--brand);
    font-weight: 600;
}
.ai-admin-tabs a.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: '';
}
.ai-filter {
    min-height: 53px;
    margin-bottom: 13px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.ai-filter > label {
    width: 280px;
    height: 32px;
    padding: 0 9px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ai-filter input {
    min-width: 0;
    border: 0;
    outline: 0;
    flex: 1;
    font-size: 12px;
}
.ai-filter select,
.heading-select {
    height: 32px;
    padding: 0 8px;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    font-size: 12px;
}
/* Dashboard drilldowns */
.drilldown-main {
    padding-bottom: 45px;
}
.drilldown-filter {
    margin: 13px 0 10px;
    padding: 18px 20px 14px;
}
.drilldown-filter .filter-grid {
    grid-template-columns: repeat(5, minmax(110px, 1fr)) auto;
}
.drilldown-filter .filter-actions {
    align-self: end;
}
.drilldown-scope {
    min-height: 38px;
    margin-bottom: 13px;
    padding: 8px 12px;
    color: #55769e;
    border: 1px solid #d5e6ff;
    border-radius: 5px;
    background: #f4f8ff;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.drilldown-scope > i {
    color: var(--brand);
}
.drilldown-scope strong {
    color: #315d91;
}
.drilldown-scope em {
    margin-left: auto;
    font-style: normal;
}
.drilldown-scope em i {
    margin-right: 4px;
    color: var(--brand);
}
.drilldown-metrics {
    margin-bottom: 13px;
}
.drilldown-metrics .metric-card {
    min-height: 92px;
    padding: 14px 15px 12px 66px;
}
.drilldown-metrics .metric-icon {
    position: absolute;
    top: 16px;
    left: 15px;
    width: 39px;
    height: 39px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 15px;
}
.drilldown-metrics .metric-icon.blue {
    color: var(--brand);
    background: var(--brand-soft);
}
.drilldown-metrics .metric-icon.cyan {
    color: var(--cyan);
    background: var(--cyan-soft);
}
.drilldown-metrics .metric-icon.green {
    color: var(--success);
    background: var(--success-soft);
}
.drilldown-metrics .metric-icon.orange {
    color: var(--warning);
    background: var(--warning-soft);
}
.drilldown-grid {
    display: grid;
    grid-template-columns: minmax(780px, 1.9fr) minmax(260px, 0.55fr);
    gap: 14px;
    align-items: start;
}
.drilldown-table-panel {
    min-width: 0;
}
.drilldown-table-panel .panel-header p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}
.drilldown-table {
    width: 100%;
    border-collapse: collapse;
}
.drilldown-table th,
.drilldown-table td {
    min-height: 48px;
    padding: 10px 9px;
    border-bottom: 1px solid var(--line-light);
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}
.drilldown-table th {
    height: 36px;
    color: var(--text-muted);
    background: #f7f9fc;
    font-weight: 600;
}
.drilldown-table tbody tr:hover {
    background: #f8fbff;
}
.drilldown-table tr[hidden] {
    display: none;
}
.drilldown-table .project-name {
    min-width: 210px;
}
.drilldown-table .project-name strong {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.drilldown-table .tag,
.drilldown-table .status-tag {
    font-size: 12px;
}
.table-footer {
    min-height: 48px;
    padding: 9px 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.pagination {
    display: flex;
    gap: 4px;
}
.pagination button {
    min-width: 27px;
    height: 27px;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
    font-size: 12px;
}
.pagination button.active {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}
.drilldown-notes {
    padding: 5px 14px 14px;
}
.drilldown-notes p {
    padding: 11px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.55;
}
.drilldown-notes p:last-child {
    border-bottom: 0;
}
.drilldown-notes p > i {
    width: 15px;
    margin-top: 2px;
    color: var(--brand);
    text-align: center;
}
.drilldown-notes strong {
    display: block;
    font-size: 12px;
}
.current-scope {
    padding: 5px 14px 13px;
}
.current-scope > div {
    padding: 9px 0;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}
.current-scope > div:last-child {
    border-bottom: 0;
}
.current-scope dt {
    color: var(--text-muted);
}
.current-scope dd {
    color: var(--text-secondary);
}
.drilldown-tabs {
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 20px;
}
.drilldown-tabs button {
    height: 38px;
    color: var(--text-secondary);
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}
.drilldown-tabs button.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    font-weight: 600;
}
.drilldown-rank {
    padding: 9px 14px 14px;
}
.drilldown-rank li {
    padding: 8px 0;
    list-style: none;
}
.drilldown-rank li > div {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}
.drilldown-rank li > div span {
    color: var(--text-secondary);
}
.drilldown-rank li > div strong {
    color: var(--brand);
}
.drilldown-rank li > span {
    height: 5px;
    border-radius: 3px;
    background: #e8edf4;
    display: block;
    overflow: hidden;
}
.drilldown-rank li > span::before {
    width: var(--progress, 50%);
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
    display: block;
    content: '';
}

.switch-control {
    position: relative;
    display: inline-flex;
}
.switch-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.switch-control > span {
    position: relative;
    width: 34px;
    height: 19px;
    border-radius: 10px;
    background: #bdc6d1;
    cursor: pointer;
    transition: 0.2s ease;
}
.switch-control > span::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
    content: '';
    transition: 0.2s ease;
}
.switch-control input:checked + span {
    background: var(--brand);
}
.switch-control input:checked + span::after {
    transform: translateX(15px);
}
.switch-control input:disabled + span {
    opacity: 0.6;
    cursor: not-allowed;
}
.essential-notice {
    margin: 0 17px 15px;
    padding: 10px 12px;
    color: #4f719c;
    border-radius: 5px;
    background: #f3f8ff;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.essential-notice > i {
    margin-top: 2px;
    color: var(--brand);
}
.essential-notice strong {
    font-size: 12px;
}
.essential-notice p {
    margin-top: 3px;
    font-size: 12px;
}
/* Error pages */
.error-page {
    min-width: 1080px;
    min-height: 100vh;
    background: #f6f8fb;
}
.error-topbar {
    height: 64px;
    padding: 0 34px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.error-topbar .brand {
    min-width: auto;
}
.error-topbar > div {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.error-topbar > div button {
    margin-right: 14px;
    color: var(--text-secondary);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}
.error-topbar > div button i {
    margin-right: 5px;
    color: var(--brand);
}
.error-main {
    width: min(920px, calc(100% - 80px));
    min-height: calc(100vh - 112px);
    margin: 0 auto;
    padding: 53px 0 35px;
}
.error-card {
    min-height: 342px;
    padding: 45px 64px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgb(29 33 41 / 7%);
}
.forbidden-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    align-items: center;
    gap: 55px;
}
.error-visual {
    min-height: 238px;
    border-radius: 10px;
    background: linear-gradient(145deg, #f2f7ff, #fafcff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.forbidden-shield {
    position: relative;
    width: 88px;
    height: 102px;
    color: #87adf2;
    display: grid;
    place-items: center;
    font-size: 88px;
}
.forbidden-shield > span {
    position: absolute;
    width: 40px;
    height: 40px;
    color: #fff;
    border-radius: 50%;
    background: var(--brand);
    display: grid;
    place-items: center;
    font-size: 15px;
}
.error-visual > strong {
    margin-top: 8px;
    color: #2d69cf;
    font-size: 28px;
    letter-spacing: 2px;
}
.error-visual > span {
    margin-top: 3px;
    color: #8aa2bf;
    font-size: 12px;
    letter-spacing: 2.5px;
}
.error-eyebrow {
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
}
.error-copy h1,
.not-found-card h1 {
    margin-top: 8px;
    font-size: 26px;
}
.error-copy > p:not(.error-eyebrow),
.not-found-card > p:not(.error-eyebrow) {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.75;
}
.error-safety {
    margin-top: 22px;
    padding: 12px;
    color: #52749e;
    border-radius: 6px;
    background: #f2f7ff;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.error-safety > i {
    margin-top: 2px;
    color: var(--brand);
}
.error-safety strong,
.error-safety span {
    display: block;
}
.error-safety strong {
    font-size: 12px;
}
.error-safety span {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
}
.forbidden-actions,
.not-found-actions {
    margin-top: 24px;
    display: flex;
    gap: 9px;
}
.error-help {
    margin-top: 16px;
    padding: 18px 20px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.error-help h2 {
    font-size: 12px;
}
.error-help > div {
    margin-top: 11px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.error-help a,
.error-help button {
    min-width: 0;
    min-height: 61px;
    padding: 10px;
    color: var(--text);
    border: 1px solid var(--line-light);
    border-radius: 6px;
    background: #fbfcfe;
    display: grid;
    grid-template-columns: 32px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    text-align: left;
    cursor: pointer;
}
.error-help a:hover,
.error-help button:hover {
    border-color: #b4d1ff;
    background: #f6faff;
}
.error-help a > span,
.error-help button > span {
    width: 30px;
    height: 30px;
    grid-row: span 2;
    color: var(--brand);
    border-radius: 6px;
    background: var(--brand-soft);
    display: grid;
    place-items: center;
}
.error-help strong {
    align-self: end;
    font-size: 12px;
}
.error-help small {
    align-self: start;
    color: var(--text-muted);
    font-size: 12px;
}
.error-help a > i,
.error-help button > i {
    grid-column: 3;
    grid-row: 1 / span 2;
    color: #bdc6d1;
    font-size: 12px;
}
.error-correlation {
    margin-top: 14px;
    color: var(--text-muted);
    text-align: center;
    font-size: 12px;
}
.error-correlation i {
    margin-right: 4px;
}
.error-footer {
    height: 48px;
    padding: 0 34px;
    color: var(--text-muted);
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.error-footer a {
    margin-left: 18px;
}
.error-footer a:hover {
    color: var(--brand);
}
.error-not-found .error-main {
    width: min(860px, calc(100% - 80px));
    padding-top: 44px;
}
.not-found-card {
    text-align: center;
}
.not-found-visual {
    height: 178px;
    color: #3e75d1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.not-found-visual .digit {
    font-size: 112px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 9px 20px rgb(38 93 185 / 12%);
}
.radar-orbit {
    position: relative;
    width: 116px;
    height: 116px;
    color: var(--brand);
    border: 2px solid #8db5f4;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 32px;
}
.radar-orbit::before,
.radar-orbit::after {
    position: absolute;
    inset: 13px;
    border: 1px dashed #bcd4fa;
    border-radius: 50%;
    content: '';
}
.radar-orbit::after {
    inset: 35px;
    border-style: solid;
}
.radar-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #76a9f5;
}
.radar-dot.dot-a {
    top: 12px;
    left: 23px;
}
.radar-dot.dot-b {
    right: 6px;
    bottom: 31px;
}
.radar-line {
    position: absolute;
    right: -18px;
    bottom: 6px;
    width: 42px;
    height: 3px;
    border-radius: 2px;
    background: #8db5f4;
    transform: rotate(43deg);
}
.not-found-card > p:not(.error-eyebrow) {
    max-width: 520px;
    margin-right: auto;
    margin-left: auto;
}
.not-found-actions {
    justify-content: center;
}
.not-found-help {
    margin-top: 28px;
}
.not-found-help > div {
    grid-template-columns: repeat(4, 1fr);
}
.not-found-search {
    width: 470px;
    height: 39px;
    margin: 14px auto 0;
    padding-left: 12px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
}
.not-found-search input {
    min-width: 0;
    height: 100%;
    padding: 0 9px;
    border: 0;
    outline: 0;
    flex: 1;
    font-size: 12px;
}
.not-found-search button {
    align-self: stretch;
    padding: 0 19px;
    color: #fff;
    border: 0;
    border-radius: 0 5px 5px 0;
    background: var(--brand);
    cursor: pointer;
    font-size: 12px;
}

.form-field {
    display: block;
    margin-bottom: 20px;
}
.form-field > span:first-child {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}
.form-field input,
.form-field select,
.form-field textarea,
.filter-field input,
.filter-field select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    outline: none;
}
.form-field textarea {
    min-height: 82px;
    padding: 10px 11px;
    resize: vertical;
    line-height: 1.5;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.filter-field input:focus,
.filter-field select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgb(0 82 217 / 10%);
}
.checkbox-label {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.checkbox-label input {
    accent-color: var(--brand);
}
.plain-link {
    padding: 0;
    color: var(--brand);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}
.plain-link:hover {
    text-decoration: underline;
}
/* Projects */
.prototype-shell {
    min-height: 100vh;
    padding-top: 64px;
    padding-left: 240px;
}
.button-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-panel {
    margin-bottom: 16px;
    padding: 18px 20px 14px;
}
.filter-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.15fr repeat(3, 1fr) 1.35fr auto;
    gap: 12px;
    align-items: end;
}
.filter-field {
    margin: 0;
}
.filter-field > span {
    margin-bottom: 6px;
    font-size: 12px;
}
.filter-field input,
.filter-field select {
    min-height: 34px;
    font-size: 12px;
}
.filter-actions {
    display: flex;
    gap: 8px;
}
.filter-actions .button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}
.filter-tags {
    margin-top: 13px;
    padding-top: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.filter-tag {
    padding: 4px 8px;
    color: var(--brand);
    border: 0;
    border-radius: 4px;
    background: var(--brand-soft);
    cursor: pointer;
    font-size: 12px;
}
.review-search {
    width: 300px;
    height: 34px;
    padding: 0 10px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.review-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 12px;
}
.project-summary {
    margin-bottom: 16px;
    padding: 0 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}
.summary-item {
    min-height: 70px;
    padding: 12px 22px;
    border: 0;
    border-right: 1px solid var(--line-light);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
}
.summary-item:last-child {
    border-right: 0;
}
.summary-item:hover,
.summary-item.active {
    background: #f8fbff;
}
.summary-item span {
    color: var(--text-secondary);
    font-size: 12px;
}
.summary-item strong {
    margin-top: 2px;
    color: var(--text);
    font-size: 24px;
}
.summary-item.active strong {
    color: var(--brand);
}
.table-tools {
    display: flex;
    gap: 18px;
}
.wide-table {
    overflow-x: auto;
}
.project-list-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
}
.project-list-table th,
.project-list-table td {
    padding: 0 13px;
    border-bottom: 1px solid var(--line-light);
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}
.project-list-table th {
    height: 42px;
    color: var(--text-muted);
    background: #fafbfc;
    font-weight: 400;
}
.project-list-table td {
    height: 64px;
    color: var(--text-secondary);
}
.project-list-table tbody tr:hover {
    background: #fafcff;
}
.project-list-table th:first-child,
.project-list-table td:first-child {
    padding-left: 20px;
}
.project-list-table th:last-child,
.project-list-table td:last-child {
    padding-right: 20px;
}
.table-title {
    color: var(--text);
    font-weight: 500;
}
.table-title:hover {
    color: var(--brand);
}
.member-cell {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.member-cell .avatar {
    width: 21px;
    height: 21px;
    font-size: 12px;
}
.status-tag-green {
    color: #0a7a55;
    background: var(--success-soft);
}
.more-button {
    padding: 0;
    color: var(--text-secondary);
    border: 0;
    background: transparent;
    cursor: pointer;
}
.pagination {
    min-height: 58px;
    padding: 12px 20px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 12px;
}
.pagination span {
    margin-right: auto;
}
.pagination select,
.pagination button {
    height: 28px;
    padding: 0 8px;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
}
.pagination button {
    min-width: 28px;
    cursor: pointer;
}
.pagination button.current {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-soft);
}
.pagination button:disabled {
    color: #c5c8ce;
    cursor: not-allowed;
}

/* Create project */
.create-layout {
    display: grid;
    grid-template-columns: 200px minmax(640px, 1fr) 250px;
    min-height: 680px;
}
.form-steps {
    padding: 28px 18px;
    border-right: 1px solid var(--line-light);
    background: #fafbfc;
}
.step {
    position: relative;
    padding: 0 0 30px 37px;
    color: var(--text-muted);
}
.step::before {
    position: absolute;
    top: 26px;
    bottom: 3px;
    left: 12px;
    width: 1px;
    background: var(--line);
    content: '';
}
.step:last-child::before {
    display: none;
}
.step > span {
    position: absolute;
    top: 0;
    left: 0;
    width: 25px;
    height: 25px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    display: grid;
    place-items: center;
    font-size: 12px;
}
.step strong,
.step small {
    display: block;
}
.step strong {
    color: inherit;
    font-size: 13px;
}
.step small {
    margin-top: 3px;
    font-size: 12px;
}
.step.active {
    color: var(--brand);
}
.step.active > span {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}
.form-content {
    padding: 28px 34px;
}
.form-content-head {
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line-light);
}
.form-content-head h2 {
    font-size: 18px;
}
.form-content-head p {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}
.form-content-head b {
    color: var(--danger);
}
fieldset {
    margin: 0;
    padding: 23px 0;
    border: 0;
    border-bottom: 1px solid var(--line-light);
}
legend {
    padding: 0;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}
.form-grid {
    margin-top: 18px;
    display: grid;
    gap: 16px 18px;
}
.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.full-row {
    grid-column: 1 / -1;
}
.required > span:first-child::after {
    margin-left: 3px;
    color: var(--danger);
    content: '*';
}
.field-hint {
    margin-left: 4px;
    color: var(--text-muted);
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
}
.tag-input {
    min-height: 40px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}
.tag-input button {
    padding: 2px 4px;
    color: var(--brand);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}
.form-footer {
    padding-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.form-help {
    margin: 25px 20px 25px 0;
    align-self: start;
    padding: 18px;
    background: #f8fbff;
    border: 1px solid #d7e8ff;
    border-radius: 7px;
}
.form-help h3 {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 14px;
}
.form-help ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
}
.form-help li {
    margin: 0 0 9px;
    font-size: 12px;
    line-height: 1.55;
}

/* Project overview */
.project-hero {
    padding-bottom: 18px;
}
.project-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}
.title-with-status {
    display: flex;
    align-items: center;
    gap: 10px;
}
.project-meta {
    margin-top: 10px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 16px;
    font-size: 12px;
}
.project-tabs {
    height: 51px;
    margin: 0 -30px 20px;
    padding: 0 30px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-end;
    gap: 25px;
}
.project-tabs button {
    position: relative;
    height: 50px;
    padding: 0;
    color: var(--text-secondary);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}
.project-tabs button.active {
    color: var(--brand);
    font-weight: 500;
}
.project-tabs button.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: '';
}
.avatar-purple {
    background: #7a5af8;
}
.avatar-cyan {
    background: #1a9bd7;
}
.avatar-orange {
    background: #ed7b2f;
}

/* Project members */
.project-tabs a {
    position: relative;
    height: 50px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    font-size: 13px;
}
.project-tabs a:hover {
    color: var(--brand);
}
.info-card-list {
    padding: 6px 18px 12px;
}
.info-card-list p {
    min-height: 42px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
}
.info-card-list p:last-child {
    border-bottom: 0;
}
.info-card-list i {
    width: 14px;
    color: var(--brand);
    text-align: center;
}
.modal-backdrop[hidden] {
    display: none;
}
.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    padding: 24px;
    background: rgb(0 0 0 / 36%);
    display: grid;
    place-items: center;
}
.prototype-modal {
    width: min(540px, 100%);
    overflow: hidden;
    background: var(--surface);
    border-radius: 9px;
    box-shadow: 0 16px 42px rgb(0 0 0 / 24%);
}
.prototype-modal header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.prototype-modal h2 {
    margin: 0;
    font-size: 17px;
}
.prototype-modal header button {
    width: 28px;
    height: 28px;
    color: var(--text-muted);
    border: 0;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}
.prototype-modal header button:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.modal-form {
    padding: 20px;
}
.prototype-modal footer {
    padding: 14px 20px;
    border-top: 1px solid var(--line-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Project requirement documents */
.resource-summary {
    margin: 0;
    grid-template-columns: repeat(4, 1fr);
}
.resource-summary .summary-item {
    min-height: 65px;
}
.requirements-filter {
    grid-template-columns: 1.45fr repeat(3, 1fr) auto auto;
}
.requirements-table td {
    height: 76px;
}
.file-cell {
    min-width: 260px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.file-cell > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.file-cell strong {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.file-cell small {
    color: var(--text-muted);
    font-size: 12px;
}
.file-cell .tag {
    min-height: 17px;
    padding: 0 4px;
    font-size: 12px;
}
.xlsx {
    color: #1d8d5b;
    background: #effaf4;
}
.mini-progress {
    width: 90px;
    height: 4px;
    margin-top: 5px;
    overflow: hidden;
    background: #edf0f4;
    border-radius: 6px;
}
.mini-progress span {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: inherit;
}
.status-tag-red {
    color: var(--danger);
    background: var(--danger-soft);
}

/* Project materials */
.materials-search {
    height: 30px;
    margin: 0 0 8px auto;
    padding: 0 8px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.materials-search input {
    width: 135px;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 12px;
}
.material-list {
    padding: 4px 20px 12px;
}
.material-card {
    padding: 17px 0;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    gap: 12px;
}
.material-card:last-child {
    border-bottom: 0;
}
.material-type {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 6px;
    display: grid;
    place-items: center;
}
.type-project {
    color: var(--brand);
    background: var(--brand-soft);
}
.type-policy {
    color: var(--warning);
    background: var(--warning-soft);
}
.type-report {
    color: var(--purple);
    background: var(--purple-soft);
}
.material-main {
    min-width: 0;
    flex: 1;
}
.material-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.material-title strong {
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.relevance {
    margin-left: auto;
    padding: 2px 6px;
    color: var(--success);
    border-radius: 3px;
    background: var(--success-soft);
    white-space: nowrap;
    font-size: 12px;
}
.material-source {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}
.material-reason {
    margin-top: 9px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}
.material-reason b {
    color: var(--text);
    font-weight: 500;
}
.material-card blockquote {
    margin: 8px 0;
    padding: 7px 10px;
    color: #606b7d;
    border-left: 2px solid #afceff;
    background: #f8fbff;
    font-size: 12px;
    line-height: 1.5;
}
.material-footer {
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.material-footer .text-action {
    margin-left: auto;
    font-size: 12px;
}
.material-footer .text-action + .text-action {
    margin-left: 0;
}

.creation-task-tabs {
    height: 50px;
    margin: 0 -30px 18px;
    padding: 0 30px;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-end;
    gap: 26px;
}
.creation-task-tabs a {
    position: relative;
    height: 49px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    font-size: 13px;
}
.creation-task-tabs a:hover,
.creation-task-tabs a.active {
    color: var(--brand);
}
.creation-task-tabs a.active {
    font-weight: 600;
}
.creation-task-tabs a.active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: '';
}
@keyframes creation-spin {
    to {
        transform: rotate(360deg);
    }
}
.metric-green {
    background: #effaf5;
}
.metric-green strong {
    color: var(--success);
}
.metric-red {
    background: #fff3f2;
}
.metric-red strong {
    color: var(--danger);
}
.permission-notice {
    margin-top: 14px;
    padding: 10px 12px;
    color: #5077a6;
    border-radius: 5px;
    background: #f3f8ff;
    font-size: 12px;
    line-height: 1.5;
}
.permission-notice i {
    margin-right: 5px;
    color: var(--brand);
}
.secondary-column .permission-notice {
    margin: 12px 14px 14px;
}
.subnav button {
    padding: 7px 4px;
    color: var(--text-muted);
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
}
.subnav button:hover,
.subnav .active {
    color: var(--brand);
    font-weight: 500;
}
.search-hero {
    padding: 22px 24px 0;
    margin-bottom: 18px;
}
.search-large {
    max-width: 860px;
    height: 44px;
    margin: 0 auto;
    padding-left: 15px;
    border: 1px solid #b9d4ff;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 0 3px rgb(0 82 217 / 5%);
}
.search-large > i {
    color: var(--text-muted);
}
.search-large input {
    min-width: 0;
    height: 100%;
    flex: 1;
    color: var(--text);
    border: 0;
    outline: 0;
    font-size: 14px;
}
.search-large .button {
    height: 32px;
    margin-right: 5px;
}
/* Shared phase planning components */
.phase-badge {
    min-height: 22px;
    padding: 0 7px;
    color: #87551f;
    border-radius: 4px;
    background: var(--warning-soft);
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
}
.phase-panel[hidden] {
    display: none;
}
.phase-notice {
    min-height: 54px;
    margin: 13px 0;
    padding: 10px 13px;
    color: #4f719c;
    border: 1px solid #d5e6ff;
    border-radius: 7px;
    background: #f4f8ff;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
}
.phase-notice.warning {
    color: #8b5b27;
    border-color: #f1d7b9;
    background: #fff9f1;
}
.phase-notice > i {
    color: var(--brand);
    font-size: 15px;
}
.phase-notice.warning > i {
    color: var(--warning);
}
.phase-notice strong,
.phase-notice small {
    display: block;
}
.phase-notice small {
    margin-top: 4px;
    font-size: 12px;
}
.phase-notice button {
    margin-left: auto;
}
.phase-metrics {
    margin-bottom: 13px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.phase-metric {
    min-height: 78px;
    padding: 13px 13px 11px 54px;
    position: relative;
}
.phase-metric > i {
    position: absolute;
    top: 14px;
    left: 13px;
    width: 31px;
    height: 31px;
    color: var(--brand);
    border-radius: 6px;
    background: var(--brand-soft);
    display: grid;
    place-items: center;
}
.phase-metric span,
.phase-metric strong,
.phase-metric small {
    display: block;
}
.phase-metric span {
    color: var(--text-muted);
    font-size: 12px;
}
.phase-metric strong {
    margin-top: 2px;
    font-size: 20px;
}
.phase-metric small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}
.phase-filter {
    min-height: 53px;
    margin-bottom: 13px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.phase-filter label {
    width: 250px;
    height: 32px;
    padding: 0 9px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.phase-filter input {
    min-width: 0;
    border: 0;
    outline: 0;
    flex: 1;
    font-size: 12px;
}
.phase-filter select {
    height: 32px;
    min-width: 122px;
    padding: 0 8px;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    font-size: 12px;
}
.phase-filter .button-group {
    margin-left: auto;
}
.flow-steps {
    padding: 18px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.flow-step {
    position: relative;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 9px;
}
.flow-step:not(:last-child)::after {
    position: absolute;
    top: 15px;
    right: 10px;
    left: 45px;
    height: 1px;
    background: var(--line);
    content: '';
}
.flow-step > i {
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: #fff;
    border-radius: 50%;
    background: var(--brand);
    display: grid;
    place-items: center;
}
.flow-step.pending {
    color: var(--text-muted);
}
.flow-step.pending > i {
    color: var(--text-muted);
    background: #eef0f3;
}
.flow-step strong,
.flow-step small {
    position: relative;
    z-index: 1;
    background: var(--surface);
    display: block;
}
.flow-step strong {
    font-size: 12px;
}
.flow-step small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}
/* Knowledge center P2 planning pages */
.knowledge-phase-main {
    padding-bottom: 45px;
}
.knowledge-phase-main .page-heading {
    margin-bottom: 0;
}
.knowledge-table-wrap {
    overflow-x: auto;
}
.knowledge-p2-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
}
.knowledge-p2-table th,
.knowledge-p2-table td {
    height: 43px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-light);
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}
.knowledge-p2-table th {
    height: 34px;
    color: var(--text-muted);
    background: #f7f9fc;
    font-weight: 600;
}
.knowledge-p2-table tbody tr:hover {
    background: #f8fbff;
}
/* Shared knowledge preview and search components */
.document-preview > header {
    min-height: 55px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.document-preview > header h2 {
    font-size: 15px;
}
.document-preview > header span {
    color: var(--text-muted);
    font-size: 12px;
}
.preview-layout {
    min-height: 600px;
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
}
.preview-layout nav {
    padding: 15px 10px;
    border-right: 1px solid var(--line-light);
    background: #fafbfc;
}
.preview-layout nav strong {
    display: block;
    margin: 0 8px 8px;
    color: var(--text-secondary);
    font-size: 12px;
}
.preview-layout nav button {
    width: 100%;
    min-height: 32px;
    padding: 0 8px;
    color: var(--text-secondary);
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
}
.preview-layout nav button.active,
.preview-layout nav button:hover {
    color: var(--brand);
    background: var(--brand-soft);
}
.preview-layout article {
    width: min(620px, calc(100% - 50px));
    min-height: 530px;
    margin: 22px auto;
    padding: 45px 54px;
    border: 1px solid #e9eaed;
    box-shadow: 0 2px 10px rgb(29 33 41 / 5%);
}
.preview-page {
    margin: 0 0 28px;
    color: var(--text-muted);
    text-align: right;
    font-size: 12px;
}
.preview-layout article h2 {
    margin: 0 0 20px;
    font-size: 18px;
}
.preview-layout article p:not(.preview-page) {
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 2;
    text-indent: 2em;
}
.preview-layout .preview-highlight {
    padding: 8px 10px;
    color: #315f97 !important;
    border-left: 3px solid #8fbdff;
    background: #f4f8ff;
    text-indent: 0 !important;
}
.permission-tip {
    margin: 12px;
    padding: 9px;
    color: #5077a6;
    border-radius: 5px;
    background: #f3f8ff;
    font-size: 12px;
    line-height: 1.5;
}
.permission-tip i {
    margin-right: 3px;
    color: var(--brand);
}

/* Shared presentation layer for the current business prototypes. */

html:has(body.v2-page) {
    min-width: 0;
    overflow-x: hidden;
}

body.v2-page {
    --v2-sidebar-width: 232px;
    --v2-topbar-height: 64px;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    background: #f4f6f8;
}

body.v2-page *,
body.v2-page *::before,
body.v2-page *::after {
    box-sizing: border-box;
}

body.v2-page [hidden] {
    display: none !important;
}

body.v2-page button,
body.v2-page input,
body.v2-page select,
body.v2-page textarea {
    min-width: 0;
    font: inherit;
}

body.v2-page button,
body.v2-page a,
body.v2-page input,
body.v2-page select,
body.v2-page textarea {
    outline-offset: 2px;
}

body.v2-page :focus-visible {
    outline: 2px solid rgb(0 82 217 / 42%);
}

body.v2-page img,
body.v2-page svg {
    max-width: 100%;
}

body.v2-page .v2-shell,
body.v2-page .prototype-shell,
body.v2-page .app-shell {
    min-width: 0;
    min-height: 100vh;
    padding: 0;
}

/* Application chrome */
.v2-topbar,
body.v2-page .topbar {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: 0;
    height: var(--v2-topbar-height);
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 97%);
    box-shadow: 0 1px 5px rgb(29 33 41 / 3%);
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(280px, 440px) minmax(250px, 1fr);
    align-items: center;
    gap: 20px;
}

.v2-brand,
body.v2-page .topbar > .brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 650;
    white-space: nowrap;
}

.v2-brand .brand-mark,
body.v2-page .topbar > .brand .brand-mark {
    flex: 0 0 auto;
}

.v2-brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-global-search,
body.v2-page .topbar > .global-search {
    position: relative;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fafbfc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-global-search:focus-within,
body.v2-page .topbar > .global-search:focus-within {
    border-color: #8bb8ff;
    background: var(--surface);
    box-shadow: 0 0 0 3px rgb(0 82 217 / 8%);
}

.v2-global-search input,
body.v2-page .topbar > .global-search input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
}

.v2-global-search kbd,
body.v2-page .topbar > .global-search kbd {
    padding: 2px 5px;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--surface);
    font-size: 11px;
    white-space: nowrap;
}

.v2-topbar-actions,
body.v2-page .topbar > .topbar-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.v2-profile {
    min-width: 0;
    height: 38px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.v2-profile:hover {
    background: #f5f7fa;
}

.v2-profile-name {
    overflow: hidden;
    max-width: 84px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: #fff;
    border-radius: 50%;
    background: #1677ff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
}

.mobile-nav-button {
    display: none;
}

.v2-sidebar,
body.v2-page .sidebar {
    position: fixed;
    z-index: 45;
    top: var(--v2-topbar-height);
    bottom: 0;
    left: 0;
    width: var(--v2-sidebar-width);
    min-width: 0;
    padding: 18px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

body.v2-page .sidebar.has-unified-sidebar {
    overflow: hidden;
}

body.v2-page .unified-sidebar-nav {
    min-height: 0;
}

.sidebar-scrim {
    position: fixed;
    z-index: 44;
    inset: var(--v2-topbar-height) 0 0;
    border: 0;
    background: rgb(16 24 40 / 48%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

main.v2-main,
body.v2-page main.main-content {
    width: auto;
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--v2-sidebar-width);
    padding: calc(var(--v2-topbar-height) + 24px) clamp(20px, 2.2vw, 34px) 48px;
}

.v2-content {
    width: min(100%, 1600px);
    min-width: 0;
    margin: 0 auto;
}

/* Page headings and layout */
.v2-breadcrumb {
    margin-bottom: 9px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
}

.v2-breadcrumb a:hover {
    color: var(--brand);
}

.v2-breadcrumb i {
    font-size: 9px;
}

.v2-page-heading,
.v2-page-header {
    min-width: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.v2-page-heading-main,
.v2-page-header-main {
    min-width: 0;
}

.v2-page-heading h1,
.v2-page-header h1 {
    overflow-wrap: anywhere;
    font-size: 26px;
    line-height: 1.35;
    letter-spacing: 0;
}

.v2-page-heading p,
.v2-page-header p {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.v2-heading-actions,
.v2-toolbar,
.v2-card-actions,
.v2-inline-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-heading-actions {
    justify-content: flex-end;
}

.v2-toolbar {
    min-width: 0;
    margin-bottom: 14px;
    justify-content: space-between;
}

.v2-toolbar-group {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-grid {
    min-width: 0;
    display: grid;
    gap: 16px;
}

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

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

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

.v2-grid-main-aside {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
}

.v2-stack {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cards and summary blocks */
.v2-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgb(29 33 41 / 4%);
}

.v2-card-header {
    min-width: 0;
    min-height: 54px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.v2-card-header h2,
.v2-card-header h3 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: 0;
}

.v2-card-header p,
.v2-card-subtitle {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.v2-card-body {
    min-width: 0;
    padding: 16px;
}

.v2-card-footer {
    min-height: 48px;
    padding: 10px 16px;
    border-top: 1px solid var(--line-light);
    background: #fbfcfd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.v2-card-compact .v2-card-header,
.v2-card-compact .v2-card-body {
    padding: 12px 14px;
}

.v2-section-title {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: 0;
}

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

.v2-caption {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.v2-divider {
    height: 1px;
    margin: 16px 0;
    border: 0;
    background: var(--line-light);
}

/* Buttons */
.v2-button {
    min-height: 34px;
    padding: 0 13px;
    color: #fff;
    border: 1px solid var(--brand);
    border-radius: 6px;
    background: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.v2-button:hover {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
    box-shadow: 0 3px 8px rgb(0 82 217 / 18%);
}

.v2-button-secondary {
    color: var(--text-secondary);
    border-color: var(--line);
    background: var(--surface);
}

.v2-button-secondary:hover {
    color: var(--brand);
    border-color: #9fc4ff;
    background: #f4f8ff;
    box-shadow: none;
}

.v2-button-ghost {
    color: var(--brand);
    border-color: transparent;
    background: transparent;
}

.v2-button-ghost:hover {
    border-color: transparent;
    background: var(--brand-soft);
    box-shadow: none;
}

.v2-button-danger {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.v2-button-danger:hover {
    border-color: #b93831;
    background: #b93831;
}

.v2-button-small {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
}

.v2-button:disabled,
.v2-button[aria-disabled='true'] {
    color: #a5aab2;
    border-color: #dfe2e7;
    background: #f2f3f5;
    box-shadow: none;
    cursor: not-allowed;
}

.v2-icon-button,
.v2-icon-btn {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.v2-icon-button:hover,
.v2-icon-btn:hover {
    color: var(--brand);
    border-color: #a8c9ff;
    background: var(--brand-soft);
}

.v2-text-button,
.v2-text-btn,
.v2-link {
    padding: 3px 0;
    color: var(--brand);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}

.v2-text-button:hover,
.v2-text-btn:hover,
.v2-link:hover {
    text-decoration: underline;
}

/* Forms and filters */
.v2-filter,
.v2-filters {
    min-width: 0;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgb(29 33 41 / 3%);
}

.v2-form-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    align-items: end;
    gap: 12px;
}

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

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

.v2-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.v2-field > span,
.v2-field > label,
.v2-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.v2-required::after {
    margin-left: 3px;
    color: var(--danger);
    content: '*';
}

.v2-input,
.v2-select,
.v2-textarea,
.v2-control,
.v2-field input,
.v2-field select,
.v2-field textarea {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    font-size: 13px;
}

.v2-field textarea,
.v2-textarea {
    min-height: 86px;
    resize: vertical;
    line-height: 1.55;
}

.v2-input:focus,
.v2-select:focus,
.v2-textarea:focus,
.v2-control:focus,
.v2-field input:focus,
.v2-field select:focus,
.v2-field textarea:focus {
    border-color: #78aaff;
    outline: 0;
    box-shadow: 0 0 0 3px rgb(0 82 217 / 8%);
}

.v2-field-hint,
.v2-field-error {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.v2-field-error {
    color: var(--danger);
}

.v2-form-actions {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.v2-checkbox,
.v2-radio {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 13px;
}

.v2-checkbox input,
.v2-radio input {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    accent-color: var(--brand);
}

.v2-search-field {
    position: relative;
}

.v2-search-field > i {
    position: absolute;
    top: 50%;
    left: 11px;
    color: var(--text-muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.v2-search-field input {
    padding-left: 32px;
}

/* Metrics */
.v2-metrics {
    min-width: 0;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.v2-metric {
    position: relative;
    min-width: 0;
    min-height: 104px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgb(29 33 41 / 4%);
    display: flex;
    flex-direction: column;
}

.v2-metric-label {
    color: var(--text-secondary);
    font-size: 12px;
}

.v2-metric-value {
    margin-top: 7px;
    overflow-wrap: anywhere;
    font-size: 25px;
    font-weight: 650;
    line-height: 1.15;
}

.v2-metric-value small {
    margin-left: 3px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
}

.v2-metric-note {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 12px;
}

.v2-trend-up {
    color: var(--success);
}

.v2-trend-down {
    color: var(--danger);
}

.v2-metric-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    color: var(--brand);
    border-radius: 6px;
    background: var(--brand-soft);
    display: grid!important;
    place-items: center;
}

/* Tables */
.v2-table-wrap {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.v2-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.v2-table th,
.v2-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line-light);
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
    line-height: 1.45;
}

.v2-table th {
    color: var(--text-secondary);
    background: #f7f9fb;
    font-weight: 600;
    white-space: nowrap;
}

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

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

.v2-table td {
    overflow-wrap: anywhere;
}

.v2-table .v2-nowrap {
    white-space: nowrap;
}

.v2-table-primary {
    color: var(--brand);
    font-weight: 500;
}

.v2-table-meta {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
}

.v2-table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.v2-selection-bar {
    min-height: 44px;
    margin-bottom: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    border: 1px solid #cfe1ff;
    border-radius: 6px;
    background: #f5f9ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

/* Tags and statuses */
.v2-tag,
.v2-badge,
.v2-status {
    max-width: 100%;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.35;
}

.v2-tag {
    color: #41658f;
    background: #eef5ff;
}

.v2-tag-neutral,
.v2-status-neutral {
    color: #68717e;
    background: #f0f2f5;
}

.v2-tag-success,
.v2-badge-success,
.v2-status-success {
    color: #087b55;
    background: var(--success-soft);
}

.v2-tag-warning,
.v2-badge-warning,
.v2-status-warning {
    color: #a95316;
    background: var(--warning-soft);
}

.v2-tag-danger,
.v2-badge-danger,
.v2-status-danger {
    color: #b93831;
    background: var(--danger-soft);
}

.v2-tag-info,
.v2-badge-blue,
.v2-status-info {
    color: #1559bd;
    background: var(--brand-soft);
}

.v2-status-dot::before {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentcolor;
    content: '';
}

/* Tabs */
.v2-tabs {
    min-width: 0;
    margin-bottom: 16px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 22px;
    scrollbar-width: none;
}

.v2-tabs::-webkit-scrollbar {
    display: none;
}

.v2-tab {
    position: relative;
    min-height: 42px;
    padding: 0 1px;
    color: var(--text-secondary);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.v2-tab:hover,
.v2-tab.active,
.v2-tab[aria-selected='true'] {
    color: var(--brand);
}

.v2-tab.active::after,
.v2-tab[aria-selected='true']::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--brand);
    content: '';
}

body.v2-page [data-tab-panel][hidden] {
    display: none !important;
}

/* Menus */
.v2-menu-wrap {
    position: relative;
    display: inline-flex;
}

.v2-menu {
    position: absolute;
    z-index: 60;
    top: calc(100% + 6px);
    right: 0;
    width: max-content;
    min-width: 150px;
    max-width: min(280px, calc(100vw - 24px));
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgb(29 33 41 / 14%);
}

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

.v2-menu a,
.v2-menu button {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    color: var(--text-secondary);
    border: 0;
    border-radius: 4px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
}

.v2-menu a:hover,
.v2-menu button:hover {
    color: var(--brand);
    background: var(--brand-soft);
}

/* Dialogs and drawers */
.v2-dialog,
.v2-dialog-backdrop,
.v2-modal,
.v2-drawer {
    position: fixed;
    z-index: 100;
    inset: 0;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 20px;
    overflow: auto;
    border: 0;
    background: rgb(16 24 40 / 48%);
}

.v2-dialog[hidden],
.v2-dialog-backdrop[hidden],
.v2-modal[hidden],
.v2-drawer[hidden] {
    display: none;
}

.v2-dialog,
.v2-dialog-backdrop,
.v2-modal {
    align-items: center;
    justify-content: center;
}

.v2-dialog.is-open,
.v2-dialog-backdrop.is-open,
.v2-modal.is-open {
    display: flex;
}

.v2-dialog-panel,
.v2-modal-panel {
    width: min(100%, 560px);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 20px 50px rgb(16 24 40 / 24%);
}

.v2-dialog-header,
.v2-dialog-footer {
    min-height: 58px;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.v2-dialog-header {
    border-bottom: 1px solid var(--line-light);
}

.v2-dialog-header h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: 0;
}

.v2-dialog-body {
    padding: 18px;
}

.v2-dialog-footer {
    border-top: 1px solid var(--line-light);
    justify-content: flex-end;
}

.v2-drawer.is-open {
    display: flex;
    justify-content: flex-end;
    padding: 0;
}

.v2-drawer-panel {
    width: min(440px, 100%);
    min-height: 100%;
    overflow: auto;
    background: var(--surface);
    box-shadow: -12px 0 30px rgb(16 24 40 / 18%);
}

.v2-dialog-backdrop > .v2-dialog,
.v2-dialog-backdrop > .v2-modal {
    position: relative;
    inset: auto;
    width: min(100%, 560px);
    height: auto;
    max-height: calc(100vh - 40px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 20px 50px rgb(16 24 40 / 24%);
    display: block;
}

body.v2-dialog-open {
    overflow: hidden;
}

/* Notices, empty states and restricted content */
.v2-notice {
    min-width: 0;
    padding: 11px 13px;
    color: #315f97;
    border: 1px solid #cfe1ff;
    border-radius: 6px;
    background: #f4f8ff;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12px;
    line-height: 1.55;
}

.v2-notice > i {
    margin-top: 2px;
    flex: 0 0 auto;
}

.v2-notice-warning {
    color: #8b4c17;
    border-color: #f8d7b6;
    background: #fff8f1;
}

.v2-notice-danger {
    color: #9f312c;
    border-color: #f2c6c3;
    background: #fff5f4;
}

.v2-notice-success {
    color: #087353;
    border-color: #bce5d5;
    background: #f1fbf7;
}

.v2-empty,
.v2-restricted {
    min-height: 210px;
    padding: 32px 20px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.v2-empty > i,
.v2-restricted > i {
    color: #9aa7b8;
    font-size: 30px;
}

.v2-empty h3,
.v2-restricted h3 {
    margin: 0;
    font-size: 15px;
    letter-spacing: 0;
}

.v2-empty p,
.v2-restricted p {
    max-width: 420px;
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.65;
}

.v2-restricted {
    min-height: 160px;
    border: 1px dashed #d4dae3;
    border-radius: 7px;
    background: #fafbfc;
}

/* Pagination and progress */
.v2-pagination {
    min-width: 0;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.v2-pagination-pages {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.v2-pagination button,
.v2-pagination a {
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    color: var(--text-secondary);
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.v2-pagination button:hover,
.v2-pagination a:hover,
.v2-pagination .active {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.v2-progress {
    height: 7px;
    overflow: hidden;
    border-radius: 4px;
    background: #edf0f3;
}

.v2-progress > span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
}

/* Detail views and simple chart surfaces */
.v2-description-list {
    min-width: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 22px;
}

.v2-description-item {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(76px, 0.4fr) minmax(0, 1fr);
    gap: 10px;
}

.v2-description-item dt {
    color: var(--text-muted);
    font-size: 12px;
}

.v2-description-item dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.55;
}

.v2-chart {
    position: relative;
    min-width: 0;
    min-height: 230px;
    overflow: hidden;
}

.v2-chart-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted);
    font-size: 11px;
}

.v2-legend-dot {
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-radius: 50%;
    background: currentcolor;
    display: inline-block;
}

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

.v2-list-item {
    min-width: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.v2-list-item-main {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Toast */
.v2-toast {
    position: fixed;
    z-index: 130;
    right: 24px;
    bottom: 24px;
    max-width: min(380px, calc(100vw - 32px));
    padding: 11px 14px;
    color: #fff;
    border-radius: 6px;
    background: rgb(29 33 41 / 94%);
    box-shadow: 0 8px 24px rgb(16 24 40 / 20%);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
    font-size: 13px;
    line-height: 1.5;
}

.v2-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Naming aliases used by economic operations pages. */
.v2-btn {
    min-height: 34px;
    padding: 0 13px;
    color: #fff;
    border: 1px solid var(--brand);
    border-radius: 6px;
    background: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
}

.v2-btn:hover {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
}

.v2-button-primary,
.v2-btn-primary {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.v2-btn-secondary,
.v2-btn.v2-button-secondary {
    color: var(--text-secondary);
    border-color: var(--line);
    background: var(--surface);
}

.v2-btn-ghost,
.v2-btn.v2-button-ghost {
    color: var(--brand);
    border-color: transparent;
    background: transparent;
}

.v2-btn-danger,
.v2-btn.v2-button-danger {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.v2-button-icon-only,
.v2-btn-icon-only {
    width: 36px;
    height: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    padding: 0;
}

.v2-button-compact,
.v2-btn-compact {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
}

.v2-tab-panel[hidden] {
    display: none !important;
}

/* Tablet */
@media (max-width: 1180px) {
    body.v2-page {
        --v2-sidebar-width: 216px;
    }

    .v2-topbar,
    body.v2-page .topbar {
        padding: 0 18px;
        grid-template-columns: minmax(210px, 1fr) minmax(240px, 340px) minmax(180px, 1fr);
        gap: 14px;
    }

    main.v2-main,
    body.v2-page main.main-content {
        padding-right: 20px;
        padding-left: 20px;
    }

    .v2-grid-4,
    .v2-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .v2-grid-main-aside {
        grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
    }
}

/* Mobile */
@media (max-width: 767px) {
    body.v2-page {
        --v2-sidebar-width: min(286px, calc(100vw - 48px));
        --v2-topbar-height: 56px;
    }

    .v2-topbar,
    body.v2-page .topbar {
        height: var(--v2-topbar-height);
        padding: 0 12px;
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .mobile-nav-button {
        width: 36px;
        height: 36px;
        padding: 0;
        color: var(--text-secondary);
        border: 0;
        border-radius: 6px;
        background: transparent;
        display: grid;
        place-items: center;
        cursor: pointer;
    }

    .mobile-nav-button:hover {
        color: var(--brand);
        background: var(--brand-soft);
    }

    .v2-brand,
    body.v2-page .topbar > .brand {
        min-width: 0;
        font-size: 14px;
    }

    .v2-brand .brand-mark,
    body.v2-page .topbar > .brand .brand-mark {
        display: none;
    }

    .v2-brand-name {
        display: block;
    }

    .v2-global-search,
    body.v2-page .topbar > .global-search {
        display: none;
    }

    .v2-topbar-actions,
    body.v2-page .topbar > .topbar-actions {
        gap: 3px;
    }

    .v2-topbar-actions > :not(.v2-profile, .v2-icon-button),
    body.v2-page
        .topbar
        > .topbar-actions
        > :not(.profile-button, .v2-profile, .icon-button, .v2-icon-button) {
        display: none;
    }

    .v2-profile {
        padding: 0 2px;
    }

    .v2-profile-name,
    .v2-profile > i {
        display: none;
    }

    .v2-sidebar,
    body.v2-page .sidebar {
        top: var(--v2-topbar-height);
        width: var(--v2-sidebar-width);
        max-width: calc(100vw - 48px);
        transform: translateX(-100%);
    }

    body.v2-nav-open .v2-sidebar,
    body.v2-nav-open .sidebar {
        box-shadow: 10px 0 28px rgb(16 24 40 / 22%);
        transform: translateX(0);
    }

    body.v2-nav-open .sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    main.v2-main,
    body.v2-page main.main-content {
        min-height: 100vh;
        margin-left: 0;
        padding: calc(var(--v2-topbar-height) + 16px) 12px 36px;
    }

    .v2-content {
        width: 100%;
    }

    .v2-page-heading,
    .v2-page-header {
        margin-bottom: 16px;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .v2-page-heading h1,
    .v2-page-header h1 {
        font-size: 22px;
    }

    .v2-heading-actions {
        justify-content: flex-start;
    }

    .v2-heading-actions .v2-button {
        flex: 1 1 auto;
    }

    .v2-grid-2,
    .v2-grid-3,
    .v2-grid-4,
    .v2-grid-main-aside,
    .v2-form-grid,
    .v2-form-grid-2,
    .v2-form-grid-3,
    .v2-metrics {
        grid-template-columns: minmax(0, 1fr);
    }

    .v2-metrics {
        gap: 10px;
    }

    .v2-metric {
        min-height: 94px;
        padding: 14px;
    }

    .v2-metric-value {
        font-size: 22px;
    }

    .v2-card-header,
    .v2-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .v2-card-actions,
    .v2-card-footer .v2-inline-actions {
        width: 100%;
    }

    .v2-filter,
    .v2-filters,
    .v2-card-body {
        padding: 14px;
    }

    .v2-form-actions {
        justify-content: stretch;
    }

    .v2-form-actions .v2-button {
        flex: 1 1 120px;
    }

    .v2-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .v2-toolbar-group {
        width: 100%;
    }

    .v2-selection-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .v2-table-wrap {
        overflow: visible;
    }

    .v2-table.v2-table-responsive,
    .v2-table.v2-table-responsive tbody,
    .v2-table.v2-table-responsive tr,
    .v2-table.v2-table-responsive td {
        width: 100%;
        display: block;
    }

    .v2-table.v2-table-responsive {
        border-collapse: separate;
    }

    .v2-table.v2-table-responsive thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .v2-table.v2-table-responsive tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .v2-table.v2-table-responsive tr {
        padding: 7px 12px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: var(--surface);
    }

    .v2-table.v2-table-responsive td {
        min-width: 0;
        padding: 8px 0;
        border-bottom: 1px solid var(--line-light);
        display: grid;
        grid-template-columns: minmax(88px, 36%) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        text-align: right;
        white-space: normal;
    }

    .v2-table.v2-table-responsive td::before {
        color: var(--text-muted);
        content: attr(data-label);
        text-align: left;
        font-weight: 500;
    }

    .v2-table.v2-table-responsive td:last-child {
        border-bottom: 0;
    }

    .v2-table.v2-table-responsive .v2-table-actions {
        justify-content: flex-end;
    }

    .v2-description-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .v2-description-item {
        grid-template-columns: minmax(72px, 32%) minmax(0, 1fr);
    }

    .v2-tabs {
        gap: 18px;
    }

    .v2-dialog,
    .v2-dialog-backdrop,
    .v2-modal,
    .v2-drawer {
        padding: 12px;
    }

    .v2-dialog-panel,
    .v2-modal-panel {
        max-height: calc(100vh - 24px);
    }

    .v2-drawer.is-open {
        padding: 0;
    }

    .v2-dialog-footer .v2-button {
        flex: 1 1 auto;
    }

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

    .v2-pagination-pages {
        max-width: 100%;
    }

    .v2-toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        max-width: none;
    }

    body.v2-page .prototype-navigator {
        right: 12px;
        bottom: 12px;
    }

    body.v2-page .prototype-nav-panel {
        position: fixed;
        top: 68px;
        right: 12px;
        bottom: 66px;
        left: 12px;
        width: auto;
    }

    body.v2-page .prototype-nav-list {
        max-height: calc(100vh - 190px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.v2-page *,
    body.v2-page *::before,
    body.v2-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Cross-business administration extensions */
.admin-extension-panel {
    margin-top: 14px;
    overflow: hidden;
}
.admin-extension-panel > .panel-header {
    min-height: 58px;
}
.admin-extension-panel > .panel-header p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}
.admin-extension-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line-light);
}
.admin-extension-slice {
    min-width: 0;
    padding: 16px;
    border-right: 1px solid var(--line-light);
}
.admin-extension-slice:last-child {
    border-right: 0;
}
.admin-extension-slice > header {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.admin-extension-slice > header > span:first-child {
    min-width: 0;
}
.admin-extension-slice h3 {
    font-size: 13px;
}
.admin-extension-slice header p {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}
.admin-extension-list {
    list-style: none;
}
.admin-extension-list li {
    min-height: 38px;
    padding: 8px 0;
    border-top: 1px solid var(--line-light);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}
.admin-extension-list li:first-child {
    border-top: 0;
}
.admin-extension-list li > span:first-child {
    min-width: 0;
}
.admin-extension-list strong,
.admin-extension-list small {
    display: block;
}
.admin-extension-list small {
    margin-top: 3px;
    color: var(--text-muted);
    line-height: 1.45;
}
.admin-extension-list b {
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 600;
}
.admin-extension-table {
    border-top: 1px solid var(--line-light);
    overflow-x: auto;
}
.admin-extension-table .admin-data-table th,
.admin-extension-table .admin-data-table td {
    height: 44px;
}
.admin-extension-footer {
    min-height: 54px;
    padding: 10px 16px;
    border-top: 1px solid var(--line-light);
    background: #fafbfd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.admin-extension-footer > span {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}
.admin-budget-track {
    width: 100%;
    height: 7px;
    margin-top: 8px;
    border-radius: 4px;
    background: #edf0f4;
    overflow: hidden;
}
.admin-budget-track > i {
    height: 100%;
    border-radius: inherit;
    background: var(--brand);
    display: block;
}
.admin-budget-track > i.warning {
    background: var(--warning);
}
.admin-budget-track > i.danger {
    background: var(--danger);
}

@media (max-width: 980px) {
    .admin-extension-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .admin-extension-slice {
        border-right: 0;
        border-bottom: 1px solid var(--line-light);
    }
    .admin-extension-slice:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 620px) {
    .admin-extension-panel > .panel-header,
    .admin-extension-footer {
        align-items: flex-start;
        flex-direction: column;
    }
    .admin-extension-footer .button-group,
    .admin-extension-footer .button {
        width: 100%;
    }
    .admin-extension-footer .button-group .button {
        flex: 1 1 auto;
    }
}

/* Responsive bridge for the established administration pages. */
@media (max-width: 1180px) {
    body.v2-page main.main-content > *,
    body.v2-page .panel,
    body.v2-page .secondary-column {
        min-width: 0;
        max-width: 100%;
    }
    body.v2-page .admin-overview-grid,
    body.v2-page .admin-management-grid,
    body.v2-page .organization-layout,
    body.v2-page .role-layout,
    body.v2-page .permission-layout,
    body.v2-page .project-authorization-grid,
    body.v2-page .security-layout,
    body.v2-page .audit-layout,
    body.v2-page .dictionary-layout,
    body.v2-page .tag-layout,
    body.v2-page .metadata-layout,
    body.v2-page .provider-layout,
    body.v2-page .prompt-layout,
    body.v2-page .metrics-charts,
    body.v2-page .metrics-bottom,
    body.v2-page .notification-layout,
    body.v2-page .parameter-layout,
    body.v2-page .integration-layout,
    body.v2-page .external-auth-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    body.v2-page .admin-filter .filter-grid,
    body.v2-page .project-auth-filter .filter-grid,
    body.v2-page .audit-filter .filter-grid,
    body.v2-page .tag-filter .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    body.v2-page .ai-filter {
        flex-wrap: wrap;
    }
    body.v2-page .admin-management-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.v2-page .wide-table,
    body.v2-page .admin-extension-table,
    body.v2-page .send-records {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }
}

@media (max-width: 767px) {
    body.v2-page .page-heading {
        margin-bottom: 16px;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }
    body.v2-page .page-heading > div {
        min-width: 0;
    }
    body.v2-page .page-heading h1 {
        font-size: 22px;
        overflow-wrap: anywhere;
    }
    body.v2-page .page-heading .button-group,
    body.v2-page .page-heading > .button,
    body.v2-page .page-heading > button {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    body.v2-page .admin-filter .filter-grid,
    body.v2-page .project-auth-filter .filter-grid,
    body.v2-page .audit-filter .filter-grid,
    body.v2-page .tag-filter .filter-grid,
    body.v2-page .admin-module-grid,
    body.v2-page .role-permission-grid,
    body.v2-page .choice-row,
    body.v2-page .knowledge-scope,
    body.v2-page .classification-policies,
    body.v2-page .security-config-sections,
    body.v2-page .security-number-row,
    body.v2-page .metadata-editor-body,
    body.v2-page .prompt-editor-grid,
    body.v2-page .parameter-form-grid,
    body.v2-page .parameter-overview {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    body.v2-page .admin-domain-tabs,
    body.v2-page .ai-admin-tabs,
    body.v2-page .admin-config-tabs {
        max-width: 100%;
        overflow-x: auto;
        gap: 18px;
        scrollbar-width: thin;
    }
    body.v2-page .admin-domain-tabs a,
    body.v2-page .ai-admin-tabs a,
    body.v2-page .admin-config-tabs a,
    body.v2-page .admin-config-tabs button {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    body.v2-page .ai-filter {
        align-items: stretch;
        flex-direction: column;
    }
    body.v2-page .ai-filter > * {
        width: 100%;
    }
    body.v2-page .admin-modal-body {
        grid-template-columns: minmax(0, 1fr);
    }
    body.v2-page .admin-modal-body > * {
        grid-column: 1 !important;
    }
}
