:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    min-height: 100vh;
}

.app-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.controls-panel {
    width: 340px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header h2 {
    font-size: 1.35rem;
    margin: 0 0 6px;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 16px;
    line-height: 1.4;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    box-sizing: border-box;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Document Paper Layout */
.preview-panel {
    flex: 1;
    background: #f1f5f9;
    padding: 40px;
    display: flex;
    justify-content: center;
    overflow-y: auto;
}

.doc-wrapper {
    background: #ffffff;
    width: 100%;
    max-width: 800px;
    min-height: 1050px;
    padding: 60px 50px;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.doc-header {
    text-align: center;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.doc-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    margin: 0 0 6px;
    color: #0f172a;
}

.doc-subtitle {
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #64748b;
    margin: 0;
}

.doc-body {
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
    text-align: justify;
}

.doc-body p {
    margin-bottom: 16px;
}

.doc-body h3 {
    font-size: 15px;
    color: #0f172a;
    margin: 20px 0 8px;
    text-transform: uppercase;
}

.signatures-section {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    gap: 40px;
}

.sig-block {
    flex: 1;
    font-size: 13px;
    color: #334155;
    word-break: break-word;
    min-width: 0;
}

.sig-line {
    border-top: 1px solid #94a3b8;
    margin-bottom: 12px;
}

.doc-footer {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: 40px;
}

@media print {
    .hide-in-pdf { display: none !important; }
    .preview-panel { padding: 0; background: #fff; }
    .doc-wrapper { box-shadow: none; padding: 30px; width: 100%; }
}
