/* 頁面樣式：plans */
.plans-card { overflow: hidden; }
.plans-readonly { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.plans-table input:disabled::placeholder { color: transparent; }
.plans-table { min-width: 560px; }
.plans-table th { text-align: left; padding: 10px 12px; font-size: 12px; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); }
.plans-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plans-table th.plan-code { width: 140px; }
.plans-table th.plan-price, .plans-table td.plan-price { width: 160px; text-align: right; }
.plans-table th.plan-use, .plans-table td.plan-use { width: 90px; text-align: right; color: var(--muted); white-space: nowrap; }
.plans-table th.plan-op, .plans-table td.plan-op { width: 100px; text-align: right; white-space: nowrap; }
.plans-table td.plan-price input { text-align: right; }
.plans-table input:disabled { background: transparent; border-color: transparent; color: inherit; opacity: 1; -webkit-text-fill-color: currentColor; }
.plans-table tr.plan-removed td { color: var(--muted); }
.plans-table tr.plan-removed input { text-decoration: line-through; color: var(--muted); }
.plans-table tr.plan-dup input[data-plan-field="code"] { border-color: var(--red); background: var(--red-s); }
.plans-table tr.plans-empty td { text-align: center; color: var(--muted); padding: 22px 12px; }
.plans-add { display: block; width: 100%; padding: 12px; border: 0; border-top: 1px dashed var(--line); background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.plans-add:hover { color: var(--accent-d); background: var(--soft); }

@media (max-width: 720px) {
  /* 窄螢幕改成卡片：代號｜金額，名稱整行，使用中｜操作。 */
  .plans-table { min-width: 0; }
  .plans-table thead { display: none; }
  .plans-table, .plans-table tbody { display: block; }
  .plans-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "code price" "name name" "use op"; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
  .plans-table tbody tr:last-child { border-bottom: 0; }
  .plans-table td { display: block; padding: 0; border: 0; width: auto !important; text-align: left; }
  .plans-table td.plan-code { grid-area: code; }
  .plans-table td.plan-name { grid-area: name; }
  .plans-table td.plan-price { grid-area: price; text-align: right; }
  .plans-table td.plan-use { grid-area: use; font-size: 13px; text-align: left; }
  .plans-table td.plan-use::before { content: "使用中 "; }
  .plans-table td.plan-op { grid-area: op; text-align: right; }
  .plans-table tr.plans-empty { display: block; }
}
