/* FileShare UI · css/viewers.css · Full screen, drawings, archives, e-mail and text viewers. Loaded in the order listed in index.html. */
/* full-screen preview */
.preview.fullscreen { position: fixed; inset: 0; z-index: 95; width: 100vw; height: 100vh; }
.workspace.has-preview .preview.fullscreen { grid-column: auto; }

/* drawing viewer (DWG / DXF), CAD-style */
.cadview { position: relative; height: 100%; min-height: 0; overflow: hidden; background: #1b1d2e; }
.cadview.light { background: #fff; }
.cadview .viewer-canvas { position: absolute !important; inset: 0; } /* dxf-viewer sets position:relative inline */
.cad-tools { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 2px; padding: 5px;
  background: #23263a; border: 1px solid #353a55; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.cadview.light .cad-tools { background: #fff; border-color: var(--line); }
.cad-tools button { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 32px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: #C9D1E4; cursor: pointer; font-size: 12.5px; gap: 4px; }
.cadview.light .cad-tools button { color: var(--ink); }
.cad-tools button:hover { background: #2f3350; }
.cadview.light .cad-tools button:hover { background: var(--hover); }
.cad-tools button[aria-pressed="true"] { background: #1f6fbf; color: #fff; }
.cad-tools .ic { width: 18px; height: 18px; }
.cad-tools .sep { width: 1px; background: #3a3f5c; margin: 4px 3px; }
.cad-status { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; gap: 16px; align-items: center; padding: 6px 14px;
  background: #23263a; color: #AEB6CC; font-size: 12.5px; border-top: 1px solid #353a55; }
.cadview.light .cad-status { background: #F3F5F7; color: var(--muted); border-color: var(--line); }
.cad-status b { color: #fff; font-weight: 500; }
.cadview.light .cad-status b { color: var(--ink); }
.cad-status .right { margin-left: auto; }
.cadview .layer-panel { top: 60px; right: 12px; background: #23263a; color: #D5DBEA; border-color: #353a55; }
.cadview.light .layer-panel { background: #fff; color: var(--ink); border-color: var(--line); }
.cad-progress { position: absolute; inset: 0; display: grid; place-items: center; color: #C9D1E4; z-index: 3; }

/* archive / email / structured text */
.doc-pane { overflow: auto; height: 100%; background: #fff; padding: 12px 14px; }
.doc-pane .grid td, .doc-pane .grid th { text-align: left; }
.mail-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; display: grid; gap: 3px; font-size: 13.5px; }
.mail-head .subj { font-size: 17px; font-weight: 500; margin-bottom: 4px; }
.mail-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.55; }
.md-body { max-width: 820px; line-height: 1.6; font-size: 14.5px; }
.md-body h1, .md-body h2, .md-body h3 { margin: 18px 0 8px; font-weight: 500; }
.md-body code { background: var(--line-soft); padding: 1px 5px; border-radius: 3px; }
.md-body pre { background: #F4F6F8; padding: 10px; border-radius: 4px; overflow: auto; }
.hexview { margin: 0; padding: 12px 14px; background: #fff; font: 12.5px/1.5 ui-monospace, Consolas, monospace; white-space: pre; overflow: auto; height: 100%; color: #1F2933; }
.hexview .off { color: #8A96A3; } .hexview .asc { color: #2F6E8F; }
.report-filters { flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; }
.report-filters label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.report-filters select, .report-filters input { font: inherit; font-size: 13px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.report-filters input[type="search"] { width: 220px; }
.report-filters .quick { display: flex; gap: 4px; }
.report-count { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; background: #F8F9FA; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.pager-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-left: 12px; }
.evt { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: var(--line-soft); white-space: nowrap; }
.evt-auth { background: #E3F4EC; color: #155E3E; } .evt-folder { background: #FFF3DC; color: #7A5200; }
.evt-document { background: #E3EDF8; color: #1F3D5E; } .evt-version { background: #FDE8D7; color: #8A4B12; }
.evt-preview { background: #EEF0FF; color: #3A3F8F; } .evt-sharing { background: #E0F5F3; color: #145F57; }
.evt-search { background: #F1EAFB; color: #4F2F6E; } .evt-admin { background: #F7E4E0; color: #7A271C; }
