/* modals.css - extracted from mesh-PO_sheet.html */

.up-overlay { position: fixed; inset: 0; background: rgba(17,24,39,0.4); z-index: 700; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.18s ease, visibility 0s linear 0.18s; }
.up-overlay.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.18s ease, visibility 0s linear 0s; }
.up-modal { background: white; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.18); width: 480px; max-height: 86vh; overflow: hidden; display: flex; flex-direction: column; opacity: 0; transform: scale(0.96) translateY(8px); transition: opacity 0.22s cubic-bezier(0.32, 0.72, 0, 1), transform 0.22s cubic-bezier(0.32, 0.72, 0, 1); }
.up-overlay.on .up-modal { opacity: 1; transform: scale(1) translateY(0); }
.up-modal.wide { width: 720px; }
.up-modal.xwide { width: 880px; }
.up-hd { padding: 18px 20px 14px; border-bottom: 1px solid #f3f4f6; }
.up-title { font-size: 15px; font-weight: 600; color: #111827; }
.up-sub { font-size: 12px; color: #6b7280; margin-top: 4px; }
.up-bd { padding: 18px 20px; flex: 1; overflow-y: auto; }
.up-ft { padding: 12px 20px; border-top: 1px solid #f3f4f6; display: flex; align-items: center; justify-content: flex-end; gap: 8px; background: #fafafa; }
.up-btn { padding: 7px 14px; border-radius: 6px; border: 1px solid #e5e7eb; background: white; font-size: 12px; font-weight: 500; color: #374151; cursor: pointer; }
.up-btn:hover { background: #f4f6fa; }
.up-btn.primary { background: #4f6ef7; border-color: #4f6ef7; color: white; }
.up-btn.primary:hover { background: #4060f0; }
.up-btn.primary:disabled { opacity: 0.5; cursor: not-allowed; }
.up-btn.danger { background: #dc2626; border-color: #dc2626; color: white; }
.up-btn.danger:hover { background: #b91c1c; }
.up-close { width: 28px; height: 28px; border-radius: 5px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #9ca3af; border: none; background: none; margin-left: auto; }
.up-close:hover { background: #f3f4f6; color: #374151; }
.up-hd-row { display: flex; align-items: flex-start; gap: 12px; }
.up-hd-row .up-hd-text { flex: 1; min-width: 0; }
.up-mode-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 12px; margin-bottom: 14px; }
.up-mode-banner.replace { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.up-mode-banner.append { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.up-mode-banner.create { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.up-mode-banner svg { flex-shrink: 0; }
.up-mode-banner b { font-weight: 600; }
.up-field { margin-bottom: 14px; }
.up-label { font-size: 11px; font-weight: 600; color: #374151; margin-bottom: 6px; display: block; }
.up-input { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; outline: none; font-family: inherit; box-sizing: border-box; }
.up-input:focus { border-color: #4f6ef7; box-shadow: 0 0 0 3px rgba(79,110,247,0.12); }
.up-help { font-size: 11px; color: #9ca3af; margin-top: 6px; }
.up-drop { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 32px 20px; text-align: center; background: #fafbfc; cursor: pointer; transition: background 0.1s, border-color 0.1s; }
.up-drop:hover { border-color: #4f6ef7; background: #f5f8ff; }
.up-drop.has-file { border-style: solid; border-color: #10b981; background: #f0fdf4; padding: 18px 20px; text-align: left; }
.up-drop-ic { width: 36px; height: 36px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: #eef2ff; color: #4f6ef7; border-radius: 8px; }
.up-drop-title { font-size: 12px; font-weight: 500; color: #374151; margin-bottom: 4px; }
.up-drop-sub { font-size: 11px; color: #9ca3af; }
.up-drop-formats { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.up-drop-formats .fmt-pill { font-size: 10px; padding: 2px 7px; background: white; border: 1px solid #e5e7eb; border-radius: 9px; color: #6b7280; font-weight: 500; }
.up-file-row { display: flex; align-items: center; gap: 10px; }
.up-file-ic { width: 32px; height: 32px; background: white; border: 1px solid #d1fae5; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #16a34a; flex-shrink: 0; }
.up-file-name { font-size: 12px; font-weight: 500; color: #111827; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-file-meta { font-size: 11px; color: #6b7280; }
.up-file-x { width: 24px; height: 24px; border-radius: 4px; border: none; background: none; color: #6b7280; cursor: pointer; }
.up-file-x:hover { background: white; color: #dc2626; }
.up-detect { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; font-size: 12px; color: #1e40af; margin-top: 12px; }
.up-detect b { font-weight: 600; }
.map-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.map-tbl thead th { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.3px; text-align: left; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; background: #fafafa; position: sticky; top: 0; }
.map-tbl tbody td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.map-actual { font-weight: 500; color: #111827; font-family: 'Menlo','Consolas',monospace; font-size: 11.5px; }
.map-sel { width: 100%; padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 11.5px; background: white; outline: none; font-family: inherit; }
.map-sel:focus { border-color: #4f6ef7; }
.map-sel.unmapped { color: #9ca3af; }
.map-req { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 8px; font-size: 9.5px; font-weight: 600; }
.map-req.req { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.map-req.opt { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.map-desc { font-size: 11px; color: #6b7280; line-height: 1.4; }
.map-desc-loading { display: inline-flex; align-items: center; gap: 5px; color: #4f6ef7; font-size: 11px; }
.map-desc-loading .pulse-dot { width: 5px; height: 5px; border-radius: 50%; background: #4f6ef7; animation: pulse-dot 1.2s ease-in-out infinite; }
.map-banner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; font-size: 12px; color: #1e3a8a; margin-bottom: 14px; }
.map-banner svg { flex-shrink: 0; margin-top: 1px; }
.map-banner b { font-weight: 600; }
.map-stats { display: flex; gap: 16px; font-size: 11px; color: #6b7280; margin-bottom: 12px; }
.map-stats b { color: #111827; font-weight: 600; }
.sopf-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; max-height: 320px; overflow-y: auto; }
.sopf-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; transition: border-color 0.12s, background 0.12s; }
.sopf-row:hover { border-color: #c7d2fe; background: #fafbff; }
.sopf-row.active { border-color: #4f6ef7; background: #eef2ff; }
.sopf-row-ico { width: 32px; height: 32px; flex-shrink: 0; background: #f3f4f6; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #6b7280; }
.sopf-row.active .sopf-row-ico { background: white; color: #4f6ef7; }
.sopf-row-body { flex: 1; min-width: 0; }
.sopf-row-name { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sopf-row-meta { font-size: 11.5px; color: #6b7280; margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.sopf-row-meta-sep { color: #d1d5db; }
.sopf-row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sopf-row-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; border-radius: 6px; cursor: pointer; color: #9ca3af; transition: background 0.12s, color 0.12s; }
.sopf-row-btn:hover { background: #f3f4f6; color: #374151; }
.sopf-row-btn.danger:hover { background: #fee2e2; color: #dc2626; }
.sopf-row-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.sopf-row-btn:disabled:hover { background: transparent; color: #9ca3af; }
.sopf-default-tag { display: inline-flex; align-items: center; padding: 1px 7px; background: #eef2ff; color: #4f6ef7; border-radius: 999px; font-size: 10px; font-weight: 600; }
.sopf-drop.drag-over { border-color: #4f6ef7 !important; background: #eef2ff !important; }
#schemaOverlay .up-modal { height: min(640px, 86vh); }
#schemaOverlay .up-bd { padding: 18px 20px 0; overflow: hidden; display: flex; flex-direction: column; }
.sch-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e5e7eb; margin-bottom: 12px; flex-shrink: 0; }
.sch-tab { padding: 7px 12px; font-size: 12px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.12s, border-color 0.12s; user-select: none; }
.sch-tab:hover { color: #374151; }
.sch-tab.on { color: #4f6ef7; border-bottom-color: #4f6ef7; font-weight: 600; }
.sch-tab-count { color: #9ca3af; font-weight: 500; margin-left: 3px; font-variant-numeric: tabular-nums; }
.sch-tab.on .sch-tab-count { color: #4f6ef7; }
.sch-headrow { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-shrink: 0; }
.sch-schema-name { font-size: 14px; font-weight: 600; color: #111827; }
.sch-sublabel { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 9px; background: #eff6ff; color: #1d4ed8; }
.sch-sublabel.supplementary { background: #fef3c7; color: #b45309; }
.sch-sublabel.communications { background: #f3e8ff; color: #7c3aed; }
.sch-search-wrap { margin-left: auto; position: relative; display: flex; align-items: center; }
.sch-search-wrap svg.sch-search-ic { position: absolute; left: 9px; color: #9ca3af; pointer-events: none; }
.sch-search { width: 260px; padding: 6px 10px 6px 30px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; outline: none; font-family: inherit; background: white; }
.sch-search:focus { border-color: #4f6ef7; box-shadow: 0 0 0 3px rgba(79,110,247,0.12); }
.sch-count { font-size: 11px; color: #6b7280; flex-shrink: 0; }
.sch-tbl-wrap { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: 18px; }
.sch-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.sch-tbl thead th { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.3px; text-align: left; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; background: #fafafa; position: sticky; top: 0; z-index: 2; }
.sch-tbl thead th::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #e5e7eb; }
.sch-th-glyph { display: inline-flex; align-items: center; vertical-align: -1px; margin-right: 5px; opacity: 0.75; }
.sch-th-glyph svg { display: block; }
.sch-th-edit { color: #4f6ef7; opacity: 0.9; }
.sch-tbl tbody td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.sch-tbl tbody tr:hover { background: #fafbff; }
.sch-cell-locked { color: #6b7280; font-family: 'Menlo','Consolas',monospace; font-size: 11.5px; cursor: default; user-select: text; }
.sch-cell-edit { color: #111827; cursor: text; padding: 2px 6px; margin: -2px -6px; border-radius: 4px; transition: background 0.1s; min-height: 16px; display: inline-block; }
.sch-cell-edit:hover { background: #eef2ff; }
.sch-cell-edit:focus { background: white; outline: 2px solid #4f6ef7; outline-offset: -2px; }
.sch-context { line-height: 1.45; }
.sch-context-empty { color: #9ca3af; font-style: italic; }
.sch-type-pill { display: inline-flex; align-items: center; height: 19px; padding: 0 8px; border-radius: 9px; font-size: 10.5px; font-weight: 500; cursor: pointer; user-select: none; transition: filter 0.1s; }
.sch-type-pill:hover { filter: brightness(0.95); }
.sch-type-pill.t-string,
.sch-type-pill.t-numeric,
.sch-type-pill.t-integer,
.sch-type-pill.t-date,
.sch-type-pill.t-boolean { background: #eff6ff; color: #1d4ed8; }
.sch-type-pill.t-money,
.sch-type-pill.t-decimal { background: #fef3c7; color: #b45309; }
.sch-type-pill.t-badge { background: #f3e8ff; color: #7c3aed; }
.sch-type-pill.t-unknown { background: #f3f4f6; color: #6b7280; }
.sch-type-sel { padding: 2px 6px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 11.5px; background: white; outline: none; font-family: inherit; }
.sch-type-sel:focus { border-color: #4f6ef7; }
