Refactor PDF reset to restore original document state using a new OriginalPdfBase64 variable and async logic. Redesign app.css with a lighter color palette, CSS variables, and updated styles for buttons, overlays, modals, and inputs for a cleaner, more accessible UI. Adjust signature and text overlay colors in pdfInterop.js for better contrast and consistency.
228 lines
4.3 KiB
CSS
228 lines
4.3 KiB
CSS
:root {
|
|
--bg: #f6f7fb;
|
|
--bg-strong: #eef2fb;
|
|
--text: #0f172a;
|
|
--muted: #475569;
|
|
--border: #e2e8f0;
|
|
--shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
|
|
--card: #ffffff;
|
|
--accent: #2563eb;
|
|
--accent-strong: #1d4ed8;
|
|
--accent-soft: #e8efff;
|
|
--danger: #dc2626;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
|
|
background: radial-gradient(120% 120% at 10% 20%, #ffffff 0%, #f3f6ff 45%, #eef2fb 80%);
|
|
color: var(--text);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.main-layout {
|
|
min-height: 100vh;
|
|
}
|
|
|
|
.top-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 14px 24px;
|
|
background: var(--card);
|
|
border-bottom: 1px solid var(--border);
|
|
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
|
|
}
|
|
|
|
.top-bar .brand {
|
|
font-weight: 800;
|
|
letter-spacing: 0.4px;
|
|
}
|
|
|
|
.content {
|
|
padding: 28px 32px 40px;
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 16px;
|
|
align-items: center;
|
|
}
|
|
|
|
h1 {
|
|
margin: 0 0 10px;
|
|
letter-spacing: 0.2px;
|
|
}
|
|
|
|
.controls {
|
|
display: flex;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
margin-bottom: 14px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn {
|
|
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
|
|
color: #ffffff;
|
|
border: none;
|
|
padding: 10px 14px;
|
|
border-radius: 10px;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
|
|
box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
|
|
}
|
|
|
|
.btn:hover:not(:disabled) {
|
|
transform: translateY(-1px);
|
|
filter: brightness(1.02);
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.45;
|
|
cursor: not-allowed;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.btn.secondary {
|
|
background: var(--accent-soft);
|
|
color: var(--accent-strong);
|
|
border: 1px solid var(--border);
|
|
box-shadow: none;
|
|
}
|
|
|
|
.drop-hint {
|
|
padding: 26px;
|
|
border: 1px dashed var(--border);
|
|
border-radius: 14px;
|
|
text-align: center;
|
|
color: var(--muted);
|
|
background: #ffffff;
|
|
width: min(1100px, 100%);
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.error-banner {
|
|
margin-top: 10px;
|
|
padding: 12px 14px;
|
|
border-radius: 10px;
|
|
background: #fff1f2;
|
|
border: 1px solid #fecdd3;
|
|
color: #b91c1c;
|
|
}
|
|
|
|
.document-shell {
|
|
position: relative;
|
|
margin-top: 14px;
|
|
border-radius: 14px;
|
|
overflow: hidden;
|
|
box-shadow: var(--shadow);
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
|
|
canvas {
|
|
display: block;
|
|
width: 100%;
|
|
height: auto;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.overlay {
|
|
position: absolute;
|
|
border: 1px dashed var(--accent);
|
|
border-radius: 10px;
|
|
padding: 8px;
|
|
background: rgba(255, 255, 255, 0.96);
|
|
box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
|
|
user-select: none;
|
|
touch-action: none;
|
|
}
|
|
|
|
.overlay.signature img {
|
|
display: block;
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
}
|
|
|
|
.overlay-controls {
|
|
position: absolute;
|
|
top: -44px;
|
|
right: 0;
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|
|
|
|
.overlay-btn {
|
|
background: #ffffff;
|
|
color: var(--accent-strong);
|
|
border: 1px solid var(--accent);
|
|
border-radius: 8px;
|
|
padding: 6px 10px;
|
|
cursor: pointer;
|
|
box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
|
|
}
|
|
|
|
.overlay-input {
|
|
border: 1px solid var(--border);
|
|
background: #ffffff;
|
|
color: var(--text);
|
|
font-size: 18px;
|
|
padding: 6px 8px;
|
|
min-width: 180px;
|
|
border-radius: 8px;
|
|
outline: none;
|
|
}
|
|
|
|
.paging {
|
|
margin-top: 14px;
|
|
display: flex;
|
|
gap: 10px;
|
|
align-items: center;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.modal-backdrop {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(15, 23, 42, 0.35);
|
|
backdrop-filter: blur(3px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 2000;
|
|
}
|
|
|
|
.modal {
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
padding: 18px;
|
|
min-width: 760px;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.modal-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-top: 12px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.modal canvas {
|
|
background: #ffffff;
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.spacer {
|
|
flex: 1;
|
|
}
|