.plan-page-head{display:grid;grid-template-columns:minmax(0,1fr) auto}
.plan-page-head>:first-child{min-width:0}
.plan-head-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.plan-import-dialog.dialog{width:min(1100px,calc(100vw - 32px));max-width:1100px}
.plan-import-dialog .dialog-content{min-width:0;overflow:auto}
.plan-import-template{margin:16px 0}.plan-import-catalog{margin:12px 0 20px;overflow-wrap:anywhere}
.plan-import-catalog summary{cursor:pointer;font-weight:600}.plan-import-catalog p{font-size:13px;line-height:1.5}
.plan-import-dialog input[type=file]{width:100%;min-width:0;max-width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.plan-import-table-scroll{max-height:45vh;overflow:auto;border:1px solid var(--line);border-radius:12px;margin:16px 0}
.plan-import-table{width:100%;min-width:730px;border-collapse:collapse;table-layout:fixed;font-size:13px}
.plan-import-table th,.plan-import-table td{padding:12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.plan-import-table th{background:var(--surface-2);position:sticky;top:0;z-index:1;color:var(--ink)}
.plan-import-table th:first-child{width:68px}.plan-import-table th:nth-child(2){width:35%}.plan-import-table th:nth-child(4){width:24%}
.plan-import-table p{margin:6px 0;line-height:1.45}.plan-import-table tr.invalid{background:var(--danger-soft)}
.plan-import-row-error{color:var(--danger)}.plan-import-row-warning{color:var(--warning)}
.plan-import-warning{padding:14px;border-radius:12px;background:var(--warning-soft);color:var(--ink);gap:12px;align-items:flex-start}
.plan-import-warning[hidden]{display:none}.plan-import-warning input{flex:0 0 auto;margin-top:3px}
/* Keep the action group on its own row before it can squeeze the heading. */
@media(max-width:900px){
.plan-page-head{grid-template-columns:minmax(0,1fr);align-items:start}
.plan-page-head .plan-head-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:10px}
.plan-page-head .plan-head-actions .btn{min-width:0;max-width:100%;white-space:normal}}
@media(max-width:600px){
.plan-import-dialog.dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:auto;padding:0}
.plan-import-dialog .dialog-head,.plan-import-dialog .dialog-content,.plan-import-dialog .dialog-actions{padding:16px}
.plan-import-dialog .dialog-actions{display:flex;flex-direction:column;align-items:stretch}.plan-import-dialog .dialog-actions .btn{width:100%}
.plan-import-template .btn{width:100%;white-space:normal}.plan-import-table-scroll{max-height:42vh}}
