* { box-sizing: border-box; }
body { margin:0; font-family: 'Inter', system-ui, Arial, sans-serif; background:#0e1013; color:#e6e8ec; -webkit-font-smoothing:antialiased; }
a { color:#5aa2ff; text-decoration:none; }
a:hover { text-decoration:underline; }
h1,h2,h3 { font-weight:600; line-height:1.25; }
p { line-height:1.55; }

.app-shell { min-height:100vh; display:flex; flex-direction:column; }
.app-header { backdrop-filter: blur(8px); background:#161a20cc; border-bottom:1px solid #262c35; padding:0.9rem 1.2rem; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:10; }
.logo { font-weight:600; letter-spacing:0.5px; font-size:1.05rem; }
.admin-link { font-size:0.9rem; padding:0.4rem 0.8rem; border:1px solid #2d3742; border-radius:6px; background:#1d232b; }
.admin-link:hover { background:#28303a; }

.main { flex:1; width:100%; max-width:1100px; margin:0 auto; padding:1.4rem 1.2rem 3rem; }
.footer { text-align:center; padding:1.4rem 1rem; font-size:0.75rem; color:#6d7885; border-top:1px solid #1f262e; background:#121519; }

.panel { background:#161b22; border:1px solid #242c36; border-radius:12px; padding:1.2rem 1.3rem 1.6rem; margin-bottom:1.6rem; box-shadow:0 4px 16px -8px #000a; }
.panel h1, .panel h2 { margin-top:0; }

label { font-size:0.8rem; font-weight:500; color:#cbd5e1; display:inline-block; }
input[type=text], input[type=email] { width:100%; background:#10151b; border:1px solid #2a3542; color:#e6e8ec; border-radius:8px; padding:0.65rem 0.75rem; font:inherit; outline:none; transition:border .2s, background .2s; }
input[type=text]:focus, input[type=email]:focus { border-color:#4d8dff; background:#141b23; }

.form-row { display:flex; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
.form-row > label { flex:1 1 240px; }

.nda-form { background:#161b22; border:1px solid #242c36; padding:1.2rem 1.3rem 2rem; border-radius:14px; box-shadow:0 6px 20px -10px #000c; }

.pdf-wrapper { max-height:65vh; overflow:auto; border:1px solid #25303b; border-radius:10px; background:#fff; color:#111; padding:0; box-shadow:0 4px 18px -8px #000d; }
.pdf-page { padding:1.4rem 1.6rem 2.2rem; font-size:0.82rem; line-height:1.4; font-family:"Times New Roman", Times, serif; }
.pdf-page h1 { font-size:1.05rem; text-align:center; text-transform:uppercase; letter-spacing:0.5px; margin:0 0 1rem; }
.pdf-page h2 { font-size:0.85rem; margin:1.05rem 0 0.35rem; letter-spacing:0.2px; }
.pdf-page p { margin:0 0 0.6rem; }
.pdf-page .ack { font-style:italic; font-weight:600; margin-top:1.2rem; }

.signature-block { margin-top:1.4rem; padding-top:1rem; border-top:1px solid #ccc; font-size:0.72rem; font-family:'Inter', sans-serif; }
.sig-label { font-weight:600; margin-bottom:0.4rem; }
.sig-line { position:relative; background:#fafafa; border:1px dashed #aaa; border-radius:6px; height:170px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.sig-line:hover { background:#f1f1f1; }
.sig-line canvas { width:100%; height:100%; display:block; }
.sig-placeholder { color:#666; font-size:0.85rem; letter-spacing:0.5px; }
.clear-btn { position:absolute; bottom:6px; right:8px; background:#d62828; color:#fff; border:none; font-size:0.65rem; padding:0.35rem 0.6rem; border-radius:4px; cursor:pointer; opacity:0.85; }
.clear-btn:hover { opacity:1; }
.sig-meta { margin-top:0.5rem; display:flex; gap:0.6rem; color:#444; font-size:0.68rem; }

.actions { margin-top:1rem; }
button.primary { background:#2563eb; border:1px solid #1d4ed8; color:#fff; padding:0.8rem 1.2rem; font:600 0.85rem 'Inter', sans-serif; border-radius:10px; cursor:pointer; letter-spacing:0.3px; box-shadow:0 4px 14px -6px #1e3a8a; }
button.primary:hover:not(:disabled) { background:#1d4ed8; }
button.primary:disabled { opacity:0.45; cursor:not-allowed; }

.status { margin-top:0.8rem; font-size:0.75rem; min-height:1.2rem; color:#7dd3fc; }
.notice { background:#2c2f36; padding:1rem 1.2rem; border:1px solid #404751; border-radius:10px; font-size:0.85rem; }
.hidden { display:none !important; }
.req { color:#ef4444; }

/* Admin */
.inline-form { display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-end; margin:0.6rem 0 0.8rem; }
.inline-form label { flex:1 1 240px; }
.generated-link { background:#0f172a; border:1px solid #1e293b; padding:0.6rem 0.75rem; border-radius:8px; font-size:0.72rem; word-break:break-all; }
.table { width:100%; border-collapse:collapse; font-size:0.7rem; }
.table th, .table td { border:1px solid #24303c; padding:0.45rem 0.5rem; vertical-align:top; }
.table th { background:#1d2430; text-align:left; font-weight:600; letter-spacing:0.4px; }
.table tr:nth-child(even) { background:#182029; }
.url-field { width:100%; background:#0f172a; border:1px solid #263341; color:#d1d5db; font-size:0.65rem; padding:0.3rem 0.4rem; border-radius:4px; }
.copy-btn { background:#334155; color:#fff; border:1px solid #475569; padding:0.35rem 0.6rem; font-size:0.6rem; border-radius:4px; cursor:pointer; }
.copy-btn:hover { background:#475569; }
.small-note { font-size:0.6rem; color:#74808f; margin-top:0.6rem; }
.auth-panel { max-width:640px; margin:1.2rem auto; }
.secondary-btn { background:#374151; color:#fff; border:1px solid #4b5563; padding:0.65rem 0.9rem; font:500 0.7rem 'Inter', sans-serif; border-radius:8px; cursor:pointer; }
.secondary-btn:hover { background:#4b5563; }

@media (max-width:800px){
	.pdf-wrapper { max-height:55vh; }
	.form-row { flex-direction:column; }
	.pdf-page { font-size:0.74rem; }
	.sig-line { height:150px; }
}

@media (max-width:520px){
	.app-header { flex-direction:column; align-items:flex-start; gap:0.4rem; }
	.panel, .nda-form { padding:1rem 1rem 1.4rem; }
	button.primary { width:100%; }
}
