/* Matsunaga Seed Portal v0.1.82 - shared admin form + upload UI */
body.theme-saas-admin .admin-form-shell{display:grid;gap:18px}
body.theme-saas-admin .admin-form-card{padding:0!important;overflow:hidden;border-color:#dce8e3!important;box-shadow:0 16px 38px rgba(18,52,43,.07)!important}
body.theme-saas-admin .admin-form-section{padding:22px 24px;border-bottom:1px solid #e8efec;background:#fff}
body.theme-saas-admin .admin-form-section:nth-of-type(odd){background:linear-gradient(180deg,#fff,#fcfefd)}
body.theme-saas-admin .admin-form-section:last-of-type{border-bottom:0}
body.theme-saas-admin .admin-form-section-head{display:flex;align-items:flex-start;gap:12px;margin:0 0 17px}
body.theme-saas-admin .admin-form-section-icon{display:grid;place-items:center;flex:0 0 auto;width:34px;height:34px;border-radius:12px;background:#eaf4ef;color:#1f5b49;font-size:.74rem;font-weight:900;letter-spacing:.03em}
body.theme-saas-admin .admin-form-section-title{margin:0;color:#153b31;font-size:1.02rem;font-weight:850;line-height:1.35}
body.theme-saas-admin .admin-form-section-description{margin:4px 0 0;color:#71827c;font-size:.81rem;line-height:1.55}
body.theme-saas-admin .admin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 16px}
body.theme-saas-admin .admin-form-grid.is-three{grid-template-columns:repeat(3,minmax(0,1fr))}
body.theme-saas-admin .admin-form-grid>.is-wide{grid-column:1/-1}
body.theme-saas-admin .admin-form-field{display:grid;gap:7px;margin:0;color:#36574d;font-size:.86rem;font-weight:800}
body.theme-saas-admin .admin-form-field>input:not([type="checkbox"]):not([type="radio"]),
body.theme-saas-admin .admin-form-field>select{min-height:50px;font-weight:650}
body.theme-saas-admin .admin-form-field>textarea{min-height:132px;padding:14px 15px;line-height:1.7;resize:vertical}
body.theme-saas-admin .admin-form-field .muted.small,
body.theme-saas-admin .admin-form-help{font-weight:500;color:#74837e;line-height:1.55}
body.theme-saas-admin .admin-form-subcard{padding:16px;border:1px solid #dfe9e5;border-radius:16px;background:#f8fbf9}
body.theme-saas-admin .admin-form-subcard.is-soft{background:#fbfdfc}
body.theme-saas-admin .employee-active-subcard{align-self:end;display:flex;align-items:center;min-height:50px;padding:0 16px}
body.theme-saas-admin .employee-active-subcard .checkbox-row{margin:0}
body.theme-saas-admin .employee-active-subcard .field-error{margin-left:8px}
body.theme-saas-admin .admin-form-subcard-title{margin:0 0 5px;color:#234d41;font-size:.92rem;font-weight:850}
body.theme-saas-admin .admin-form-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.theme-saas-admin .admin-form-choice-card{position:relative;display:flex;align-items:flex-start;gap:10px;min-width:0;margin:0;padding:13px 14px;border:1px solid #dce6e2;border-radius:14px;background:#fff;color:#36574d;font-weight:750;cursor:pointer;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease}
body.theme-saas-admin .admin-form-choice-card input{flex:0 0 auto;width:auto;margin:3px 0 0}
body.theme-saas-admin .admin-form-choice-card span{min-width:0}
body.theme-saas-admin .admin-form-choice-card small{display:block;margin-top:3px;color:#7a8984;font-weight:500;line-height:1.45}
body.theme-saas-admin .admin-form-choice-card:has(input:checked){border-color:#9fc2b3;background:#edf7f2;box-shadow:0 5px 14px rgba(23,63,53,.06)}
body.theme-saas-admin .admin-form-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 15px;border:1px solid #dfe8e4;border-radius:14px;background:#fbfdfc}
body.theme-saas-admin .admin-form-toggle-row>div{min-width:0}
body.theme-saas-admin .admin-form-toggle-row strong{display:block;color:#294f43;font-size:.9rem}
body.theme-saas-admin .admin-form-toggle-row small{display:block;margin-top:3px;color:#75847f;font-weight:500;line-height:1.45}
body.theme-saas-admin .admin-form-toggle-row .checkbox-row{flex:0 0 auto;margin:0}
body.theme-saas-admin .admin-form-actions-bar{display:flex;justify-content:flex-end;gap:10px;padding:15px 24px;border-top:1px solid #e2ebe7;background:rgba(249,252,250,.96)}
body.theme-saas-admin .admin-form-actions-bar button,
body.theme-saas-admin .admin-form-actions-bar .button-link{min-height:46px;display:inline-flex;align-items:center;justify-content:center;margin:0}
body.theme-saas-admin .admin-form-primary-action{min-width:180px}
body.theme-saas-admin .admin-form-compact-card{padding:19px 20px!important;border-color:#dce8e3!important;box-shadow:0 10px 28px rgba(18,52,43,.055)!important}
body.theme-saas-admin .admin-form-compact-card h2{margin:0 0 6px;color:#173f35;font-size:1rem}
body.theme-saas-admin .admin-form-upload-zone{display:grid;gap:9px;padding:18px;border:1px dashed #b9cec5;border-radius:16px;background:#f9fcfa}
body.theme-saas-admin .admin-form-divider{height:1px;background:#e6edea;margin:4px 0}
body.theme-saas-admin .admin-form-card .company-assignment-section{margin:0;padding:16px;border:1px solid #dfe9e5;border-radius:16px;background:#f8fbf9;box-shadow:none}
body.theme-saas-admin .admin-form-card .company-secondary-sales-item{border-radius:12px;padding:11px 12px;transition:border-color .14s ease,background .14s ease}
body.theme-saas-admin .admin-form-card .company-secondary-sales-item:has(input:checked){border-color:#9fc2b3;background:#edf7f2}
body.theme-saas-admin .admin-form-card .announcement-audience{margin:0;padding:0;border:0}
body.theme-saas-admin .admin-form-card .audience-options{margin-top:0}
body.theme-saas-admin .admin-form-card .announcement-target-picker{margin-top:14px;border-radius:16px;border-color:#dce8e3;background:#fbfdfc}
body.theme-saas-admin .admin-form-card .settings-fieldset{margin:0;padding:0;border:0}
body.theme-saas-admin .admin-form-card .settings-fieldset>legend{display:none}
body.theme-saas-admin .admin-form-card .settings-workdays{margin-top:12px}
body.theme-saas-admin .admin-form-card .settings-workday-options{gap:8px}
body.theme-saas-admin .admin-form-card .settings-workday-options .checkbox-row{min-width:48px;justify-content:center;padding:9px 11px;border:1px solid #dce6e2;border-radius:999px;background:#fff}
body.theme-saas-admin .admin-form-card .settings-workday-options .checkbox-row:has(input:checked){border-color:#9fc2b3;background:#edf7f2;color:#214f41}
body.theme-saas-admin .admin-form-card .ai-settings-section{margin:0;padding:16px;border:1px solid #dfe9e5;border-radius:16px;background:#f8fbf9}
body.theme-saas-admin .admin-form-card .ai-keyword-row{padding:10px;border:1px solid #e1e9e5;border-radius:12px;background:#fff}
body.theme-saas-admin .ai-editor-card{border-color:#dce8e3;box-shadow:0 14px 34px rgba(18,52,43,.065)}
body.theme-saas-admin .ai-editor-card>.card-title{color:#173f35}
body.theme-saas-admin .ai-editor-card form>label{color:#36574d;font-size:.86rem;font-weight:800}
body.theme-saas-admin .ai-editor-card form input:not([type="checkbox"]):not([type="radio"]),
body.theme-saas-admin .ai-editor-card form select{min-height:48px}
body.theme-saas-admin .ai-editor-card form textarea{padding:13px 14px;line-height:1.65}
body.theme-saas-admin .company-user-management-grid{display:grid;grid-template-columns:minmax(280px,.72fr) minmax(0,1.28fr);gap:18px;align-items:start}
body.theme-saas-admin .company-user-row{padding:16px 0;border-bottom:1px solid #e5ece9}
body.theme-saas-admin .company-user-row:last-child{border-bottom:0}
body.theme-saas-admin .company-user-meta{margin-top:5px;line-height:1.55}
body.theme-saas-admin .company-user-actions{margin-top:10px}
body.theme-saas-admin .company-user-status-form{padding:8px 10px;border:1px solid #e2ebe7;border-radius:12px;background:#fafcfb}
body.theme-saas-admin .company-user-status-form select{min-width:112px}
@media(max-width:900px){
  body.theme-saas-admin .admin-form-grid.is-three{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.theme-saas-admin .company-user-management-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
  body.theme-saas-admin .admin-form-shell{gap:14px}
  body.theme-saas-admin .admin-form-section{padding:18px 16px}
  body.theme-saas-admin .admin-form-section-head{margin-bottom:14px}
  body.theme-saas-admin .admin-form-grid,
  body.theme-saas-admin .admin-form-grid.is-three{grid-template-columns:1fr;gap:12px}
  body.theme-saas-admin .employee-active-subcard{align-self:stretch;min-height:50px}
  body.theme-saas-admin .admin-form-choice-grid{grid-template-columns:1fr}
  body.theme-saas-admin .admin-form-field>input:not([type="checkbox"]):not([type="radio"]),
  body.theme-saas-admin .admin-form-field>select,
  body.theme-saas-admin .admin-form-field>textarea{font-size:16px}
  body.theme-saas-admin .admin-form-actions-bar{padding:12px 16px;display:grid;grid-template-columns:1fr}
  body.theme-saas-admin .admin-form-actions-bar button,
  body.theme-saas-admin .admin-form-actions-bar .button-link{width:100%;min-width:0}
  body.theme-saas-admin .admin-form-toggle-row{align-items:flex-start;flex-direction:column}
  body.theme-saas-admin .company-user-status-form{width:100%;display:grid;grid-template-columns:1fr auto}
}


/* Unified upload picker (v0.1.82) */
.msp-upload-picker{position:relative;display:flex;align-items:center;gap:14px;min-height:92px;padding:16px 18px;border:1.5px dashed #a9c8bb;border-radius:17px;background:linear-gradient(180deg,#fbfefc,#f4faf7);color:#31574b;cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease,transform .15s ease}
.msp-upload-picker:hover,.msp-upload-picker:focus-within{border-color:#6f9f8d;background:#f0f8f4;box-shadow:0 8px 22px rgba(23,63,53,.07)}
.msp-upload-picker.is-dragover{border-color:#397764;background:#eaf6f0;box-shadow:0 0 0 4px rgba(57,119,100,.08)}
.msp-upload-input{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;opacity:0!important;pointer-events:none!important}
.msp-upload-icon{position:relative;display:grid;place-items:center;flex:0 0 50px;width:50px;height:50px;border-radius:15px;background:#e5f2ec;color:#1f664f}
.msp-upload-icon::before{content:"";width:22px;height:17px;border:2px solid currentColor;border-radius:4px}
.msp-upload-icon::after{content:"＋";position:absolute;right:7px;bottom:6px;display:grid;place-items:center;width:18px;height:18px;border:2px solid #f7fbf9;border-radius:50%;background:#275f4c;color:#fff;font-size:.76rem;font-weight:900;line-height:1}
.msp-upload-copy{display:grid;gap:4px;min-width:0}
.msp-upload-copy strong{color:#214d40;font-size:.92rem;font-weight:850}
.msp-upload-copy small{color:#71827c;font-size:.79rem;font-weight:550;line-height:1.5}
.msp-upload-choice{color:#4d7165!important;font-weight:750!important}
.msp-upload-picker.has-selection{border-style:solid;border-color:#8eb7a7;background:#eff8f3}
.msp-upload-picker.is-compact{min-height:76px;padding:13px 15px}
.msp-upload-picker.is-compact .msp-upload-icon{flex-basis:44px;width:44px;height:44px;border-radius:13px}
.msp-upload-preview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,132px));gap:10px;margin-top:12px}
.msp-upload-preview-item{position:relative;aspect-ratio:1/1;overflow:hidden;border:1px solid #d8e5df;border-radius:15px;background:#f6faf8}
.msp-upload-preview-item img{display:block;width:100%;height:100%;object-fit:cover}
.msp-upload-preview-remove{position:absolute!important;top:5px;right:5px;z-index:2;display:grid!important;place-items:center!important;width:29px!important;min-width:29px!important;height:29px!important;min-height:29px!important;padding:0!important;border:1px solid rgba(154,34,34,.18)!important;border-radius:999px!important;background:rgba(255,255,255,.94)!important;color:#9d2323!important;box-shadow:0 3px 10px rgba(70,20,20,.12)!important;font-size:1.02rem!important;font-weight:900!important;line-height:1!important}
.msp-upload-preview-remove:hover{background:#fff2f2!important;color:#7d1717!important;transform:none!important}
.msp-upload-file-card{display:grid;place-items:center;width:100%;height:100%;padding:10px;color:#31594c;text-align:center}
.msp-upload-file-type{display:grid;place-items:center;width:56px;height:68px;border:2px solid #7da395;border-radius:9px;background:#fff;font-size:.72rem;font-weight:900;letter-spacing:.04em}
.announcement-image-help{margin:10px 0 0}
@media(max-width:720px){
  .msp-upload-picker{min-height:82px;padding:14px}
  .msp-upload-preview-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
}
@media(max-width:390px){.msp-upload-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Employee individual permissions (v0.1.85) */
body.theme-saas-admin .employee-permission-groups{display:grid;gap:13px}
body.theme-saas-admin .employee-permission-group{padding:15px 16px;border:1px solid #dde8e3;border-radius:16px;background:#fafdfb}
body.theme-saas-admin .employee-permission-group-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
body.theme-saas-admin .employee-permission-group-head h3{margin:0;color:#214b3f;font-size:.94rem}
body.theme-saas-admin .employee-permission-group-head p{margin:4px 0 0;color:#71817c;font-size:.78rem;line-height:1.5}
body.theme-saas-admin .employee-permission-list{display:grid;gap:8px}
body.theme-saas-admin .employee-permission-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(138px,170px);gap:12px;align-items:center;padding:10px 11px;border:1px solid #e3ebe7;border-radius:12px;background:#fff}
body.theme-saas-admin .employee-permission-label{min-width:0;color:#36564d;font-size:.84rem;font-weight:750;line-height:1.45}
body.theme-saas-admin .employee-permission-default{white-space:nowrap;font-size:.73rem;font-weight:800;color:#70817b}
body.theme-saas-admin .employee-permission-default.is-on{color:#2c7059}
body.theme-saas-admin .employee-permission-row select{min-height:42px;font-size:.82rem}
body.theme-saas-admin .employee-permission-note{margin:12px 0 0;padding:11px 13px;border-left:3px solid #7aa491;background:#f5faf7;color:#5d756c;font-size:.8rem;line-height:1.6}
body.theme-saas-admin .individual-permission-badge{display:inline-flex;align-items:center;margin-top:4px;padding:3px 7px;border-radius:999px;background:#edf6f2;color:#2d6654;font-size:.69rem;font-weight:800}
@media(max-width:720px){
  body.theme-saas-admin .employee-permission-row{grid-template-columns:1fr auto}
  body.theme-saas-admin .employee-permission-row select{grid-column:1/-1;width:100%;font-size:16px}
}

/* v0.1.110: customer branch management */
body.theme-saas-admin .company-branch-management{margin-top:18px;padding:22px}
body.theme-saas-admin .company-branch-management-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
body.theme-saas-admin .company-branch-management-head p{margin:6px 0 0;max-width:820px;line-height:1.65}
body.theme-saas-admin .company-branch-management-list{display:grid;gap:10px}
body.theme-saas-admin .company-branch-management-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch;padding:12px;border:1px solid #dfe9e5;border-radius:14px;background:#f8fbf9}
body.theme-saas-admin .company-branch-edit-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch;margin:0}
body.theme-saas-admin .company-branch-edit-form label{display:flex;align-items:stretch;margin:0}
body.theme-saas-admin .company-branch-edit-form .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
body.theme-saas-admin .company-branch-edit-form input{min-height:52px;height:100%;margin:0}
body.theme-saas-admin .company-branch-edit-form button,body.theme-saas-admin .company-branch-delete-form button{display:inline-flex;align-items:center;justify-content:center;min-height:52px;margin:0;white-space:nowrap}
body.theme-saas-admin .company-branch-delete-form{display:flex;align-items:stretch;margin:0}
body.theme-saas-admin .company-branch-delete-form button{height:100%}
body.theme-saas-admin .company-branch-empty{margin:0;padding:16px;border:1px dashed #ccdcd5;border-radius:14px;background:#fafcfb}
body.theme-saas-admin .company-branch-summary-cell{max-width:240px}
body.theme-saas-admin .company-branch-summary{display:block;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.86rem}
@media (max-width:720px){
  body.theme-saas-admin .company-branch-management{padding:16px}
  body.theme-saas-admin .company-branch-management-row{grid-template-columns:1fr}
  body.theme-saas-admin .company-branch-edit-form{grid-template-columns:1fr auto}
  body.theme-saas-admin .company-branch-delete-form{justify-self:end}
}

body.theme-retro-admin .company-branch-management{margin-top:18px;padding:20px}
body.theme-retro-admin .company-branch-management-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
body.theme-retro-admin .company-branch-management-head p{margin:6px 0 0;max-width:820px;line-height:1.65}
body.theme-retro-admin .company-branch-management-list{display:grid;gap:10px}
body.theme-retro-admin .company-branch-management-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch;padding:12px;border:1px solid #cdbd98;border-radius:6px;background:#f7f1e2}
body.theme-retro-admin .company-branch-edit-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch;margin:0}
body.theme-retro-admin .company-branch-edit-form label{display:flex;align-items:stretch;margin:0}
body.theme-retro-admin .company-branch-edit-form .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
body.theme-retro-admin .company-branch-edit-form input{min-height:52px;height:100%;margin:0}
body.theme-retro-admin .company-branch-edit-form button,body.theme-retro-admin .company-branch-delete-form button{display:inline-flex;align-items:center;justify-content:center;min-height:52px;margin:0;white-space:nowrap}
body.theme-retro-admin .company-branch-delete-form{display:flex;align-items:stretch;margin:0}
body.theme-retro-admin .company-branch-delete-form button{height:100%}
body.theme-retro-admin .company-branch-empty{margin:0;padding:16px;border:1px dashed #cdbd98;border-radius:6px;background:#fbf7eb}
body.theme-retro-admin .company-branch-summary-cell{max-width:240px}
body.theme-retro-admin .company-branch-summary{display:block;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.86rem}
@media (max-width:720px){
  body.theme-retro-admin .company-branch-management{padding:14px}
  body.theme-retro-admin .company-branch-management-row{grid-template-columns:1fr}
  body.theme-retro-admin .company-branch-edit-form{grid-template-columns:1fr auto}
  body.theme-retro-admin .company-branch-delete-form{justify-self:end}
}
