/* AMP 专属视觉令牌与基础交互。所有选择器均以 amp- 前缀命名，避免影响 ORP。 */
:root {
    --amp-ink: #16382e;
    --amp-ink-soft: #31594d;
    --amp-muted: #6b8178;
    --amp-primary: #17785b;
    --amp-primary-strong: #0f6048;
    --amp-primary-soft: #e8f4ee;
    --amp-teal: #2b9a88;
    --amp-sand: #e6b85f;
    --amp-danger: #be4e3a;
    --amp-warning: #a77918;
    --amp-line: #d8e6de;
    --amp-line-soft: #edf3ef;
    --amp-surface: #ffffff;
    --amp-surface-muted: #f4f8f5;
    --amp-radius-sm: 8px;
    --amp-radius-md: 14px;
    --amp-radius-lg: 20px;
    --amp-shadow-sm: 0 4px 14px rgba(22, 56, 46, .06);
    --amp-shadow-md: 0 14px 34px rgba(22, 56, 46, .10);
    --amp-focus: 0 0 0 3px rgba(43, 154, 136, .28);
}

.amp-shell,
.amp-module-shell {
    color: var(--amp-ink);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.amp-shell *,
.amp-module-shell * {
    box-sizing: border-box;
}

.amp-shell :is(a, button, input, select, textarea, [tabindex]):focus-visible,
.amp-module-shell :is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: none;
    box-shadow: var(--amp-focus);
}

.amp-action-button,
.amp-link-button,
.amp-icon-button,
.amp-row-actions button,
.amp-pagination button {
    min-height: 36px;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.amp-action-button:not(:disabled):hover,
.amp-row-actions button:not(:disabled):hover,
.amp-pagination button:not(:disabled):hover {
    transform: translateY(-1px);
}

.amp-action-button.primary {
    background: var(--amp-primary);
}

.amp-action-button.primary:hover:not(:disabled) {
    background: var(--amp-primary-strong);
    box-shadow: var(--amp-shadow-sm);
}

.amp-action-button.secondary,
.amp-icon-button {
    background: var(--amp-primary-soft);
    color: var(--amp-primary-strong);
}

.amp-status {
    white-space: nowrap;
    font-weight: 600;
}

.amp-table-scroll {
    scrollbar-color: #b4cfc1 transparent;
    scrollbar-width: thin;
}

.amp-table-scroll::-webkit-scrollbar {
    height: 8px;
}

.amp-table-scroll::-webkit-scrollbar-thumb {
    background: #b4cfc1;
    border-radius: 999px;
}

.amp-inline-message,
.amp-module-message {
    line-height: 1.55;
}

.amp-inline-message[role="alert"],
.amp-module-message[role="alert"] {
    background: #fff4e8;
    border-color: #f0d1a9;
    color: #80530e;
}

.amp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .amp-shell *,
    .amp-module-shell * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 640px) {
    .amp-action-button,
    .amp-row-actions button,
    .amp-pagination button {
        min-height: 42px;
    }
}

.amp-context-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: .75rem 0;
}

.amp-context-guide article {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .75rem;
    border: 1px solid var(--amp-line);
    border-radius: var(--amp-radius-md);
    background: #fbfdfb;
}

.amp-context-guide article > i {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--amp-primary-soft);
    color: var(--amp-primary);
}

.amp-context-guide article div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .2rem;
}

.amp-context-guide strong {
    font-size: .78rem;
}

.amp-context-guide small {
    color: var(--amp-muted);
    font-size: .66rem;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .amp-context-guide {
        grid-template-columns: 1fr;
    }
}

.amp-notification-board {
    display: grid;
    gap: .8rem;
    margin: .75rem 0;
    padding: .8rem;
    border: 1px solid var(--amp-line);
    border-radius: var(--amp-radius-md);
    background: #fbfdfb;
}

.amp-channel-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    color: var(--amp-primary);
    font-size: .72rem;
}

.amp-channel-flow span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .45rem .65rem;
    border-radius: 999px;
    background: var(--amp-primary-soft);
    font-weight: 600;
}

.amp-channel-flow > i {
    color: var(--amp-muted);
    font-size: .65rem;
}

.amp-delivery-timeline {
    display: grid;
    gap: .45rem;
    padding-top: .7rem;
    border-top: 1px solid var(--amp-line);
}

.amp-delivery-timeline > strong {
    font-size: .78rem;
}

.amp-delivery-timeline article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(120px, 1fr);
    gap: .6rem;
    align-items: center;
    padding: .55rem .65rem;
    border-radius: var(--amp-radius-sm);
    background: var(--amp-surface-muted);
}

.amp-delivery-timeline article div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .18rem;
}

.amp-delivery-timeline article small,
.amp-delivery-timeline article em {
    color: var(--amp-muted);
    font-size: .66rem;
    font-style: normal;
}

@media (max-width: 640px) {
    .amp-channel-flow {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: .2rem;
    }

    .amp-delivery-timeline article {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .amp-delivery-timeline article em {
        grid-column: 2;
    }
}

.amp-template-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: .75rem 0;
}

.amp-template-guide article {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .8rem;
    border: 1px solid var(--amp-line);
    border-radius: var(--amp-radius-md);
    background: #fbfdfb;
}

.amp-template-guide article > i {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: var(--amp-primary-soft);
    color: var(--amp-primary);
}

.amp-template-guide article div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .25rem;
}

.amp-template-guide strong {
    font-size: .8rem;
}

.amp-template-guide small {
    color: var(--amp-muted);
    font-size: .68rem;
    line-height: 1.45;
}

@media (max-width: 720px) {
    .amp-template-guide {
        grid-template-columns: 1fr;
    }
}

.amp-production-board {
    display: grid;
    gap: .75rem;
    margin: .75rem 0;
    padding: .8rem;
    border: 1px solid var(--amp-line);
    border-radius: var(--amp-radius-md);
    background: linear-gradient(135deg, #f7fbf8, #eff7f2);
}

.amp-production-stages {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .4rem;
}

.amp-production-stages span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    min-height: 34px;
    border-radius: 999px;
    background: #e5f1ea;
    color: var(--amp-ink-soft);
    font-size: .7rem;
}

.amp-production-stages span.active {
    background: var(--amp-primary);
    color: #fff;
}

.amp-production-stages i {
    font-size: .6rem;
}

.amp-production-agenda {
    display: grid;
    gap: .5rem;
    padding-top: .7rem;
    border-top: 1px solid var(--amp-line);
}

.amp-production-agenda > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
}

.amp-production-agenda > div:first-child small,
.amp-agenda-empty {
    color: var(--amp-muted);
    font-size: .68rem;
}

.amp-production-agenda article {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    gap: .6rem;
    align-items: center;
    padding: .55rem .65rem;
    border-radius: var(--amp-radius-sm);
    background: #fff;
}

.amp-production-agenda time,
.amp-production-agenda article > span {
    color: var(--amp-primary);
    font-size: .68rem;
    font-weight: 700;
}

.amp-production-agenda article div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .2rem;
}

.amp-production-agenda article small {
    color: var(--amp-muted);
    font-size: .66rem;
}

@media (max-width: 640px) {
    .amp-production-stages {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .amp-production-agenda article {
        grid-template-columns: 4.5rem minmax(0, 1fr);
    }

    .amp-production-agenda article > span {
        grid-column: 2;
    }
}

/* 共享模块壳层的轻量增强，使用双类选择器覆盖旧版隔离样式。 */
.amp-module-shell.amp-module-shell {
    max-width: 1680px;
    margin: 0 auto;
}

.amp-module-shell .amp-module-hero {
    padding: 1.35rem 1.65rem;
    border-radius: var(--amp-radius-lg);
}

.amp-module-shell .amp-module-nav {
    border-bottom: 1px solid var(--amp-line);
    gap: .3rem;
    padding: .55rem .2rem .35rem;
    scrollbar-width: thin;
}

.amp-module-shell .amp-module-nav-item {
    min-height: 38px;
}

.amp-module-shell .amp-module-nav-item.active {
    font-weight: 700;
}

.amp-module-shell .amp-module-status {
    min-width: 132px;
}

@media (max-width: 520px) {
    .amp-module-shell .amp-module-hero {
        padding: 1.1rem;
    }
}

/* 驾驶舱信息层级 */
.amp-shell .amp-hero {
    position: relative;
    overflow: hidden;
}

.amp-shell .amp-readiness strong {
    font-size: 1.05rem;
    letter-spacing: .04em;
}

.amp-shell .amp-kpi {
    position: relative;
    min-height: 122px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.amp-shell .amp-kpi > strong {
    font-variant-numeric: tabular-nums;
}

.amp-shell .amp-kpi:hover {
    transform: translateY(-2px);
    box-shadow: var(--amp-shadow-md);
}

.amp-shell .amp-panel-heading small {
    color: var(--amp-muted);
    white-space: nowrap;
}

.amp-shell .amp-task,
.amp-shell .amp-alert-row {
    min-height: 58px;
}

.amp-shell .amp-module {
    min-height: 118px;
    align-content: start;
}

.amp-shell .amp-module small {
    margin-top: .35rem;
}

.amp-shell .amp-thread-flow > div {
    border: 1px solid transparent;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.amp-shell .amp-thread-flow > div:hover {
    border-color: #b8d9c8;
    background: #eaf5ef;
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .amp-shell .amp-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 列表筛选和窄屏记录卡片 */
.amp-module-shell .amp-filter-bar,
.amp-module-shell .amp-filter-summary {
    background: var(--amp-surface-muted);
}

.amp-module-shell .amp-filter-bar {
    border-radius: var(--amp-radius-sm);
    padding: .75rem;
}

.amp-module-shell .amp-filter-bar input,
.amp-module-shell .amp-filter-bar select {
    min-height: 40px;
}

.amp-module-shell .amp-filter-bar .ghost {
    background: transparent;
    border: 1px solid var(--amp-line);
    color: var(--amp-ink-soft);
}

.amp-module-shell .amp-filter-summary {
    color: var(--amp-muted);
    font-size: .75rem;
    padding: .5rem .7rem;
    border-bottom: 1px solid var(--amp-line-soft);
}

.amp-module-shell .amp-admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--amp-surface-muted);
}

.amp-module-shell .amp-admin-table tbody tr:hover {
    background: #f8fbf9;
}

@media (max-width: 720px) {
    .amp-module-shell .amp-admin-table,
    .amp-module-shell .amp-admin-table thead,
    .amp-module-shell .amp-admin-table tbody,
    .amp-module-shell .amp-admin-table tr,
    .amp-module-shell .amp-admin-table td {
        display: block;
        width: 100%;
    }

    .amp-module-shell .amp-admin-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .amp-module-shell .amp-admin-table tr {
        margin: .65rem 0;
        padding: .55rem .7rem;
        border: 1px solid var(--amp-line);
        border-radius: var(--amp-radius-md);
        background: var(--amp-surface);
        box-shadow: var(--amp-shadow-sm);
    }

    .amp-module-shell .amp-admin-table td {
        display: grid;
        grid-template-columns: 7.2rem minmax(0, 1fr);
        gap: .55rem;
        align-items: center;
        padding: .55rem 0;
        border-bottom: 1px solid var(--amp-line-soft);
    }

    .amp-module-shell .amp-admin-table td:last-child {
        border-bottom: 0;
    }

    .amp-module-shell .amp-admin-table td::before {
        content: attr(data-label);
        color: var(--amp-muted);
        font-size: .72rem;
        font-weight: 600;
    }

    .amp-module-shell .amp-admin-table td[data-label="操作"] {
        display: block;
        padding-top: .7rem;
    }

    .amp-module-shell .amp-admin-table td[data-label="操作"]::before {
        display: block;
        margin-bottom: .45rem;
    }

    .amp-module-shell .amp-row-actions button {
        flex: 1 1 auto;
    }
}

/* 详情与编辑抽屉 */
.amp-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    justify-content: flex-end;
    background: rgba(12, 34, 27, .38);
    animation: amp-fade-in .16s ease-out;
}

.amp-drawer {
    width: min(640px, 92vw);
    height: 100%;
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--amp-surface);
    box-shadow: -14px 0 34px rgba(22, 56, 46, .16);
    animation: amp-slide-in .2s ease-out;
}

.amp-drawer .amp-panel-heading {
    position: sticky;
    top: -1.25rem;
    z-index: 1;
    padding: .2rem 0 .9rem;
    background: var(--amp-surface);
}

.amp-drawer .amp-detail-grid,
.amp-drawer .amp-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amp-drawer-detail {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--amp-line-soft);
}

.amp-drawer-detail > span {
    color: var(--amp-muted);
    font-size: .75rem;
    font-weight: 600;
}

.amp-drawer-detail p {
    line-height: 1.7;
}

@keyframes amp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes amp-slide-in {
    from { transform: translateX(24px); }
    to { transform: translateX(0); }
}

@media (max-width: 640px) {
    .amp-drawer {
        width: 100%;
        padding: 1rem;
    }

    .amp-drawer .amp-panel-heading {
        top: -1rem;
    }

    .amp-drawer .amp-detail-grid,
    .amp-drawer .amp-form-grid {
        grid-template-columns: 1fr;
    }
}

/* 第 60 轮：小屏可读性、触控尺寸和高对比度支持 */
.amp-shell,
.amp-module-shell {
    max-width: 100%;
    overflow-x: clip;
}

.amp-shell a,
.amp-module-shell a {
    overflow-wrap: anywhere;
}

.amp-shell .amp-hero-tags span {
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 390px) {
    .amp-shell,
    .amp-module-shell {
        font-size: .92rem;
    }

    .amp-shell .amp-hero,
    .amp-module-shell .amp-module-hero {
        padding: 1rem;
        border-radius: var(--amp-radius-md);
    }

    .amp-shell .amp-hero h1,
    .amp-module-shell .amp-module-hero h1 {
        font-size: clamp(1.35rem, 8vw, 1.8rem);
    }

    .amp-shell .amp-panel,
    .amp-module-shell .amp-panel,
    .amp-module-shell .amp-workspace-card {
        padding: .85rem;
    }

    .amp-shell .amp-hero-tags,
    .amp-module-shell .amp-module-meta {
        gap: .35rem;
    }
}

@media (forced-colors: active) {
    .amp-shell,
    .amp-module-shell {
        forced-color-adjust: none;
    }

    .amp-shell .amp-panel,
    .amp-module-shell .amp-panel,
    .amp-module-shell .amp-admin-table,
    .amp-module-shell .amp-drawer {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
    }

    .amp-shell a,
    .amp-module-shell a,
    .amp-action-button,
    .amp-row-actions button,
    .amp-pagination button {
        color: LinkText;
        border: 1px solid ButtonText;
    }

    .amp-status,
    .amp-alert-level {
        border: 1px solid CanvasText;
    }
}

/* 第 61 轮：编辑表单分段 */
.amp-editor-drawer .amp-form-sections {
    display: grid;
    gap: 1rem;
}

.amp-editor-drawer .amp-form-section {
    padding: 1rem;
    border: 1px solid var(--amp-line-soft);
    border-radius: var(--amp-radius-md);
    background: var(--amp-surface-muted);
}

.amp-editor-drawer .amp-form-section-heading {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin-bottom: .8rem;
}

.amp-editor-drawer .amp-form-section-heading > i {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--amp-primary-soft);
    color: var(--amp-primary);
}

.amp-editor-drawer .amp-form-section-heading strong,
.amp-editor-drawer .amp-form-section-heading small {
    display: block;
}

.amp-editor-drawer .amp-form-section-heading strong {
    color: var(--amp-ink);
    font-size: .86rem;
}

.amp-editor-drawer .amp-form-section-heading small,
.amp-editor-drawer .amp-form-grid label small {
    margin-top: .18rem;
    color: var(--amp-muted);
    font-size: .68rem;
    line-height: 1.45;
}

.amp-editor-drawer .amp-form-grid label.required > :first-child::after {
    content: " *";
    color: var(--amp-danger);
}

.amp-editor-drawer .amp-field-label {
    display: block;
    min-height: 1.2em;
    color: var(--amp-ink-soft);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.35;
}

.amp-editor-drawer .amp-form-grid label.required .amp-field-label::after {
    content: " *";
    color: var(--amp-danger);
}

.amp-editor-drawer .amp-form-grid input,
.amp-editor-drawer .amp-form-grid select,
.amp-editor-drawer .amp-form-grid textarea {
    width: 100%;
    min-width: 0;
    font: inherit;
    font-size: .85rem;
    line-height: 1.4;
    outline: none;
}

.amp-editor-drawer .amp-form-grid textarea {
    resize: vertical;
    min-height: 104px;
}

.amp-partner-editor-drawer .amp-form-section:first-child {
    border-color: #c7e1d2;
    background: linear-gradient(135deg, #f4fbf6, #fbfdfb);
}

.amp-partner-editor-drawer .amp-form-section-heading > i {
    background: #dff2e6;
}

.amp-partner-editor-drawer input[type="tel"] {
    letter-spacing: .03em;
}

.amp-editor-drawer .amp-form-footer {
    align-items: center;
}

.amp-save-feedback {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    min-width: 0;
    color: var(--amp-primary);
}

.amp-save-feedback > i {
    margin-top: .16rem;
}

.amp-save-feedback strong,
.amp-save-feedback small {
    display: block;
}

.amp-save-feedback strong {
    font-size: .76rem;
}

.amp-save-feedback small {
    max-width: 420px;
    margin-top: .2rem;
    color: var(--amp-muted);
    font-size: .68rem;
    line-height: 1.45;
}

.amp-save-feedback.is-saving {
    color: var(--amp-warning);
}

.amp-save-button {
    min-width: 112px;
    flex: 0 0 auto;
}

.amp-form-validation {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .2rem .55rem;
    margin-bottom: 1rem;
    padding: .7rem .8rem;
    border: 1px solid #efc8bd;
    border-radius: var(--amp-radius-sm);
    background: #fff5f1;
    color: #8f3b2b;
    font-size: .76rem;
}

.amp-form-validation > i {
    grid-row: span 2;
    margin-top: .12rem;
}

.amp-form-validation strong,
.amp-form-validation span {
    display: block;
}

.amp-form-validation span {
    line-height: 1.45;
}

.amp-editor-drawer .amp-form-grid label.has-error .amp-field-label {
    color: var(--amp-danger);
}

.amp-editor-drawer .amp-form-grid label.has-error input,
.amp-editor-drawer .amp-form-grid label.has-error select,
.amp-editor-drawer .amp-form-grid label.has-error textarea {
    border-color: var(--amp-danger);
    background: #fffaf8;
}

/* 第 66 轮：列表密度与状态层次 */
.amp-module-shell .amp-admin-table tbody tr {
    transition: background-color .16s ease;
}

.amp-module-shell .amp-admin-table tbody tr:hover {
    background: #f8fbf9;
}

.amp-module-shell .amp-admin-table td {
    line-height: 1.45;
}

.amp-module-shell .amp-admin-table td:first-child strong {
    color: var(--amp-ink);
    font-size: .82rem;
}

.amp-module-shell .amp-admin-table td small {
    overflow-wrap: anywhere;
}

.amp-module-shell .amp-status {
    min-width: 3.8em;
    text-align: center;
}

.amp-module-shell .amp-status.warning {
    background: #fff1cd;
    color: #806116;
}

.amp-module-shell .amp-status.danger {
    background: #fbe2dc;
    color: #9c3d2b;
}

.amp-module-shell .amp-status.info {
    background: #e5f0fb;
    color: #2b5d88;
}

.amp-module-shell .amp-status.neutral {
    background: #eef2f0;
    color: var(--amp-muted);
}

/* 第 71 轮：视觉层次与对比度 */
.amp-module-shell {
    line-height: 1.5;
}

.amp-module-shell .amp-crud-panel {
    border-color: #cfe0d6;
    box-shadow: 0 12px 30px rgba(22, 56, 46, .07);
}

.amp-module-shell .amp-crud-panel > .amp-panel-heading {
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--amp-line-soft);
}

.amp-module-shell .amp-crud-panel > .amp-panel-heading h2 {
    color: var(--amp-ink);
    letter-spacing: -.01em;
}

.amp-module-shell .amp-filter-bar {
    margin: .85rem 0;
    padding: .8rem;
    border: 1px solid var(--amp-line-soft);
    border-radius: var(--amp-radius-md);
    background: #f8fbf9;
}

.amp-module-shell .amp-filter-bar label {
    color: var(--amp-ink-soft);
    font-weight: 600;
}

.amp-module-shell .amp-filter-bar input:focus,
.amp-module-shell .amp-filter-bar select:focus {
    border-color: var(--amp-teal);
    box-shadow: var(--amp-focus);
}

@media (prefers-contrast: more) {
    .amp-module-shell {
        --amp-muted: #4d6259;
        --amp-line: #a6bdb1;
        --amp-line-soft: #c2d3ca;
    }

    .amp-module-shell .amp-panel,
    .amp-module-shell .amp-crud-panel,
    .amp-module-shell .amp-filter-bar,
    .amp-module-shell .amp-form-section {
        border-width: 2px;
    }

    .amp-module-shell .amp-action-button,
    .amp-module-shell .amp-row-actions button {
        font-weight: 700;
    }
}

/* 第 69 轮：加载与空状态 */
.amp-module-shell .amp-loading-state {
    display: grid;
    justify-items: center;
    gap: .38rem;
    padding: 2.6rem 1rem;
    color: var(--amp-primary);
    text-align: center;
}

.amp-module-shell .amp-loading-state > i {
    font-size: 1.5rem;
}

.amp-module-shell .amp-loading-state strong {
    color: var(--amp-ink);
    font-size: .9rem;
}

.amp-module-shell .amp-loading-state span {
    color: var(--amp-muted);
    font-size: .74rem;
}

.amp-loading-lines {
    display: grid;
    width: min(420px, 90%);
    gap: .45rem;
    margin-top: .7rem;
}

.amp-loading-lines i {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #edf4ef 20%, #dcebe2 50%, #edf4ef 80%);
    background-size: 220% 100%;
    animation: amp-loading-shimmer 1.2s linear infinite;
}

.amp-loading-lines i:nth-child(2) { width: 82%; }
.amp-loading-lines i:nth-child(3) { width: 64%; }

@keyframes amp-loading-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

.amp-module-shell .amp-table-empty {
    min-height: 250px;
    text-align: center;
}

.amp-module-shell .amp-table-empty span {
    max-width: 480px;
    line-height: 1.55;
}

.amp-module-shell .amp-table-empty .amp-action-button {
    margin-top: .6rem;
}

/* 第 70 轮：键盘导航与焦点入口 */
.amp-module-shell .amp-skip-link {
    position: absolute;
    z-index: 10;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.amp-module-shell .amp-skip-link:focus {
    position: relative;
    display: inline-flex;
    width: auto;
    height: auto;
    margin-bottom: .65rem;
    padding: .5rem .75rem;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border-radius: var(--amp-radius-sm);
    background: var(--amp-primary);
    color: #fff;
}

.amp-module-shell .amp-admin-table caption {
    text-align: left;
}

.amp-module-shell .amp-drawer:focus {
    outline: none;
}

/* 第 68 轮：操作按钮语义 */
.amp-module-shell .amp-row-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    min-height: 36px;
    white-space: nowrap;
}

.amp-module-shell .amp-row-actions button i {
    font-size: .68rem;
}

.amp-module-shell .amp-row-actions button.transition {
    border-color: #bdd8c8;
    background: #f3faf5;
}

.amp-module-shell .amp-row-actions button.danger {
    background: #fff9f7;
}

@media (max-width: 640px) {
    .amp-module-shell .amp-row-actions button {
        min-height: 42px;
    }
}

/* 第 67 轮：详情上下文摘要 */
.amp-detail-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-top: 1rem;
}

.amp-detail-highlights > div {
    min-width: 0;
    padding: .7rem;
    border: 1px solid var(--amp-line-soft);
    border-radius: var(--amp-radius-sm);
    background: #fbfdfb;
}

.amp-detail-highlights i,
.amp-detail-highlights span,
.amp-detail-highlights strong {
    display: block;
}

.amp-detail-highlights i {
    margin-bottom: .45rem;
    color: var(--amp-primary);
}

.amp-detail-highlights span {
    color: var(--amp-muted);
    font-size: .68rem;
}

.amp-detail-highlights strong {
    margin-top: .18rem;
    color: var(--amp-ink);
    font-size: .76rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    .amp-detail-highlights {
        grid-template-columns: 1fr;
    }
}

.amp-editor-drawer {
    overscroll-behavior: contain;
}

@media (max-width: 640px) {
    .amp-editor-drawer .amp-form-footer {
        position: sticky;
        bottom: -1rem;
        z-index: 2;
        margin: 1rem -1rem -1rem;
        padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 -8px 18px rgba(22, 56, 46, .08);
        backdrop-filter: blur(8px);
    }

    .amp-editor-drawer .amp-icon-button {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 390px) {
    .amp-editor-drawer .amp-form-section {
        padding: .8rem;
    }

    .amp-editor-drawer .amp-form-footer {
        gap: .7rem;
    }
}

/* 第 72 轮：最终断点收口 */
@media (max-width: 720px) {
    .amp-module-shell .amp-filter-bar {
        align-items: stretch;
    }

    .amp-module-shell .amp-filter-bar label {
        flex: 1 1 210px;
    }

    .amp-module-shell .amp-filter-bar .amp-action-button {
        align-self: stretch;
    }

    .amp-module-shell .amp-module-nav {
        margin-inline: -.25rem;
        padding-inline: .25rem;
        scrollbar-width: thin;
    }
}

@media (max-width: 480px) {
    .amp-module-shell .amp-filter-bar {
        gap: .55rem;
        padding: .65rem;
    }

    .amp-module-shell .amp-filter-bar label,
    .amp-module-shell .amp-filter-bar .amp-action-button {
        flex-basis: 100%;
        width: 100%;
    }

    .amp-module-shell .amp-pagination {
        font-size: .68rem;
    }

    .amp-module-shell .amp-pagination span {
        line-height: 1.45;
    }
}

@supports not (overflow: clip) {
    .amp-shell,
    .amp-module-shell {
        overflow-x: hidden;
    }
}

/* 全局 AMP 按钮规范：圆角、深绿底色和右上角关闭 */
.amp-shell button,
.amp-module-shell button {
    border: 1px solid var(--amp-primary) !important;
    border-radius: 999px !important;
    background: var(--amp-primary) !important;
    color: #fff !important;
}

.amp-shell button:hover:not(:disabled),
.amp-module-shell button:hover:not(:disabled) {
    border-color: var(--amp-primary-strong) !important;
    background: var(--amp-primary-strong) !important;
    color: #fff !important;
}

.amp-shell button:disabled,
.amp-module-shell button:disabled {
    border-color: #8caea0 !important;
    background: #8caea0 !important;
    color: #f5fbf7 !important;
}

.amp-shell .amp-drawer .amp-panel-heading,
.amp-module-shell .amp-drawer .amp-panel-heading {
    position: sticky;
    padding-right: 3.5rem;
}

.amp-shell .amp-drawer .amp-panel-heading > div,
.amp-module-shell .amp-drawer .amp-panel-heading > div {
    min-width: 0;
}

.amp-shell .amp-drawer .amp-icon-button,
.amp-module-shell .amp-drawer .amp-icon-button {
    position: absolute;
    top: .15rem;
    right: .15rem;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
}

@media (max-width: 640px) {
    .amp-shell .amp-drawer .amp-icon-button,
    .amp-module-shell .amp-drawer .amp-icon-button {
        top: .1rem;
        right: .1rem;
        width: 44px;
        height: 44px;
    }
}

.amp-editor-drawer .amp-form-grid input::placeholder,
.amp-editor-drawer .amp-form-grid textarea::placeholder {
    color: #9aada5;
}
