.siged-preview-frame-wrap {
  width: 100%;
  height: min(74vh, 720px);
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.siged-preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.siged-word-scroll {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 26px;
  background: #eef2f5;
  color: #172b38;
  -webkit-overflow-scrolling: touch;
}

.siged-word-page {
  width: min(900px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 44px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  font-family: Arial, sans-serif;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.siged-word-page h1,
.siged-word-page h2,
.siged-word-page h3,
.siged-word-page h4 { color: #173b5e; }
.siged-word-page table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.siged-word-page th,
.siged-word-page td { border: 1px solid #9aa7b2; padding: 7px; text-align: left; vertical-align: top; color: #172b38; background: #fff; }
.siged-word-page img { max-width: 100%; height: auto; }
.siged-word-page ul,
.siged-word-page ol { padding-left: 24px; }

.siged-excel-view { height:100%; display:flex; flex-direction:column; background:#fff; color:#172b38; }
.siged-excel-tabs { display:flex; gap:6px; padding:9px; overflow-x:auto; border-bottom:1px solid #dce3ea; background:#eef2f5; }
.siged-excel-tab { white-space:nowrap; min-height:36px; padding:7px 11px!important; border-radius:9px!important; box-shadow:none!important; }
.siged-excel-tab.active { background:#173b5e!important; color:#fff!important; }
.siged-excel-table-wrap { flex:1; overflow:auto; -webkit-overflow-scrolling:touch; }
.siged-excel-table { min-width:max-content; border-collapse:collapse; font-family:Arial,sans-serif; font-size:.8rem; }
.siged-excel-table th,.siged-excel-table td { min-width:90px; max-width:320px; padding:7px 9px; border:1px solid #ccd5dd; color:#172b38; background:#fff; white-space:pre-wrap; overflow-wrap:anywhere; }
.siged-excel-table th { position:sticky; top:0; z-index:2; background:#173b5e!important; color:#fff!important; }
.siged-excel-table tr:nth-child(even) td { background:#f7f9fb; }
.siged-excel-note { margin:0; padding:7px 10px; background:#fff8dc; color:#664a00; font-size:.76rem; }

@media (max-width: 760px) {
  .siged-preview-frame-wrap { height: 70vh; }
  .siged-word-scroll { padding: 8px; }
  .siged-word-page { padding: 20px; box-shadow: none; }
}

.siged-document-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}
.siged-document-head h3{margin:0;min-width:0;overflow-wrap:anywhere}
.siged-document-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px;flex-wrap:wrap}
.siged-mobile-pdf-fallback{height:100%;display:grid;place-items:center;align-content:center;gap:10px;padding:28px;text-align:center;color:#243746;background:linear-gradient(145deg,#f7f8fa,#eef1f4)}
.siged-mobile-pdf-fallback h3,.siged-mobile-pdf-fallback p{margin:0}
.siged-mobile-pdf-fallback p{max-width:440px;color:#64717d;line-height:1.45}
.siged-mobile-pdf-icon{font-size:3.2rem}
.siged-mobile-pdf-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;margin-top:5px}

@media (max-width:760px){
  .siged-document-modal{width:calc(100vw - 18px)!important;max-height:92dvh!important;padding:14px!important;border-radius:18px!important}
  .siged-document-head{align-items:flex-start}
  .siged-document-head h3{font-size:1rem;line-height:1.25}
  .siged-preview-frame-wrap{height:58dvh;min-height:320px;border-radius:12px}
  .siged-document-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));position:sticky;bottom:0;padding-top:8px;background:var(--card,#fff);z-index:2}
  .siged-document-actions button{width:100%;min-width:0;min-height:44px;padding:8px 6px!important}
  .siged-mobile-pdf-actions{display:grid;grid-template-columns:1fr 1fr;width:min(100%,320px)}
}
