* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1300px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin: 20px;
    min-height: 550px;
}

/* Sidebar / Formulário */
.sidebar {
    width: 30%;
    background-color: #ffffff;
    padding: 40px;
    border-right: 1px solid #e1e4e8;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 30px;
}

.sidebar-header h2 {
    color: #15479B;
    font-size: 24px;
    margin-bottom: 10px;
}

.sidebar-header p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

#signature-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Animações de Input */
.input-group {
    position: relative;
    width: 100%;
}

.input-group input {
    width: 100%;
    padding: 16px 12px 10px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    background: transparent;
    transition: border-color 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.input-group input:focus {
    border-color: #15479B;
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 15px;
    color: #9ca3af;
    pointer-events: none;
    transition: 0.2s ease all;
    background-color: #ffffff;
    padding: 0 4px;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 12px;
    color: #15479B;
    font-weight: 600;
}

/* Botão */
.btn-primary {
    background-color: #15479B;
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background-color: #0f3472;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Área de Preview */
.preview-section {
    width: 70%;
    background-color: #fafbfc;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
}

.preview-card {
    width: fit-content;
    max-width: 100%;
}

.preview-card h3 {
    margin-bottom: 20px;
    color: #4b5563;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.preview-container {
    background-color: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: inline-block; /* Substitui flex para garantir o encapsulamento do conteudo */
    min-width: max-content;
}

/* Toast */
.toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #10b981;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: bottom 0.4s ease;
    z-index: 1000;
}

.toast.show {
    bottom: 30px;
}

/* Responsividade */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }
    .sidebar, .preview-section {
        width: 100%;
    }
    .sidebar {
        border-right: none;
        border-bottom: 1px solid #e1e4e8;
        padding: 30px 20px;
    }
    .preview-section {
        padding: 30px 20px;
    }
    .preview-container {
        padding: 15px;
        overflow-x: auto;
    }
}
