:root {
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --primary: #1890ff;
    --primary-dark: #096dd9;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #f5222d;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.dashboard-tabs {
    display: flex;
    width: 100%;
    margin: 0 0 20px;
    padding: 0;
    background: #dfe3ea;
    border: 1px solid #c5cdd8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}

.dashboard-tab {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    border: none;
    border-right: 1px solid #c5cdd8;
    border-radius: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: #5a6575;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 14px 10px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-tab:last-child {
    border-right: none;
}

.dashboard-tab:hover:not(.is-active) {
    background: linear-gradient(180deg, #ffffff 0%, #e8edf4 100%);
    color: #1f2937;
}

.dashboard-tab.is-active {
    background: linear-gradient(180deg, #40a9ff 0%, #1890ff 45%, #096dd9 100%);
    color: #ffffff;
    box-shadow: inset 0 -4px 0 #0050b3, 0 2px 8px rgba(24, 144, 255, 0.35);
    position: relative;
    z-index: 1;
}

.dashboard-tab.is-active:hover {
    color: #ffffff;
    background: linear-gradient(180deg, #69c0ff 0%, #1890ff 45%, #096dd9 100%);
}

.dashboard-tab:focus-visible {
    outline: 2px solid #1890ff;
    outline-offset: -2px;
    z-index: 2;
}

@media (max-width: 900px) {
    .dashboard-tabs {
        flex-wrap: wrap;
    }

    .dashboard-tab {
        flex: 1 1 calc(33.333% - 1px);
        font-size: 14px;
        padding: 12px 6px;
        border-bottom: 1px solid #c5cdd8;
    }

    .dashboard-tab:nth-child(3n) {
        border-right: none;
    }
}

.tab-panel {
    margin-bottom: 24px;
}

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

.todos-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.todos-launch-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 12px 0 8px;
}

.todos-launch-table-wrap {
    max-height: 280px;
    overflow: auto;
}

#daily-detail-table .daily-row-main td {
    vertical-align: middle;
}

#daily-detail-table .daily-row-related td {
    padding: 8px 12px 12px;
    background: #fafafa;
    border-top: none;
    box-shadow: inset 0 2px 0 #e8e8e8;
}

#daily-detail-table tr.daily-row-main + tr.daily-row-related td {
    border-top: 1px dashed var(--border);
}

.related-subset-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
}

.related-subset-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 28px;
}

.related-chip-list {
    flex: 1 1 200px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.related-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #fff;
    border: 1px solid #d9d9d9;
    max-width: 100%;
    word-break: break-all;
}

button.related-chip {
    cursor: pointer;
    font: inherit;
    line-height: 1.4;
}

button.related-chip:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

button.related-chip:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.related-chip-list--compact {
    max-width: 220px;
}

.related-chip em {
    font-style: normal;
    font-size: 10px;
    color: #888;
    white-space: nowrap;
}

.related-chip.chip-family {
    border-color: #91caff;
    background: #e6f4ff;
}

.related-chip.chip-replace {
    border-color: #ffd591;
    background: #fff7e6;
}

.replace-situation-cell {
    min-width: 8rem;
    max-width: 14rem;
}

.replace-situation-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 12px;
}

.replace-situation-label {
    color: var(--text-secondary);
    margin-right: 2px;
}

a.replace-situation-link,
.replace-situation-link.btn-related-open {
    color: #014ccc;
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
}

a.replace-situation-link:hover,
.replace-situation-link.btn-related-open:hover {
    text-decoration: underline;
}

.related-empty {
    font-size: 12px;
    color: var(--text-secondary);
}

.replace-raw-details {
    flex: 1 1 100%;
    font-size: 12px;
    margin-top: 4px;
}

.badge-focus-warning {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #cf1322;
    background: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: 4px;
    vertical-align: middle;
}

.replace-focus-banner {
    margin: 0 0 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #a8071a;
    background: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: 6px;
}

.replace-compare-panel {
    flex: 1 1 100%;
    margin-top: 8px;
}

.replace-compare-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.replace-compare-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.replace-compare-warn {
    font-size: 11px;
    color: #d48806;
    background: #fffbe6;
    padding: 2px 8px;
    border-radius: 4px;
}

.replace-compare-ok {
    font-size: 11px;
    color: #389e0d;
    background: #f6ffed;
    padding: 2px 8px;
    border-radius: 4px;
}

.replace-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.replace-compare-table th,
.replace-compare-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.replace-compare-table thead th {
    background: #fafafa;
    font-weight: 600;
    color: var(--text-secondary);
}

.replace-compare-table tbody th {
    width: 6rem;
    color: var(--text-secondary);
    font-weight: 500;
    background: #fcfcfc;
}

.replace-compare-table tr.diff-mismatch td {
    background: #fff7e6;
}

.replace-compare-table tr.diff-mismatch th {
    background: #fff1b8;
    color: #ad6800;
}

.replace-raw-details summary {
    cursor: pointer;
    color: var(--primary);
}

.replace-raw-text {
    margin: 6px 0 0;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    max-height: 120px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

#daily-detail-table {
    table-layout: auto;
}

.daily-launch-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
    padding: 12px 16px;
    background: #f0f7ff;
    border: 1px solid #bae0ff;
    border-radius: 8px;
}

.daily-launch-panel label.inline-check,
.lc-results-toolbar label.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
}

header {
    margin-bottom: 24px;
}

header h1 {
    margin: 0;
    font-size: 28px;
}

.subtitle {
    color: var(--text-secondary);
    margin-top: 8px;
}

.countdown-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.countdown-card {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.countdown-label {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 8px;
}

.countdown-task {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.countdown-timer {
    font-size: 48px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    line-height: 1.1;
}

.countdown-meta {
    margin-top: 12px;
    font-size: 14px;
    opacity: 0.9;
}

.status-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.section-hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin: -8px 0 16px;
}

.time-input {
    width: 48px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.desc {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 220px;
}

.btn.small {
    padding: 4px 10px;
    font-size: 13px;
}

.schedule-section {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary);
}

.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.pending { border-left-color: var(--text-secondary); }

.stat-card-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.stat-card-clickable:hover {
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
    transform: translateY(-1px);
}

.stat-card-clickable.is-active-filter {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
}

.controls {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.status-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 15px;
}

.proxy-badge {
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #666;
}

.proxy-badge.proxy-off {
    background: #e6f7ff;
    color: #096dd9;
}

.proxy-badge.proxy-on {
    background: #fff7e6;
    color: #d48806;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.status-dot.running { background: var(--success); animation: pulse 1.5s infinite; }
.status-dot.idle { background: var(--text-secondary); }
.status-dot.error { background: var(--danger); }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.scheduler-info {
    color: var(--text-secondary);
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn.primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

section {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

section h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
}

.data-table .empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: var(--text);
}

.badge.running { background: #e6f7ff; color: var(--primary); }
.badge.completed { background: #f6ffed; color: var(--success); }
.badge.stopped { background: #fff7e6; color: var(--warning); }
.badge.error { background: #fff1f0; color: var(--danger); }

.log-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.log-filters select,
.log-filters input {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.log-container {
    max-height: 500px;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: 6px;
    padding: 12px;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 13px;
}

.log-empty {
    color: #888;
    text-align: center;
    padding: 24px;
}

.log-empty.error {
    color: var(--danger);
}

.log-line {
    padding: 4px 0;
    border-bottom: 1px solid #333;
    color: #e0e0e0;
    line-height: 1.5;
}

.log-line:last-child {
    border-bottom: none;
}

.log-line.info { color: #e0e0e0; }
.log-line.debug { color: #888; }
.log-line.warning { color: #faad14; }
.log-line.error { color: #ff4d4f; }

.log-time {
    color: #888;
    margin-right: 8px;
}

.log-level {
    display: inline-block;
    min-width: 50px;
    font-weight: bold;
    margin-right: 8px;
}

.actions-section,
.lifecycle-section,
.daily-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.mini-stat-scene {
    background: #f8fafc;
    border-color: #e8ecf1;
}

.mini-stat-scene.muted-scene span {
    color: var(--text-secondary);
}

.mini-stat-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.mini-stat-clickable:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.12);
}

.todos-scene-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 12px;
}

.acceptance-panel {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
}

.acceptance-panel > strong {
    margin-right: 10px;
}

.acceptance-check-list {
    margin: 10px 0 8px;
    padding-left: 18px;
    line-height: 1.6;
}

.acceptance-check.fail {
    color: #cf1322;
}

.acceptance-check.warn {
    color: #d48806;
}

.acceptance-data-backlog {
    margin: 0.35rem 0 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted, #666);
}

.acceptance-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0.25rem 0 0.65rem;
}

.acceptance-quick-label {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    margin-right: 0.15rem;
}

.record-e2e-hint {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface-muted, #f4f6f8);
    border-left: 3px solid var(--accent, #2563eb);
    border-radius: 4px;
}

.record-e2e-hint .section-hint {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.82rem;
}

.record-e2e-steps {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}

.record-e2e-steps .e2e-step-active {
    font-weight: 600;
    color: var(--accent, #2563eb);
}

.record-e2e-steps .e2e-step-done {
    color: var(--text-muted, #888);
    text-decoration: line-through;
    text-decoration-color: rgba(0, 0, 0, 0.25);
}

.record-e2e-hint-relation {
    border-left-color: var(--warn, #d97706);
    margin-top: -0.5rem;
}

.record-e2e-hint-relation .btn {
    margin-top: 0.5rem;
}

.acceptance-check.ok {
    color: #389e0d;
}

.acceptance-manual-hint {
    margin: 8px 0 0;
    font-size: 12px;
}

.lifecycle-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.lifecycle-gates {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.gate-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.gate-badge.ok {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.gate-badge.fail {
    background: #fff2f0;
    color: #cf1322;
    border: 1px solid #ffccc7;
}

.gate-hint {
    color: var(--text-secondary);
    font-size: 13px;
}

.lifecycle-progress {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.lifecycle-progress.running {
    color: var(--primary);
    font-weight: 600;
}

.lifecycle-progress.done {
    color: var(--success);
}

.lifecycle-results {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.lifecycle-results h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.lc-results-hint {
    margin-bottom: 12px;
}

.lc-results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.lc-results-toolbar label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.lc-results-toolbar select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

.lc-records-meta {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

.table-wrap {
    overflow-x: auto;
}

.pagination-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.pagination-bar span {
    font-size: 14px;
    color: var(--text-secondary);
}

.badge.lc-upcoming {
    background: #e6f4ff;
    color: #0958d9;
}

.badge.lc-current {
    background: #f6ffed;
    color: #389e0d;
}

.badge.lc-abolished {
    background: #fff2f0;
    color: #cf1322;
}

.badge.rel-pending {
    background: #fff7e6;
    color: #d48806;
}

.badge.rel-approved {
    background: #f6ffed;
    color: #389e0d;
}

.badge.rel-rejected {
    background: #fff2f0;
    color: #cf1322;
}

.lc-results-toolbar input[type="text"] {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.daily-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.daily-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.daily-records-panel {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.daily-actions {
    white-space: nowrap;
}

.daily-actions .btn {
    margin-left: 4px;
}

.badge.pub-draft {
    background: #fff7e6;
    color: #d48806;
}

.badge.pub-published {
    background: #f6ffed;
    color: #389e0d;
}

.badge.pub-closed {
    background: #f5f5f5;
    color: #8c8c8c;
}

.badge.pub-rejected {
    background: #fff2f0;
    color: #cf1322;
}

.badge.pub-pending-relation {
    background: #e6f4ff;
    color: #0958d9;
    font-weight: 600;
}

.badge.val-ok {
    background: #f6ffed;
    color: #389e0d;
}

.badge.val-warn {
    background: #fff7e6;
    color: #d48806;
    font-weight: 600;
}

.badge.val-error {
    background: #fff2f0;
    color: #cf1322;
    font-weight: 600;
}

.eff-cell {
    min-width: 150px;
}

.countdown-tag {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.3;
    color: #595959;
}

.countdown-tag.warn {
    color: #d48806;
    font-weight: 600;
}

.countdown-tag.overdue {
    color: #cf1322;
    font-weight: 600;
}

.abolish-review-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.abolish-review-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 4px 0;
    background: transparent;
    border: none;
}

.abolish-target-link {
    font-weight: 600;
    min-width: 8rem;
}

.abolish-review-item.readonly {
    background: transparent;
    border: none;
    padding: 0;
}

.abolish-action-select {
    min-width: 120px;
    font-size: 12px;
    padding: 4px 6px;
}

.abolish-action-label {
    font-size: 12px;
    color: #595959;
}

.abolish-state-hint {
    font-size: 12px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
}

.abolish-state-hint.ok {
    background: #f6ffed;
    color: #389e0d;
}

.abolish-state-hint.warn {
    background: #fff7e6;
    color: #d48806;
}

.scene4-closure-checklist {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-muted, #666);
}

.scene4-closure-checklist li.ok {
    color: #389e0d;
}

.scene4-closure-checklist li.pending {
    color: #d48806;
}

.scene4-closure-checklist .closure-hint {
    color: #888;
    font-size: 11px;
}

.audit-timeline {
    margin: 0.5rem 0 1rem;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    color: var(--text-muted, #555);
}
.audit-timeline time {
    display: inline-block;
    min-width: 9.5rem;
    color: var(--text-muted, #666);
}
.audit-timeline li {
    margin-bottom: 0.35rem;
}

.snapshot-pre {
    max-height: 240px;
    overflow: auto;
    font-size: 11px;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 6px;
}

.badge.conf-low {
    background: #fff7e6;
    color: #d48806;
    font-weight: 600;
}

.ops-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.platform-links,
.platform-links-inline {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.platform-links a,
.platform-links-inline a {
    color: var(--primary);
}

.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal-panel {
    position: relative;
    background: #fff;
    border-radius: 10px;
    max-width: 720px;
    width: 92%;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
}

.modal-panel header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.modal-panel h3 {
    margin: 0;
    font-size: 16px;
}

.detail-dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 12px;
    font-size: 14px;
}

.detail-dl dt {
    color: var(--text-secondary);
    margin: 0;
}

.detail-dl dd {
    margin: 0;
    word-break: break-word;
}

.mini-stat {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-stat span {
    color: var(--text-secondary);
    font-size: 13px;
}

.mini-stat strong {
    font-size: 22px;
}

.calendar-grid {
    margin-bottom: 16px;
}

.calendar-grid.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 4px;
}

.calendar-day {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    min-height: 56px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calendar-day.has-data {
    border-color: var(--primary);
    background: #e6f4ff;
}

.calendar-day.selected {
    box-shadow: 0 0 0 2px var(--primary);
    background: #bae0ff;
}

.calendar-day.selected em {
    color: var(--primary);
}

.daily-empty-hint {
    margin: 8px 0 0;
    color: #ad6800;
}

.calendar-day em {
    font-style: normal;
    font-weight: 600;
}

.calendar-day small {
    color: var(--text-secondary);
    font-size: 11px;
}

.calendar-day.empty-day {
    border: none;
    background: transparent;
    cursor: default;
}

.badge.empty { background: #f0f0f0; color: #666; }

@media (max-width: 768px) {
    .countdown-section {
        grid-template-columns: 1fr;
    }
    .controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .daily-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
