/* AWS Lightsail 监控面板 - 多主题支持 */

/* ========== 主题定义 ==========
   所有主题都用白底（按紫枫要求），只换强调色/边框/文字
   ============================================= */

/* 默认紫色 */
:root, [data-theme="purple"] {
    --bg: #ffffff;
    --bg-soft: #f8f7fc;
    --surface: #ffffff;
    --surface-2: #f3f1f8;
    --text: #1f1f2e;
    --muted: #6b6b80;
    --primary: #a78bfa;
    --primary-strong: #8b5cf6;
    --primary-soft: rgba(167, 139, 250, .12);
    --primary-text: #ffffff;
    --accent: #f472b6;
    --ok: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: #e8e5ef;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.08);
}

[data-theme="blue"] {
    --bg: #ffffff;
    --bg-soft: #f0f7ff;
    --surface: #ffffff;
    --surface-2: #e8f1fb;
    --text: #1a2433;
    --muted: #5b6b80;
    --primary: #60a5fa;
    --primary-strong: #3b82f6;
    --primary-soft: rgba(96, 165, 250, .12);
    --primary-text: #ffffff;
    --accent: #38bdf8;
    --ok: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: #e1ebf5;
    --shadow: 0 1px 3px rgba(96,165,250,.06), 0 1px 2px rgba(96,165,250,.04);
    --shadow-lg: 0 4px 12px rgba(96,165,250,.08);
}

[data-theme="green"] {
    --bg: #ffffff;
    --bg-soft: #f0faf4;
    --surface: #ffffff;
    --surface-2: #e8f5ee;
    --text: #1a2e22;
    --muted: #5b7a68;
    --primary: #22c55e;
    --primary-strong: #16a34a;
    --primary-soft: rgba(34, 197, 94, .12);
    --primary-text: #ffffff;
    --accent: #34d399;
    --ok: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: #dfeedf;
    --shadow: 0 1px 3px rgba(34,197,94,.06), 0 1px 2px rgba(34,197,94,.04);
    --shadow-lg: 0 4px 12px rgba(34,197,94,.08);
}

[data-theme="amber"] {
    --bg: #ffffff;
    --bg-soft: #fffbeb;
    --surface: #ffffff;
    --surface-2: #fff4d6;
    --text: #2e2310;
    --muted: #7a6e4f;
    --primary: #f59e0b;
    --primary-strong: #d97706;
    --primary-soft: rgba(245, 158, 11, .12);
    --primary-text: #ffffff;
    --accent: #f97316;
    --ok: #84cc16;
    --warn: #f59e0b;
    --danger: #dc2626;
    --border: #faecbf;
    --shadow: 0 1px 3px rgba(245,158,11,.06), 0 1px 2px rgba(245,158,11,.04);
    --shadow-lg: 0 4px 12px rgba(245,158,11,.08);
}

[data-theme="rose"] {
    --bg: #ffffff;
    --bg-soft: #fff5f9;
    --surface: #ffffff;
    --surface-2: #ffe9f1;
    --text: #2e0e1e;
    --muted: #7a4d65;
    --primary: #f472b6;
    --primary-strong: #db2777;
    --primary-soft: rgba(244, 114, 182, .12);
    --primary-text: #ffffff;
    --accent: #ec4899;
    --ok: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: #fbd8e3;
    --shadow: 0 1px 3px rgba(244,114,182,.06), 0 1px 2px rgba(244,114,182,.04);
    --shadow-lg: 0 4px 12px rgba(244,114,182,.08);
}

[data-theme="slate"] {
    --bg: #ffffff;
    --bg-soft: #f5f7fa;
    --surface: #ffffff;
    --surface-2: #ecf0f5;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #64748b;
    --primary-strong: #475569;
    --primary-soft: rgba(100, 116, 139, .12);
    --primary-text: #ffffff;
    --accent: #94a3b8;
    --ok: #10b981;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(100,116,139,.06), 0 1px 2px rgba(100,116,139,.04);
    --shadow-lg: 0 4px 12px rgba(100,116,139,.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}
.topbar .brand { font-size: 1.1rem; font-weight: 600; color: var(--primary-strong); }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar nav a { color: var(--text); padding: .25rem .5rem; border-radius: 4px; }
.topbar nav a:hover { background: var(--primary-soft); text-decoration: none; }
.topbar .user { color: var(--muted); font-size: .9rem; }
.topbar .user-menu { color: var(--text); padding: .25rem .5rem; }

.container { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }

.footer {
    text-align: center; padding: 1.5rem; color: var(--muted); font-size: .85rem;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    margin-top: 2rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.card.narrow { max-width: 420px; margin: 4rem auto; }
.card.settings-card { max-width: 580px; margin: 2rem auto; }
.card h1, .card h3 { margin-top: 0; }
.card-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 1rem;
}
.card-foot {
    margin-top: 1rem; padding-top: .75rem;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    font-size: .85rem;
}
.card-foot .muted { color: var(--muted); }

.page-actions {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem;
}
.page-actions h1 { margin: 0; font-size: 1.5rem; }
.page-actions .actions { display: flex; gap: .5rem; }

.btn {
    display: inline-block;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: .5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
    text-decoration: none;
    transition: all .15s;
}
.btn:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); font-weight: 600; }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: white; }
.btn.small { padding: .3rem .6rem; font-size: .8rem; }
button.link {
    background: none; border: none; color: var(--primary);
    cursor: pointer; font-size: inherit; padding: 0;
}

.alert {
    padding: .75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.alert.error { background: rgba(239,68,68,.08); color: #b91c1c; border: 1px solid #fecaca; }
.alert.success { background: rgba(16,185,129,.08); color: #047857; border: 1px solid #a7f3d0; }

.badge {
    display: inline-block; padding: .15rem .55rem;
    border-radius: 999px; font-size: .75rem;
    background: var(--surface-2);
}
.badge.ok { background: rgba(16,185,129,.12); color: #047857; }
.badge.warn { background: rgba(245,158,11,.12); color: #b45309; }
.badge.stale { background: rgba(251,146,60,.15); color: #c2410c; }
.badge.danger { background: rgba(239,68,68,.15); color: #b91c1c; }
.badge.partial { background: rgba(245,158,11,.12); color: #b45309; }
/* ===== AWS Lightsail 状态配色 ===== */
.badge.state-running   { background: rgba(16,185,129,.15); color: #047857; }   /* 绿色 运行中 */
.badge.state-stopped   { background: rgba(107,114,128,.15); color: #374151; }   /* 灰色 已停止 */
.badge.state-stopping  { background: rgba(245,158,11,.15); color: #b45309; }   /* 黄色 正在关机 */
.badge.state-starting  { background: rgba(59,130,246,.15); color: #1d4ed8; }    /* 蓝色 正在开机 */
.badge.state-pending   { background: rgba(59,130,246,.12); color: #1d4ed8; }
.badge.state-rebooting { background: rgba(168,85,247,.15); color: #6b21a8; }    /* 紫色 重启中 */
.badge.state-unknown   { background: rgba(107,114,128,.10); color: #6b7280; }  /* 浅灰 未知/查询中 */
.badge.state-unavailable { background: rgba(239,68,68,.12); color: #b91c1c; }  /* 红色 不可用 */
/* ===== 仪表盘卡片内嵌流量图表 ===== */
.quota-chart-wrap {
  margin-top: .6rem;
  height: 80px;
  position: relative;
}
.quota-chart-wrap canvas {
  width: 100% !important;
  height: 80px !important;
}

/* ========== 主题切换器 ========== */
.theme-switcher { position: relative; }
.theme-switcher summary {
    list-style: none;
    cursor: pointer;
    padding: .25rem .55rem;
    border-radius: 4px;
    color: var(--text);
    font-size: .85rem;
    user-select: none;
}
.theme-switcher summary::-webkit-details-marker { display: none; }
.theme-switcher summary:hover { background: var(--primary-soft); }
.theme-switcher[open] summary { background: var(--primary-soft); }
.theme-menu {
    position: absolute;
    top: 100%; right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .4rem;
    margin-top: .25rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 130px;
}
.theme-form { display: block; margin: 0; }
.theme-btn {
    display: flex; align-items: center; gap: .5rem;
    width: 100%;
    background: transparent;
    border: none;
    padding: .4rem .55rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text);
    font-size: .85rem;
    text-align: left;
}
.theme-btn:hover { background: var(--primary-soft); }
.theme-btn.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.theme-btn .dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 1px solid rgba(0,0,0,.1);
}
.theme-purple .dot { background: #a78bfa; }
.theme-blue .dot { background: #3b82f6; }
.theme-green .dot { background: #22c55e; }
.theme-amber .dot { background: #f59e0b; }
.theme-rose .dot { background: #ec4899; }
.theme-slate .dot { background: #64748b; }

label {
    display: block;
    margin-bottom: .75rem;
    color: var(--muted);
    font-size: .85rem;
}
label.checkbox { display: flex; align-items: center; gap: .5rem; color: var(--text); }
input, select, textarea {
    display: block;
    width: 100%;
    padding: .5rem .75rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: .9rem;
    font-family: inherit;
    margin-top: .25rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
input[type="checkbox"] { width: auto; display: inline-block; margin: 0; }

button[type="submit"] {
    background: var(--primary);
    color: var(--primary-text);
    border: none;
    padding: .6rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
}
button[type="submit"]:hover { background: var(--primary-strong); }

.grid { display: grid; gap: 1.5rem; }
.grid.instances {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.grid.form { grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
@media (max-width: 1024px) { .grid.form { grid-template-columns: 1fr; } }

.instance { padding: 1rem; }
.instance.offline { opacity: .65; }
.instance.stale { border-color: rgba(251,146,60,.4); background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%); }
.instance.stale .metrics .value { color: #c2410c; }
.instance.partial { border-color: rgba(245,158,11,.4); background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); }
.instance .name { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.instance .host { font-size: .8rem; color: var(--muted); margin-top: .15rem; }

.metrics {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem;
    margin: 1rem 0;
}
.metric { text-align: center; }
.metric .label { font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.metric .value { font-size: 1.25rem; font-weight: 600; color: var(--primary); margin-top: .15rem; }

.quota { margin-top: 1rem; }
.quota-label {
    display: flex; justify-content: space-between;
    font-size: .8rem; color: var(--muted); margin-bottom: .25rem;
}
.bar {
    background: var(--bg-soft);
    border-radius: 4px; height: 8px; overflow: hidden;
}
.bar .fill {
    background: var(--primary);
    height: 100%;
    transition: width .3s, background .3s;
}
.bar .fill.warn { background: var(--warn); }
.bar .fill.danger { background: var(--danger); }
.quota-pct {
    text-align: right; font-size: .75rem; color: var(--muted); margin-top: .25rem;
}
.quota-split { display: flex; justify-content: space-between; margin-top: .35rem; font-size: .75rem; color: var(--muted); }
.quota-split .in { color: #2563eb; }
.quota-split .out { color: #16a34a; }



.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; }
.table tr.disabled { opacity: .55; }
.table .muted { color: var(--muted); }
.table .center { text-align: center; }
.actions-cell { white-space: nowrap; display: flex; gap: .35rem; align-items: center; }
.actions-cell form { display: inline-flex; align-items: center; margin: 0; vertical-align: middle; }

.muted { color: var(--muted); }
code { background: var(--bg-soft); padding: 1px 4px; border-radius: 3px; font-size: .85em; }

.chart-box {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    height: 260px;
    position: relative;
}
canvas { max-height: 240px; }

.form-actions { margin-top: 1.5rem; display: flex; gap: .75rem; }

.loading { color: var(--muted); padding: 2rem; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 3rem; }
/* ============================================
   手机端适配 (< 768px)
   ============================================ */
/* ========== 配额采集健康提示（自动切换颜色） ========== */
.quota-health {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
.quota-health.healthy {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: #86efac;
  color: #166534;
}
.quota-health.unhealthy {
  background: linear-gradient(135deg, #fff7ed 0%, #fef2f2 100%);
  border-color: #fca5a5;
  color: #991b1b;
}
.quota-health .health-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.quota-health .health-body {
  flex: 1;
  min-width: 0;
}
.quota-health .health-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.quota-health .health-detail {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}
.quota-health .health-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.quota-health .health-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  align-items: center;
}
.quota-health .health-name {
  font-weight: 600;
  min-width: 6rem;
}
.quota-health .health-meta {
  opacity: 0.85;
}
.quota-health .health-hint {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-top: 0.5rem;
}
.quota-health .health-hint a {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}


@media (max-width: 768px) {
    /* 容器缩窄 */
    .container { padding: 1rem .75rem; }

    /* Topbar: 品牌缩小，nav 横向滚动 */
    .topbar {
        padding: .75rem 1rem;
        flex-wrap: wrap;
        gap: .5rem;
    }
    .topbar .brand { font-size: 1rem; }
    .topbar nav {
        width: 100%;
        gap: .65rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: .25rem;
        -webkit-overflow-scrolling: touch;
    }
    .topbar nav a { white-space: nowrap; font-size: .9rem; padding: .35rem .5rem; }
    .topbar nav .badge { white-space: nowrap; font-size: .75rem; padding: .15rem .5rem; }
    .topbar .user-menu { white-space: nowrap; font-size: .9rem; }

    /* 主题切换器收窄 */
    .theme-switcher summary { font-size: .85rem; padding: .25rem .5rem; }

    /* 页面标题缩小 */
    .page-actions { flex-wrap: wrap; gap: .5rem; }
    .page-actions h1 { font-size: 1.25rem; }

    /* 表格 → 卡片化（每行变卡片） */
    .table, .table thead, .table tbody, .table tr, .table th, .table td {
        display: block;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }
    .table thead { display: none; }
    .table tr {
        margin-bottom: 1rem;
        padding: .75rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: var(--surface);
    }
    .table td {
        padding: .35rem 0;
        border-bottom: 1px dashed var(--border);
        text-align: left;
        white-space: normal;
    }
    .table td:last-child { border-bottom: 0; padding-top: .65rem; }

    /* 每个 td 前加 label（用 data-label） */
    .table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: .7rem;
        color: var(--muted);
        text-transform: uppercase;
        margin-bottom: .15rem;
    }

    /* 操作按钮区折成 2x2 */
    .actions-cell {
        flex-wrap: wrap;
        gap: .4rem !important;
    }
    .actions-cell .btn { flex: 1 1 calc(50% - .4rem); min-width: 80px; }

    /* Dashboard grid 改单列 */
    .grid.instances { grid-template-columns: 1fr; }
    .instance-card .stats { grid-template-columns: repeat(2, 1fr) !important; }

    /* Form grid 单列 */
    .grid.form { grid-template-columns: 1fr; }

    /* Metrics grid 2 列 */
    .metrics { grid-template-columns: repeat(2, 1fr); }

    /* 编辑页底部实时图表容器 */
    .chart-box { padding: .75rem; height: 220px; }
    canvas { max-width: 100%; }
}

/* ===== 同步弹窗 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eee;
}
.modal-header h3 { margin: 0; font-size: 1rem; }
.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  padding: 0;
  line-height: 1;
}
.close-btn:hover { color: #333; }

.sync-loading {
  padding: 1.5rem;
  text-align: center;
  color: #666;
}

.sync-summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: .875rem;
}
.sync-list {
  flex: 1;
  overflow-y: auto;
  padding: .5rem 0;
}
.sync-region { margin-bottom: .5rem; }
.region-label {
  font-size: .75rem;
  color: #888;
  padding: .25rem 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sync-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  cursor: pointer;
  font-size: .875rem;
}
.sync-item:hover { background: #f9f9ff; }
.sync-item.synced { color: #888; }
.sync-name { flex: 1; font-weight: 500; }
.sync-state {
  font-size: .7rem;
  padding: .1em .4em;
  border-radius: 4px;
  font-weight: 500;
}
.sync-state.running { background: #d4edda; color: #155724; }
.sync-state.stopped { background: #f8d7da; color: #721c24; }
.sync-state.pending { background: #fff3cd; color: #856404; }
.sync-badge {
  font-size: .7rem;
  padding: .1em .4em;
  border-radius: 4px;
}
.sync-badge.synced { background: #e9ecef; color: #495057; }
.sync-badge.new { background: #e7f3ff; color: #0c63e4; }

.modal-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.dns-conflict-overlay {
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(2px);
}
.dns-conflict-modal {
  max-width: 460px;
  border-top: 4px solid #dc2626;
}
.dns-conflict-modal .modal-header h3 { color: #b91c1c; }
.dns-conflict-body {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
}
.dns-conflict-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fee2e2;
  color: #dc2626;
  font-size: 1.5rem;
  font-weight: 800;
}
.dns-conflict-body strong { color: #991b1b; font-size: 1.05rem; }
.dns-conflict-body p { margin: .5rem 0; color: #1f2937; line-height: 1.55; }
.dns-conflict-body small { color: #6b7280; }
.dns-conflict-footer {
  align-items: flex-end;
  background: #f9fafb;
}
.dns-conflict-footer .btn { min-width: 100px; }

/* ===== 配额采集异常警告 ===== */
.quota-warning {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: #7c2d12;
}
.quota-warning .warning-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.quota-warning .warning-body {
  flex: 1;
  min-width: 0;
}
.quota-warning .warning-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.quota-warning .warning-detail {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #9a3412;
}
.quota-warning .warning-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.quota-warning .warning-item {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
  background: rgba(255, 255, 255, 0.5);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.quota-warning .warning-name {
  font-weight: 500;
  min-width: 100px;
}
.quota-warning .warning-meta {
  color: #9a3412;
  font-size: 0.8rem;
}
.quota-warning .warning-meta strong {
  color: #c2410c;
  font-weight: 600;
}
.quota-warning .warning-hint {
  font-size: 0.8rem;
  color: #9a3412;
}
.quota-warning .warning-hint a {
  color: #c2410c;
  text-decoration: underline;
}

/* 实例卡片上加警告角标 */
.card.instance.quota-warn {
  border-left: 3px solid #f97316;
}
.card.instance.quota-warn::before {
  content: "⚠ 配额 0";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.7rem;
  color: #c2410c;
  background: #fff7ed;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1px solid #fdba74;
}
