/* Modal L partner invitation workspace: one create form, one history. */
html body dialog.plm-dialog.link-action-dialog.link-modal-l{width:min(1180px,calc(100vw - 32px));max-width:calc(100vw - 32px);height:min(760px,calc(100dvh - 32px - var(--link-local-tools-height,0px)));max-height:calc(100dvh - 32px - var(--link-local-tools-height,0px));padding:0;border:1px solid var(--link-card-gold);border-radius:16px;background:var(--sg-surface);color:var(--sg-ink);font-family:var(--link-font-family);box-sizing:border-box;overflow:hidden}
html body dialog.plm-dialog[open]{display:flex;flex-direction:column;inset:0 0 var(--link-local-tools-height,0px);margin:auto}
.plm-dialog::backdrop{background:var(--sg-backdrop)}
.plm-head{display:flex;align-items:center;gap:12px;flex:none;padding:14px 18px;border-bottom:1px solid var(--link-card-gold);min-width:0}
.plm-head-icon{width:38px;height:38px;flex:none;display:grid;place-items:center;background:var(--link-card-soft);color:var(--link-card-ink);border-radius:10px}
.plm-head h2{font-size:20px;line-height:1.3;margin:0;min-width:0;color:var(--link-card-ink)}
.plm-close,.plm-more,.plm-page-actions button{display:inline-grid;place-items:center;width:30px;height:30px;border:1px solid var(--link-card-line);border-radius:7px;background:var(--sg-surface);color:var(--link-card-ink);cursor:pointer;flex:none}
.plm-close{margin-left:auto;width:34px;height:34px}
.plm-dialog :is(button,input,select,textarea):focus-visible,.plm-select:focus-within{outline:2px solid var(--sg-gold);outline-offset:2px}
.plm-dialog button:hover:not(:disabled){background:var(--sg-surface-warm)}
.plm-dialog button:disabled{opacity:.55;cursor:default}
.plm-layout{display:grid;grid-template-columns:minmax(270px,34fr) minmax(0,66fr);gap:16px;padding:16px;min-height:0;flex:1;min-width:0}
.plm-left,.plm-right{display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid var(--link-card-gold);border-radius:12px;background:var(--sg-surface);overflow:hidden}
.plm-left{padding:14px}.plm-right-head{padding:13px 14px;border-bottom:1px solid var(--link-card-gold);flex:none}
.plm-section-head{padding-bottom:11px;margin-bottom:12px;border-bottom:1px solid var(--link-card-gold)}
.plm-section-head h3,.plm-right-head h3{font-size:16px;line-height:1.3;color:var(--link-card-ink);margin:0}
.plm-form{display:flex;flex-direction:column;gap:12px;min-height:0;overflow-y:auto;flex:1;padding:2px;overscroll-behavior:contain}
.plm-field{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:13px;color:var(--sg-ink-2)}
.plm-field>span{font-size:12px;font-weight:700;color:var(--link-card-ink)}.plm-field b{color:var(--sg-gold-text)}
.plm-field :is(input,textarea){width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--sg-line);border-radius:7px;background:var(--sg-field);color:var(--sg-ink);padding:8px 9px;font:400 13px/1.4 var(--link-font-family)}
.plm-field :is(input,textarea)::placeholder{font-size:12px;color:var(--link-card-ink);opacity:.55}
.plm-field input{height:36px}.plm-field textarea{min-height:64px;resize:vertical}
.plm-field input[readonly]{background:var(--sg-surface-warm)}
.plm-preview{white-space:pre-wrap;overflow-wrap:anywhere;padding:10px;border:1px solid var(--sg-line);border-radius:7px;background:var(--sg-surface-warm);font-size:13px;line-height:1.55;min-height:110px}
.plm-lookup{font-size:11px;line-height:1.4;overflow-wrap:anywhere}.plm-error-text,.plm-alert{color:var(--sg-error)}
.plm-alert,.plm-notice{font-size:12px;line-height:1.5;margin:5px 0}.plm-notice{color:var(--sg-ink-2)}
.plm-left-bottom{padding-top:12px;margin-top:12px;border-top:1px solid var(--link-card-gold)}
.plm-dialog .plm-send{width:100%}
.plm-right-panel{display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0;flex:1;padding:12px}
.plm-right-tools{display:grid;grid-template-columns:minmax(0,27fr) minmax(0,17fr) minmax(0,24fr) minmax(0,32fr);gap:8px;align-items:stretch;flex:none;min-width:0}
.plm-right-tools.is-mine{grid-template-columns:minmax(0,32fr) minmax(0,20fr) minmax(0,48fr)}
.plm-filter{display:flex;flex-direction:column;gap:5px;min-width:0;height:100%;font-size:12px;line-height:1.4}
.plm-filter>span:first-child{font-weight:500;flex:none}
.plm-filter input,.plm-select{box-sizing:border-box;width:100%;min-width:0;min-height:36px;border:1px solid var(--sg-line);border-radius:7px;background:var(--sg-field);color:var(--sg-ink);font:400 12px/1.4 var(--link-font-family)}
.plm-filter input{padding:7px 8px;flex:1;height:36px}
.plm-select{position:relative;display:flex;align-items:center;flex:1;padding:7px 22px 7px 7px}
.plm-select::after{content:'⌄';position:absolute;right:7px;top:50%;transform:translateY(-50%);pointer-events:none}
.plm-select-value{white-space:normal;overflow-wrap:anywhere}
.plm-select select{position:absolute;inset:0;opacity:0;width:100%;height:100%;font:inherit;cursor:pointer}
.plm-period{min-width:0;position:relative}
.plm-calendar{position:fixed;inset:auto;margin:0;width:min(300px,calc(100vw - 24px));padding:14px;border:1px solid var(--link-card-gold);border-radius:10px;background:var(--sg-surface);color:var(--sg-ink);box-shadow:0 8px 24px rgba(var(--sg-rgb-ink),.18)}
.plm-calendar:not(:popover-open){display:none}
.plm-calendar label{display:grid;gap:4px;margin-bottom:8px;font:400 12px/1.4 var(--link-font-family)}
.plm-calendar input{min-height:34px;width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--sg-line);border-radius:6px;padding:6px;color:var(--sg-ink);background:var(--sg-field)}
.plm-calendar p{font-size:12px;color:var(--sg-error);margin:5px 0}
.plm-table-wrap{flex:1;min-height:90px;min-width:0;overflow:auto;border:1px solid var(--link-card-gold);border-radius:8px}
.plm-dialog .plm-table{width:100%;min-width:540px;border-collapse:collapse;table-layout:fixed;font:400 12px/1.45 var(--link-font-family)}
.plm-dialog .plm-table th{background:var(--link-table-header-bg,var(--link-card-soft));border-bottom:1px solid var(--link-card-gold);font-size:12px;font-weight:600;text-align:left;position:sticky;top:0;z-index:1}
.plm-table th,.plm-table td{padding:9px 8px;border-right:1px solid var(--sg-line);border-bottom:1px solid var(--sg-line);vertical-align:middle;overflow-wrap:anywhere}
.plm-table :is(th,td):last-child{border-right:0;text-align:center}
.plm-table th:nth-child(1){width:29%}.plm-table th:nth-child(2){width:23%}.plm-table th:nth-child(3){width:20%}.plm-table th:nth-child(4){width:17%}.plm-table th:nth-child(5){width:11%}
.plm-table td strong{display:block;font-weight:500}.plm-table td small{display:block;color:var(--sg-muted);font-size:11px;line-height:1.4}
.plm-table tbody tr{height:54px}.plm-table tbody tr:hover{background:var(--sg-surface-warm)}
.plm-status{display:inline-block;font-size:11px;line-height:1.4;padding:3px 5px;border-radius:6px;background:var(--sg-surface-warm);color:var(--sg-ink-2)}
.plm-status.is-ok{color:var(--sg-success,var(--sg-ink))}.plm-status.is-bad{color:var(--sg-error)}.plm-status.is-muted{color:var(--sg-muted)}
.plm-employee-link,.plm-sort{border:0;padding:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.plm-employee-link:hover{text-decoration:underline}
.plm-empty{text-align:center!important;color:var(--sg-muted);padding:24px!important}
.plm-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:nowrap;font-size:11px;color:var(--sg-ink-2);flex:none;border-top:1px solid var(--link-card-gold);padding-top:10px;min-width:0}
.plm-stats{line-height:1.7;flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.plm-footer-controls,.plm-page-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0}
.plm-footer-controls{margin-left:auto;flex:none}.plm-shown{white-space:nowrap;color:var(--sg-muted)}.plm-page-actions button{width:25px;height:27px}
.plm-details{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:10px;background:var(--sg-surface-warm);border:1px solid var(--sg-line);border-radius:8px;font-size:12px}
.plm-details>div:first-child{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}.plm-detail-actions{display:flex;gap:5px;flex-wrap:wrap}
@media(max-width:900px){
 .plm-footer{flex-wrap:wrap}.plm-stats{white-space:normal;flex:1 1 100%}.plm-footer-controls{width:100%;justify-content:space-between;flex-wrap:wrap}.plm-shown{flex:none}html body dialog.plm-dialog.link-action-dialog.link-modal-l{width:calc(100vw - 20px);max-width:calc(100vw - 20px);height:calc(100dvh - var(--link-local-tools-height,0px) - 20px);max-height:calc(100dvh - var(--link-local-tools-height,0px) - 20px)}.plm-head{padding:10px 12px}.plm-head h2{font-size:17px}.plm-layout{grid-template-columns:minmax(0,1fr);overflow:auto;display:grid;grid-template-rows:max-content max-content;align-content:start;gap:12px;padding:12px}.plm-left{overflow:visible;min-height:max-content}.plm-form{overflow:visible;flex:none}.plm-left-bottom{flex:none}.plm-right{min-height:400px}.plm-right-panel{min-height:330px}.plm-right-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.plm-right-tools.is-mine{grid-template-columns:repeat(2,minmax(0,1fr))}.plm-table-wrap{min-height:180px;max-height:340px}.plm-footer-controls{margin-left:0}.plm-head-icon{width:32px;height:32px}}
