/* Contract Generator page — standalone layout linked from contract-generator.php after css/geral.css. */

html, body { overflow-x: hidden; overflow-y: auto; min-height: 100vh; background: #383431; color: #fff; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; margin: 0; padding: 0; }
.contract-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
.contract-header { text-align: center; margin-bottom: 32px; }
.contract-header h1 { font-size: 2.2rem; color: #fff; margin-bottom: 12px; }
.contract-header p { color: #aaa; max-width: 700px; margin: 0 auto; font-size: 1rem; line-height: 1.6; }
.badge-tag { display: inline-block; background: rgba(37, 99, 235, 0.2); color: #93c5fd; border: 1px solid rgba(37, 99, 235, 0.4); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; margin-bottom: 12px; }
.contract-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .contract-grid { grid-template-columns: 1fr; } }
.panel-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 28px; backdrop-filter: blur(8px); }
.panel-title { font-size: 1.25rem; margin-top: 0; margin-bottom: 20px; color: #fff; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #ccc; margin-bottom: 6px; }
.form-control { width: 100%; box-sizing: border-box; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 12px 14px; color: #fff; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.form-control:focus { border-color: #2563eb; }
textarea.form-control { min-height: 90px; resize: vertical; }
.template-selector { display: flex; gap: 12px; margin-bottom: 20px; }
.type-btn { flex: 1; min-height: 44px; padding: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; color: #aaa; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; }
.type-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.4); }

.preview-doc { background: #ffffff; color: #111827; padding: 32px; border-radius: 12px; font-family: 'Times New Roman', Times, serif; font-size: 13px; line-height: 1.6; max-height: 600px; overflow-y: auto; border: 1px solid #d1d5db; }
.preview-doc h2 { font-size: 18px; text-align: center; margin-bottom: 20px; color: #111; border-bottom: 2px solid #2563eb; padding-bottom: 8px; }
.preview-doc h3 { font-size: 14px; margin-top: 16px; margin-bottom: 6px; color: #1f2937; }
.preview-doc p { margin-bottom: 12px; text-align: justify; }

.signature-area { margin-top: 20px; padding: 16px; background: rgba(0,0,0,0.2); border-radius: 12px; border: 1px dashed rgba(255,255,255,0.2); }
.signature-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.signature-label-row label { font-size: 0.85rem; font-weight: 600; color: #ccc; }
.sig-status { font-size: 0.75rem; color: #34d399; }
.canvas-wrapper { background: #fff; border-radius: 8px; overflow: hidden; position: relative; width: 100%; height: 140px; margin-bottom: 10px; touch-action: none; }
#sig-canvas { width: 100%; height: 100%; cursor: crosshair; }
.sig-actions { display: flex; justify-content: space-between; align-items: center; }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 0.85rem; border-radius: 6px; border: none; font-weight: 600; cursor: pointer; }
.btn-secondary { background: rgba(255,255,255,0.1); color: #ccc; }
.btn-secondary:hover { background: rgba(255,255,255,0.2); color: #fff; }
.btn-primary { background: #2563eb; color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,0.3); }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #059669; color: #fff; width: 100%; min-height: 48px; font-size: 1rem; margin-top: 20px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-success:hover { background: #047857; }
.sig-timestamp { font-size: 0.75rem; color: #888; }

.back-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 28px; color: #aaa; text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: #fff; }
