/* ACCGEN optional service runtime fields. Isolated from existing form/list rules. */
#accgen-service-single[hidden],#accgen-service-single-fields[hidden],#accgen-service-batch-common[hidden],.accgen-service-row-warning[hidden],#accgen-service-single-warning[hidden]{display:none!important}
.accgen-service-card{margin:12px 0 15px;padding:13px;border:1px solid #d7e3ef;border-radius:12px;background:#f8fbfe;color:#243b53;min-width:0}
.accgen-service-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.accgen-service-card-title{display:block;font-size:14px;line-height:1.45;font-weight:750}
.accgen-service-card-help{display:block;margin-top:3px;color:#6a7786;font-size:12px;line-height:1.5}
.accgen-service-switch{display:flex;gap:7px;align-items:center;flex:none;font-size:13px;font-weight:650;cursor:pointer}
.accgen-service-switch input{height:19px;width:19px;accent-color:#146cb0}
.accgen-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:11px}
.accgen-service-field{display:flex;flex-direction:column;gap:5px;min-width:0;color:#31485d;font-size:12px;font-weight:650;line-height:1.4}
.accgen-service-field input,.accgen-service-field select{box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;min-height:43px;padding:9px 11px;border:1px solid #cbd8e5;border-radius:9px;background:white;color:#223344;font:inherit;font-size:16px;font-weight:400}
.accgen-service-field input:focus-visible,.accgen-service-field select:focus-visible{outline:2px solid #1976b9;outline-offset:1px}
.accgen-service-money{display:flex;align-items:center;gap:7px;min-width:0}
.accgen-service-money>:first-child{flex:1 1 auto;min-width:0}
.accgen-service-money input{flex:1;min-width:0;width:100%;box-sizing:border-box;text-align:right;font-variant-numeric:tabular-nums}
/* One control shell; inner input has NO border/focus paint even under global field CSS.
   The global ACCGEN design system uses an ID selector + !important; this override
   intentionally uses the same view scope and higher specificity. */
.accgen-service-money>.accgen-service-fee-control{display:flex;position:relative;flex:1 1 auto;align-items:center;box-sizing:border-box;width:100%;min-width:0;height:44px;min-height:44px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;overflow:hidden}
.accgen-service-money>.accgen-service-fee-control:focus-within{border-color:#005a9e;outline:none;box-shadow:0 0 0 1px rgba(0,90,158,.12)}
#view-main-layout .accgen-service-money>.accgen-service-fee-control>input[data-accgen-no-clear],
#view-main-layout .accgen-service-money>.accgen-service-fee-control>input[data-accgen-no-clear]:focus,
#view-main-layout .accgen-service-money>.accgen-service-fee-control>input[data-accgen-no-clear]:focus-visible{display:block;flex:1 1 0%!important;width:0!important;min-width:0!important;max-width:100%!important;height:42px!important;min-height:0!important;box-sizing:border-box!important;margin:0!important;padding:9px 11px!important;border:0!important;border-radius:0!important;background:transparent!important;color:#1f2937!important;outline:0!important;box-shadow:none!important;text-align:right!important;font-variant-numeric:tabular-nums;font-weight:400!important;font-size:16px!important;line-height:22px!important;letter-spacing:normal}
.accgen-service-money>.accgen-service-fee-control>.accgen-service-fee-clear{display:flex;position:static;flex:0 0 28px;align-items:center;justify-content:center;box-sizing:border-box;width:28px;height:28px;min-height:0;margin:0 7px 0 3px;padding:0;border:0;border-radius:7px;background:#edf4fa;color:#496981;cursor:pointer;touch-action:manipulation;transform:none}
.accgen-service-money>.accgen-service-fee-control>.accgen-service-fee-clear[hidden]{display:none!important}
/* During active IME composition, show the grouped digits as a visual mirror.
   Do not rewrite the in-progress text, which would corrupt composition/caret. */
.accgen-service-fee-control.accgen-service-fee-composing::after{content:attr(data-money-preview);position:absolute;z-index:1;top:50%;right:11px;transform:translateY(-50%);box-sizing:border-box;display:block;max-width:calc(100% - 24px);height:22px;padding-right:2px;border-right:1px solid #005a9e;overflow:hidden;white-space:nowrap;text-align:right;pointer-events:none;color:#1f2937;font-size:16px;font-weight:400;line-height:22px;font-variant-numeric:tabular-nums}
.accgen-service-fee-control.accgen-service-fee-composing.accgen-service-fee-has-clear::after{right:45px;max-width:calc(100% - 58px)}
#view-main-layout .accgen-service-money>.accgen-service-fee-control.accgen-service-fee-composing>input[data-accgen-no-clear],
#view-main-layout .accgen-service-money>.accgen-service-fee-control.accgen-service-fee-composing>input[data-accgen-no-clear]:focus{color:transparent!important;-webkit-text-fill-color:transparent!important;caret-color:transparent!important;opacity:0!important}
.accgen-service-fee-clear svg{width:12px;height:12px;stroke-width:2.3;pointer-events:none}
.accgen-service-fee-clear:hover{background:#dcebf7}
.accgen-service-fee-clear:focus-visible{outline:2px solid #005a9e;outline-offset:1px}
.accgen-service-money-unit{white-space:nowrap;color:#4b5d6d;font-size:13px;font-weight:400}
.accgen-service-words-label{display:block;color:#31485d;font-size:12px;font-weight:650;line-height:1.4}
.accgen-service-words,.accgen-service-row-words{display:flex;align-items:center;box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0;padding:9px 11px;border:1px solid #d7e3ef;border-radius:9px;background:#fff;color:#415a70;font-size:13px;font-weight:400;line-height:1.5;overflow-wrap:anywhere}
.accgen-service-warning,.accgen-service-row-warning{display:block;margin-top:6px;color:#93631c;font-size:12px;line-height:1.5}
.accgen-service-common-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.accgen-service-common-actions button{min-height:42px}
.accgen-service-apply-status{font-size:12px;color:#3b6579;line-height:1.5}
.accgen-service-row{margin-top:9px;padding:0 10px;border:1px solid #dbe5ee;border-radius:10px;background:#fff;max-width:100%}
.accgen-service-row summary{padding:9px 2px;cursor:pointer;color:#285984;font-size:12px;font-weight:700;line-height:1.4}
.accgen-service-row-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 1px 10px;min-width:0}
.accgen-service-row-fields>.accgen-service-field:nth-child(2){grid-column:1/-1}
.accgen-service-row-fields>.accgen-service-field:nth-child(3){grid-column:1/-1}
.accgen-service-row-fields>.accgen-service-row-words-field,.accgen-service-row-fields>.accgen-service-row-warning{grid-column:1/-1}
/* Keep the original 2 x 2 generate form, including the 600-700px tablet range. */
@media(min-width:600px){#templates-user-state .templates-single-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#templates-user-state .templates-single-grid>.form-group{grid-column:auto}}
/* Only the selected Person picker: name and ID share a line when they fit. */
#templates-user-state .templates-single-grid>.form-group:nth-child(3) .accgen-picker-trigger-copy{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
#templates-user-state .templates-single-grid>.form-group:nth-child(3) .accgen-picker-trigger-title,#templates-user-state .templates-single-grid>.form-group:nth-child(3) .accgen-picker-trigger-detail{flex:0 1 auto;max-width:100%;min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
@media(max-width:599px){#templates-user-state .templates-single-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.accgen-service-grid{grid-template-columns:1fr}.accgen-service-row-fields{grid-template-columns:1fr}.accgen-service-row-fields>.accgen-service-field:nth-child(2),.accgen-service-row-fields>.accgen-service-field:nth-child(3){grid-column:auto}.accgen-service-card{padding:11px}.accgen-service-card-head{align-items:flex-start}}
