/* Pearl AI / PRSXA — Spreadsheets (pak-90) */
.psh{margin:10px 0 14px;border:1px solid var(--app-border,#e5e7eb);border-radius:16px;background:var(--app-bg,#fff);overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.04);color:var(--app-text,#111827)}
.psh-top{display:flex;align-items:center;gap:10px;padding:12px 14px}
.psh-ic{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border-radius:9px;background:linear-gradient(135deg,#16a34a,#0d9488);color:#fff}
.psh-tt{flex:1;min-width:0;display:flex;flex-direction:column}
.psh-tt b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.psh-tt small{font-size:12px;color:var(--app-text-dim,#6b7280)}
.psh-b{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border:1px solid var(--app-border,#e5e7eb);border-radius:9px;background:transparent;color:var(--app-text,#111827);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.psh-b:hover,.psh-b:focus-visible{border-color:#16a34a;color:#15803d;outline:0}
.psh-b:disabled{opacity:.6;cursor:progress}
.psh-b[aria-pressed="true"]{border-color:#16a34a;color:#15803d;background:rgba(22,163,74,.06)}
.psh-pri{background:#16a34a;border-color:#16a34a;color:#fff!important}
.psh-pri:hover,.psh-pri:focus-visible{background:#15803d;border-color:#15803d;box-shadow:0 0 0 3px rgba(22,163,74,.25)}
.psh-tabs{display:flex;gap:4px;padding:0 14px;overflow-x:auto;border-bottom:1px solid var(--app-border,#e5e7eb)}
.psh-tabs button{flex:0 0 auto;padding:8px 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--app-text-dim,#6b7280);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer}
.psh-tabs button.on{color:#15803d;border-bottom-color:#16a34a}
.psh-tabs button:focus-visible{outline:2px solid #16a34a;outline-offset:-2px}
.psh-fx{display:flex;align-items:center;gap:8px;padding:6px 14px;border-bottom:1px solid var(--app-border,#e5e7eb);font-size:12.5px;min-height:32px}
.psh-addr{flex:0 0 auto;min-width:44px;padding:2px 8px;border:1px solid var(--app-border,#e5e7eb);border-radius:6px;font-weight:700;text-align:center;font-size:12px}
.psh-fxi{color:var(--app-text-dim,#6b7280);display:inline-flex}
.psh-fxv{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;background:transparent!important;padding:0!important;color:inherit}
.psh-wrap{max-height:420px;overflow:auto;outline:0}
.psh-wrap:focus-visible{box-shadow:inset 0 0 0 2px rgba(22,163,74,.4)}
.psh .psh-t{border-collapse:separate;border-spacing:0;font-size:13px;width:max-content;min-width:100%;margin:0}
.psh .psh-t th,.psh .psh-t td{border:0;border-right:1px solid var(--app-border,#e5e7eb);border-bottom:1px solid var(--app-border,#e5e7eb);padding:6px 10px;white-space:nowrap;max-width:320px;overflow:hidden;text-overflow:ellipsis;text-align:left;background:var(--app-bg,#fff)}
.psh .psh-t thead th{position:sticky;top:0;z-index:2;background:var(--app-sidebar,#f8fafc);color:var(--app-text-dim,#6b7280);font-size:11px;font-weight:600;text-align:center;padding:4px 10px}
.psh .psh-t .psh-rh,.psh .psh-t .psh-c0{position:sticky;left:0;z-index:1;background:var(--app-sidebar,#f8fafc);color:var(--app-text-dim,#6b7280);font-size:11px;font-weight:600;text-align:center;min-width:36px;padding:4px 6px}
.psh .psh-t .psh-c0{z-index:3}
.psh .psh-t tr.psh-head td{font-weight:700;background:rgba(22,163,74,.07)}
.psh .psh-t td.psh-n{text-align:right;font-variant-numeric:tabular-nums}
.psh .psh-t td.psh-f{color:#0f5132}
html[data-theme="dark"] .psh .psh-t td.psh-f{color:#86efac}
.psh .psh-t td.psh-err{color:#b91c1c;font-weight:600}
.psh .psh-t td{cursor:cell}
.psh .psh-t td.on{box-shadow:inset 0 0 0 2px #16a34a}
.psh-note{padding:8px 14px;font-size:12.5px;color:var(--app-text-dim,#6b7280);border-top:1px solid var(--app-border,#e5e7eb)}
.psh-acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 14px 12px;border-top:1px solid var(--app-border,#e5e7eb)}
.psh-grow{flex:1}
.psh-msg{display:none;margin:0 14px 12px;padding:8px 11px;border-radius:9px;font-size:12.5px}
.psh-msg.good{display:block;background:rgba(22,163,74,.08);color:#15803d;border:1px solid rgba(22,163,74,.25)}
.psh-msg.bad{display:block;background:rgba(220,38,38,.08);color:#b91c1c;border:1px solid rgba(220,38,38,.25)}
.psh-bad{margin:8px 0;padding:9px 12px;border-radius:9px;background:rgba(220,38,38,.08);color:#b91c1c;border:1px solid rgba(220,38,38,.25);font-size:13px}
.psh-building pre{display:none!important}
.psh-wait{display:flex;align-items:center;gap:10px;padding:14px 16px;font-size:13px;color:var(--app-text-dim,#6b7280)}
.psh-spin{width:16px;height:16px;border-radius:50%;border:2px solid rgba(22,163,74,.25);border-top-color:#16a34a;animation:pshspin .8s linear infinite}
@keyframes pshspin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.psh-spin{animation:none}}
@media (max-width:600px){.psh-top .psh-b span{display:none}.psh-acts .psh-b[data-psh-a="src"] span,.psh-acts .psh-b[data-psh-a="copy"] span{display:none}.psh-wrap{max-height:360px}}
html[data-theme="dark"] .psh .psh-t td.psh-err,html[data-theme="dark"] .psh-msg.bad,html[data-theme="dark"] .psh-bad{color:#fca5a5}
html[data-theme="dark"] .psh-msg.good,html[data-theme="dark"] .psh-tabs button.on,html[data-theme="dark"] .psh-b:hover,html[data-theme="dark"] .psh-b[aria-pressed="true"]{color:#86efac}
html[data-theme="dark"] .psh .psh-t tr.psh-head td{background:rgba(134,239,172,.08)}
/* pak-91: editing */
.psh .psh-t td.is-edit{padding:0;box-shadow:inset 0 0 0 2px #16a34a}
.psh .psh-in{display:block;width:100%;min-width:120px;height:100%;min-height:30px;box-sizing:border-box;padding:6px 10px;border:0;outline:0;background:var(--app-bg,#fff);color:inherit;font:inherit;font-size:13px}
.psh-ed{font-size:12px;color:#b45309}
.psh-ed[hidden]{display:none}
.psh-link{border:0;background:transparent;padding:0;color:#2563eb;font:inherit;font-weight:600;cursor:pointer;text-decoration:underline}
.psh-tt .psh-ed{margin-top:1px}
html[data-theme="dark"] .psh-ed{color:#fbbf24}
html[data-theme="dark"] .psh-link{color:#93c5fd}
@media (max-width:600px){.psh-acts .psh-b[data-psh-a="row"] span,.psh-acts .psh-b[data-psh-a="undo"] span{display:none}}
